SceneProjection struct

Where a camera puts the world in a view, in the view's UI units (origin top left).

Public static functions

static auto Of(const ViewCamera& camera, float width, float height) -> SceneProjection

Public functions

auto Project(const float world[3], float& x, float& y) const -> bool
Where world shows; false if it is behind the camera.
void Ray(float x, float y, float origin[3], float direction[3]) const
The ray through (x, y): from the eye, unit length.
auto Depth(const float world[3]) const -> float
How far in front of the camera world is.
auto UnitsAt(const float world[3]) const -> float
World units one UI unit covers at world's depth.

Public variables

float Eye
float Right
float Up
float Forward
float Focal
1 / tan(half the vertical field of view)
float Width
float Height