Struct cam::CameraPerspective [] [src]

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: Float> CameraPerspective<T> where f64: Cast<T>
[src]

fn projection(&self) -> Matrix4<T>

Computes a projection matrix for the camera perspective.