- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDPhysicsRigidBodyInstance Class Reference

An instance of a physics rigid body. More...

`#include <FCDPhysicsRigidBodyInstance.h>`

Inheritance diagram for FCDPhysicsRigidBodyInstance:

List of all members.

## Public Member Functions
| FCDPhysicsRigidBodyInstance (FCDocument *document, FCDPhysicsModelInstance *_parent, FCDPhysicsRigidBody *body)
| Constructor: do not use directly.
virtual | ~FCDPhysicsRigidBodyInstance ()
| Destructor.
virtual Type | GetType () const
| Retrieves the entity type for this class.
FCDPhysicsModelInstance * | GetModelParentInstance ()
| [INTERNAL] Retrieve it's parent model instance.
FCDPhysicsRigidBodyParameters * | GetParameters ()
| Retrieves the parameters of tihs rigid body.
const FCDPhysicsRigidBodyParameters * | GetParameters () const
| See above.
FCDPhysicsRigidBody * | GetRigidBody ()
| Retrieves the rigid body for this instance.
FCDParameterAnimatableVector3 & | GetAngularVelocity ()
| Retrieves the angular velocity of this rigid body instance.
const FCDParameterAnimatableVector3 & | GetAngularVelocity () const
| See above.
void | SetAngularVelocity (const FMVector3 &_angularVelocity)
| Sets the angular velocity of this rigid body instance.
FCDParameterAnimatableVector3 & | GetVelocity ()
| Retrives the linear velocity of this rigid body instance.
const FCDParameterAnimatableVector3 & | GetVelocity () const
| See above.
void | SetVelocity (const FMVector3 &_velocity)
| Sets the linear velocity of this rigid body instance.
FCDSceneNode * | GetTargetNode ()
| Retrieves the target node influenced by this rigid body instance.
const FCDSceneNode * | GetTargetNode () const
| See above.
void | SetTargetNode (FCDSceneNode *target)
| Sets the target node influenced by this rigid body instance.
CollisionEvent & | GetCollisionEvent ()
| Retrieves the collision event.
virtual FCDEntityInstance * | Clone (FCDEntityInstance *clone=NULL) const
| Clones the rigid body instance.
void | SetRigidBody (FCDPhysicsRigidBody *body)
| [INTERNAL] Sets the rigid body for this rigid body instance.

## Detailed Description

An instance of a physics rigid body.

Allows you to overwrite the material of a rigid body and attach the instance to a visual scene node.

## Constructor & Destructor Documentation

FCDPhysicsRigidBodyInstance::FCDPhysicsRigidBodyInstance | ( | FCDocument * | document,
|  | FCDPhysicsModelInstance * | _parent,
|  | FCDPhysicsRigidBody * | body
| ) |

  | Constructor: do not use directly. Create new rigid bodies using the FCDPhysicsModelInstance::AddRigidBodyInstance function. Parameters:
  | document | The COLLADA document that contains this rigid body instance.
  | _parent | The physics model instance holding this rigid body instance.
  | body | The rigid body to instance. Default values are taken from here. This should not be NULL unless it is expected to be filled in by LoadFromXML.

## Member Function Documentation

virtual FCDEntityInstance* FCDPhysicsRigidBodyInstance::Clone | ( | FCDEntityInstance * | clone = `NULL` | ) | const`[virtual]`

  | Clones the rigid body instance. Parameters:
  | clone | The rigid body instance to become the clone. If this pointer is NULL, a new rigid body instance will be created and you will need to release it.
Returns: The clone. Reimplemented from FCDEntityInstance.

FCDParameterAnimatableVector3& FCDPhysicsRigidBodyInstance::GetAngularVelocity | ( |  | ) | `[inline]`

| Retrieves the angular velocity of this rigid body instance. Returns: The angular velocity.

CollisionEvent& FCDPhysicsRigidBodyInstance::GetCollisionEvent | ( |  | ) | `[inline]`

| Retrieves the collision event. This event may be used by a physics plugin to call an applications' callback when a collision occured on this rigid body. It should call it twice per collision, once for each object. The first parameter to the event is the rigid body instance that was collided with, and the second parameter is the world position of the collision. Returns: The collision event.

FCDPhysicsModelInstance* FCDPhysicsRigidBodyInstance::GetModelParentInstance | ( |  | ) | `[inline]`

| [INTERNAL] Retrieve it's parent model instance. Returns: The parent of the intance.

FCDPhysicsRigidBodyParameters* FCDPhysicsRigidBodyInstance::GetParameters | ( |  | ) | `[inline]`

| Retrieves the parameters of tihs rigid body. Returns: The parameters.

FCDPhysicsRigidBody* FCDPhysicsRigidBodyInstance::GetRigidBody | ( |  | ) | `[inline]`

| Retrieves the rigid body for this instance. Returns: The rigid body.

FCDSceneNode* FCDPhysicsRigidBodyInstance::GetTargetNode | ( |  | ) | `[inline]`

| Retrieves the target node influenced by this rigid body instance. Returns: The target node.

virtual Type FCDPhysicsRigidBodyInstance::GetType | ( |  | ) | const`[inline, virtual]`

| Retrieves the entity type for this class. This function is part of the FCDEntity interface. Returns: The entity type: PHYSICS_RIGID_BODY. Reimplemented from FCDEntityInstance.

FCDParameterAnimatableVector3& FCDPhysicsRigidBodyInstance::GetVelocity | ( |  | ) | `[inline]`

| Retrives the linear velocity of this rigid body instance. Returns: The linear velocity.

void FCDPhysicsRigidBodyInstance::SetAngularVelocity | ( | const FMVector3 & | _angularVelocity | ) | `[inline]`

  | Sets the angular velocity of this rigid body instance. Parameters:
  | _angularVelocity | The angular velocity.

void FCDPhysicsRigidBodyInstance::SetRigidBody | ( | FCDPhysicsRigidBody * | body | ) |

  | [INTERNAL] Sets the rigid body for this rigid body instance. Default values are taken from the rigid body. Parameters:
  | body | The rigid body.

void FCDPhysicsRigidBodyInstance::SetTargetNode | ( | FCDSceneNode * | target | ) | `[inline]`

  | Sets the target node influenced by this rigid body instance. Parameters:
  | target | The target node.

void FCDPhysicsRigidBodyInstance::SetVelocity | ( | const FMVector3 & | _velocity | ) | `[inline]`

  | Sets the linear velocity of this rigid body instance. Parameters:
  | _velocity | The linear velocity.

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

- FCDocument/FCDPhysicsRigidBodyInstance.h