An abstract base class for all lens classes. Lens objects provides a projection matrix that transforms 3D geometry to normalized homogeneous coordinates.
protected var _aspectRatio:Number = 1
protected var _far:Number = 3000
protected var _frustumCorners:Vector.<Number>
protected var _matrix:Matrix3D
protected var _matrixInvalid:Boolean = true
protected var _near:Number = 20
protected var _scissorRect:Rectangle
protected var _viewPort:Rectangle
aspectRatio:Number
Implementation arcane function get aspectRatio():Number
arcane function set aspectRatio(value:Number):void
far:Number
The distance to the far plane of the frustum. Anything beyond the far plane will not be rendered.
Implementation public function get far():Number
public function set far(value:Number):void
frustumCorners:Vector.<Number>
Retrieves the corner points of the lens frustum.
Implementation public function get frustumCorners():Vector.<Number>
public function set frustumCorners(value:Vector.<Number>):void
matrix:Matrix3D
The projection matrix that transforms 3D geometry to normalized homogeneous coordinates.
Implementation public function get matrix():Matrix3D
public function set matrix(value:Matrix3D):void
near:Number
The distance to the near plane of the frustum. Anything behind near plane will not be rendered.
Implementation public function get near():Number
public function set near(value:Number):void
unprojectionMatrix:Matrix3D
[read-only]
Implementation public function get unprojectionMatrix():Matrix3D
public function LensBase()
Creates a new LensBase object.
public function clone():LensBase
Creates an exact duplicate of the lens
Returns protected function invalidateMatrix():void
Invalidates the projection matrix, which will cause it to be updated on the next request.
public function project(point3d:Vector3D):Vector3D
Calculates the normalised position in screen space of the given scene position relative to the camera.
Parameters
| point3d:Vector3D — the position vector of the scene coordinates to be projected.
|
Returns | Vector3D — The normalised screen position of the given scene coordinates relative to the camera.
|
public function unproject(nX:Number, nY:Number, sZ:Number):Vector3D
Calculates the scene position relative to the camera of the given normalized coordinates in screen space.
Parameters
| nX:Number — The normalised x coordinate in screen space, -1 corresponds to the left edge of the viewport, 1 to the right.
|
|
| nY:Number — The normalised y coordinate in screen space, -1 corresponds to the top edge of the viewport, 1 to the bottom.
|
|
| sZ:Number — The z coordinate in screen space, representing the distance into the screen.
|
Returns | Vector3D — The scene position relative to the camera of the given screen coordinates.
|
protected function updateMatrix():void
Updates the matrix
arcane function updateScissorRect(x:Number, y:Number, width:Number, height:Number):void
Parameters
| x:Number |
|
| y:Number |
|
| width:Number |
|
| height:Number |
arcane function updateViewport(x:Number, y:Number, width:Number, height:Number):void
Parameters
| x:Number |
|
| y:Number |
|
| width:Number |
|
| height:Number |
Thu Jul 11 2013, 08:55 PM +01:00