oa::vlm::Mat4

A packed 4×4 row-major matrix.

StRust public API

Declaration

#[repr(C)]pub struct Mat4<T: Float = f32> { pub m: [[T; 4]; 4], }
Public Rust declaration.

Public Methods

pub fn is_identity(self, tolerance: T) -> bool
pub fn try_decompose_affine( self, tolerance: T, ) -> Option<AffineDecomposition<T>>
pub fn try_decompose_trs(self, tolerance: T) -> Option<TrsDecomposition<T>>
pub fn is_finite(self) -> bool
pub fn transpose(self) -> Self
pub fn determinant(self) -> T
pub fn try_inverse(self, tolerance: T) -> Option<Self>
pub fn linear_part(self) -> Mat3<T>
pub fn translation_part(self) -> Vec3<T>
pub fn is_affine(self, tolerance: T) -> bool
pub fn try_affine_inverse(self, tolerance: T) -> Option<Self>
pub fn try_normal_matrix(self, tolerance: T) -> Option<Mat3<T>>
pub fn transform(self, value: Vec4<T>) -> Vec4<T>
pub fn transform_point(self, point: Vec3<T>) -> Vec3<T>
pub fn transform_direction(self, direction: Vec3<T>) -> Vec3<T>
pub fn try_project_point(self, point: Vec3<T>, tolerance: T) -> Option<Vec3<T>>
pub fn try_transform_normal( self, normal: Vec3<T>, tolerance: T, ) -> Option<Vec3<T>>
pub fn approximately_equal(self, other: Self, absolute: T, relative: T) -> bool
fn add(self, other: Self) -> Self
fn add_assign(&mut self, other: Self)
fn clone(&self) -> Mat4<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn div(self, scalar: T) -> Self
fn div_assign(&mut self, scalar: T)
fn mul(self, other: Self) -> Self
fn mul(self, matrix: Mat4<T>) -> Self
fn mul(self, matrix: Mat4<f64>) -> Self::Output
fn mul(self, matrix: Mat4<f32>) -> Self::Output
fn mul(self, scalar: T) -> Self
fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, scalar: T)
fn neg(self) -> Self
fn eq(&self, other: &Mat4<T>) -> bool
fn sub(self, other: Self) -> Self
fn sub_assign(&mut self, other: Self)

Associated Functions

pub fn try_view_from_pose( position: Vec3<T>, rotation: Quat<T>, tolerance: T, ) -> Option<Self>
pub fn try_look_at( eye: Vec3<T>, target: Vec3<T>, world_up: Vec3<T>, tolerance: T, ) -> Option<Self>
pub fn compose_affine(decomposition: AffineDecomposition<T>) -> Option<Self>
pub fn identity() -> Self
pub fn from_affine(linear: Mat3<T>, translation: Vec3<T>) -> Self
pub fn translation(value: Vec3<T>) -> Self
pub fn scaling(value: Vec3<T>) -> Self
pub fn try_from_quaternion(rotation: Quat<T>) -> Option<Self>
pub fn try_compose_trs( translation: Vec3<T>, rotation: Quat<T>, scale: Vec3<T>, ) -> Option<Self>
pub fn try_perspective_off_center( left: T, right: T, bottom: T, top: T, near: T, far: T, ) -> Option<Self>
pub fn try_perspective( fov_y_degrees: T, aspect: T, near: T, far: T, ) -> Option<Self>
pub fn try_perspective_shifted( fov_y_degrees: T, aspect: T, near: T, far: T, ndc_offset: Vec2<T>, ) -> Option<Self>
pub fn try_orthographic_off_center( left: T, right: T, bottom: T, top: T, near: T, far: T, ) -> Option<Self>
pub fn try_orthographic( width: T, height: T, near: T, far: T, zoom: T, ) -> Option<Self>
pub fn try_orthographic_shifted( width: T, height: T, near: T, far: T, zoom: T, ndc_offset: Vec2<T>, ) -> Option<Self>
pub fn try_perspective_reverse_z( fov_y_degrees: T, aspect: T, near: T, far: T, ) -> Option<Self>
pub fn try_perspective_reverse_z_infinite( fov_y_degrees: T, aspect: T, near: T, ) -> Option<Self>
fn default() -> Mat4<T>

Public Data Members

m[[T; 4]; 4]field

Public Method Documentation

