RBCollection : Helper

RBCollection - superclass: Helper; super-superclass:Node - classID: #(72697407, 2075537247)

Description:

The Rigid Body Collection is a helper object that acts as a container for rigid bodies. At a lower level, a collection also allows you to specify which mathematical method will be used for solving the rigid body behaviors for bodies in that collection.

Constructors:

RBCollection ...

rctRBCollection ...

Properties

.disabled : boolean

When set to True, the RBCollection will be disabled.

.odeSolver (ODE_Solver) : integer

Specifies the ODE Solver. Corresponds to the radio buttons in the Advanced rollout, "ODE Solver" group.

Possible values are:

0 - Euler (default)

1 - Runge-Kutta

Interfaces

Interface: rctRBCollectionInterface

Properties

.rigidBodiesTab : node by value array : Read|Write

Get/Set the array of rigid body objects in the RBCollection.

For Example:

rbc = RBCollection() --create an RBCollection

$RBCollection:RBCollection01 @ [0.000000,0.000000,0.000000]

s = Sphere pos:[100,0,0] --create a Sphere

$Sphere:Sphere01 @ [100.000000,0.000000,0.000000]

b = Box pos:[200,0,0] --create a Box

$Box:Box01 @ [200.000000,0.000000,0.000000]

rbc.rigidBodiesTab = #(s,b) --add both objects to the RBCollection

#($Sphere:Sphere01 @ [100.000000,0.000000,0.000000], $Box:Box01 @ [200.000000,0.000000,0.000000])

select rbc --select the RBCollection

OK

max modify mode --change to Modify tab - the objects are on the list!

OK

rbc.rigidBodiesTab --get the content of the list

#($Sphere:Sphere01 @ [100.000000,0.000000,0.000000], $Box:Box01 @ [200.000000,0.000000,0.000000])

Methods

<boolean>AddRigidBody <node>bodyNode

Add an object to the Collection. Returns true on success.

<boolean>RemoveRigidBody <integer>bodyIndex

Remove the indexed object from the Collection. Returns true on success.

<boolean>RemoveRigidBodyByINode <node>bodyNode

Remove the specified object from the Collection. Returns true on success.

<integer>GetNumRigidBodies()

Returns the number of object in the Collection.

<IObject>getRigidObject <integer>bodyIndex

Returns the object specified by the supplied index.

See also

MAXScript Extensions for Reactor