Choreonoid  1.8
Public Types | Public Member Functions | Protected Attributes | List of all members
cnoid::LinkTraverse Class Reference

#include <LinkTraverse.h>

Inheritance diagram for cnoid::LinkTraverse:
cnoid::LinkPath

Public Types

typedef std::vector< Link * > container
 
typedef container::iterator iterator
 
typedef container::const_iterator const_iterator
 

Public Member Functions

 LinkTraverse ()
 
 LinkTraverse (int size)
 
 LinkTraverse (Link *root, bool doUpward=false, bool doDownward=true)
 
 LinkTraverse (const LinkTraverse &org)
 
virtual ~LinkTraverse ()
 
void clear ()
 
virtual void find (Link *root, bool doUpward=false, bool doDownward=true)
 
void append (Link *link, bool isDownward=true)
 
bool remove (Link *link)
 
LinkprependRootAdjacentLinkToward (Link *link)
 
int numLinks () const
 
bool empty () const
 
std::size_t size () const
 
LinkrootLink () const
 
Linklink (int index) const
 
Linkoperator[] (int index) const
 
const std::vector< Link * > & links () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool isDownward (int index) const
 
void calcForwardKinematics (bool calcVelocity=false, bool calcAcceleration=false) const
 

Protected Attributes

std::vector< Link * > links_
 
int numUpwardConnections
 

Member Typedef Documentation

◆ const_iterator

typedef container::const_iterator cnoid::LinkTraverse::const_iterator

◆ container

typedef std::vector<Link*> cnoid::LinkTraverse::container

◆ iterator

typedef container::iterator cnoid::LinkTraverse::iterator

Constructor & Destructor Documentation

◆ LinkTraverse() [1/4]

LinkTraverse::LinkTraverse ( )

◆ LinkTraverse() [2/4]

LinkTraverse::LinkTraverse ( int  size)

◆ LinkTraverse() [3/4]

LinkTraverse::LinkTraverse ( Link root,
bool  doUpward = false,
bool  doDownward = true 
)

◆ LinkTraverse() [4/4]

LinkTraverse::LinkTraverse ( const LinkTraverse org)

◆ ~LinkTraverse()

LinkTraverse::~LinkTraverse ( )
virtual

Member Function Documentation

◆ append()

void LinkTraverse::append ( Link link,
bool  isDownward = true 
)

◆ begin() [1/2]

iterator cnoid::LinkTraverse::begin ( )
inline

◆ begin() [2/2]

const_iterator cnoid::LinkTraverse::begin ( ) const
inline

◆ calcForwardKinematics()

void LinkTraverse::calcForwardKinematics ( bool  calcVelocity = false,
bool  calcAcceleration = false 
) const

◆ clear()

void LinkTraverse::clear ( )

◆ empty()

bool cnoid::LinkTraverse::empty ( ) const
inline

◆ end() [1/2]

iterator cnoid::LinkTraverse::end ( )
inline

◆ end() [2/2]

const_iterator cnoid::LinkTraverse::end ( ) const
inline

◆ find()

void LinkTraverse::find ( Link root,
bool  doUpward = false,
bool  doDownward = true 
)
virtual

◆ isDownward()

bool cnoid::LinkTraverse::isDownward ( int  index) const
inline

If the connection from the queried link to the next link is downward (forward) direction, the method returns true. Otherwise, returns false. The range of valid indices is 0 to (numLinks() - 2).

◆ link()

Link* cnoid::LinkTraverse::link ( int  index) const
inline

◆ links()

const std::vector<Link*>& cnoid::LinkTraverse::links ( ) const
inline

◆ numLinks()

int cnoid::LinkTraverse::numLinks ( ) const
inline

◆ operator[]()

Link* cnoid::LinkTraverse::operator[] ( int  index) const
inline

◆ prependRootAdjacentLinkToward()

Link * LinkTraverse::prependRootAdjacentLinkToward ( Link link)
Returns
prepended link

◆ remove()

bool LinkTraverse::remove ( Link link)

◆ rootLink()

Link* cnoid::LinkTraverse::rootLink ( ) const
inline

◆ size()

std::size_t cnoid::LinkTraverse::size ( ) const
inline

Member Data Documentation

◆ links_

std::vector<Link*> cnoid::LinkTraverse::links_
protected

◆ numUpwardConnections

int cnoid::LinkTraverse::numUpwardConnections
protected

The documentation for this class was generated from the following files: