diff options
Diffstat (limited to 'engine/src/projection.rs')
| -rw-r--r-- | engine/src/projection.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/src/projection.rs b/engine/src/projection.rs index b3bfa00..91a0259 100644 --- a/engine/src/projection.rs +++ b/engine/src/projection.rs @@ -15,6 +15,7 @@ pub enum Projection impl Projection { + #[must_use] pub fn to_matrix_rh( &self, window_size: PhysicalSize<u32>, @@ -47,6 +48,7 @@ impl Perspective { /// Creates a perspective projection matrix using right-handed coordinates. #[inline] + #[must_use] pub fn to_matrix_rh(&self, aspect: f32, clip_volume: ClipVolume) -> Matrix<f32, 4, 4> { @@ -107,12 +109,14 @@ pub struct Orthographic impl Orthographic { + #[must_use] pub fn builder() -> OrthographicBuilder { OrthographicBuilder::default() } /// Creates a orthographic projection matrix using right-handed coordinates. + #[must_use] pub fn to_matrix_rh( &self, window_size: PhysicalSize<u32>, @@ -187,6 +191,7 @@ pub struct OrthographicParams } /// Creates a orthographic projection matrix using right-handed coordinates. +#[must_use] pub fn orthographic_rh( OrthographicParams { left, right, bottom, top, near, far }: OrthographicParams, clip_volume: ClipVolume, |
