ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
Orientation3D

Package | flash.geom
Class | public final class Orientation3D
Inheritance | Orientation3D Object

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

The Orientation3D class is an enumeration of constant values for representing the orientation style of a Matrix3D object. The three types of orientation are Euler angles, axis angle, and quaternion. The `decompose` and `recompose` methods of the Matrix3D object take one of these enumerated types to identify the rotational components of the Matrix.

See also

flash.geom.Matrix3D
flash.geom.Transform
flash.geom.PerspectiveProjection

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | AXIS_ANGLE : String = "axisAngle" [static] The axis angle orientation uses a combination of an axis and an angle to determine the orientation. | Orientation3D
|  | EULER_ANGLES : String = "eulerAngles" [static] Euler angles, the default orientation for decompose() and recompose() methods, defines the orientation with three separate angles of rotation for each axis. | Orientation3D
|  | QUATERNION : String = "quaternion" [static] The quaternion orientation uses complex numbers. | Orientation3D

Constant Detail

AXIS_ANGLE | Constant

`public static const AXIS_ANGLE:String = "axisAngle"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

The axis angle orientation uses a combination of an axis and an angle to determine the orientation. A line or vector from the center of a three-dimensional globe to the surface is an example of an axis. The axis around which the object is rotated is a unit vector that represents any possible direction in the three-dimensional space. The angle represents the magnitude of the rotation about the vector. The direction determines where a display object is facing and the roll angle determines which way is up. You can use Vector3D and the Matrix3D objects to determine the various matrix transformations as well as to determine important three-dimensional programming values such as the distance to the intersection of two objects that can be used to detect simple collision between three-dimensional objects.

The `Matrix3D.appendRotation()` and `Matrix3D.prependRotation()` methods use the axis angle orientation.

See also

flash.geom.Matrix3D.decompose()
flash.geom.Matrix3D.recompose()

EULER_ANGLES | Constant |

`public static const EULER_ANGLES:String = "eulerAngles"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Euler angles, the default orientation for `decompose()` and `recompose()` methods, defines the orientation with three separate angles of rotation for each axis. Usually, a rotation around the x axis is followed by a rotation around the y axis, which is followed by a rotation around the z axis.

Euler angles can sometimes lead to animation errors because of problems such as singularities when rotating around the x axis or gimbal lock. For example, since with Euler angles each axis is handled independently, gimbal lock can occur during the rotation around two or more axes. The axes can become aligned, leading to unexpected results.

The axis rotation properties of the display object perform Euler angles rotation.

See also

flash.geom.Matrix3D.decompose()
flash.geom.Matrix3D.recompose()

QUATERNION | Constant |

`public static const QUATERNION:String = "quaternion"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

The quaternion orientation uses complex numbers. An orientation in quaternion is by the three axes of rotation (x,y,z) and an angle of rotation (w). Quaternion guarantees the shortest, most efficient, path for the rotation. It also produces a smooth, gimbal-lock-free rotation. A gimbal lock can occur when during the rotation around two or more axes the axes are aligned, leading to unexpected results.

The `Matrix3D.interpolate()` method uses quaternion.

See also

flash.geom.Matrix3D.decompose()
flash.geom.Matrix3D.recompose()

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00