DART  6.10.1
dart::dynamics::AccessoryNode< NodeType > Class Template Reference

AccessoryNode provides an interface for Nodes to get their index within the list of Nodes, as well as detach and reattach. More...

#include <Node.hpp>

Public Member Functions

virtual ~AccessoryNode ()=default
 Virtual destructor. More...
 
std::size_t getIndexInBodyNode () const
 Get the index of this Node within its BodyNode. More...
 
std::size_t getIndexInSkeleton () const
 Get the index of this Node within its Skeleton. More...
 
std::size_t getIndexInTree () const
 Get the index of this Node within its tree. More...
 
std::size_t getTreeIndex () const
 Get the index of this Node's tree within its Skeleton. More...
 
void remove ()
 Stage the Node for removal. More...
 
void reattach ()
 Undo the effectos of calling remove(). More...
 

Protected Member Functions

 AccessoryNode ()=default
 Prevent a non-inheriting class from constructing one. More...
 

Detailed Description

template<class NodeType>
class dart::dynamics::AccessoryNode< NodeType >

AccessoryNode provides an interface for Nodes to get their index within the list of Nodes, as well as detach and reattach.

This uses CRTP to get around the diamond of death problem.

Constructor & Destructor Documentation

◆ ~AccessoryNode()

template<class NodeType >
virtual dart::dynamics::AccessoryNode< NodeType >::~AccessoryNode ( )
virtualdefault

Virtual destructor.

◆ AccessoryNode()

template<class NodeType >
dart::dynamics::AccessoryNode< NodeType >::AccessoryNode ( )
protecteddefault

Prevent a non-inheriting class from constructing one.

Member Function Documentation

◆ getIndexInBodyNode()

template<class NodeType >
std::size_t dart::dynamics::AccessoryNode< NodeType >::getIndexInBodyNode

Get the index of this Node within its BodyNode.

◆ getIndexInSkeleton()

template<class NodeType >
std::size_t dart::dynamics::AccessoryNode< NodeType >::getIndexInSkeleton

Get the index of this Node within its Skeleton.

◆ getIndexInTree()

template<class NodeType >
std::size_t dart::dynamics::AccessoryNode< NodeType >::getIndexInTree

Get the index of this Node within its tree.

◆ getTreeIndex()

template<class NodeType >
std::size_t dart::dynamics::AccessoryNode< NodeType >::getTreeIndex

Get the index of this Node's tree within its Skeleton.

◆ reattach()

template<class NodeType >
void dart::dynamics::AccessoryNode< NodeType >::reattach

Undo the effectos of calling remove().

The Node will continue to exist, even when all the strong references to it expire.

◆ remove()

template<class NodeType >
void dart::dynamics::AccessoryNode< NodeType >::remove

Stage the Node for removal.

When all strong references to the Node expire, the Node will be removed from its BodyNode and deleted.