Interface: primitiveInterface

The primitiveInterface is returned by the rigidBodyInterface.GetPrimitive method.

Interface: primitiveInterface

Properties:

.mass : float : Read|Write

Get/Set the mass of the primitive.

.simulationGeometry : integer : Read|Write

Get/Set the simulation geometry of the primitive. Possible values are:

0 - Use Bounding Box

1 - Use Bounding Sphere

2 - Use Mesh Convex Hull

3 - Use Proxy Convex Hull

.proxyGeometryNode : node : Read|Write

Get/Set the Proxy Geometry Node.

.phantom : boolean : Read|Write

Get/Set the phantom property of the primitive.

Example:

resetMaxFile #noprompt --reset the scene

OK

t = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

select t --select the teapot

OK

rctMakeRBCollection() --create a RigidBodyCollection with the Teapot

OK

a = $RBCollection01.getRigidObject 1 --get the Teapot's RigidBodyObject

<IObject:RigidBodyObject>

b = a.rigidBodyInterface --get the Teapot's RigidBodyInterface

<MixinInterface:rigidBodyInterface>

c = b.GetPrimitive 1 --get the Teapot's primitiveInterface

<IObject:RigidBodyObject>

c.mass --get the mass

0.0

c.mass = 1.0 --set the mass

1.0

c.simulationGeometry --get the simulation geometry mode

2

c.simulationGeometry = 0 --set the geometry to Bounding Box

0

See also

Interface: reactorInterface

Interface: rigidBodyInterface

MAXScript Extensions for Reactor