Packageaway3d.containers
Classpublic class ObjectContainer3D
InheritanceObjectContainer3D Inheritance Object3D Inheritance flash.events.EventDispatcher
SubclassesEntity, Sound3D, TextureProjector

ObjectContainer3D is the most basic scene graph node. It can contain other ObjectContainer3Ds. ObjectContainer3D can have its own scene partition assigned. However, when assigned to a different scene, it will loose any partition information, since partitions are tied to a scene. TODO: polycount updates TODO: all the event-based stuff is not done (onDimensionsUpdate etc) Trying to avoid bubbling here :s TODO: names not implemented yet

Public Properties
 PropertyDefined by
 Inheritedeulers : Vector3D
Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.
Object3D
 Inheritedextra : Object
An object that can contain any extra data.
Object3D
  inverseSceneTransform : Matrix3D
[read-only] The inverse scene transform object that transforms from world to model space.
ObjectContainer3D
  maxX : Number
[read-only] The maximum extremum of the object along the X-axis.
ObjectContainer3D
  maxY : Number
[read-only] The maximum extremum of the object along the Y-axis.
ObjectContainer3D
  maxZ : Number
[read-only] The maximum extremum of the object along the Z-axis.
ObjectContainer3D
  minX : Number
[read-only] The minimum extremum of the object along the X-axis.
ObjectContainer3D
  minY : Number
[read-only] The minimum extremum of the object along the Y-axis.
ObjectContainer3D
  minZ : Number
[read-only] The minimum extremum of the object along the Z-axis.
ObjectContainer3D
 Inheritedname : String
The name of the object.
Object3D
  numChildren : uint
[read-only] The amount of child objects of the ObjectContainer3D.
ObjectContainer3D
  parent : ObjectContainer3D
The parent ObjectContainer3D to which this object's transformation is relative.
ObjectContainer3D
  partition : Partition3D
The space partition to be used by the object container and all its recursive children, unless it has its own space partition assigned.
ObjectContainer3D
 InheritedpivotPoint : Vector3D
Defines the local point around which the object rotates.
Object3D
 Inheritedposition : Vector3D
Defines the position of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 InheritedrotationX : Number
Defines the euler angle of rotation of the 3d object around the x-axis, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 InheritedrotationY : Number
Defines the euler angle of rotation of the 3d object around the y-axis, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 InheritedrotationZ : Number
Defines the euler angle of rotation of the 3d object around the z-axis, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 InheritedscaleX : Number
Defines the scale of the 3d object along the x-axis, relative to local coordinates.
Object3D
 InheritedscaleY : Number
Defines the scale of the 3d object along the y-axis, relative to local coordinates.
Object3D
 InheritedscaleZ : Number
Defines the scale of the 3d object along the z-axis, relative to local coordinates.
Object3D
  scenePosition : Vector3D
[read-only] The global position of the ObjectContainer3D in the scene.
ObjectContainer3D
  sceneTransform : Matrix3D
[read-only] The transformation matrix that transforms from model to world space.
ObjectContainer3D
  transform : Matrix3D
[write-only] The local transformation matrix that transforms to the parent object's space.
ObjectContainer3D
 Inheritedx : Number
Defines the x coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 Inheritedy : Number
Defines the y coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 Inheritedz : Number
Defines the z coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
Protected Properties
 PropertyDefined by
  _explicitPartition : Partition3D
ObjectContainer3D
  _implicitPartition : Partition3D
ObjectContainer3D
  _parent : ObjectContainer3D
ObjectContainer3D
 Inherited_pivotPoint : Vector3D
Object3D
 Inherited_pivotZero : Boolean = true
Object3D
 Inherited_pos : Vector3D
A calculation placeholder.
Object3D
 Inherited_scaleX : Number = 1
Object3D
 Inherited_scaleY : Number = 1
Object3D
 Inherited_scaleZ : Number = 1
Object3D
  _scene : Scene3D
ObjectContainer3D
  _sceneTransform : Matrix3D
ObjectContainer3D
  _sceneTransformDirty : Boolean = true
ObjectContainer3D
 Inherited_transform : Matrix3D
Object3D
 Inherited_x : Number = 0
