FCDPhysicsRigidBodyParameters Class Reference
[COLLADA Document Object Model.]

A structure to hold the parameters for rigid body and rigid body instance. More...

#include <FCDPhysicsRigidBodyParameters.h>

Inheritance diagram for FCDPhysicsRigidBodyParameters:

FCDObject FUParameterizable FUTrackable FUObject List of all members.

Public Member Functions

 FCDPhysicsRigidBodyParameters (FCDocument *document, FCDPhysicsRigidBody *owner)
 Constructor.
 FCDPhysicsRigidBodyParameters (FCDocument *document, FCDPhysicsRigidBodyInstance *owner)
 See above.
virtual ~FCDPhysicsRigidBodyParameters ()
 Destructor.
FCDParameterAnimatableFloatGetDynamic ()
 Retrieves whether the owner is dynamic.
const FCDParameterAnimatableFloatGetDynamic () const
 See above.
bool IsDynamic ()
 See above.
void SetDynamic (bool dynamic)
 Sets whether the owner is dynamic.
bool IsDensityMoreAccurate ()
 Retrieves whether density is more accurate.
void SetDensityMoreAccurate (bool value)
 [INTERNAL] Set 'DensityMoreAccurate'.
FUParameterFloatGetDensity ()
 Retrieves the density of the owner.
const FUParameterFloatGetDensity () const
 See above.
void SetDensity (float dens)
 [INTERNAL] Set the densisty.
FCDParameterAnimatableFloatGetMass ()
 Retrieves the mass of the owner.
const FCDParameterAnimatableFloatGetMass () const
 See above.
void SetMass (float _mass)
 Sets the mass of the owner.
FCDParameterAnimatableVector3GetInertia ()
 Retrieves the inertia of the owner.
const FCDParameterAnimatableVector3GetInertia () const
 See above.
bool IsInertiaAccurate ()
 Inertia is accurate only if it comes directly from the COLLADA file.
void SetInertiaAccurate (bool value)
 [INTERNAL] Sets the inertia accuracy flag.
void SetInertia (const FMVector3 &_inertia)
 Sets the inertia of the owner.
FCDParameterAnimatableVector3GetMassFrameTranslate ()
 Retrieves the center of mass of the owner.
const FCDParameterAnimatableVector3GetMassFrameTranslate () const
 See above.
void SetMassFrameTranslate (const FMVector3 &position)
 Sets the center of mass of the owner.
FCDParameterAnimatableAngleAxisGetMassFrameOrientation ()
 Retrieves the orientation of mass of the owner.
const FCDParameterAnimatableAngleAxisGetMassFrameOrientation () const
 See above.
void SetMassFrameOrientation (const FMAngleAxis &angleAxis)
 Sets the orientation of mass of the owner.
FMVector3GetMassFrameRotateAxis ()
 Retrieves the axis of orientation of mass of the owner.
const FMVector3GetMassFrameRotateAxis () const
 See above.
void SetMassFrameRotateAxis (const FMVector3 &axis)
 Sets the axis of orientation of mass of the owner.
float & GetMassFrameRotateAngle ()
 Retrieves the angle of orientation of mass of the owner along the axis retrieved from GetMassFrameRotateAxis.
const float & GetMassFrameRotateAngle () const
 See above.
void SetMassFrameRotateAngle (float angle)
 Sets the angle of orientation of mass of the owner along the axis retrieved from GetMassFrameRotateAxis.
FCDPhysicsMaterialGetPhysicsMaterial ()
 Retrives the physics material of the owner.
const FCDPhysicsMaterialGetPhysicsMaterial () const
 See above.
void SetPhysicsMaterial (FCDPhysicsMaterial *physicsMaterial)
 Sets the physics material of the owner.
FCDPhysicsMaterialAddOwnPhysicsMaterial ()
 Adds a physics material for the owner.
 DEPRECATED (3.05A, GetPhysicsShapeCount and GetPhysicsShape(index)) void GetPhysicsShapeList() const
 Retrieves the physics shapes of the owner.
size_t GetPhysicsShapeCount () const
 Retrieves the number of physics shapes of the owner.
FCDPhysicsShapeGetPhysicsShape (size_t index)
 Retrieves a speficied physics shape of the owner by index.
const FCDPhysicsShapeGetPhysicsShape (size_t index) const
 See above.
FCDPhysicsShapeAddPhysicsShape ()
 Adds a physics shape to the owner.
