| Package | alternativa.engine3d.core | 
| Class | public class Camera3D | 
| Inheritance | Camera3D  Object3D  Object | 
farClipping.
 The pyramid is truncated at the nearClipping. Current version of Alternativa3D uses Z-Buffer for sorting objects,
 accuracy of sorting depends on distance between farClipping and nearClipping. That's why necessary to set a minimum
 distance between them for current scene. nearClipping mustn't be equal zero.
 
 | Property | Defined By | ||
|---|---|---|---|
| blurEnabled : Boolean = true | Camera3D | ||
|  | boundBox : BoundBox 
		 Bounds of the object described as rectangular parallelepiped. | Object3D | |
|  | concatenatedMatrix : Matrix3D [read-only] 
		 A Matrix3D object representing the combined transformation matrices of the Object3D
		 and all of its parent objects, back to the root level. | Object3D | |
| debug : Boolean = false 
	 Turns debug mode on if true and off otherwise. | Camera3D | ||
| depthScale : int | Camera3D | ||
| diagram : DisplayObject [read-only] 
	 Diagram where debug information is displayed. | Camera3D | ||
| diagramAlign : String 
	 Diagram alignment relatively to working space. | Camera3D | ||
| diagramHorizontalMargin : Number 
	 Diagram margin from the edge of working space in horizontal axis. | Camera3D | ||
| diagramVerticalMargin : Number 
	 Diagram margin from the edge of working space in vertical axis. | Camera3D | ||
|  | doubleClickEnabled : Boolean = false 
		 Specifies whether the object receives doubleClick events. | Object3D | |
| effectMode : int = 0 
	  Defines what will render the camera. | Camera3D | ||
| effectRate : int = 1 | Camera3D | ||
|  | excludedLights : Vector.<Light3D> [read-only] 
		 Returns excluded lights list of current object. | Object3D | |
| farClipping : Number 
	 Far distance of clipping. | Camera3D | ||
| fov : Number 
	 Field if view. | Camera3D | ||
| fpsUpdatePeriod : int = 10 
	 The amount of frames which determines the period of FPS value update in diagram. | Camera3D | ||
|  | matrix : Matrix3D 
		 The matrix property represents a transformation matrix that determines the position
		 and orientation of an Object3D. | Object3D | |
|  | mouseChildren : Boolean = true 
		 Determines whether or not the children of the object are mouse, or user input device, enabled. | Object3D | |
|  | mouseEnabled : Boolean = true 
		 Specifies whether this object receives mouse, or other user input, messages. | Object3D | |
|  | name : String 
		 Name of the object. | Object3D | |
| nearClipping : Number 
	 Near clipping distance. | Camera3D | ||
|  | numChildren : int [read-only] 
		 Returns the number of children of this object. | Object3D | |
| orthographic : Boolean = false 
	 Determines whether orthographic (true) or perspective (false) projection is used. | Camera3D | ||
|  | parent : Object3D [read-only] 
		 Object3D, to which this object was added as a child. | Object3D | |
|  | rotationX : Number 
		  The  angle of rotation of Object3D around the X-axis expressed in radians. | Object3D | |
|  | rotationY : Number 
		 The  angle of rotation of Object3D around the Y-axis expressed in radians. | Object3D | |
|  | rotationZ : Number 
		 The  angle of rotation of Object3D around the Z-axis expressed in radians. | Object3D | |
|  | scaleX : Number 
		 The scale of the Object3D along the X-axis. | Object3D | |
|  | scaleY : Number 
		 The scale of the Object3D along the Y-axis. | Object3D | |
|  | scaleZ : Number 
		 The scale of the Object3D along the Z-axis. | Object3D | |
| ssaoScale : int = 0 
	 Defines SSAO resolution. | Camera3D | ||
| timerUpdatePeriod : int = 10 
	 The amount of frames which determines the period of MS value update in diagram. | Camera3D | ||
|  | useHandCursor : Boolean 
		 A Boolean value that indicates whether the pointing hand (hand cursor)
		 appears when the pointer rolls over a Object3D. | Object3D | |
|  | userData : Object 
		 Custom data available to store within Object3D by user. | Object3D | |
| view : View 
	 The viewport defines part of screen to which renders image seen by the camera. | Camera3D | ||
|  | visible : Boolean = true 
		 Whether or not the display object is visible. | Object3D | |
|  | x : Number 
		 X coordinate. | Object3D | |
