m4 create_view_from_world_mat(const v3 &pos, const CameraVectors &cv)
v2 screen_from_world(const CompiledCamera &cam, const v3 &world_pos, const v2 &resolution)
Calculate the screen coordinate of a 3d world position.
CompiledCamera compile(const Camera &, const Size &window_size)
"Compile" a camera to a perspective so it can be used in rendering.
CameraVectors create_vectors(const Camera &camera)
Capture the current local space of the camera.
An angle in both degrees and radians.
A (inclusive) range between two values.
A temporary view of the local space of a camera.
The current perspective camera representation.
A "compiled" camera for use in rendering.
m4 clip_from_view
also known as projection matrix
m4 view_from_world
also known as view matrix
A orthographic camera representation.