Adobe ATMOSPHERE User Manual page 320

Table of Contents

Advertisement

308
APPENDIX E
mapLocalPositionToWorldPosition(Vector)
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.getPrimitive("wheel1");
desiredOffset = anchor.position;
// Place the wheel SceneGroup in world space
wheel.position = car.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));
box.transform = car.mapLocalTransformToWorldTransform(carRelativeTransform);
setPosition(x, y, z)
Sets the absolute position of the SceneGroup within its parent World (if any) ignoring the collision fl ag. The
velocity and acceleration are unaffected.
mySceneGroup.setPosition(10,0,15);
getParent()
Returns the parent SceneGroup; will return NULL if the given SceneGroup is the World.
theParent = SceneGroup.getParent();
getChild(index or name)
Returns the corresponding child object at the given index or name that is contained by the SceneGroup.
theChild = SceneGroup.getChild(0);
getChildCount()
Returns the number of Children objects in the given SceneGroup.
chat.print("There stage contains " + stage.getChildCount() + " child objects.");
getSceneGroup(index or name)
Returns the corresponding SceneGroup at the given index or name that is contained by the SceneGroup.
theChildSceneGroup = SceneGroup.getSceneGroup(0);
getSceneGroupCount()
Returns the number of SceneGroups in the given SceneGroup.
chat.print("There stage contains " + stage.getSceneGroupCount() + " child SceneGroups.");
getSolidObject(index or name)
Returns the corresponding SolidObject at the given index or name that is contained by the SceneGroup.
theSolidObject = theStage.getSolidObject(0);

Advertisement

Table of Contents
loading

Table of Contents