virtual void CopyFrom (const FCDPhysicsRigidBodyParameters &original)
 Copies the rigid body parameters into this parameters structure.
 DEPRECATED (3.05A, GetParent) FCDObject *GetOwner()
 [INTERNAL] Retrieves the owner of the parameters.
FCDObjectGetParent ()
 See above.
const FCDObjectGetParent () const
 See above.
FCDPhysicsRigidBodyGetEntityOwner ()
 [INTERNAL] Retrieve the entity owner.
FCDPhysicsRigidBodyInstanceGetInstanceOwner ()
 [INTERNAL] Retrieve the instance owner.
bool OwnsPhysicsMaterial ()
 [INTERNAL] Determine if the model owns the maaterial.
void SetInstanceMaterial (FCDEntityInstance *instance)
 [INTERNAL] Set the material instance.
FCDEntityInstanceGetInstanceMaterial ()
 [INTERNAL] Retrieve the material instance.

Detailed Description

A structure to hold the parameters for rigid body and rigid body instance.

Because many of the parameters found in the rigid body can be overwritten by the rigid body instance, it is useful to keep it in one single place. This class is responsible for loading, storing, and writing these parameters.


Constructor & Destructor Documentation

FCDPhysicsRigidBodyParameters::FCDPhysicsRigidBodyParameters FCDocument document,
FCDPhysicsRigidBody owner
 

Constructor.

Parameters:
owner The owner of this parameters holder. Its SetDirty will be called whenever this class is modified. It cannot be NULL.


Member Function Documentation

FCDPhysicsMaterial* FCDPhysicsRigidBodyParameters::AddOwnPhysicsMaterial  ) 
 

Adds a physics material for the owner.

This parameter structuer is responsible for releasing the physics material.

Returns:
The new physics material.

FCDPhysicsShape* FCDPhysicsRigidBodyParameters::AddPhysicsShape  ) 
 

Adds a physics shape to the owner.

Returns:
The new physics shape.

virtual void FCDPhysicsRigidBodyParameters::CopyFrom const FCDPhysicsRigidBodyParameters original  )  [virtual]
 

Copies the rigid body parameters into this parameters structure.

Parameters:
original The original rigid body parameters to get values from.

FCDPhysicsRigidBodyParameters::DEPRECATED 3.  05A,
GetParent 
[inline]
 

[INTERNAL] Retrieves the owner of the parameters.

Returns:
The owner of the parameters

FCDPhysicsRigidBodyParameters::DEPRECATED 3.  05A,
GetPhysicsShapeCount and   GetPhysicsShape(index)
const [inline]
 

Retrieves the physics shapes of the owner.

Returns:
The physics shapes.

FUParameterFloat& FCDPhysicsRigidBodyParameters::GetDensity  )  [inline]
 

Retrieves the density of the owner.

The client should call IsDensityMoreAccurate to make sure this is what we want instead of mass.

Returns:
The density.

FCDParameterAnimatableFloat& FCDPhysicsRigidBodyParameters::GetDynamic  )  [inline]
 

Retrieves whether the owner is dynamic.

If it is dynamic, forces like gravity affect it.

Returns:
True if dynamic.

FCDPhysicsRigidBody* FCDPhysicsRigidBodyParameters::GetEntityOwner  )  [inline]
 

[INTERNAL] Retrieve the entity owner.

Returns:
The entity owner.

FCDParameterAnimatableVector3& FCDPhysicsRigidBodyParameters::GetInertia  )  [inline]
 

Retrieves the inertia of the owner.

Returns:
The inertia.

FCDEntityInstance* FCDPhysicsRigidBodyParameters::GetInstanceMaterial  )  [inline]
 

[INTERNAL] Retrieve the material instance.

Returns:
The material instance.

FCDPhysicsRigidBodyInstance* FCDPhysicsRigidBodyParameters::GetInstanceOwner  )  [inline]
 

[INTERNAL] Retrieve the instance owner.

Returns:
The instance owner.

FCDParameterAnimatableFloat& FCDPhysicsRigidBodyParameters::GetMass  )  [inline]
 

Retrieves the mass of the owner.

Returns:
The mass.

FCDParameterAnimatableAngleAxis& FCDPhysicsRigidBodyParameters::GetMassFrameOrientation  )  [inline]
 

Retrieves the orientation of mass of the owner.

Returns:
The orientation of mass.

float& FCDPhysicsRigidBodyParameters::GetMassFrameRotateAngle  )  [inline]
 

Retrieves the angle of orientation of mass of the owner along the axis retrieved from GetMassFrameRotateAxis.

