step/stepcore
StepCore::Body Class Reference
[Physical bodies]
#include <world.h>

Detailed Description
Interface for bodies.Body is anything that has dynamic variables that require ODE integration
Definition at line 138 of file world.h.
Public Member Functions | |
| virtual void | addForce (const double *force, const double *forceVariance)=0 |
| Body () | |
| virtual void | getAccelerations (double *acceleration, double *accelerationVariance)=0 |
| virtual void | getInverseMass (GmmSparseRowMatrix *inverseMass, GmmSparseRowMatrix *variance, int offset)=0 |
| virtual void | getVariables (double *position, double *velocity, double *positionVariance, double *velocityVariance)=0 |
| virtual void | resetForce (bool resetVariance)=0 |
| virtual void | setVariables (const double *position, const double *velocity, const double *positionVariance, const double *velocityVariance)=0 |
| virtual int | variablesCount ()=0 |
| int | variablesOffset () const |
| virtual | ~Body () |
Constructor & Destructor Documentation
Member Function Documentation
| virtual void StepCore::Body::addForce | ( | const double * | force, | |
| const double * | forceVariance | |||
| ) | [pure virtual] |
Add force and (possibly) its variance to force accomulator.
- Note:
- This function is used only by generic constraints handling code, force objects should use body-specific functions.
Implemented in StepCore::Particle, and StepCore::RigidBody.
| virtual void StepCore::Body::getAccelerations | ( | double * | acceleration, | |
| double * | accelerationVariance | |||
| ) | [pure virtual] |
Copy acceleration (forces left-multiplied by inverse mass) and (possibly) its variances to arrays.
Variances should only be copied if accelerationVariance != NULL.
Implemented in StepCore::Particle, and StepCore::RigidBody.
| virtual void StepCore::Body::getInverseMass | ( | GmmSparseRowMatrix * | inverseMass, | |
| GmmSparseRowMatrix * | variance, | |||
| int | offset | |||
| ) | [pure virtual] |
Get inverse mass and (possibly) its variance matrixes.
Variance should only be copied of variance != NULL.
Implemented in StepCore::Particle, and StepCore::RigidBody.
| virtual void StepCore::Body::getVariables | ( | double * | position, | |
| double * | velocity, | |||
| double * | positionVariance, | |||
| double * | velocityVariance | |||
| ) | [pure virtual] |
Copy positions, velocities and (possibly) its variances to arrays.
Variances should only be copied if positionVariance != NULL.
Implemented in StepCore::Particle, and StepCore::RigidBody.
| virtual void StepCore::Body::resetForce | ( | bool | resetVariance | ) | [pure virtual] |
Reset force accomulator and (possibly) its variance to zero.
Variance should only be reseted if resetVariance == true.
Implemented in StepCore::Particle, and StepCore::RigidBody.
| virtual void StepCore::Body::setVariables | ( | const double * | position, | |
| const double * | velocity, | |||
| const double * | positionVariance, | |||
| const double * | velocityVariance | |||
| ) | [pure virtual] |
Set positions, velocities and (possibly) its variances using values in arrays and also reset accelerations and its variances.
Variances should only be copied and reseted if positionVariance != NULL.
Implemented in StepCore::Particle, and StepCore::RigidBody.
| virtual int StepCore::Body::variablesCount | ( | ) | [pure virtual] |
Get count of dynamic variables (not including velocities).
Implemented in StepCore::Particle, and StepCore::RigidBody.
| int StepCore::Body::variablesOffset | ( | ) | const [inline] |
The documentation for this class was generated from the following file:
KDE 4.2 API Reference