Class: Camera

Camera

Camera is an abstract base class for camera objects.


new Camera()

Properties:
Name Type Description
nearDistance number

The minimum distance to be able to render. Anything closer gets cut off.

farDistance number

The maximum distance to be able to render. Anything farther gets cut off.

viewProjectionMatrix Matrix4x4

The matrix transforming coordinates from world space to the camera's homogeneous projective space.

viewMatrix Matrix4x4

The matrix transforming coordinates from world space to the camera's local coordinate system (eye space).

projectionMatrix Matrix4x4

The matrix transforming coordinates from eye space to the camera's homogeneous projective space.

inverseViewProjectionMatrix Matrix4x4

The matrix that transforms from the homogeneous projective space to world space.

inverseProjectionMatrix Matrix4x4

The matrix that transforms from the homogeneous projective space to view space.

Author:
  • derschmale <http://www.derschmale.com>
See:

Methods


getRay(x, y)

Returns a ray in world space at the given coordinates.

Parameters:
Name Type Description
x

The x-coordinate in NDC [-1, 1] range.

y

The y-coordinate in NDC [-1, 1] range.