Struct camera_controllers::CameraPerspective
source · pub struct CameraPerspective<T = f32> {
pub fov: T,
pub near_clip: T,
pub far_clip: T,
pub aspect_ratio: T,
}
Expand description
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.
Implementations§
source§impl<T> CameraPerspective<T>where
T: Float,
f64: Cast<T>,
impl<T> CameraPerspective<T>where
T: Float,
f64: Cast<T>,
sourcepub fn projection(&self) -> [[T; 4]; 4]
pub fn projection(&self) -> [[T; 4]; 4]
Computes a projection matrix for the camera perspective.