Packageaway3d.core.base
Classpublic class Object3D
InheritanceObject3D Inheritance flash.events.EventDispatcher
ImplementsIResource
SubclassesObjectContainer3D

Object3D provides a base class for any 3D object that has a (local) transformation.

Public Properties
 PropertyDefined by
  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
  name : String
The name of the object.
Object3D
  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
  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
  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
A calculation placeholder.
Object3D
  _scaleX : Number = 1
Object3D
  _scaleY : Number = 1
Object3D
  _scaleZ : Number = 1
Object3D
  _transform : Matrix3D
Object3D
  _x : Number = 0
Object3D
  _y : Number = 0
Object3D
  _z : Number = 0
Object3D
Public Methods
 MethodDefined by
  
Creates an Object3D object.
Object3D
  
Object3D
  
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
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
  
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
  
Invalidates the transformation matrix, causing it to be updated upon the next request
Object3D
  
Object3D
Property detail
eulersproperty
eulers:Vector3D  [read-write]

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.

nameproperty 
name:String  [read-write]

The name of the object.

Implementation
    public function get name():String
    public function set name(value:String):void
_pivotPointproperty 
protected var _pivotPoint:Vector3D
pivotPointproperty 
pivotPoint:Vector3D  [read-write]

Defines the local point around which the object rotates.

Implementation
    public function get pivotPoint():Vector3D
    public function set pivotPoint(value:Vector3D):void
_pivotZeroproperty 
protected var _pivotZero:Boolean = true
_posproperty 
protected var _pos:Vector3D

A calculation placeholder.

positionproperty 
position:Vector3D  [read-write]

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
rotationXproperty 
rotationX:Number  [read-write]

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  [read-write]

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  [read-write]

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 
protected var _scaleX:Number = 1
scaleXproperty 
scaleX:Number  [read-write]

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 
protected var _scaleY:Number = 1
scaleYproperty 
scaleY:Number  [read-write]

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 
protected var _scaleZ:Number = 1
scaleZproperty 
scaleZ:Number  [read-write]

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 
protected var _transform:Matrix3D
transformproperty 
transform:Matrix3D  [read-write]

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
_xproperty 
protected var _x:Number = 0
xproperty 
x:Number  [read-write]

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 
protected var _y:Number = 0
yproperty 
y:Number  [read-write]

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 
protected var _z:Number = 0
zproperty 
z:Number  [read-write]

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() Init Parameters
Method detail
clone()method
public function clone():Object3D

Returns
Object3D
dispose()method 
public 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.
invalidateTransform()method 
protected 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
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
Wiki link
Click to go to the wiki page for 'away3d.core.base.Object3D'

Code examples

Comments