Packageaway3dlite.cameras
Classpublic class Camera3D
InheritanceCamera3D Inheritance Object3D Inheritance flash.display.Sprite
SubclassesTargetCamera3D

Basic camera used to resolve a view.

See also

away3dlite.containers.View3D
Public Properties
 PropertyDefined by
 InheritedanimationLibrary : AnimationLibrary
Used in the loaders to store all parsed animation data contained in the model.
Object3D
  focus : Number
Defines the distance from the focal point of the camera to the viewing plane.
Camera3D
 InheritedgeometryLibrary : GeometryLibrary
Used in loaders to store all parsed geometry data contained in the model.
Object3D
  invSceneMatrix3D : Matrix3D
[read-only] Returns the 3d matrix representing the camera inverse scene transform for the view.
Camera3D
 Inheritedlayer : Sprite
An optional layer sprite used to draw into inseatd of the default view.
Object3D
  lens : AbstractLens
Defines the lens used for calculating the projectionMatrix3D of the camera.
Camera3D
 InheritedmaterialLibrary : MaterialLibrary
Used in loaders to store all parsed materials contained in the model.
Object3D
 InheritedmaxPersp : Number = 0
The maximum perspective value from which the 3d object can be viewed.
Object3D
 InheritedminPersp : Number = 0
The minimum perspective value from which the 3d object can be viewed.
Object3D
 Inheritedposition : Vector3D
Returns a 3d vector representing the local position of the 3d object.
Object3D
  projectionMatrix3D : Matrix3D
[read-only] Returns the 3d matrix representing the camera projection for the view.
Camera3D
 Inheritedscene : Scene3D
Returns the scene to which the 3d object belongs
Object3D
 InheritedsceneMatrix3D : Matrix3D
Returns a 3d matrix representing the absolute transformation of the 3d object in the scene.
Object3D
  screenMatrix3D : Matrix3D
[read-only] Returns the 3d matrix used in resolving screen space for the render loop.
Camera3D
 InheritedscreenZ : Number
Returns the z-sorting position of the 3d object.
Object3D
 Inheritedtype : String
Returns the type of 3d object.
Object3D
 Inheritedurl : String
Returns the source url of the 3d object, or the name of the family of generative geometry objects if not loaded from an external source.
Object3D
 InheritedviewMatrix3D : Matrix3D
Returns a 3d matrix representing the absolute transformation of the 3d object in the view.
Object3D
  zoom : Number
Defines the overall scale value of the view.
Camera3D
Public Methods
 MethodDefined by
  
Camera3D
(zoom:Number = 10, focus:Number = 100, lens:AbstractLens = null)
Creates a new Camera3D object.
Camera3D
 Inherited
clone(object:Object3D = null):Object3D
Duplicates the 3D object's properties to another Object3D object
Object3D
 Inherited
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
 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
moveRight(distance:Number):void
Moves the 3D object forwards along it's local x axis
Object3D
 Inherited
moveUp(distance:Number):void
Moves the 3D object forwards along it's local y axis
Object3D
 Inherited
pitch(degrees:Number):void
Rotates the 3D object around it's local x-axis
Object3D
 Inherited
roll(degrees:Number):void
Rotates the 3D object around it's local z-axis
Object3D
  
rotate(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
Rotates the Camera3D object around an axis by a defined degrees.
Camera3D
  
screen(vertex:Vector3D):Vector3D
Returns a Vector3D object describing the resolved x and y position of the given 3d vertex position.
Camera3D
 Inherited
translate(axis:Vector3D, distance:Number):void
Moves the 3D object along a vector by a defined length
Object3D
 Inherited
yaw(degrees:Number):void
Rotates the 3D object around it's local y-axis
Object3D
Protected Methods
 MethodDefined by
 Inherited
copyMatrix3D(m1:Matrix3D, m2:Matrix3D):void
Object3D
Events
 EventSummaryDefined by
 Inherited Dispatched when a user presses the left hand mouse button while the cursor is over the 3d object.Object3D
 Inherited Dispatched when a user moves the cursor while it is over the 3d object.Object3D
 Inherited Dispatched when a user moves the cursor away from the 3d object.Object3D
 Inherited Dispatched when a user moves the cursor over the 3d object.Object3D
 Inherited Dispatched when a user releases the left hand mouse button while the cursor is over the 3d object.Object3D
 Inherited Dispatched when a user rolls out of the 3d object.Object3D
 Inherited Dispatched when a user rolls over the 3d object.Object3D
Protected Constants
 ConstantDefined by
  toDEGREES : Number = 57.29577951308232
Camera3D
  toRADIANS : Number = 0.017453292519943295
Camera3D
Property detail
focusproperty
focus:Number  [read-write]

Defines the distance from the focal point of the camera to the viewing plane.

Implementation
    public function get focus():Number
    public function set focus(value:Number):void
invSceneMatrix3Dproperty 
invSceneMatrix3D:Matrix3D  [read-only]

Returns the 3d matrix representing the camera inverse scene transform for the view.

Implementation
    public function get invSceneMatrix3D():Matrix3D
_lensproperty 
arcane var _lens:AbstractLens
lensproperty 
lens:AbstractLens  [read-write]

Defines the lens used for calculating the projectionMatrix3D of the camera.

Implementation
    public function get lens():AbstractLens
    public function set lens(value:AbstractLens):void
_projectionMatrix3Dproperty 
arcane var _projectionMatrix3D:Matrix3D
projectionMatrix3Dproperty 
projectionMatrix3D:Matrix3D  [read-only]

Returns the 3d matrix representing the camera projection for the view.

Implementation
    public function get projectionMatrix3D():Matrix3D
_screenMatrix3Dproperty 
arcane var _screenMatrix3D:Matrix3D
screenMatrix3Dproperty 
screenMatrix3D:Matrix3D  [read-only]

Returns the 3d matrix used in resolving screen space for the render loop.

Implementation
    public function get screenMatrix3D():Matrix3D

See also

zoomproperty 
zoom:Number  [read-write]

Defines the overall scale value of the view.

Implementation
    public function get zoom():Number
    public function set zoom(value:Number):void
Constructor detail
Camera3D()constructor
public function Camera3D(zoom:Number = 10, focus:Number = 100, lens:AbstractLens = null)Parameters
zoom:Number (default = 10) — Defines the distance from the focal point of the camera to the viewing plane.
 
focus:Number (default = 100) — Defines the overall scale value of the view.
 
lens:AbstractLens (default = null) — Defines the lens used for calculating the projectionMatrix3D of the camera.
Init Parameters
Method detail
rotate()method
public override function rotate(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void

Rotates the Camera3D object around an axis by a defined degrees.

Parameters
degrees:Number — The degree of the rotation.
 
axis:Vector3D — The axis or direction of rotation. The usual axes are the X_AXIS (Vector3D(1,0,0)), Y_AXIS (Vector3D(0,1,0)), and Z_AXIS (Vector3D(0,0,1)).
 
pivotPoint:Vector3D (default = null) — A point that determines the center of an object's rotation. The default pivot point for an object is its registration point.
screen()method 
public function screen(vertex:Vector3D):Vector3D

Returns a Vector3D object describing the resolved x and y position of the given 3d vertex position.

Parameters
vertex:Vector3D — The vertex to be resolved.

Returns
Vector3D
Constant detail
toDEGREESconstant
protected const toDEGREES:Number = 57.29577951308232
toRADIANSconstant 
protected const toRADIANS:Number = 0.017453292519943295
Wiki link
Click to go to the wiki page for 'away3dlite.cameras.Camera3D'

Code examples

Comments