Object3D
 Inherited_y : Number = 0
Object3D
 Inherited_z : Number = 0
Object3D
Public Methods
 MethodDefined by
  
Creates a new ObjectContainer3D object.
ObjectContainer3D
  
Adds a child ObjectContainer3D to the current object.
ObjectContainer3D
  
addChildren(... childarray):void
Adds an array of 3d objects to the scene as children of the container
ObjectContainer3D
 Inherited
Object3D
  
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
ObjectContainer3D
  
Retrieves the child object at the given index.
ObjectContainer3D
  
lookAt(target:Vector3D, upAxis:Vector3D = null):void
Rotates the 3d object around to face a point defined relative to the local coordinates of the parent ObjectContainer3D.
ObjectContainer3D
 Inherited
moveBackward(distance:Number):void
Moves the 3d object backwards along it's local z axis
Object3D
 Inherited
moveDown(distance:Number):void
Moves the 3d object backwards along it's local y axis
Object3D
 Inherited
moveForward(distance:Number):void
Moves the 3d object forwards along it's local z axis
Object3D
 Inherited
moveLeft(distance:Number):void
Moves the 3d object backwards along it's local x axis
Object3D
 Inherited
movePivot(dx:Number, dy:Number, dz:Number):void
Moves the local point around which the object rotates.
Object3D
 Inherited
moveRight(distance:Number):void
Moves the 3d object forwards along it's local x axis
Object3D
 Inherited
moveTo(dx:Number, dy:Number, dz:Number):void
Moves the 3d object directly to a point in space
Object3D
 Inherited
moveUp(distance:Number):void
Moves the 3d object forwards along it's local y axis
Object3D
 Inherited
pitch(angle:Number):void
Rotates the 3d object around it's local x-axis
Object3D
  
Removes a 3d object from the child array of the container
ObjectContainer3D
 Inherited
roll(angle:Number):void
Rotates the 3d object around it's local z-axis
Object3D
 Inherited
rotate(axis:Vector3D, angle:Number):void
Rotates the 3d object around an axis by a defined angle
Object3D
 Inherited
rotateTo(ax:Number, ay:Number, az:Number):void
Rotates the 3d object directly to a euler angle
Object3D
 Inherited
scale(value:Number):void
Appends a uniform scale to the current transformation.
Object3D
 Inherited
translate(axis:Vector3D, distance:Number):void
Moves the 3d object along a vector by a defined length
Object3D
  
translateLocal(axis:Vector3D, distance:Number):void
ObjectContainer3D
 Inherited
yaw(angle:Number):void
Rotates the 3d object around it's local y-axis
Object3D
Protected Methods
 MethodDefined by
  
Invalidates the scene transformation matrix, causing it to be updated the next time it's requested.
ObjectContainer3D
  
Invalidates the transformation matrix, causing it to be updated upon the next request
ObjectContainer3D
  
Updates the scene transformation matrix.
ObjectContainer3D
 Inherited
Object3D
Property detail
_explicitPartitionproperty
protected var _explicitPartition:Partition3D
_implicitPartitionproperty 
protected var _implicitPartition:Partition3D
implicitPartitionproperty 
implicitPartition:Partition3D  [read-write]

The space partition used for this object, possibly inherited from its parent.

Implementation
    arcane function get implicitPartition():Partition3D
    arcane function set implicitPartition(value:Partition3D):void
inverseSceneTransformproperty 
inverseSceneTransform:Matrix3D  [read-only]

The inverse scene transform object that transforms from world to model space.

Implementation
    public function get inverseSceneTransform():Matrix3D
maxXproperty 
maxX:Number  [read-only]

The maximum extremum of the object along the X-axis.

Implementation
    public function get maxX():Number
maxYproperty 
maxY:Number  [read-only]

The maximum extremum of the object along the Y-axis.

Implementation
    public function get maxY():Number
maxZproperty 
maxZ:Number  [read-only]

The maximum extremum of the object along the Z-axis.

Implementation
    public function get maxZ():Number
minXproperty 
minX:Number  [read-only]

The minimum extremum of the object along the X-axis.

Implementation
    public function get minX():Number
minYproperty 
minY:Number  [read-only]

