Game Development Reference
In-Depth Information
Excerpt from include/cyclone/body.h
/**
* A rigid body is the basic simulation object in the physics core.
*/
class RigidBody
{
public:
/**
* Holds the inverse of the mass of the rigid body. It is more
* useful to hold the inverse mass because integration is simpler,
* and because in real time simulation it is more useful to have
* bodies with infinite mass (immovable) than zero mass (completely
* unstable in numerical simulation).
*/
real inverseMass;
/**
* Holds the linear position of the rigid body in world space.
*/
Vector3 position;
/**
* Holds the angular orientation of the rigid body in world space.
*/
Quaternion orientation;
/**
* Holds the linear velocity of the rigid body in world space.
*/
Vector3 velocity;
/**
* Holds the angular velocity, or rotation, or the rigid body
* in world space.
*/
Vector3 rotation;
/**
* Holds a transform matrix for converting body space into world
* space and vice versa. This can be achieved by calling the
* getPointIn*Space functions.
Matrix4 transformMatrix;
};
Search Nedrilad ::




Custom Search