Holomatix

Log In / Register


Purchase
SceneObject class

Description

The SceneObject class lets you manipulate the fundamental building blocks of the 3D world - scene objects. These are the equivalent of movie clips in the 2D Flash world. Each scene object occupies a position in 3D space. Like movie clips, scene objects can be joined together in a hierarchy so that when one moves, all its children move with it.

A scene object can be associated with an instance of the Model class, through the SceneObject.model property. If this property is set then the model will be displayed at the position of the scene object. Scene objects which do not have an associated model are said to be empty.

Method summary for the SceneObject class

Method

Description

SceneObject.attachSceneObject() Attaches a SceneObject as a child of this SceneObject.
SceneObject.removeSceneObject()Removes this scene object as a child of its parent.

 

 

 

Property summary for the SceneObject class

PropertyDescription
SceneObject.matrixThe current Matrix3d position matrix of this SceneObject.
SceneObject.modelThe Model that this SceneObject uses (possibly null).
SceneObject._visibleSet this to false to turn this SceneObject and all children invisible. To make this SceneObject and all children visible, set this to true.
SceneObject.fieldOfViewThe full angle, in degrees, which is visible when this scene object is set to be used as a camera. The aperture size is taken to be the width of the Flash stage.

 

 

 

 

 

 

Constructor for the SceneObject class

Usage

new SceneObject();

Returns

A reference to a SceneObject object

Description

Scene objects differ from movie clips in that they are created like any other ActionScript object, using the new operator. However, a scene object created this way will not appear on the stage until it has been attached to a movie clip, or a previously attached scene object.

Example

The following creates a scene object and stores it in a variable called treasure:

var treasure = new SceneObject();
 
< Prev   Next >


© Copyright 2000-2011 Holomatix Ltd. All rights reserved.