Packageaway3d.core.base
Classpublic class Object3D
InheritanceObject3D Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses ObjectContainer3D

Object3D provides a base class for any 3D object that has a (local) transformation. Standard Transform: To affect Scale: To affect Pivot: To affect Rotate: To affect Translate (post-rotate translate):



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
  backVector : Vector3D
[read-only]
Object3D
  downVector : Vector3D
[read-only]
Object3D
  eulers : Vector3D
Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.
Object3D
  extra : Object
An object that can contain any extra data.
Object3D
  forwardVector : Vector3D
[read-only]
Object3D
  leftVector : Vector3D
[read-only]
Object3D
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
  pivotPoint : Vector3D
Defines the local point around which the object rotates.
Object3D
  position : Vector3D
Defines the position of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  rightVector : Vector3D
[read-only]
Object3D
  rotationX : 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
  rotationY : 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
  rotationZ : 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
  scaleX : Number
Defines the scale of the 3d object along the x-axis, relative to local coordinates.
Object3D
  scaleY : Number
Defines the scale of the 3d object along the y-axis, relative to local coordinates.
Object3D
  scaleZ : Number
Defines the scale of the 3d object along the z-axis, relative to local coordinates.
Object3D
  transform : Matrix3D
The transformation of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  upVector : Vector3D
[read-only]
Object3D
  x : Number
Defines the x coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  y : Number
Defines the y coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  z : Number
Defines the z coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
Protected Properties
 PropertyDefined By
  _pivotPoint : Vector3D
Object3D
  _pivotZero : Boolean = true
Object3D
  _pos : Vector3D
Object3D
  _rot : Vector3D
Object3D
  _sca : Vector3D
Object3D
  _scaleX : Number = 1
Object3D
  _scaleY : Number = 1
Object3D
  _scaleZ : Number = 1
Object3D
  _transform : Matrix3D
Object3D
  _transformComponents : Vector.<Vector3D>
Object3D
  _x : Number = 0
Object3D
  _y : Number = 0
Object3D
  _z : Number = 0
Object3D
Public Methods
 MethodDefined By
  
Creates an Object3D object.
Object3D
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override]
Object3D
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
Object3D
  
dispose():void
Cleans up any resources used by the current object.
Object3D
  
Object3D
  
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.
Object3D
  
moveBackward(distance:Number):void
Moves the 3d object backwards along it's local z axis
Object3D
  
moveDown(distance:Number):void
Moves the 3d object backwards along it's local y axis
Object3D
  
moveForward(distance:Number):void
Moves the 3d object forwards along it's local z axis
Object3D
  
moveLeft(distance:Number):void
Moves the 3d object backwards along it's local x axis
Object3D
  
movePivot(dx:Number, dy:Number, dz:Number):void
Moves the local point around which the object rotates.
Object3D
  
moveRight(distance:Number):void
Moves the 3d object forwards along it's local x axis
Object3D
  
moveTo(dx:Number, dy:Number, dz:Number):void
Moves the 3d object directly to a point in space
Object3D
  
moveUp(distance:Number):void
Moves the 3d object forwards along it's local y axis
Object3D
  
pitch(angle:Number):void
Rotates the 3d object around it's local x-axis
Object3D
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override]
Object3D
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
  
roll(angle:Number):void
Rotates the 3d object around it's local z-axis
Object3D
  
rotate(axis:Vector3D, angle:Number):void
Rotates the 3d object around an axis by a defined angle
Object3D
  
rotateTo(ax:Number, ay:Number, az:Number):void
Rotates the 3d object directly to a euler angle
Object3D
  
scale(value:Number):void
Appends a uniform scale to the current transformation.
Object3D
  
translate(axis:Vector3D, distance:Number):void
Moves the 3d object along a vector by a defined length
Object3D
  
translateLocal(axis:Vector3D, distance:Number):void
Moves the 3d object along a vector by a defined length
Object3D
  
yaw(angle:Number):void
Rotates the 3d object around it's local y-axis
Object3D
Protected Methods
 MethodDefined By
  
Object3D
Events
 Event Summary Defined By
  Dispatched when the position of the 3d object changes.Object3D
  Dispatched when the rotation of the 3d object changes.Object3D
  Dispatched when the scale of the 3d object changes.Object3D
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
_pivotPointproperty
protected var _pivotPoint:Vector3D

_pivotZeroproperty 
protected var _pivotZero:Boolean = true

_posproperty 
protected var _pos:Vector3D

_rotproperty 
protected var _rot:Vector3D

_scaproperty 
protected var _sca:Vector3D

_scaleXproperty 
protected var _scaleX:Number = 1

_scaleYproperty 
protected var _scaleY:Number = 1

_scaleZproperty 
protected var _scaleZ:Number = 1

_transformproperty 
protected var _transform:Matrix3D

_transformComponentsproperty 
protected var _transformComponents:Vector.<Vector3D>

_xproperty 
protected var _x:Number = 0

_yproperty 
protected var _y:Number = 0

_zproperty 
protected var _z:Number = 0

backVectorproperty 
backVector:Vector3D  [read-only]


Implementation
    public function get backVector():Vector3D
downVectorproperty 
downVector:Vector3D  [read-only]


Implementation
    public function get downVector():Vector3D
eulersproperty 
eulers:Vector3D

Defines the rotation of the 3d object as a Vector3D object containing euler angles for rotation around x, y and z axis.


Implementation
    public function get eulers():Vector3D
    public function set eulers(value:Vector3D):void
extraproperty 
public var extra:Object

An object that can contain any extra data.

forwardVectorproperty 
forwardVector:Vector3D  [read-only]


Implementation
    public function get forwardVector():Vector3D
leftVectorproperty 
leftVector:Vector3D  [read-only]


Implementation
    public function get leftVector():Vector3D
