The rigid body accessor provides an optimized access to the data and property values of a rigid body dynamics object. CRigidBodyAccessor is suitable for data export applications as it allows access to rigid body data more quickly and efficiently than the regular API classes.
#include <xsi_rigidbodyaccessor.h>
Public Member Functions |
|
CRigidBodyAccessor () | |
~CRigidBodyAccessor () | |
CRigidBodyAccessor (const CRef &in_ref) | |
CRigidBodyAccessor (const CRigidBodyAccessor &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
CRigidBodyAccessor & | operator= (const CRigidBodyAccessor &in_obj) |
CRigidBodyAccessor & | operator= (const CRef &in_ref) |
CRefArray | GetAttachedRigidConstraints () const |
LONG | GetAttachedRigidConstraintsCount () const |
SimulationEnvironment | GetSimulationEnvironment () const |
CRefArray | GetShapes (bool in_bAllShapes) const |
LONG | GetShapeCount (bool in_bAllShapes) const |
CRef | GetPatriarch () const |
Default constructor.
~CRigidBodyAccessor | ( | ) |
Default destructor.
CRigidBodyAccessor | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
CRigidBodyAccessor | ( | const CRigidBodyAccessor & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from CBase.
siClassID GetClassID | ( | ) | const [virtual] |
CRigidBodyAccessor& operator= | ( | const CRigidBodyAccessor & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
CRigidBodyAccessor& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
CRefArray GetAttachedRigidConstraints | ( | ) | const |
Returns all rigid body constraints (such as hinges and sliders) attached to this rigid body.
LONG GetAttachedRigidConstraintsCount | ( | ) | const |
Returns the number of rigid body constraints (such as hinges and sliders) attached to this rigid body as a LONG.
SimulationEnvironment GetSimulationEnvironment | ( | ) | const |
Returns the SimulationEnvironment that contains this rigid body.
CRefArray GetShapes | ( | bool | in_bAllShapes | ) | const |
Returns all rigid body objects that make up this rigid body. Compound rigid bodies are composed of more than one rigid body object.
in_bAllShapes | True to return all rigid body objects that make up this rigid body. Otherwise, return all the rigid body objects except the current one. |
LONG GetShapeCount | ( | bool | in_bAllShapes | ) | const |
Returns a the number of rigid body objects that make up this rigid body as a LONG. Compound rigid bodies are composed of more than one rigid body object.
in_bAllShapes | True to return the count of all rigid body objects that make up this rigid body. Otherwise, return this number minus one. |
CRef GetPatriarch | ( | ) | const |
Returns this rigid body's patriarch. A "patriarch" is the top-most rigid body object in a rigid body. The simplest rigid bodies consist of a single X3DObject with rigid body properties; for example a single sphere with the "bounding sphere" collision type.
A compound rigid body, however, is made up of one or more rigid body objects parented under an active rigid body. This top-most rigid body object is the patriarch, and controls such aspects of the rigid body as its center of mass and whether the entire compound rigid body is active or passive.