User Guide
ADOBE ATMOSPHERE 329
User Guide
more stable by scaling up the moments of inertia of the physical models that they affect. Once created, the
physical model will modfy the tranform of the Viewpoint object as it experiences external forces, collisions and
constraints.
For this version of the function, the physical model uses the convex hull of the Viewpoint object, which allows
collisions to be much more effi ciently computed by the physics engine. Care should be given to following the
guidelines for mass and inertia values as described in createPhysicalModel() above.
boxPhysicalModel = boxViewPointObject.createConvexPhysicalModel(1, 1);
createConvexPhysicalModelForMTSInstance(mass, inertiaScale)
A function similar to above, but which can be used at the instance level (more specifi c). For example, in
a viewpoint scene which contains a number of instances, thismethod can be applied to just one of those
instances. In doing so, the physical model created and the instance itself will now be rendered and processed as
a separate object. Care should be given to following the guidelines for mass and inertia values as described in
createPhysicalModel() above.
boxPhysicalModel = boxInstance.createConvexPhysicalModelForMTSInstance(1, 1);
toString()
Returns the name of the object (assigned in the Builder) as a string. If a name was not assigned,the type is
returned.
objectName = ViewPointObject.toString();
getPhysicalModel()
Gets the PhysicalModel created by the above methods.
boxPhysicalModel = boxObject.getPhysicalModel();
deletePhysicalModel()
Deletes the PhysicalModel created by the above methods, and removes all associated physics processing.
boxObject.deletePhysicalModel();
getParent()
Returns the parent SceneGroup; will return NULL if the given SceneGroup is the World.
theParent = SceneGroup.getParent();
Callbacks
onClick(what, mods)
This function is called when the user clicks on the Viewpoint object. “what” is the lowest-level geometry that was
hit. “mods” is an integer bitmask indicating modifi er keys (e.g., shift, control, etc..) which were down during the
click event.
box.onClick = function(what, mods)
{
if (what.name == ‘lid’)










