[][src]Module three::camera

Cameras are used to view scenes from any point in the world.

Projections

Finite perspective

Finite persepective projections are often used for 3D rendering. In a finite perspective projection, objects moving away from the camera appear smaller and are occluded by objects that are closer to the camera.

Finite Perspective projections are created with the Factory::perspective_camera method with a bounded range.

window.factory.perspective_camera(60.0, 0.1 .. 1.0);

Infinite perspective

Infinite perspective projections are perspective projections with zfar planes at infinity. This means objects are never considered to be 'too far away' to be visible by the camera.

Infinite Perspective projections are created with the Factory::perspective_camera method with an unbounded range.

window.factory.perspective_camera(60.0, 0.1 ..);

Orthographic

Orthographic projections are often used for 2D rendering. In an orthographic projection, objects moving away from the camera retain their size but are occluded by objects that are closer to the camera.

Orthographic projections are created with the Factory::orthographic_camera method.

window.factory.orthographic_camera([0.0, 0.0], 1.0, -1.0 .. 1.0)

Structs

Camera

Camera is used to render Scene with specific Projection.

Orthographic

Orthographic projection parameters.

Perspective

Perspective projection parameters.

Enums

Projection

A camera's projection.

ZRange

The Z values of the near and far clipping planes of a camera's projection.