FCDPhysicsRigidBody Class Reference
[COLLADA Document Object Model.]

A COLLADA rigid body. More...

#include <FCDPhysicsRigidBody.h>

Inheritance diagram for FCDPhysicsRigidBody:

FCDEntity FCDObjectWithId FCDObject FUParameterizable FUTrackable FUObject List of all members.

Public Member Functions

 FCDPhysicsRigidBody (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDPhysicsRigidBody ()
 Destructor.
virtual Type GetType () const
 Retrieves the entity type for this class.
const fm::stringGetSubId () const
 Retrieves the sub id (sid) of this rigid body.
void SetSubId (const char *sid)
 Sets the sub id (sid) of this rigid body.
void SetSubId (const fm::string &sid)
 See above.
FCDPhysicsRigidBodyParametersGetParameters ()
 Retrieves the parameters of tihs rigid body.
const FCDPhysicsRigidBodyParametersGetParameters () const
 See above.
float GetShapeMassFactor () const
 Retrieves the factor to multiple by to ensure shape masses are correct.
virtual FCDEntityClone (FCDEntity *clone=NULL, bool cloneChildren=false) const
 Copies the rigid body into a clone.

Detailed Description

A COLLADA rigid body.

A rigid body contains all the information needed for collision detection.


Constructor & Destructor Documentation

FCDPhysicsRigidBody::FCDPhysicsRigidBody FCDocument document  ) 
 

Constructor: do not use directly.

Create new rigid bodies using the FCDPhysicsModel::AddRigidBody function.

Parameters:
document The COLLADA document that contains this rigid body.


Member Function Documentation

virtual FCDEntity* FCDPhysicsRigidBody::Clone FCDEntity clone = NULL,
bool  cloneChildren = false
const [virtual]
 

Copies the rigid body into a clone.

Parameters:
clone The empty clone. If this pointer is NULL, a new rigid body will be created and you will need to release the returned pointer manually.
cloneChildren Whether to recursively clone this entity's children.
Returns:
The clone.

Reimplemented from FCDEntity.

FCDPhysicsRigidBodyParameters* FCDPhysicsRigidBody::GetParameters  )  [inline]
 

Retrieves the parameters of tihs rigid body.

Returns:
The parameters.

float FCDPhysicsRigidBody::GetShapeMassFactor  )  const
 

Retrieves the factor to multiple by to ensure shape masses are correct.

According to the COLLADA spec in 1.4.1, if the total mass of the rigid body is 6 and there are 2 shapes with mass of 1 and 2, then it will be interpreted as 2 shapes with mass of 2 and 4 respectively. This method gives the factor to convert from the shape's mass to the one that should be interpreted as.

Returns:
The factor for shape mass.

const fm::string& FCDPhysicsRigidBody::GetSubId  )  const [inline]
 

Retrieves the sub id (sid) of this rigid body.

Returns:
The sub id.

virtual Type FCDPhysicsRigidBody::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 FCDEntity.

void FCDPhysicsRigidBody::SetSubId const char *  sid  )  [inline]
 

Sets the sub id (sid) of this rigid body.

Parameters:
sid The new sub id.


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