DART  6.6.2
dart::dynamics::Detachable Class Referenceabstract

The Detachable class is a special case of the Entity base class. More...

#include <Entity.hpp>

Inheritance diagram for dart::dynamics::Detachable:
dart::dynamics::Entity dart::common::Subject dart::dynamics::SimpleFrame dart::gui::osg::InteractiveFrame dart::gui::osg::InteractiveTool

Public Types

using EntitySignal = common::Signal< void(const Entity *)>
 
using FrameChangedSignal = common::Signal< void(const Entity *, const Frame *_oldFrame, const Frame *_newFrame)>
 
using NameChangedSignal = common::Signal< void(const Entity *, const std::string &_oldName, const std::string &_newName)>
 

Public Member Functions

 Detachable (Frame *_refFrame, bool _quiet)
 Constructor. More...
 
virtual void setParentFrame (Frame *_newParentFrame)
 Allows the user to change the parent Frame of this Entity. More...
 
virtual const std::string & setName (const std::string &_name)=0
 Set name. More...
 
virtual const std::string & getName () const =0
 Return the name of this Entity. More...
 
FramegetParentFrame ()
 Get the parent (reference) frame of this Entity. More...
 
const FramegetParentFrame () const
 Get the parent (reference) frame of this Entity. More...
 
bool descendsFrom (const Frame *_someFrame) const
 True if and only if this Entity depends on (i.e. More...
 
bool isFrame () const
 True iff this Entity is also a Frame. More...
 
bool isQuiet () const
 Returns true if this Entity is set to be quiet. More...
 
virtual void notifyTransformUpdate ()
 Notify the transformation update of this Entity that its parent Frame's pose is needed. More...
 
virtual void dirtyTransform ()
 Notify the transformation update of this Entity that its parent Frame's pose is needed. More...
 
bool needsTransformUpdate () const
 Returns true iff a transform update is needed for this Entity. More...
 
virtual void notifyVelocityUpdate ()
 Notify the velocity update of this Entity that its parent Frame's velocity is needed. More...
 
virtual void dirtyVelocity ()
 Notify the velocity update of this Entity that its parent Frame's velocity is needed. More...
 
bool needsVelocityUpdate () const
 Returns true iff a velocity update is needed for this Entity. More...
 
virtual void notifyAccelerationUpdate ()
 Notify the acceleration of this Entity that its parent Frame's acceleration is needed. More...
 
virtual void dirtyAcceleration ()
 Notify the acceleration of this Entity that its parent Frame's acceleration is needed. More...
 
bool needsAccelerationUpdate () const
 Returns true iff an acceleration update is needed for this Entity. More...
 

Protected Types

enum  ConstructFrameTag { ConstructFrame }
 Used when constructing a Frame class, because the Frame constructor will take care of setting up the parameters you pass into it. More...
 
enum  ConstructAbstractTag { ConstructAbstract }
 Used when constructing a pure abstract class, because calling the Entity constructor is just a formality. More...
 

Protected Member Functions

 Detachable ()
 Constructor for inheriting classes, so they do not need to fill in the arguments. More...
 
virtual void changeParentFrame (Frame *_newParentFrame)
 Used by derived classes to change their parent frames. More...
 
void sendDestructionNotification () const
 Send a destruction notification to all Observers. More...
 
void addObserver (Observer *_observer) const
 Add an Observer to the list of Observers. More...
 
void removeObserver (Observer *_observer) const
 Remove an Observer from the list of Observers. More...
 

Protected Attributes

FramemParentFrame
 Parent frame of this Entity. More...
 
bool mNeedTransformUpdate
 Does this Entity need a Transform update. More...
 
bool mNeedVelocityUpdate
 Does this Entity need a Velocity update. More...
 
bool mNeedAccelerationUpdate
 Does this Entity need an Acceleration update. More...
 
FrameChangedSignal mFrameChangedSignal
 Frame changed signal. More...
 
NameChangedSignal mNameChangedSignal
 Name changed signal. More...
 
EntitySignal mTransformUpdatedSignal
 Transform changed signal. More...
 
EntitySignal mVelocityChangedSignal
 Velocity changed signal. More...
 
EntitySignal mAccelerationChangedSignal
 Acceleration changed signal. More...
 
std::set< Observer * > mObservers
 List of current Observers. More...
 

Slot registers

common::SlotRegister< FrameChangedSignalonFrameChanged
 Slot register for frame changed signal. More...
 
common::SlotRegister< NameChangedSignalonNameChanged
 Slot register for name changed signal. More...
 
common::SlotRegister< EntitySignalonTransformUpdated
 Slot register for transform updated signal. More...
 
common::SlotRegister< EntitySignalonVelocityChanged
 Slot register for velocity updated signal. More...
 
common::SlotRegister< EntitySignalonAccelerationChanged
 Slot register for acceleration updated signal. More...
 
const bool mAmQuiet
 Whether or not this Entity is set to be quiet. More...
 
bool mAmFrame
 Whether or not this Entity is a Frame. More...
 

Detailed Description

The Detachable class is a special case of the Entity base class.

Detachable allows the Entity's reference Frame to be changed arbitrarily by the user.

Member Typedef Documentation

◆ EntitySignal

◆ FrameChangedSignal

using dart::dynamics::Entity::FrameChangedSignal = common::Signal<void(const Entity*, const Frame* _oldFrame, const Frame* _newFrame)>
inherited

◆ NameChangedSignal

using dart::dynamics::Entity::NameChangedSignal = common::Signal<void(const Entity*, const std::string& _oldName, const std::string& _newName)>
inherited

Member Enumeration Documentation

◆ ConstructAbstractTag

Used when constructing a pure abstract class, because calling the Entity constructor is just a formality.

Enumerator
ConstructAbstract 

◆ ConstructFrameTag

Used when constructing a Frame class, because the Frame constructor will take care of setting up the parameters you pass into it.

Enumerator
ConstructFrame 

Constructor & Destructor Documentation

◆ Detachable() [1/2]

dart::dynamics::Detachable::Detachable ( Frame _refFrame,
bool  _quiet 
)
explicit

Constructor.

◆ Detachable() [2/2]

dart::dynamics::Detachable::Detachable ( )
protected

Constructor for inheriting classes, so they do not need to fill in the arguments.

Member Function Documentation

◆ addObserver()

void dart::common::Subject::addObserver ( Observer _observer) const
protectedinherited

Add an Observer to the list of Observers.

◆ changeParentFrame()

void dart::dynamics::Entity::changeParentFrame ( Frame _newParentFrame)
protectedvirtualinherited

Used by derived classes to change their parent frames.

Reimplemented in dart::dynamics::Frame.

◆ descendsFrom()

bool dart::dynamics::Entity::descendsFrom ( const Frame _someFrame) const
inherited

True if and only if this Entity depends on (i.e.

kinematically descends from) _someFrame. If _someFrame is nullptr, this returns true in order to accommodate BodyNodes which always have a nullptr BodyNode as the parent of a root BodyNode.

◆ dirtyAcceleration()

void dart::dynamics::Entity::dirtyAcceleration ( )
virtualinherited

Notify the acceleration of this Entity that its parent Frame's acceleration is needed.

Reimplemented in dart::dynamics::PointMassNotifier, dart::dynamics::Frame, and dart::dynamics::BodyNode.

◆ dirtyTransform()

void dart::dynamics::Entity::dirtyTransform ( )
virtualinherited

Notify the transformation update of this Entity that its parent Frame's pose is needed.

Reimplemented in dart::dynamics::PointMassNotifier, dart::dynamics::Frame, and dart::dynamics::BodyNode.

◆ dirtyVelocity()

void dart::dynamics::Entity::dirtyVelocity ( )
virtualinherited

Notify the velocity update of this Entity that its parent Frame's velocity is needed.

Reimplemented in dart::dynamics::PointMassNotifier, dart::dynamics::Frame, and dart::dynamics::BodyNode.

◆ getName()

virtual const std::string& dart::dynamics::Entity::getName ( ) const
pure virtualinherited

◆ getParentFrame() [1/2]

Frame * dart::dynamics::Entity::getParentFrame ( )
inherited

Get the parent (reference) frame of this Entity.

◆ getParentFrame() [2/2]

const Frame * dart::dynamics::Entity::getParentFrame ( ) const
inherited

Get the parent (reference) frame of this Entity.

◆ isFrame()

bool dart::dynamics::Entity::isFrame ( ) const
inherited

True iff this Entity is also a Frame.

◆ isQuiet()

bool dart::dynamics::Entity::isQuiet ( ) const
inherited

Returns true if this Entity is set to be quiet.

A quiet entity is unknown to its parent Frame. It will not be tracked by its parent; it will not receive notifications from its parent, and it will not be rendered. The advantage to a quiet Entity is that it has less overhead when constructing and deconstructing, which makes it more suitable for temporary objects.

◆ needsAccelerationUpdate()

bool dart::dynamics::Entity::needsAccelerationUpdate ( ) const
inherited

Returns true iff an acceleration update is needed for this Entity.

◆ needsTransformUpdate()

bool dart::dynamics::Entity::needsTransformUpdate ( ) const
inherited

Returns true iff a transform update is needed for this Entity.

◆ needsVelocityUpdate()

bool dart::dynamics::Entity::needsVelocityUpdate ( ) const
inherited

Returns true iff a velocity update is needed for this Entity.

◆ notifyAccelerationUpdate()

void dart::dynamics::Entity::notifyAccelerationUpdate ( )
virtualinherited

Notify the acceleration of this Entity that its parent Frame's acceleration is needed.

◆ notifyTransformUpdate()

void dart::dynamics::Entity::notifyTransformUpdate ( )
virtualinherited

Notify the transformation update of this Entity that its parent Frame's pose is needed.

◆ notifyVelocityUpdate()

void dart::dynamics::Entity::notifyVelocityUpdate ( )
virtualinherited

Notify the velocity update of this Entity that its parent Frame's velocity is needed.

◆ removeObserver()

void dart::common::Subject::removeObserver ( Observer _observer) const
protectedinherited

Remove an Observer from the list of Observers.

◆ sendDestructionNotification()

void dart::common::Subject::sendDestructionNotification ( ) const
protectedinherited

Send a destruction notification to all Observers.

This will cause all Observers to behave as if this Subject has been permanently deleted, so it should only be called when that behavior is desired.

◆ setName()

virtual const std::string& dart::dynamics::Entity::setName ( const std::string &  _name)
pure virtualinherited

Set name.

Some implementations of Entity may make alterations to the name that gets passed in. The final name that this entity will use gets passed back in the return of this function.

Implemented in dart::dynamics::WorldFrame, dart::dynamics::SimpleFrame, dart::dynamics::PointMassNotifier, and dart::dynamics::BodyNode.

◆ setParentFrame()

void dart::dynamics::Detachable::setParentFrame ( Frame _newParentFrame)
virtual

Allows the user to change the parent Frame of this Entity.

Member Data Documentation

◆ mAccelerationChangedSignal

EntitySignal dart::dynamics::Entity::mAccelerationChangedSignal
protectedinherited

Acceleration changed signal.

◆ mAmFrame

bool dart::dynamics::Entity::mAmFrame
privateinherited

Whether or not this Entity is a Frame.

◆ mAmQuiet

const bool dart::dynamics::Entity::mAmQuiet
privateinherited

Whether or not this Entity is set to be quiet.

◆ mFrameChangedSignal

FrameChangedSignal dart::dynamics::Entity::mFrameChangedSignal
protectedinherited

Frame changed signal.

◆ mNameChangedSignal

NameChangedSignal dart::dynamics::Entity::mNameChangedSignal
protectedinherited

Name changed signal.

◆ mNeedAccelerationUpdate

bool dart::dynamics::Entity::mNeedAccelerationUpdate
mutableprotectedinherited

Does this Entity need an Acceleration update.

◆ mNeedTransformUpdate

bool dart::dynamics::Entity::mNeedTransformUpdate
mutableprotectedinherited

Does this Entity need a Transform update.

◆ mNeedVelocityUpdate

bool dart::dynamics::Entity::mNeedVelocityUpdate
mutableprotectedinherited

Does this Entity need a Velocity update.

◆ mObservers

std::set<Observer*> dart::common::Subject::mObservers
mutableprotectedinherited

List of current Observers.

◆ mParentFrame

Frame* dart::dynamics::Entity::mParentFrame
protectedinherited

Parent frame of this Entity.

◆ mTransformUpdatedSignal

EntitySignal dart::dynamics::Entity::mTransformUpdatedSignal
protectedinherited

Transform changed signal.

◆ mVelocityChangedSignal

EntitySignal dart::dynamics::Entity::mVelocityChangedSignal
protectedinherited

Velocity changed signal.

◆ onAccelerationChanged

common::SlotRegister<EntitySignal> dart::dynamics::Entity::onAccelerationChanged
inherited

Slot register for acceleration updated signal.

◆ onFrameChanged

common::SlotRegister<FrameChangedSignal> dart::dynamics::Entity::onFrameChanged
inherited

Slot register for frame changed signal.

◆ onNameChanged

common::SlotRegister<NameChangedSignal> dart::dynamics::Entity::onNameChanged
inherited

Slot register for name changed signal.

◆ onTransformUpdated

common::SlotRegister<EntitySignal> dart::dynamics::Entity::onTransformUpdated
inherited

Slot register for transform updated signal.

◆ onVelocityChanged

common::SlotRegister<EntitySignal> dart::dynamics::Entity::onVelocityChanged
inherited

Slot register for velocity updated signal.