RBCollection : Helper
RBCollection - superclass: Helper; super-superclass:Node - classID: #(72697407, 2075537247)
The Reactor dynamics system has been retired and REMOVED from 3ds Max 2012.
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
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
.rigidBodies : node by value array : Read|Write
Get/Set the array of rigid body objects in the RBCollection.
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.rigidBodies = #(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.rigidBodies--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
Should returnthe object specified by the supplied index.
NOTE:
This method is currently broken - always returns undefined.
An existing workaround is to set the properties of the RigidObject as values in the
User Properties of the node, for example
setUserProp $ "Mass" 123.4 --sets the mass to 123.4
The following is a list of the User Properties assigned by reactor:
|
Allowed_Penetration = 0.000000
Disable_Collisions = 0
Display_Proxy = Sphere01
Ellasticity = 0.21--note incorrect spelling, required to set Elasticity.
Friction = 0.5
Inactive = 0
Mass = 123.4
Phantom = 0
Proxy_Geometry = Sphere01
Quality_Type = 3
Shell_Radius = 0.050000
Simulation_Geometry = 3
Unyielding = 0
Use_Display_Proxy = 0
|