|  | y : Number 
		 Y coordinate. | Object3D | |
|  | z : Number 
		  Z coordinate. | Object3D | |
| Method | Defined By | ||
|---|---|---|---|
| Camera3D(nearClipping:Number, farClipping:Number) 
	 Creates a Camera3D object. | Camera3D | ||
|  | 
		  Adds given Object3D instance as a child to the end of this Object3D's children list. | Object3D | |
|  | 
		 Adds a child Object3D instance to this Object3D instance. | Object3D | |
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void 
		 Registers an event listener object with an EventDispatcher object
		 so that the listener receives notification of an event. | Object3D | |
| addToDebug(debug:int, objectOrClass:*):void 
	 Adds an object or a class to list of debug drawing. | Camera3D | ||
|  | calculateBoundBox():void 
		 Calculates object's bounds in its own coordinates
		  | Object3D | |
| calculateRay(origin:Vector3D, direction:Vector3D, viewX:Number, viewY:Number):void 
	 Calculates a ray in global space. | Camera3D | ||
|  | clearExcludedLights(updateChildren:Boolean = false):void 
		 Resets list of lights excluded from lighting this object. | Object3D | |
| [override] 
	 
		 Returns a copy of object. | Camera3D | ||
|  | 
		 Check if given object is child of this Object3D. | Object3D | |
|  | dispatchEvent(event:Event):Boolean 
		 Dispatches an event into the event flow. | Object3D | |
|  | excludeLight(light:Light3D, updateChildren:Boolean = false):void 
		 Disables lighting of the object by given light. | Object3D | |
|  | getChildAt(index:int):Object3D 
		 Returns the child Object3D instance that exists at the specified index. | Object3D | |
|  | getChildByName(name:String):Object3D 
		 Returns child Object3D instance with given name. | Object3D | |
|  | getChildIndex(child:Object3D):int 
		 Returns index of given child  Object3D instance. | Object3D | |
|  | getResources(hierarchy:Boolean = false, resourceType:Class = null):Vector.<Resource> 
		 Gather the resources of this Object3D. | Object3D | |
|  | globalToLocal(point:Vector3D):Vector3D 
		 Converts the Vector3D object from the root Object3D (global) coordinates to the local Object3D's own coordinates. | Object3D | |
|  | hasEventListener(type:String):Boolean 
		 Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | Object3D | |
|  | intersectRay(origin:Vector3D, direction:Vector3D):RayIntersectionData 
		 Searches for the intersection of an Object3D and given ray, defined by origin and direction. | Object3D | |
|  | localToGlobal(point:Vector3D):Vector3D 
		 Converts the Vector3D object from the Object3D's own (local) coordinates to the root Object3D (global) coordinates. | Object3D | |
| lookAt(x:Number, y:Number, z:Number):void 
	  Camera3D lookAt method
	  | Camera3D | ||
| projectGlobal(point:Vector3D):Vector3D 
	 Transforms point from global space to screen space. | Camera3D | ||
|  | 
		 Removes the specified child Object3D instance from the child list of the
		 this Object3D instance. | Object3D | |
|  | removeChildAt(index:int):Object3D 
		 Removes a child Object3D from the specified index position in the child list of
		 the Object3D. | Object3D | |
|  | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void 
		 Removes child objects in given range of indexes. | Object3D | |
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void 
		 Removes a listener from the EventDispatcher object. | Object3D | |
| removeFromDebug(debug:int, objectOrClass:*):void 
	 Removed an object or a class from list of debug drawing. | Camera3D | ||
| render(stage3D:Stage3D):void 
	 Rendering of objects hierarchy to the given Stage3D. | Camera3D | ||
|  | setChildIndex(child:Object3D, index:int):void 
		 Sets index for child  Object3D instance. | Object3D | |
| setPosition(x:Number, y:Number, z:Number):void 
	 Setup Camera3D position using x, y, z coordinates
	  | Camera3D | ||
| startTimer():void 
	 Starts time count. | Camera3D | ||
| stopTimer():void 
	 Stops time count. | Camera3D | ||
|  | 
		 Swaps index positions of two specified child objects. | Object3D | |
|  | swapChildrenAt(index1:int, index2:int):void 
		 Swaps index positions of two child objects by its index. | Object3D | |
|  | toString():String 
		 Returns the string representation of the specified object. | Object3D | |
|  | willTrigger(type:String):Boolean 
		 Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | Object3D | |
