NTRT Simulator
v1.1
|
#include <abstractMarker.h>
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 () |
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.
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.
|
inherited |
Attach an observer to the subject of the observer.
[in,out] | pObserver | a 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.
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.
|
inherited |
Call tgObserver<T>::onSetup() on all observers in the order in which they were attached.
|
inherited |
Call tgObserver<T>::onStep() on all observers in the order in which they were attached.
[in] | dt | the number of seconds since the previous call; do nothing if not positive |
|
inherited |
Call tgObserver<T>::onTeardown() on all observers in the order in which they were attached.