Packageaway3d.containers
Classpublic class ObjectContainer3D
InheritanceObjectContainer3D Inheritance Object3D Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Implements IAsset
Subclasses Entity, Loader3D, 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.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
  assetType : String
[read-only]
ObjectContainer3D
 InheritedbackVector : Vector3D
[read-only]
Object3D
 InheriteddownVector : Vector3D
[read-only]
Object3D
 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
 InheritedforwardVector : Vector3D
[read-only]
Object3D
  ignoreTransform : Boolean
Does not apply any transformations to this object.
ObjectContainer3D
  inverseSceneTransform : Matrix3D
[read-only] The inverse scene transform object that transforms from world to model space.
ObjectContainer3D
 InheritedleftVector : Vector3D
[read-only]
Object3D
  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
  mouseChildren : Boolean
ObjectContainer3D
  mouseEnabled : Boolean
Indicates whether the IRenderable should trigger mouse events, and hence should be rendered for hit testing.
ObjectContainer3D
 Inheritedname : String
NamedAssetBase
  numChildren : uint
[read-only] The amount of child objects of the ObjectContainer3D.
ObjectContainer3D
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
  parent : ObjectContainer3D
[read-only] 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
 InheritedrightVector : Vector3D
[read-only]
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
  scene : Scene3D
A reference to the Scene3D object to which this object belongs.
ObjectContainer3D
  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
 Inheritedtransform : Matrix3D
The transformation of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
 InheritedupVector : Vector3D
[read-only]
Object3D
  visible : Boolean
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
  _ignoreTransform : Boolean = false
ObjectContainer3D
  _implicitPartition : Partition3D
ObjectContainer3D
  _mouseEnabled : Boolean
ObjectContainer3D
  _parent : ObjectContainer3D
ObjectContainer3D
 Inherited_pivotPoint : Vector3D
Object3D
 Inherited_pivotZero : Boolean = true
Object3D
 Inherited_pos : Vector3D
Object3D
 Inherited_rot : Vector3D
Object3D
 Inherited_sca : Vector3D
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_transformComponents : Vector.<Vector3D>
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
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override]
ObjectContainer3D
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
[override] Clones this ObjectContainer3D instance along with all it's children, and returns the result (which will be a copy of this container, containing copies of all it's children.)
ObjectContainer3D
  
ObjectContainer3D
  
dispatchEvent(event:Event):Boolean
[override]
ObjectContainer3D
  
dispose():void
[override] Cleans up resources used by this asset.
ObjectContainer3D
 Inherited
Object3D
  
Retrieves the child object at the given index.
ObjectContainer3D
  
lookAt(target:Vector3D, upAxis:Vector3D = null):void
[override] 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
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override]
ObjectContainer3D
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
 Inherited
roll(angle:Number):void
Rotates the 3d object around it's local z-axis
Object3D
  
rotate(axis:Vector3D, angle:Number):void
[override]
ObjectContainer3D
 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
[override]
ObjectContainer3D
  
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
  
ObjectContainer3D
  
Updates the scene transformation matrix.
ObjectContainer3D
 Inherited
Object3D
Events
 Event Summary Defined By
  Dispatched when a user presses the left hand mouse button while the cursor is over the 3d object.ObjectContainer3D
  Dispatched when a user moves the cursor while it is over the 3d object.ObjectContainer3D
  Dispatched when a user moves the cursor away from the 3d object.ObjectContainer3D
  Dispatched when a user moves the cursor over the 3d object.ObjectContainer3D
  Dispatched when a user releases the left hand mouse button while the cursor is over the 3d object.ObjectContainer3D
 InheritedDispatched when the position of the 3d object changes.Object3D
 InheritedDispatched when the rotation of the 3d object changes.Object3D
 InheritedDispatched when the scale of the 3d object changes.Object3D
  Dispatched when the parent scene of the 3d object changes.ObjectContainer3D
  Dispatched when the scene transform matrix of the 3d object changes.ObjectContainer3D
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
_explicitPartitionproperty
protected var _explicitPartition:Partition3D

_ignoreTransformproperty 
protected var _ignoreTransform:Boolean = false

_implicitPartitionproperty 
protected var _implicitPartition:Partition3D

_isRootproperty 
arcane var _isRoot:Boolean

_mouseEnabledproperty 
protected var _mouseEnabled:Boolean

_parentproperty 
protected var _parent:ObjectContainer3D

_sceneproperty 
protected var _scene:Scene3D

_sceneTransformproperty 
protected var _sceneTransform:Matrix3D