| Method | Defined By | ||
|---|---|---|---|
| clonePropertiesFrom(source:Object3D):void [override] 
	 
		 Copies basic properties of Object3D. | Camera3D | ||
| Constant | Defined By | ||
|---|---|---|---|
| MODE_COLOR : int = 0 [static] 
	 In this mode camera will render usual color image without SSAO. | Camera3D | ||
| MODE_DEPTH : int = 2 [static] 
	 This mode displays depth map which is z-buffer converted to grayscale. | Camera3D | ||
| MODE_NORMALS : int = 3 [static] 
	 This mode displays normal map calculated in screen space. | Camera3D | ||
| MODE_RAW_DEPTH : int = 1 [static] 
	  This mode represents z-buffer as it is stored with engine. | Camera3D | ||
| MODE_SSAO_COLOR : int = 9 [static] 
	 This mode displays  postprocessed image which is SSAO effect combined with usual color image. | Camera3D | ||
| MODE_SSAO_ONLY : int = 8 [static] 
	 This mode displays pure SSAO effect. | Camera3D | ||
| blurEnabled | property | 
public var blurEnabled:Boolean = true| debug | property | 
public var debug:Boolean = false
	 Turns debug mode on if true and off otherwise.
	 The default value is false.
	 
	 
See also
| depthScale | property | 
depthScale:int    public function get depthScale():int    public function set depthScale(value:int):void| diagram | property | 
diagram:DisplayObject  [read-only] 
	 Diagram where debug information is displayed. To display diagram, you need to add it on the screen.
	 FPS is an average amount of frames per second.
	 MS is an average time of executing the code part in milliseconds. This code part is measured with startTimer - stopTimer.
	 MEM is an amount of memory reserved by player (in megabytes).
	 DRW is an amount of draw calls in the current frame.
	 PLG is an amount of visible polygons in the current frame.
	 TRI is an amount of drawn triangles in the current frame.
	 
	 
    public function get diagram():DisplayObjectSee also
| diagramAlign | property | 
diagramAlign:String
	 Diagram alignment relatively to working space. You can use constants of StageAlign class.
	 
	 
    public function get diagramAlign():String    public function set diagramAlign(value:String):void| diagramHorizontalMargin | property | 
diagramHorizontalMargin:NumberDiagram margin from the edge of working space in horizontal axis.
    public function get diagramHorizontalMargin():Number    public function set diagramHorizontalMargin(value:Number):void| diagramVerticalMargin | property | 
diagramVerticalMargin:NumberDiagram margin from the edge of working space in vertical axis.
    public function get diagramVerticalMargin():Number    public function set diagramVerticalMargin(value:Number):void| effectMode | property | 
public var effectMode:int = 0
	  Defines what will render the camera.   You should set one of following values: Camera3D.MODE_COLOR, Camera3D.MODE_DEPTH,
	  Camera3D.MODE_NORMALS, Camera3D.MODE_RAW_DEPTH, Camera3D.MODE_SSAO_COLOR, Camera3D.MODE_SSAO_ONLY
	  
See also
| effectRate | property | 
public var effectRate:int = 1| farClipping | property | 
public var farClipping:Number
	 Far distance of clipping. Default value Number.MAX_VALUE.
	 
| fov | property | 
public var fov:Number
	 Field if view. Defines in radians.  Default value is Math.PI/2 which considered with 90 degrees.
	 
| fpsUpdatePeriod | property | 
public var fpsUpdatePeriod:int = 10
	 The amount of frames which determines the period of FPS value update in diagram.
	 
See also
| nearClipping | property | 
public var nearClipping:Number
	 Near clipping distance. Default value 0. It should be as big as possible.
	 
| orthographic | property | 
public var orthographic:Boolean = falseDetermines whether orthographic (true) or perspective (false) projection is used. The default value is false.
| ssaoScale | property | 
public var ssaoScale:int = 0
	 Defines SSAO resolution. In case of 0 SSAO resolution is equal to screen resolution, in case of 1 – half screen resolution and so on.
	 
| timerUpdatePeriod | property | 
public var timerUpdatePeriod:int = 10
	 The amount of frames which determines the period of MS value update in diagram.
	 
See also
| view | property | 
public var view:ViewThe viewport defines part of screen to which renders image seen by the camera. If viewport is not defined, the camera would not draws anything.
| Camera3D | () | Constructor | 
public function Camera3D(nearClipping:Number, farClipping:Number)
	 Creates a Camera3D object.
	 
	 
