Viewpointobject - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

boxPhysicalModel = boxSurfaceObject.createConvexPhysicalModel(1, 1);
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();
mapLocalPositionToWorldPosition(Vector position)
Given a position Vector in local coordinates returns the corresponding position Vector in world-relative
coordinates.
// Find the local space position of the wheel axle in the SceneGroup
anchor = car.getPrimtive("whee1");
desiredOffset = anchor.position;
// Place the wheel SceneGroup in world space
wheel.position = car.getSurfaceObject(0).mapLocalPositionToWorldPosition(desiredOffset);
mapLocalTransformToWorldTransform(Transform)
Given a Transform in local coordinates returns the corresponding Transform in world-relative coordinates.
carRelativeTransform = Transform(Vector(0, 4, 6), Rotation('Z', 0.0));
theCarSurface = car.getSurfaceObject(0);
box.transform = theCarSurface.mapLocalTransformToWorldTransform(carRelativeTransform);

ViewpointObject

A ViewpointObject is a SceneGroup which is imported into the Atmosphere Builder from an MTX fi le (and optional
associated MTS fi le). It contains a reference to the full MTSScene which is described in both the MTX and MTS fi les
(if present). The scene may contain geometries, transformations, textures, materials, time elements (animations), text
objects, SWF movies, and other related XML properties.
The Viewpoint object has a transform that positions it relative to its parent SceneGroup (or world space if
"attachedToParentModel" is set to false). Methods are also available to defi ne a "physical model" which will cause the
Viewpoint object to experience physical interaction with other objects. (Note that the current physical model will not
alter its shape when animations are run in the ViewpointObject.)
325
ADOBE ATMOSPHERE
User Guide

Advertisement

Table of Contents
loading

Table of Contents