Package | flare.core |
Class | public class Camera3D |
Inheritance | Camera3D ![]() ![]() |
There can be as many cameras as required, but the one selected in the scene will do the rendering.
See also
Property | Defined By | ||
---|---|---|---|
![]() | animationEnabled : Boolean = true
Activates or deactivates the animation. | Pivot3D | |
![]() | animationMode : int = 0 | Pivot3D | |
aspectRatio : Number
Sets or returns the aspect ratio of the camera. | Camera3D | ||
canvasSize : Point
Defines the projection area for the camera viewPort. | Camera3D | ||
![]() | children : Vector.<Pivot3D> [read-only]
Returns a Pivot3D-type vector with its children. | Pivot3D | |
clipRectangle : Boolean = true
Define whatever the viewPort clip all pixels outside the viewPort. | Camera3D | ||
![]() | components : Vector.<IComponent>
A collection vector that contains all the components of the object. | Pivot3D | |
![]() | currentFrame : Number
Returns or sets the frame number where the pivot is situated. | Pivot3D | |
![]() | dirty : Boolean = true
Gets or sets when the object has changed his transform matrix by hand. | Pivot3D | |
far : Number
Sets or returns the furthest clip plane from the camera. | Camera3D | ||
fieldOfView : Number
Sets and returns the camera’s angle of view. | Camera3D | ||
![]() | frames : Vector.<Frame3D>
Vector that contains all the animation frames. | Pivot3D | |
![]() | frameSpeed : Number
Returns or sets animation speed. | Pivot3D | |
![]() | global : Matrix3D
Returns a matrix with the global position, rotation and scale of the object. | Pivot3D | |
![]() | invGlobal : Matrix3D [read-only]
Returns a matrix with the inverse global position, rotation and scale of the object. | Pivot3D | |
![]() | inView : Boolean [read-only] | Pivot3D | |
![]() | isPlaying : Boolean [read-only]
Returns true if an animation is being played. | Pivot3D | |
![]() | labels : Array
Returns or sets a vector that contains the Labels3D objects used to play and manage animations. | Pivot3D | |
![]() | layer : int = 0
Gets or sets the layer to render the object. | Pivot3D | |
![]() | name : String
Sets or returns the object name. | Pivot3D | |
near : Number
Sets or returns the clip plane that is closest to the camera. | Camera3D | ||
![]() | parent : Pivot3D
Returns or sets the object’s parent. | Pivot3D | |
![]() | priority : int = 0
This value is for internal use to calculate the priority acording the distance from the camera during the render. | Pivot3D | |
projection : Matrix3D [read-only]
Returns the projection matrix. | Camera3D | ||
![]() | scaleX : Number
Increases or decreases the object scale on the X axis from its current scale. | Pivot3D | |
![]() | scaleY : Number
Increases or decreases the object scale on the Y axis from its current scale. | Pivot3D | |
![]() | scaleZ : Number
Increases or decreases the object scale on the Z axis from its current scale. | Pivot3D | |
![]() | scene : Scene3D [read-only]
Gets a reference to the scene that contains the object. | Pivot3D | |
![]() | sortMode : int
Gets ot sets the sorting mode for the object. | Pivot3D | |
![]() | updatable : Boolean | Pivot3D | |
![]() | userData : Object
Sets or returns an object for free use by the user. | Pivot3D | |
view : Matrix3D [read-only]
Returns the view matrix. | Camera3D | ||
viewPort : Rectangle
Defines the area where the camera will draw. | Camera3D | ||
viewProjection : Matrix3D [read-only]
Returns the viewProjection matrix. | Camera3D | ||
![]() | visible : Boolean
Sets or returns whether the object is visible. | Pivot3D | |
![]() | world : Matrix3D
Sets or returns the matrix of local position, rotation and scale. | Pivot3D | |
![]() | x : Number
Returns or sets the position on the X axis. | Pivot3D | |
![]() | y : Number
Returns or sets the position on the Y axis. | Pivot3D | |
![]() | z : Number
Returns or sets the position on the Z axis. | Pivot3D | |
zoom : Number
Sets or returns the camera zoom. | Camera3D |
Method | Defined By | ||
---|---|---|---|
Camera3D(name:String, fieldOfView:Number = 60) | Camera3D | ||
![]() |
Add a new object as a child. | Pivot3D | |
![]() | addComponent(component:IComponent):Boolean
Adds a new component to the object. | Pivot3D | |
![]() |
Adds a label that refers to a given animation. | Pivot3D | |
![]() |
Creates a copy of the object and all its elements. | Pivot3D | |
![]() | copyTransformFrom(source:Pivot3D, local:Boolean = true):void
Copies all transformations (position, rotation and scale) from another Pivot3D object. | Pivot3D | |
![]() | download():void | Pivot3D | |
![]() | draw(includeChildren:Boolean = true):void
Draws the object. | Pivot3D | |
![]() | forEach(callback:Function, filterClass:Class = null, params:Object = null, includeChildren:Boolean = true):void
Excecutes a calback functions for each of his children. | Pivot3D | |
![]() | getBackward(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the back of the object. | Pivot3D | |
![]() | getChildByName(name:String, startIndex:int = 0, includeChildren:Boolean = true):Pivot3D
Returns the first child that matches the specified name. | Pivot3D | |
![]() | getDir(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the front of the object. | Pivot3D | |
![]() | getDown(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the bottom side of the object. | Pivot3D | |
![]() | getLeft(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the left side of the object. | Pivot3D | |
![]() | getMaterialByName(name:String, includeChildren:Boolean = true):Material3D
Returns the first material that matches the specified name. | Pivot3D | |
getPointDir(x:Number, y:Number, out:Vector3D = null):Vector3D
Returns a global 3D direction vector relative to a 2D camera position. | Camera3D | ||
![]() | getPosition(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current position of the object. | Pivot3D | |
![]() | getRight(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the right side of the object. | Pivot3D | |
![]() | getRotation(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current rotation of the object in euler angles. | Pivot3D | |
![]() | getScale(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current scale of the object. | Pivot3D | |
![]() | getScreenCoords(out:Vector3D = null, camera:Camera3D = null, viewPort:Rectangle = null):Vector3D
Returns the coordinates of an object with respect to the screen. | Pivot3D | |
![]() | getUp(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the upper side of the object. | Pivot3D | |
![]() | globalToLocal(point:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the global space of the object into a local space. | Pivot3D | |
![]() | globalToLocalVector(vector:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the global space of the object into a local space without translation. | Pivot3D | |
![]() | gotoAndPlay(frame:Object, blendFrames:Number = 0, animationMode:int):void | Pivot3D | |
![]() | gotoAndStop(frame:Object, blendFrames:Number = 0):void
Stops the animation at the specified frame. | Pivot3D | |
![]() | hide():void
Sets whether the object is visible. | Pivot3D | |
![]() | localToGlobal(point:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the local space into the global space. | Pivot3D | |
![]() | localToGlobalVector(vector:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the local space of the object into a global space without translation. | Pivot3D | |
![]() | lookAt(x:Number, y:Number, z:Number, up:Vector3D = null, smooth:Number = 1):void
Directs the object towards the specified position. | Pivot3D | |
![]() | nextFrame():void | Pivot3D | |
![]() | play(animationMode:int = 0):void | Pivot3D | |
![]() | prevFrame():void | Pivot3D | |
![]() |
Removes a child of the object. | Pivot3D | |
![]() | removeComponent(component:IComponent):Boolean
Removes a component from the object. | Pivot3D | |
![]() |
Removes a label. | Pivot3D | |
![]() |
Replaces an existing material of the object with another material. | Pivot3D | |
![]() | resetTransforms():void
Resets the object position, rotation and scale. | Pivot3D | |
![]() | rotateAxis(angle:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
Rotates the object on the specified axis from its current position. | Pivot3D | |
![]() | rotateX(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the object on the X axis from its current position. | Pivot3D | |
![]() | rotateY(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the object on the Y axis from its current position. | Pivot3D | |
![]() | rotateZ(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the pivot on the Z axis from its current position. | Pivot3D | |
![]() | setLayer(value:int, includeChildren:Boolean = true):void
Sets the layer to render the object and all of his children. | Pivot3D | |
![]() | setMaterial(material:Material3D, includeChildren:Boolean = true):void
Sets a material for the object and, optionally, all its descendants. | Pivot3D | |
![]() | setNormalOrientation(normal:Vector3D, smooth:Number = 1):void
Aligns the object to a normal. | Pivot3D | |
![]() | setOrientation(dir:Vector3D, up:Vector3D = null, smooth:Number = 1):void
Orients the object in a specific direction. | Pivot3D | |
![]() | setPosition(x:Number, y:Number, z:Number, smooth:Number = 1, local:Boolean = true):void
Sets the position of the object. | Pivot3D | |
![]() | setRotation(x:Number, y:Number, z:Number):void
Sets the object rotation using euler angles. | Pivot3D | |
![]() | setScale(x:Number, y:Number, z:Number, smooth:Number = 1):void
Sets the object scale. | Pivot3D | |
![]() | setTranslation(x:Number = 0, y:Number = 0, z:Number = 0, local:Boolean = true):void
Translates the object from its current position to the specified distance. | Pivot3D | |
![]() | show():void
Sets whether the object is visible. | Pivot3D | |
![]() | startDrag(lockCenter:Boolean = false, reference:Vector3D = null):void
Lets the user drag the specified Pivot3D. | Pivot3D | |
![]() | stop():void | Pivot3D | |
![]() | stopDrag():void
Ends the startDrag() method. | Pivot3D | |
![]() | translateAxis(distance:Number, axis:Vector3D):void
Translates the object on a certain axis from its current position. | Pivot3D | |
![]() | translateX(distance:Number, local:Boolean = true):void
Translates the object on the X axis from its current position. | Pivot3D | |
![]() | translateY(distance:Number, local:Boolean = true):void
Translates the object on the Y axis from its current position. | Pivot3D | |
![]() | translateZ(distance:Number, local:Boolean = true):void
Translates the object on the Z axis from its current position. | Pivot3D | |
![]() | update():void | Pivot3D | |
updateProjectionMatrix():void
Updates the camera projection matrix. | Camera3D | ||
![]() | updateTransforms(includeChildren:Boolean = false):void
This method is used to force the system to update the object in those cases where its matrices have been modified manually. | Pivot3D | |
![]() | Pivot3D |
aspectRatio | property |
aspectRatio:Number
Sets or returns the aspect ratio of the camera.
public function get aspectRatio():Number
public function set aspectRatio(value:Number):void
canvasSize | property |
canvasSize:Point
Defines the projection area for the camera viewPort. If no canvasSize is defined, the values from scene viewPort are used. This property could be used in case where you need to render to a texture that has different dimensions that the scene viewport.
public function get canvasSize():Point
public function set canvasSize(value:Point):void
clipRectangle | property |
public var clipRectangle:Boolean = true
Define whatever the viewPort clip all pixels outside the viewPort.
far | property |
far:Number
Sets or returns the furthest clip plane from the camera. The higher the value, the further the camera will view. This value corresponds to the distance between the camera and the plane. Everything beyond that distance is not to be rendered. For optimization purposes, complex scenes with a large number of polygons should not have a high value to avoid the unnecessary rendering of objects that are too far.
public function get far():Number
public function set far(value:Number):void
See also
fieldOfView | property |
fieldOfView:Number
Sets and returns the camera’s angle of view. The angle of view is inversely proportional to the zoom. The wider the angle, the closer the projection plane and, therefore, the shorter the zoom.
public function get fieldOfView():Number
public function set fieldOfView(value:Number):void
See also
near | property |
near:Number
Sets or returns the clip plane that is closest to the camera. Its value must be greater than zero. Everything beyond this virtual plane is not to be rendered. The value corresponds to the distance between the camera and the plane. This value should be set at the furthest possible point from the camera. This is likely to result in improved performance, especially in those situations where objects go through the camera plane.
public function get near():Number
public function set near(value:Number):void
See also
projection | property |
projection:Matrix3D
[read-only] Returns the projection matrix.
public function get projection():Matrix3D
view | property |
view:Matrix3D
[read-only] Returns the view matrix.
public function get view():Matrix3D
viewPort | property |
viewPort:Rectangle
Defines the area where the camera will draw. This area is relative to the scene viewport or canvasSize if it is defined.
public function get viewPort():Rectangle
public function set viewPort(value:Rectangle):void
viewProjection | property |
viewProjection:Matrix3D
[read-only] Returns the viewProjection matrix.
public function get viewProjection():Matrix3D
zoom | property |
zoom:Number
Sets or returns the camera zoom. The zoom is the distance between the point of origin of the camera and the projection plane.
public function get zoom():Number
public function set zoom(value:Number):void
See also
Camera3D | () | Constructor |
public function Camera3D(name:String, fieldOfView:Number = 60)
name:String | |
fieldOfView:Number (default = 60 )
|
getPointDir | () | method |
public function getPointDir(x:Number, y:Number, out:Vector3D = null):Vector3D
Returns a global 3D direction vector relative to a 2D camera position.
Parameters
x:Number — The x position over the camera viewport.
| |
y:Number — The y position over the camera viewport.
| |
out:Vector3D (default = null ) — A reference vector to return the direction vector.
|
Vector3D — If the 'out' is 'null', a new vector will be returned. Otherwise, the same vector, passed to the 'out' parameter, will be returned.
|
updateProjectionMatrix | () | method |
public function updateProjectionMatrix():void
Updates the camera projection matrix.