The minimum extremum of the object along the Y-axis.

Implementation
    public function get minY():Number
minZproperty 
minZ:Number  [read-only]

The minimum extremum of the object along the Z-axis.

Implementation
    public function get minZ():Number
numChildrenproperty 
numChildren:uint  [read-only]

The amount of child objects of the ObjectContainer3D.

Implementation
    public function get numChildren():uint
_parentproperty 
protected var _parent:ObjectContainer3D
parentproperty 
parent:ObjectContainer3D  [read-write]

The parent ObjectContainer3D to which this object's transformation is relative.

Implementation
    public function get parent():ObjectContainer3D
    public function set parent(value:ObjectContainer3D):void
partitionproperty 
partition:Partition3D  [read-write]

The space partition to be used by the object container and all its recursive children, unless it has its own space partition assigned.

Implementation
    public function get partition():Partition3D
    public function set partition(value:Partition3D):void
_sceneproperty 
protected var _scene:Scene3D
sceneproperty 
scene:Scene3D  [read-write]

A reference to the Scene3D object to which this object belongs.

Implementation
    arcane function get scene():Scene3D
    arcane function set scene(value:Scene3D):void
scenePositionproperty 
scenePosition:Vector3D  [read-only]

The global position of the ObjectContainer3D in the scene.

Implementation
    public function get scenePosition():Vector3D
_sceneTransformproperty 
protected var _sceneTransform:Matrix3D
sceneTransformproperty 
sceneTransform:Matrix3D  [read-only]

The transformation matrix that transforms from model to world space.

Implementation
    public function get sceneTransform():Matrix3D
_sceneTransformDirtyproperty 
protected var _sceneTransformDirty:Boolean = true
transformproperty 
transform:Matrix3D  [write-only]

The local transformation matrix that transforms to the parent object's space.

Implementation
    public function set transform(value:Matrix3D):void
Constructor detail
ObjectContainer3D()constructor
public function ObjectContainer3D() Init Parameters
Method detail
addChild()method
public function addChild(child:ObjectContainer3D):ObjectContainer3D

Adds a child ObjectContainer3D to the current object. The child's transformation will become relative to the current object's transformation.

Parameters
child:ObjectContainer3D — The object to be added as a child.

Returns
ObjectContainer3D — A reference to the added child object.
addChildren()method 
public function addChildren(... childarray):void

Adds an array of 3d objects to the scene as children of the container

Parameters
... childarray — An array of 3d objects to be added
dispose()method 
public override function dispose(deep:Boolean):void

Cleans up any resources used by the current object.

Parameters
deep:Boolean — Indicates whether other resources should be cleaned up, that could potentially be shared across different instances.
getChildAt()method 
public function getChildAt(index:uint):ObjectContainer3D

Retrieves the child object at the given index.

Parameters
index:uint — The index of the object to be retrieved.

Returns
ObjectContainer3D — The child object at the given index.
invalidateSceneTransform()method 
protected function invalidateSceneTransform():void

Invalidates the scene transformation matrix, causing it to be updated the next time it's requested.

invalidateTransform()method 
protected override function invalidateTransform():void

Invalidates the transformation matrix, causing it to be updated upon the next request

lookAt()method 
public override function lookAt(target:Vector3D, upAxis:Vector3D = null):void

Rotates the 3d object around to face a point defined relative to the local coordinates of the parent ObjectContainer3D.

Parameters
target:Vector3D — The vector defining the point to be looked at
 
upAxis:Vector3D (default = null) — An optional vector used to define the desired up orientation of the 3d object after rotation has occurred
removeChild()method 
public function removeChild(child:ObjectContainer3D):void

Removes a 3d object from the child array of the container

Parameters
child:ObjectContainer3D — The 3d object to be removed

Throws
— ObjectContainer3D.removeChild(null)
translateLocal()method 
public override function translateLocal(axis:Vector3D, distance:Number):void Parameters
axis:Vector3D
 
distance:Number
updateSceneTransform()method 
protected function updateSceneTransform():void

Updates the scene transformation matrix.

Wiki link
Click to go to the wiki page for 'away3d.containers.ObjectContainer3D'

Code examples

Comments