class Camera3D
package away3d.cameras
extends Entity › ObjectContainer3D › Object3D › NamedAssetBase
extended by StereoCamera3D
Available on all platforms
A Camera3D object represents a virtual camera through which we view the scene.
Constructor
Variables
Methods
getRay(nX:Float, nY:Float, sZ:Float, ?v:Vector3D):Vector3D
Calculates the ray in scene space from the camera to 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 ray from the camera to the scene space position of the given screen coordinates.
project(point3d:Vector3D, ?v:Vector3D):Vector3D
Calculates the normalised position in screen space of the given scene position.
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.
unproject(nX:Float, nY:Float, sZ:Float, ?v:Vector3D):Vector3D
Calculates the scene position 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 of the given screen coordinates.