FCDPhysicsRigidBodyInstance Class Reference

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

#include <FCDPhysicsRigidBodyInstance.h>

Inheritance diagram for FCDPhysicsRigidBodyInstance:

FCDEntityInstance FCDObject FUTracker FUParameterizable FUTrackable FUObject 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.
FCDPhysicsModelInstanceGetModelParentInstance ()
 [INTERNAL] Retrieve it's parent model instance.
FCDPhysicsRigidBodyParametersGetParameters ()
 Retrieves the parameters of tihs rigid body.
const FCDPhysicsRigidBodyParametersGetParameters () const
 See above.
FCDPhysicsRigidBodyGetRigidBody ()
 Retrieves the rigid body for this instance.
FCDParameterAnimatableVector3GetAngularVelocity ()
 Retrieves the angular velocity of this rigid body instance.
const FCDParameterAnimatableVector3GetAngularVelocity () const
 See above.
void SetAngularVelocity (const FMVector3 &_angularVelocity)
 Sets the angular velocity of this rigid body instance.
FCDParameterAnimatableVector3GetVelocity ()
 Retrives the linear velocity of this rigid body instance.
const FCDParameterAnimatableVector3GetVelocity () const
 See above.
void SetVelocity (const FMVector3 &_velocity)
 Sets the linear velocity of this rigid body instance.
FCDSceneNodeGetTargetNode ()
 Retrieves the target node influenced by this rigid body instance.
const FCDSceneNodeGetTargetNode () const
 See above.
void SetTargetNode (FCDSceneNode *target)
 Sets the target node influenced by this rigid body instance.
CollisionEventGetCollisionEvent ()
 Retrieves the collision event.
virtual FCDEntityInstanceClone (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:
Generated on Thu Feb 14 16:58:39 2008 for FCollada by  doxygen 1.4.6-NO