pub fn is_identity( self, tolerance: T ) -> bool
No public source comment is attached to this declaration.
pub fn try_decompose_affine( self, tolerance: T ) -> Option<AffineDecomposition<T>>
No public source comment is attached to this declaration.
pub fn try_decompose_trs( self, tolerance: T ) -> Option<TrsDecomposition<T>>
No public source comment is attached to this declaration.
pub fn is_finite( self ) -> bool
No public source comment is attached to this declaration.
pub fn transpose( self ) -> Self
No public source comment is attached to this declaration.
pub fn determinant( self ) -> T
No public source comment is attached to this declaration.
pub fn try_inverse( self, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn linear_part( self ) -> Mat3<T>
No public source comment is attached to this declaration.
pub fn translation_part( self ) -> Vec3<T>
No public source comment is attached to this declaration.
pub fn is_affine( self, tolerance: T ) -> bool
No public source comment is attached to this declaration.
pub fn try_affine_inverse( self, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_normal_matrix( self, tolerance: T ) -> Option<Mat3<T>>
No public source comment is attached to this declaration.
pub fn transform( self, value: Vec4<T> ) -> Vec4<T>
No public source comment is attached to this declaration.
pub fn transform_point( self, point: Vec3<T> ) -> Vec3<T>
No public source comment is attached to this declaration.
pub fn transform_direction( self, direction: Vec3<T> ) -> Vec3<T>
No public source comment is attached to this declaration.
pub fn try_project_point( self, point: Vec3<T>, tolerance: T ) -> Option<Vec3<T>>
No public source comment is attached to this declaration.
pub fn try_transform_normal( self, normal: Vec3<T>, tolerance: T ) -> Option<Vec3<T>>
No public source comment is attached to this declaration.
pub fn approximately_equal( self, other: Self, absolute: T, relative: T ) -> bool
No public source comment is attached to this declaration.
fn add( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn add_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
fn clone( &self ) -> Mat4<T>
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn div( self, scalar: T ) -> Self
No public source comment is attached to this declaration.
fn div_assign( &mut self, scalar: T )
No public source comment is attached to this declaration.
fn mul( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn mul( self, matrix: Mat4<T> ) -> Self
No public source comment is attached to this declaration.
fn mul( self, matrix: Mat4<f64> ) -> Self::Output
No public source comment is attached to this declaration.
fn mul( self, matrix: Mat4<f32> ) -> Self::Output
No public source comment is attached to this declaration.
fn mul( self, scalar: T ) -> Self
No public source comment is attached to this declaration.
fn mul_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
fn mul_assign( &mut self, scalar: T )
No public source comment is attached to this declaration.
fn neg( self ) -> Self
No public source comment is attached to this declaration.
fn eq( &self, other: &Mat4<T> ) -> bool
No public source comment is attached to this declaration.
fn sub( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn sub_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
pub fn try_view_from_pose( position: Vec3<T>, rotation: Quat<T>, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_look_at( eye: Vec3<T>, target: Vec3<T>, world_up: Vec3<T>, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn compose_affine( decomposition: AffineDecomposition<T> ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn identity() -> Self
No public source comment is attached to this declaration.
pub fn from_affine( linear: Mat3<T>, translation: Vec3<T> ) -> Self
No public source comment is attached to this declaration.
pub fn translation( value: Vec3<T> ) -> Self
No public source comment is attached to this declaration.
pub fn scaling( value: Vec3<T> ) -> Self
No public source comment is attached to this declaration.
pub fn try_from_quaternion( rotation: Quat<T> ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_compose_trs( translation: Vec3<T>, rotation: Quat<T>, scale: Vec3<T> ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_perspective_off_center( left: T, right: T, bottom: T, top: T, near: T, far: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_perspective( fov_y_degrees: T, aspect: T, near: T, far: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_perspective_shifted( fov_y_degrees: T, aspect: T, near: T, far: T, ndc_offset: Vec2<T> ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_orthographic_off_center( left: T, right: T, bottom: T, top: T, near: T, far: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_orthographic( width: T, height: T, near: T, far: T, zoom: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_orthographic_shifted( width: T, height: T, near: T, far: T, zoom: T, ndc_offset: Vec2<T> ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_perspective_reverse_z( fov_y_degrees: T, aspect: T, near: T, far: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_perspective_reverse_z_infinite( fov_y_degrees: T, aspect: T, near: T ) -> Option<Self>
No public source comment is attached to this declaration.
fn default() -> Mat4<T>
No public source comment is attached to this declaration.