Struct camera_controllers::CameraPerspective []

pub struct CameraPerspective<T = f32> {
    pub fov: T,
    pub near_clip: T,
    pub far_clip: T,
    pub aspect_ratio: T,
}

Models camera perspective settings.

Fields

fov: T

Field of view (in degrees).

near_clip: T

The near clip distance.

far_clip: T

The far clip distance.

aspect_ratio: T

The aspect ratio, usually set to 1.0.

Methods

impl<T> CameraPerspective<T> where T: Float, f64: Cast<T>

fn projection(&self) -> [[T; 4]; 4]

Computes a projection matrix for the camera perspective.