_sceneTransformDirtyproperty 
protected var _sceneTransformDirty:Boolean = true

assetTypeproperty 
assetType:String  [read-only]


Implementation
    public function get assetType():String
ignoreTransformproperty 
ignoreTransform:Boolean

Does not apply any transformations to this object. Allows static objects to be described in world coordinates without any matrix calculations.


Implementation
    public function get ignoreTransform():Boolean
    public function set ignoreTransform(value:Boolean):void
implicitPartitionproperty 
implicitPartition:Partition3D


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
mouseChildrenproperty 
mouseChildren:Boolean


Implementation
    public function get mouseChildren():Boolean
    public function set mouseChildren(value:Boolean):void
mouseEnabledproperty 
mouseEnabled:Boolean

Indicates whether the IRenderable should trigger mouse events, and hence should be rendered for hit testing.


Implementation
    public function get mouseEnabled():Boolean
    public function set mouseEnabled(value:Boolean):void
numChildrenproperty 
numChildren:uint  [read-only]

The amount of child objects of the ObjectContainer3D.


Implementation
    public function get numChildren():uint
parentproperty 
parent:ObjectContainer3D  [read-only]

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


Implementation
    public function get parent():ObjectContainer3D
partitionproperty 
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.


Implementation
    public function get partition():Partition3D
    public function set partition(value:Partition3D):void
sceneproperty 
scene:Scene3D

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


Implementation
    public function get scene():Scene3D
    public 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 
sceneTransform:Matrix3D  [read-only]

The transformation matrix that transforms from model to world space.


Implementation
    public function get sceneTransform():Matrix3D
visibleproperty 
visible:Boolean


Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
Constructor Detail
ObjectContainer3D()Constructor
public function ObjectContainer3D()

Creates a new ObjectContainer3D object.

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

addEventListener()method 
override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

clone()method 
override public function clone():Object3D

Clones this ObjectContainer3D instance along with all it's children, and returns the result (which will be a copy of this container, containing copies of all it's children.)

Returns
Object3D
contains()method 
public function contains(child:ObjectContainer3D):Boolean

Parameters

child:ObjectContainer3D

Returns
Boolean
dispatchEvent()method 
override public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
dispose()method 
override public function dispose():void

Cleans up resources used by this asset.

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 
override arcane function invalidateTransform():void

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

lookAt()method 
override public 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
Error ObjectContainer3D:removeChild(null)
removeEventListener()method 
override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

rotate()method 
override public function rotate(axis:Vector3D, angle:Number):void

Parameters

axis:Vector3D
 
angle:Number

translateLocal()method 
override public function translateLocal(axis:Vector3D, distance:Number):void

Parameters

axis:Vector3D
 
distance:Number

updateImplicitVisibility()method 
public function updateImplicitVisibility():void

updateMouseChildren()method 
protected function updateMouseChildren():void

updateSceneTransform()method 
protected function updateSceneTransform():void

Updates the scene transformation matrix.

Event Detail
mouseDown3d Event
Event Object Type: away3d.events.MouseEvent3D
MouseEvent3D.type property = away3d.events.MouseEvent3D

Dispatched when a user presses the left hand mouse button while the cursor is over the 3d object.

mouseMove3d Event  
Event Object Type: away3d.events.MouseEvent3D
MouseEvent3D.type property = away3d.events.MouseEvent3D

Dispatched when a user moves the cursor while it is over the 3d object.

mouseOut3d Event  
Event Object Type: away3d.events.MouseEvent3D
MouseEvent3D.type property = away3d.events.MouseEvent3D

Dispatched when a user moves the cursor away from the 3d object.

mouseOver3d Event  
Event Object Type: away3d.events.MouseEvent3D
MouseEvent3D.type property = away3d.events.MouseEvent3D

Dispatched when a user moves the cursor over the 3d object.

mouseUp3d Event  
Event Object Type: away3d.events.MouseEvent3D
MouseEvent3D.type property = away3d.events.MouseEvent3D

Dispatched when a user releases the left hand mouse button while the cursor is over the 3d object.

sceneChanged Event  
Event Object Type: away3d.events.Object3DEvent
Object3DEvent.type property = away3d.events.Object3DEvent

Dispatched when the parent scene of the 3d object changes.

See also

scenetransformChanged Event  
Event Object Type: away3d.events.Object3DEvent
Object3DEvent.type property = away3d.events.Object3DEvent

Dispatched when the scene transform matrix of the 3d object changes.

See also