pivotPointproperty 
pivotPoint:Vector3D

Defines the local point around which the object rotates.


Implementation
    public function get pivotPoint():Vector3D
    public function set pivotPoint(value:Vector3D):void
positionproperty 
position:Vector3D

Defines the position of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get position():Vector3D
    public function set position(value:Vector3D):void
rightVectorproperty 
rightVector:Vector3D  [read-only]


Implementation
    public function get rightVector():Vector3D
rotationXproperty 
rotationX:Number

Defines the euler angle of rotation of the 3d object around the x-axis, relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get rotationX():Number
    public function set rotationX(value:Number):void
rotationYproperty 
rotationY:Number

Defines the euler angle of rotation of the 3d object around the y-axis, relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get rotationY():Number
    public function set rotationY(value:Number):void
rotationZproperty 
rotationZ:Number

Defines the euler angle of rotation of the 3d object around the z-axis, relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get rotationZ():Number
    public function set rotationZ(value:Number):void
scaleXproperty 
scaleX:Number

Defines the scale of the 3d object along the x-axis, relative to local coordinates.


Implementation
    public function get scaleX():Number
    public function set scaleX(value:Number):void
scaleYproperty 
scaleY:Number

Defines the scale of the 3d object along the y-axis, relative to local coordinates.


Implementation
    public function get scaleY():Number
    public function set scaleY(value:Number):void
scaleZproperty 
scaleZ:Number

Defines the scale of the 3d object along the z-axis, relative to local coordinates.


Implementation
    public function get scaleZ():Number
    public function set scaleZ(value:Number):void
transformproperty 
transform:Matrix3D

The transformation of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get transform():Matrix3D
    public function set transform(value:Matrix3D):void
upVectorproperty 
upVector:Vector3D  [read-only]


Implementation
    public function get upVector():Vector3D
xproperty 
x:Number

Defines the x coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number

Defines the y coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get y():Number
    public function set y(value:Number):void
zproperty 
z:Number

Defines the z coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.


Implementation
    public function get z():Number
    public function set z(value:Number):void
Constructor Detail
Object3D()Constructor
public function Object3D()

Creates an Object3D object.

Method Detail
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 
public function clone():Object3D

Returns
Object3D
dispose()method 
public function dispose():void

Cleans up any resources used by the current object.

disposeAsset()method 
public function disposeAsset():void

invalidateTransform()method 
arcane function invalidateTransform():void

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

lookAt()method 
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

moveBackward()method 
public function moveBackward(distance:Number):void

Moves the 3d object backwards along it's local z axis

Parameters

distance:Number — The length of the movement

moveDown()method 
public function moveDown(distance:Number):void

Moves the 3d object backwards along it's local y axis

Parameters

distance:Number — The length of the movement

moveForward()method 
public function moveForward(distance:Number):void

Moves the 3d object forwards along it's local z axis

Parameters

distance:Number — The length of the movement

moveLeft()method 
public function moveLeft(distance:Number):void

Moves the 3d object backwards along it's local x axis

Parameters

distance:Number — The length of the movement

movePivot()method 
public function movePivot(dx:Number, dy:Number, dz:Number):void

Moves the local point around which the object rotates.

Parameters

dx:Number — The amount of movement along the local x axis.
 
dy:Number — The amount of movement along the local y axis.
 
dz:Number — The amount of movement along the local z axis.

moveRight()method 
public function moveRight(distance:Number):void

Moves the 3d object forwards along it's local x axis

Parameters

distance:Number — The length of the movement

moveTo()method 
public function moveTo(dx:Number, dy:Number, dz:Number):void

Moves the 3d object directly to a point in space

Parameters

dx:Number — The amount of movement along the local x axis.
 
dy:Number — The amount of movement along the local y axis.
 
dz:Number — The amount of movement along the local z axis.

moveUp()method 
public function moveUp(distance:Number):void

Moves the 3d object forwards along it's local y axis

Parameters

distance:Number — The length of the movement

pitch()method 
public function pitch(angle:Number):void

Rotates the 3d object around it's local x-axis

Parameters

angle:Number — The amount of rotation in degrees

removeEventListener()method 
override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

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

roll()method 
public function roll(angle:Number):void

Rotates the 3d object around it's local z-axis

Parameters

angle:Number — The amount of rotation in degrees

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

Rotates the 3d object around an axis by a defined angle

Parameters

axis:Vector3D — The vector defining the axis of rotation
 
angle:Number — The amount of rotation in degrees

rotateTo()method 
public function rotateTo(ax:Number, ay:Number, az:Number):void

Rotates the 3d object directly to a euler angle

Parameters

ax:Number — The angle in degrees of the rotation around the x axis.
 
ay:Number — The angle in degrees of the rotation around the y axis.
 
az:Number — The angle in degrees of the rotation around the z axis.

scale()method 
public function scale(value:Number):void

Appends a uniform scale to the current transformation.

Parameters

value:Number — The amount by which to scale.

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

Moves the 3d object along a vector by a defined length

Parameters

axis:Vector3D — The vector defining the axis of movement
 
distance:Number — The length of the movement

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

Moves the 3d object along a vector by a defined length

Parameters

axis:Vector3D — The vector defining the axis of movement
 
distance:Number — The length of the movement

updateTransform()method 
protected function updateTransform():void

yaw()method 
public function yaw(angle:Number):void

Rotates the 3d object around it's local y-axis

Parameters

angle:Number — The amount of rotation in degrees

Event Detail
positionChanged Event
Event Object Type: away3d.events.Object3DEvent
Object3DEvent.type property = away3d.events.Object3DEvent

Dispatched when the position of the 3d object changes.

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

Dispatched when the rotation of the 3d object changes.

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

Dispatched when the scale of the 3d object changes.