Public Member Functions
CRigidBodyAccessor Class Reference

## Detailed Description

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.

Since:
  6.0

`#include <xsi_rigidbodyaccessor.h>`

Inheritance diagram for CRigidBodyAccessor:
[legend]

List of all members.

## 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

## Constructor & Destructor Documentation

CRigidBodyAccessor | ( |  | ) |

Default constructor.

~CRigidBodyAccessor | ( |  | ) |

Default destructor.

CRigidBodyAccessor | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

CRigidBodyAccessor | ( | const CRigidBodyAccessor & | in_obj | ) |

Copy constructor.

Parameters:

  in_obj | constant class object.

## Member Function Documentation

bool IsA | ( | siClassID | in_ClassID | ) | const `[virtual]`

Returns true if a given class type is compatible with this API class.

Parameters:

  in_ClassID | class type.

Returns:
  true if the class is compatible, false otherwise.

Reimplemented from CBase.

siClassID GetClassID | ( |  | ) | const `[virtual]`

Returns the type of the API class.

Returns:
  The class type.

Implements CBase.

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.

Parameters:

  in_obj | constant class object.

Returns:
  The new CRigidBodyAccessor 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.

Parameters:

  in_ref | constant class object.

Returns:
  The new CRigidBodyAccessor object.

CRefArray GetAttachedRigidConstraints | ( |  | ) | const

Returns all rigid body constraints (such as hinges and sliders) attached to this rigid body.

Returns:
  An array of references to X3DObject objects

See also:
  SimulationEnvironment::GetRigidConstraintObjects
  SimulationEnvironment::GetRigidConstraintObjectsCount
  X3DObject::GetRigidConstraintAccessor

Since:
  6.0

LONG GetAttachedRigidConstraintsCount | ( |  | ) | const

Returns the number of rigid body constraints (such as hinges and sliders) attached to this rigid body as a LONG.

See also:
  X3DObject::GetRigidConstraintAccessor
  CRigidBodyAccessor::GetAttachedRigidConstraints
  SimulationEnvironment::GetRigidConstraintObjects
  SimulationEnvironment::GetRigidConstraintObjectsCount

Since:
  6.0

SimulationEnvironment GetSimulationEnvironment | ( |  | ) | const

Returns the SimulationEnvironment that contains this rigid body.

Since:
  6.0

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.

Parameters:

  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.

Returns:
  An array of references to X3DObject objects

See also:
  CRigidBodyAccessor::GetPatriarch
  CRigidBodyAccessor::GetShapesCount
  SimulationEnvironment::GetPatriarchRigidBodyObjects
  X3DObject::GetRigidBodyAccessor

Since:
  6.0

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.

Parameters:

  in_bAllShapes | True to return the count of all rigid body objects that make up this rigid body. Otherwise, return this number minus one.

See also:
  CRigidBodyAccessor::GetShapes

Since:
  6.0

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.

Returns:
  A reference to an X3DObject

See also:
  CRigidBodyAccessor::GetShapes
  SimulationEnvironment::GetPatriarchRigidBodyObjects

Since:
  6.0

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

- xsi_rigidbodyaccessor.h