glam 0.34.3

A simple and fast 3D math library for games and graphics
Documentation
// Generated from camera_mod.rs.tera template. Edit the template, not the generated file.

//! View, projection and model transform helpers.
//!
//! This module provides view matrix (`look_at`, `look_to`), projection matrix (`perspective`,
//! `orthographic`, `frustum`) and model (local -> world) transform constructors.
//!
//! ## Choosing a sub-module
//!
//! Pick [`lh`] or [`rh`] modules based on your world space coordinate system.
//!
//! The view functions in each sub-module transform world space points into Y-up view space while
//! preserving your world's handedness.
//!
//! Note that while the view space methods will preserve the handedness of your world's coordinate
//! systems, view space is a different coordinate system and will not necessarily be the same as
//! your world coordinate system, especially if your world up is not +Y.
//!
//! There are other possible view space coordinate systems, notably Y-down; however, glam only
//! provides view and projection functions for left- and right-handed view space coordinate systems.
//!
//! The corresponding projection functions expect Y-up view space input with the matching
//! handedness.
//!
//! Within each `proj` sub-module, pick the API-specific constructor:
//!
//! | Module     | NDC Z   | NDC Y |
//! |------------|---------|-------|
//! | `opengl`   | [-1, 1] | Up    |
//! | `directx`  | [0, 1]  | Up    |
//! | `vulkan`   | [0, 1]  | Down  |
//!
//! ## Model transforms
//!
//! The [`model`] submodule provides local -> world transforms for orienting objects,
//! taking the object's local axes as parameters.
//!
//! Use [`model`] when orienting objects, and [`rh::view`] or [`lh::view`] when building
//! camera view matrices.

mod camera_impl;

pub mod model;

/// View functions produce right-handed Y-up view space with
/// X-right and the negative Z axis pointing forward.
///
/// Projection functions expect right-handed Y-up view space input.
pub mod rh {
    pub mod proj;
    pub mod view;
}

/// View functions produce left-handed Y-up view space with
/// X-right and the positive Z axis pointing forward.
///
/// Projection functions expect left-handed Y-up view space input.
pub mod lh {
    pub mod proj;
    pub mod view;
}