| nearClipping:Number—  Near clipping distance. | |
| farClipping:Number—  Far clipping distance. | 
| addToDebug | () | method | 
 public function addToDebug(debug:int, objectOrClass:*):voidAdds an object or a class to list of debug drawing. In case of class, all object of this type will drawn in debug mode.
Parameters
| debug:int— The component of object which will draws in debug mode. Should beDebug.BOUNDfor now. CheckDebugfor updates. | |
| objectOrClass:*—Object3Dor class extendedObject3D. | 
See also
| calculateRay | () | method | 
 public function calculateRay(origin:Vector3D, direction:Vector3D, viewX:Number, viewY:Number):void
	 Calculates a ray in global space. The ray defines by its origin and direction.
	 The ray goes like from the global camera position
	 trough the point corresponding to the viewport point with coordinates viewX и viewY.
	 The ray origin placed within nearClipping plane.
	 This ray can be used in the Object3D.intersectRay() method.  The result writes to passed arguments.
	 
	 
Parameters
| origin:Vector3D— Ray origin will wrote here. | |
| direction:Vector3D— Ray direction will wrote here. | |
| viewX:Number— Horizontal coordinate in view plane, through which the ray should go. | |
| viewY:Number— Vertical coordinate in view plane, through which the ray should go. | 
| clone | () | method | 
override public function clone():Object3DReturns a copy of object.
Returns| Object3D— A copy of thisObject3D. | 
| clonePropertiesFrom | () | method | 
override protected function clonePropertiesFrom(source:Object3D):void
	 
		 Copies basic properties of Object3D. This method calls from  clone() method.
		 
Parameters
| source:Object3D—Object3D, properties of  which will be copied. | 
| lookAt | () | method | 
 public function lookAt(x:Number, y:Number, z:Number):voidCamera3D lookAt method
Parameters
| x:Number | |
| y:Number | |
| z:Number | 
| projectGlobal | () | method | 
 public function projectGlobal(point:Vector3D):Vector3D
	 Transforms point from global space to screen space. The view property should be defined.
	 
Parameters
| point:Vector3D— Point in global space. | 
| Vector3D— A Vector3D object containing screen coordinates. | 
| removeFromDebug | () | method | 
 public function removeFromDebug(debug:int, objectOrClass:*):voidRemoved an object or a class from list of debug drawing.
Parameters
| debug:int— The component of object which will draws in debug mode. Should beDebug.BOUNDfor now. CheckDebugfor updates. | |
| objectOrClass:*—Object3Dor class extendedObject3D. | 
See also
| render | () | method | 
 public function render(stage3D:Stage3D):void
	 Rendering of objects hierarchy to the given Stage3D.
	 
	 
Parameters
| stage3D:Stage3D—Stage3Dto which image will be rendered. | 
| setPosition | () | method | 
 public function setPosition(x:Number, y:Number, z:Number):voidSetup Camera3D position using x, y, z coordinates
Parameters
| x:Number | |
| y:Number | |
| z:Number | 
| startTimer | () | method | 
 public function startTimer():void
	 Starts time count. startTimer()and stopTimer() are necessary to measure time for code part executing.
	 The result is displayed in the field MS of the diagram.
	 
	 
See also
| stopTimer | () | method | 
 public function stopTimer():void
	 Stops time count. startTimer() and stopTimer() are necessary to measure time for code part executing.
	 The result is displayed in the field MS of the diagram.
	 
See also
| MODE_COLOR | Constant | 
public static const MODE_COLOR:int = 0In this mode camera will render usual color image without SSAO.
| MODE_DEPTH | Constant | 
public static const MODE_DEPTH:int = 2This mode displays depth map which is z-buffer converted to grayscale.
| MODE_NORMALS | Constant | 
public static const MODE_NORMALS:int = 3This mode displays normal map calculated in screen space.
| MODE_RAW_DEPTH | Constant | 
public static const MODE_RAW_DEPTH:int = 1This mode represents z-buffer as it is stored with engine. For distance encoding red and green channels are used.
| MODE_SSAO_COLOR | Constant | 
public static const MODE_SSAO_COLOR:int = 9This mode displays postprocessed image which is SSAO effect combined with usual color image.
| MODE_SSAO_ONLY | Constant | 
public static const MODE_SSAO_ONLY:int = 8This mode displays pure SSAO effect.