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: TField of view (in degrees).
near_clip: TThe near clip distance.
far_clip: TThe far clip distance.
aspect_ratio: TThe aspect ratio, usually set to 1.0.
Implementations§
Source§impl<T> CameraPerspective<T>
impl<T> CameraPerspective<T>
Sourcepub fn projection(&self) -> [[T; 4]; 4]
pub fn projection(&self) -> [[T; 4]; 4]
Computes a projection matrix for the camera perspective.
Auto Trait Implementations§
impl<T> Freeze for CameraPerspective<T>where
T: Freeze,
impl<T> RefUnwindSafe for CameraPerspective<T>where
T: RefUnwindSafe,
impl<T> Send for CameraPerspective<T>where
T: Send,
impl<T> Sync for CameraPerspective<T>where
T: Sync,
impl<T> Unpin for CameraPerspective<T>where
T: Unpin,
impl<T> UnwindSafe for CameraPerspective<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more