Packagecom.derschmale.wick3d.core.objects
Classpublic class SpatialObject3D
InheritanceSpatialObject3D Inheritance flash.events.EventDispatcher
SubclassesCamera3D, HierarchicObject3D

The SpatialObject3D class is an abstract class representing an object in 3D space, which can be positioned and transformed.

See also

com.derschmale.wick3d.core.math.Transformation3D


Public Properties
 PropertyDefined by
  pitch : Number
The pitch Euler angle (independent rotation about the x-Axis) for the local transformation.
SpatialObject3D
  position : Vector3D
[read-only] The origin of the object's coordinate system as a Vector3D object
SpatialObject3D
  roll : Number
The roll Euler angle (independent rotation about the z-Axis) for the local transformation.
SpatialObject3D
  rotationX : Number
The rotation about the X-Axis in radians
SpatialObject3D
  rotationY : Number
The rotation about the Y-Axis in radians
SpatialObject3D
  rotationZ : Number
The rotation about the Z-Axis in radians
SpatialObject3D
  scaleX : Number
The scale factor along the X-Axis
SpatialObject3D
  scaleY : Number
The scale factor along the Y-Axis
SpatialObject3D
  scaleZ : Number
The scale factor along the Z-Axis
SpatialObject3D
  transform : Transformation3D
The transformation object
SpatialObject3D
  x : Number
The x-coordinate of the origin of the object's coordinate system
SpatialObject3D
  y : Number
The y-coordinate of the origin of the object's coordinate system
SpatialObject3D
  yaw : Number
The yaw Euler angle (independent rotation about the y-Axis) for the local transformation.
SpatialObject3D
  z : Number
The z-coordinate of the origin of the object's coordinate system
SpatialObject3D
Public Methods
 MethodDefined by
  
lookAt(target:SpatialObject3D):void
Sets the transformation matrix so that the current object is oriented towards a target.
SpatialObject3D
  
moveBackward(distance:Number):void
Performs a backwards movement.
SpatialObject3D
  
moveDown(distance:Number):void
Performs a downwards movement.
SpatialObject3D
  
moveForward(distance:Number):void
Performs a forward movement.
SpatialObject3D
  
moveLeft(distance:Number):void
Performs a strafing movement to the left.
SpatialObject3D
  
moveRight(distance:Number):void
Performs a strafing movement to the right.
SpatialObject3D
  
moveUp(distance:Number):void
Performs an upwards movement.
SpatialObject3D
  
transformToViewCoords(pipelineData:RenderPipelineData, camera:Camera3D, parentTransform:Transformation3D = null, recursive:Boolean = true):void
Updates the object's transformation if necessary and transforms the object to view coordinates
SpatialObject3D
Property detail
pitchproperty
pitch:Number  [read-write]

The pitch Euler angle (independent rotation about the x-Axis) for the local transformation.

Implementation
    public function get pitch():Number
    public function set pitch(value:Number):void
positionproperty 
position:Vector3D  [read-only]

The origin of the object's coordinate system as a Vector3D object

Implementation
    public function get position():Vector3D
rollproperty 
roll:Number  [read-write]

The roll Euler angle (independent rotation about the z-Axis) for the local transformation.

Implementation
    public function get roll():Number
    public function set roll(value:Number):void
rotationXproperty 
rotationX:Number  [read-write]

The rotation about the X-Axis in radians

Implementation
    public function get rotationX():Number
    public function set rotationX(value:Number):void
rotationYproperty 
rotationY:Number  [read-write]

The rotation about the Y-Axis in radians

Implementation
    public function get rotationY():Number
    public function set rotationY(value:Number):void
rotationZproperty 
rotationZ:Number  [read-write]

The rotation about the Z-Axis in radians

Implementation
    public function get rotationZ():Number
    public function set rotationZ(value:Number):void
scaleXproperty 
scaleX:Number  [read-write]

The scale factor along the X-Axis

Implementation
    public function get scaleX():Number
    public function set scaleX(value:Number):void
scaleYproperty 
scaleY:Number  [read-write]

The scale factor along the Y-Axis

Implementation
    public function get scaleY():Number
    public function set scaleY(value:Number):void
scaleZproperty 
scaleZ:Number  [read-write]

The scale factor along the Z-Axis

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

The transformation object

See also

xproperty 
x:Number  [read-write]

The x-coordinate of the origin of the object's coordinate system

Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]

The y-coordinate of the origin of the object's coordinate system

Implementation
    public function get y():Number
    public function set y(value:Number):void
yawproperty 
yaw:Number  [read-write]

The yaw Euler angle (independent rotation about the y-Axis) for the local transformation.

Implementation
    public function get yaw():Number
    public function set yaw(value:Number):void
zproperty 
z:Number  [read-write]

The z-coordinate of the origin of the object's coordinate system

Implementation
    public function get z():Number
    public function set z(value:Number):void
Method detail
lookAt()method
public function lookAt(target:SpatialObject3D):void

Sets the transformation matrix so that the current object is oriented towards a target.

Parameters
target:SpatialObject3D — The target SpatialObject3D towards which the current object should be oriented.
moveBackward()method 
public function moveBackward(distance:Number):void

Performs a backwards movement. The object will move by a certain distance in the direction of its local X-axis.

Parameters
distance:Number — The distance to move the camera along the X-axis.
moveDown()method 
public function moveDown(distance:Number):void

Performs a downwards movement. The camera will move by a certain distance in the direction of its local Y-axis.

Parameters
distance:Number — The distance to move the camera along the Y-axis.
moveForward()method 
public function moveForward(distance:Number):void

Performs a forward movement. The object will move by a certain distance in the direction of its local X-axis.

Parameters
distance:Number — The distance to move the camera along the X-axis.
moveLeft()method 
public function moveLeft(distance:Number):void

Performs a strafing movement to the left. The object will move by a certain distance in the direction of its local Z-axis.

Parameters
distance:Number — The distance to move the camera along the Z-axis.
moveRight()method 
public function moveRight(distance:Number):void

Performs a strafing movement to the right. The object will move by a certain distance in the direction of its local Z-axis.

Parameters
distance:Number — The distance to move the camera along the Z-axis.
moveUp()method 
public function moveUp(distance:Number):void

Performs an upwards movement. The camera will move by a certain distance in the direction of its local Y-axis.

Parameters
distance:Number — The distance to move the camera along the Y-axis.
transformToViewCoords()method 
public function transformToViewCoords(pipelineData:RenderPipelineData, camera:Camera3D, parentTransform:Transformation3D = null, recursive:Boolean = true):void

Updates the object's transformation if necessary and transforms the object to view coordinates

Parameters
pipelineData:RenderPipelineData — If true (default), the current's objects children will also be transformed into world coordinates. The whole hierarchical tree is traversed starting from this object until no children are found.
 
camera:Camera3D
 
parentTransform:Transformation3D (default = null)
 
recursive:Boolean (default = true)