class LensBase
package away3d.cameras.lenses
extends EventDispatcher
extended by FreeMatrixLens, ObliqueNearPlaneLens, OrthographicLens, OrthographicOffCenterLens, PerspectiveLens, PerspectiveOffCenterLens
Available on all platforms
An abstract base class for all lens classes. Lens objects provides a projection matrix that transforms 3D geometry to normalized homogeneous coordinates.
Constructor
Variables
Methods
project(point3d:Vector3D, ?v:Vector3D):Vector3D
Calculates the normalised position in screen space of the given scene position relative to the camera.
Parameters:
point3d | the position vector of the scene coordinates to be projected. |
|---|---|
v | The destination Vector3D object |
Returns:
The normalised screen position of the given scene coordinates relative to the camera.
unproject(nX:Float, nY:Float, sZ:Float, ?v:Vector3D):Vector3D
Calculates the scene position relative to the camera of the given normalized coordinates in screen space.
Parameters:
nX | The normalised x coordinate in screen space, -1 corresponds to the left edge of the viewport, 1 to the right. |
|---|---|
nY | The normalised y coordinate in screen space, -1 corresponds to the top edge of the viewport, 1 to the bottom. |
sZ | The z coordinate in screen space, representing the distance into the screen. |
v | The destination Vector3D object |
Returns:
The scene position relative to the camera of the given screen coordinates.