iDynTree::LinkTraversalsCache class

Link traversal cache, store a traversal for each link in the model.

Class that stores a traversal for each link in the model. It actually computes the traversal on the first time that a given traversal is requested

Constructors, destructors, conversion operators

LinkTraversalsCache()
Default constructur.
~LinkTraversalsCache()
Default destructor.

Public functions

void resize(unsigned int nrOfLinks)
Resize the cache to contains the specified number of Traversals.
void resize(const iDynTree::Model& model)
Resize the cache to contains the number of Traversals for the specified model.
auto getTraversalWithLinkAsBase(const iDynTree::Model& model, const iDynTree::LinkIndex linkIdx) -> Traversal&
return the traversal for the specified link in the specified model

Function documentation

void iDynTree::LinkTraversalsCache::resize(unsigned int nrOfLinks)

Resize the cache to contains the specified number of Traversals.

Parameters
nrOfLinks number of traversal

void iDynTree::LinkTraversalsCache::resize(const iDynTree::Model& model)

Resize the cache to contains the number of Traversals for the specified model.

Parameters
model the model

Traversal& iDynTree::LinkTraversalsCache::getTraversalWithLinkAsBase(const iDynTree::Model& model, const iDynTree::LinkIndex linkIdx)

return the traversal for the specified link in the specified model

Parameters
model the model
linkIdx the index to be considered as base
Returns the traversal for the specified model link

If the traversal has been cached this function returns the cached traversal otherwise it creates the new traversal, caches it and returns it, thus performin a memory allocation.