Returns:
The angle of orientation of mass.

FMVector3& FCDPhysicsRigidBodyParameters::GetMassFrameRotateAxis  )  [inline]
 

Retrieves the axis of orientation of mass of the owner.

Returns:
The axis of orientation of mass.

FCDParameterAnimatableVector3& FCDPhysicsRigidBodyParameters::GetMassFrameTranslate  )  [inline]
 

Retrieves the center of mass of the owner.

Returns:
The center of mass.

FCDPhysicsMaterial* FCDPhysicsRigidBodyParameters::GetPhysicsMaterial  )  [inline]
 

Retrives the physics material of the owner.

Returns:
The physics material.

FCDPhysicsShape* FCDPhysicsRigidBodyParameters::GetPhysicsShape size_t  index  )  [inline]
 

Retrieves a speficied physics shape of the owner by index.

Parameters:
index The index of the physics shape.
Returns:
The physics shape.

size_t FCDPhysicsRigidBodyParameters::GetPhysicsShapeCount  )  const [inline]
 

Retrieves the number of physics shapes of the owner.

Returns:
The number of physics shapes.

bool FCDPhysicsRigidBodyParameters::IsDensityMoreAccurate  )  [inline]
 

Retrieves whether density is more accurate.

Because we are using an approximating algorithm for volume, density will be more accurate when dealing with non-analytical shapes. Density is calculated as the average density of the shapes. Shapes defining a mass will have density of 0.0f. A rigid body containing both shapes with only density and shapes with only mass will have both GetMass and GetDensity approximated.

Returns:
True if density is more accurate.

bool FCDPhysicsRigidBodyParameters::IsInertiaAccurate  )  [inline]
 

Inertia is accurate only if it comes directly from the COLLADA file.

We are using a simple sphere approximation for the inertia if there is none specified.

Returns:
True if the inertia is accurate.

bool FCDPhysicsRigidBodyParameters::OwnsPhysicsMaterial  )  [inline]
 

[INTERNAL] Determine if the model owns the maaterial.

Returns:
true if the model owns the material.

void FCDPhysicsRigidBodyParameters::SetDensity float  dens  )  [inline]
 

[INTERNAL] Set the densisty.

Parameters:
dens The density to set.

void FCDPhysicsRigidBodyParameters::SetDensityMoreAccurate bool  value  )  [inline]
 

[INTERNAL] Set 'DensityMoreAccurate'.

value Value to be set.

void FCDPhysicsRigidBodyParameters::SetDynamic bool  dynamic  ) 
 

Sets whether the owner is dynamic.

If it is dynamic, forces like gravity affect it.

Parameters:
dynamic True if dynamic.

void FCDPhysicsRigidBodyParameters::SetInertia const FMVector3 _inertia  )  [inline]
 

Sets the inertia of the owner.

Parameters:
_inertia The inertia.

void FCDPhysicsRigidBodyParameters::SetInertiaAccurate bool  value  )  [inline]
 

[INTERNAL] Sets the inertia accuracy flag.

Parameters:
value The value to set.

void FCDPhysicsRigidBodyParameters::SetInstanceMaterial FCDEntityInstance instance  )  [inline]
 

[INTERNAL] Set the material instance.

The new material instance.

void FCDPhysicsRigidBodyParameters::SetMass float  _mass  )  [inline]
 

Sets the mass of the owner.

Parameters:
_mass The mass.

void FCDPhysicsRigidBodyParameters::SetMassFrameOrientation const FMAngleAxis angleAxis  )  [inline]
 

Sets the orientation of mass of the owner.

Parameters:
angleAxis The orientation of mass.

void FCDPhysicsRigidBodyParameters::SetMassFrameRotateAngle float  angle  )  [inline]
 

Sets the angle of orientation of mass of the owner along the axis retrieved from GetMassFrameRotateAxis.

Parameters:
angle The angle of orientation of mass.

void FCDPhysicsRigidBodyParameters::SetMassFrameRotateAxis const FMVector3 axis  )  [inline]
 

Sets the axis of orientation of mass of the owner.

Parameters:
axis The axis of orientation of mass.

void FCDPhysicsRigidBodyParameters::SetMassFrameTranslate const FMVector3 position  )  [inline]
 

Sets the center of mass of the owner.

Parameters:
position The center of mass.

void FCDPhysicsRigidBodyParameters::SetPhysicsMaterial FCDPhysicsMaterial physicsMaterial  ) 
 

Sets the physics material of the owner.

Parameters:
physicsMaterial The physics material.


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