NTRT Simulator  v1.1
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
abstractMarker Class Reference

#include <abstractMarker.h>

Inheritance diagram for abstractMarker:
Collaboration diagram for abstractMarker:

Public Member Functions

 abstractMarker (const btRigidBody *body, btVector3 pos, btVector3 color, int nodeNumber)
 
btVector3 getWorldPosition () const
 
btVector3 getRelativePosition () const
 
const btVector3 & getColor () const
 
int getNodeNumber () const
 
void attach (tgObserver< abstractMarker > *pObserver)
 
void notifyStep (double dt)
 
void notifySetup ()
 
void notifyTeardown ()
 

Detailed Description

ColoredMarkers are non-physical markers that are attached to a specific physical body. They are presented as colored spheres at the simulation. Markers are considered to move with the physical body. (they use orientation and translation vectors of the body) Using the orientation of the physical body, it can return its absolute position when requested.

Definition at line 40 of file abstractMarker.h.

Constructor & Destructor Documentation

abstractMarker::abstractMarker ( const btRigidBody *  body,
btVector3  pos,
btVector3  color,
int  nodeNumber 
)

construct by attaching to the body using the absolute position pos, and highlight it with the given color.

Definition at line 35 of file abstractMarker.cpp.

Member Function Documentation

void tgSubject< abstractMarker >::attach ( tgObserver< abstractMarker > *  pObserver)
inherited

Attach an observer to the subject of the observer.

Parameters
[in,out]pObservera pointer to an observer for the subject; do nothing if the pointer is NULL
btVector3 abstractMarker::getRelativePosition ( ) const

Returns the relative position to the center of mass of the attached body

Definition at line 45 of file abstractMarker.cpp.

Here is the caller graph for this function:

btVector3 abstractMarker::getWorldPosition ( ) const

Returns the current world position by looking at the attached objects transformation quaternion

Definition at line 53 of file abstractMarker.cpp.

Here is the caller graph for this function:

void tgSubject< abstractMarker >::notifySetup ( )
inherited

Call tgObserver<T>::onSetup() on all observers in the order in which they were attached.

void tgSubject< abstractMarker >::notifyStep ( double  dt)
inherited

Call tgObserver<T>::onStep() on all observers in the order in which they were attached.

Parameters
[in]dtthe number of seconds since the previous call; do nothing if not positive
void tgSubject< abstractMarker >::notifyTeardown ( )
inherited

Call tgObserver<T>::onTeardown() on all observers in the order in which they were attached.


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