![]() |
Trax3 3.1.0
trax track library
|
A dynamic object in physical space. More...
#include <C:/Trend/Development/Trax3/Code/trax/rigid/Body.h>

Public Member Functions | |
| virtual void | SetName (const char *name) noexcept=0 |
| Sets the name of the Body. | |
| virtual const char * | GetName () const noexcept=0 |
| virtual void | SetFrame (const spat::Frame< Length, One > &frame) noexcept=0 |
| Sets position and orientation (pose) in global coordinates. | |
| virtual void | GetFrame (spat::Frame< Length, One > &frame) const noexcept=0 |
| Gets the pose in global coordinates. | |
| virtual void | WakeUp ()=0 |
| Wakes the Body if it was deactivated due to not being in move. | |
| virtual bool | IsSleeping () const noexcept=0 |
| Is the body deactivated? | |
| virtual void | SetSleepDelay (Time threshold)=0 |
| virtual Time | GetSleepDelay () const noexcept=0 |
| virtual void | SetSleepThreshold (decltype(Velocity{} *Velocity{}) threshold)=0 |
| virtual decltype(Velocity{} *Velocity{}) | GetSleepThreshold () const noexcept=0 |
| virtual void | SetMass (Mass mass)=0 |
| Sets the mass of the Body. | |
| virtual Mass | GetMass () const noexcept=0 |
| virtual void | CenterOfMass (const spat::Position< Length > &pos) noexcept=0 |
| Sets the center of mass in Body space. | |
| virtual spat::Position< Length > | CenterOfMass () const noexcept=0 |
| virtual void | InertiaTensor (const spat::SquareMatrix< Area, 3 > &specificInertiaTensor)=0 |
| Sets the specific inertia tensor of the Body. | |
| virtual spat::SquareMatrix< Area, 3 > | InertiaTensor () const =0 |
| virtual void | SetLinearVelocity (const spat::Vector< Velocity > &v)=0 |
| Sets the velocity of the barycenter of this Body. | |
| virtual void | GetLinearVelocity (spat::Vector< Velocity > &v) const =0 |
| Gets the velocity of the barycenter of this Body. | |
| virtual void | SetAngularVelocity (const spat::Vector< AngularVelocity > &w)=0 |
| Sets the rotational velocity around the barycenter of this Body. | |
| virtual void | GetAngularVelocity (spat::Vector< AngularVelocity > &w) const =0 |
| Sets the rotational velocity around the barycenter of this Body. | |
A dynamic object in physical space.
For a good introduction in dynamics of solid bodies see Landau/Lifschitz, Mechanics Vol I, Nauka, Moskau.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Gets the pose in global coordinates.
Implemented in trax::Gestalt.
|
pure virtualnoexcept |
Implemented in trax::Gestalt.
|
pure virtual |
|
pure virtual |
Sets the specific inertia tensor of the Body.
The elements of the tensor are assumed to be calculated relative to the center of mass but in Body space regarding the rotations (so a frame of reference parallel to the Body's but with CoM as its origin). Furthermore the tensor is assumed to be calculated for a body of total mass 1, i.e. we need the intertia tensor divided by the total mass of the body. This way mass, CoM and inertia tensor can get specified independently of each other. There exist helper funtions for calculating the tensor.
|
pure virtual |
Sets the rotational velocity around the barycenter of this Body.
This will be a momentary velocity that will change over time due to simulation events. This should only get used to set a certain starting velocity, e.g. after inserting a RailRunner into the scene, constant reset of velocity will result in unstable simulation.
|
pure virtualnoexcept |
Sets position and orientation (pose) in global coordinates.
This will set the position and orientation of the Body in global simulation space.
| frame | Frame of reference. Must be orthonormal. |
Implemented in trax::Gestalt.
|
pure virtual |
Sets the velocity of the barycenter of this Body.
This will be a momentary velocity that will change over time due to simulation events. This should only get used to set a certain starting velocity, e.g. after inserting a Body into the scene, constant reset of velocity will result in unstable simulation.
|
pure virtual |
|
pure virtualnoexcept |
Sets the name of the Body.
This is for debug purposes; the string is not copied, only the pointer is stored.
Implemented in trax::Gestalt.