pub struct Matrix { /* private fields */ }
Implementations§
source§impl Matrix
impl Matrix
pub fn zero() -> Self
pub fn new( m00: f32, m01: f32, m02: f32, m03: f32, m10: f32, m11: f32, m12: f32, m13: f32, m20: f32, m21: f32, m22: f32, m23: f32, m30: f32, m31: f32, m32: f32, m33: f32 ) -> Self
pub fn identity() -> Self
pub fn rotation_x(rad: f32) -> Self
pub fn rotation_y(rad: f32) -> Self
pub fn rotation_z(rad: f32) -> Self
pub fn orthographic( view_width: f32, view_height: f32, near_z: f32, far_z: f32 ) -> Self
pub fn orthographic_off_center( view_left: f32, view_right: f32, view_bottom: f32, view_top: f32, near_z: f32, far_z: f32 ) -> Self
pub fn look_at(eye: Vector3, focus: Vector3, up: Vector3) -> Self
pub fn look_to(eye: Vector3, dir: Vector3, up: Vector3) -> Self
pub fn perspective(width: f32, height: f32, near_z: f32, far_z: f32) -> Self
sourcepub fn perspective_fov(fov: f32, aspect: f32, near_z: f32, far_z: f32) -> Self
pub fn perspective_fov(fov: f32, aspect: f32, near_z: f32, far_z: f32) -> Self
aspect: Width / Height
pub fn translation(ox: f32, oy: f32, oz: f32) -> Self
pub fn transpose(self) -> Self
Trait Implementations§
source§impl PartialEq<Matrix> for Matrix
impl PartialEq<Matrix> for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
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