Surfaceobject - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

boxObject.deletePhysicalModel();
getParent()
Returns the parent SceneGroup; will return NULL if the given SceneGroup is the World.
theParent = SceneGroup.getParent();
getPrimitive(name)
Returns the fi rst Primitive with the given name from the SolidObject's array of primitives. Functionally
equivalent to "solidObject.rootPrimitive.fi nd('name')".
myLongBox = mySolidObject.getPrimitive("LongBox");
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("wheel1");
desiredOffset = anchor.position;
// Place the wheel SceneGroup in world space
wheel.position = car.getSolidObject(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));
theCarSolid = car.getSolidObject(0);
box.transform = theCarSolid.mapLocalTransformToWorldTransform(carRelativeTransform);

SurfaceObject

A SurfaceObject is generated when a "Viewpoint" object is imported, and then "Convert to Surface" is selected from
the Object menu in the Atmosphere authoring application. Converting a Viewpoint object to a SurfaceObject is useful
in that the object can now recieve it's lighting from the Atmoshpere lighting process (direction, brightness, etc.).
Additionally, the object textures can also now be modifi ed from within Atmosphere.
Properties
type
The object's type; returns "SurfaceObject".
if (foo.type == 'SurfaceObject') { ... }
name
Returns the name of the SurfaceObject assigned in the Application.
if (foo.name == 'myCoolSurfaceObject') { ... }
321
ADOBE ATMOSPHERE
User Guide

Advertisement

Table of Contents
loading

Table of Contents