#[repr(C)]pub struct Matrix4x4 {
pub m: [[f32; 4]; 4],
}
Fields§
§m: [[f32; 4]; 4]
Implementations§
Source§impl Matrix4x4
impl Matrix4x4
pub const fn identity() -> Matrix4x4
Sourcepub fn get_row(self: &Matrix4x4, index: usize) -> Vector4
pub fn get_row(self: &Matrix4x4, index: usize) -> Vector4
Return the given row of the matrix as a vector
Sourcepub fn get_column(self: &Matrix4x4, index: usize) -> Vector4
pub fn get_column(self: &Matrix4x4, index: usize) -> Vector4
Return the given column of the matrix as a vector
Sourcepub fn transposed(self: &Matrix4x4) -> Matrix4x4
pub fn transposed(self: &Matrix4x4) -> Matrix4x4
Returns a transposed version of the matrix
Sourcepub fn translation(translation: Vector3) -> Matrix4x4
pub fn translation(translation: Vector3) -> Matrix4x4
Construct a translation matrix
Sourcepub fn rotation(rotation: Quaternion) -> Matrix4x4
pub fn rotation(rotation: Quaternion) -> Matrix4x4
Construct a rotation matrix
Sourcepub fn projection_ortho(
left: f32,
right: f32,
top: f32,
bottom: f32,
near: f32,
far: f32,
) -> Matrix4x4
pub fn projection_ortho( left: f32, right: f32, top: f32, bottom: f32, near: f32, far: f32, ) -> Matrix4x4
Construct a new off-center orthographic projection matrix
Sourcepub fn projection_ortho_aspect(
aspect_ratio: f32,
scale: f32,
near: f32,
far: f32,
) -> Matrix4x4
pub fn projection_ortho_aspect( aspect_ratio: f32, scale: f32, near: f32, far: f32, ) -> Matrix4x4
Construct a new orthographic projection matrix using the given aspect ratio, scale, and near/far plane clip distances
Sourcepub fn projection_perspective(
aspect_ratio: f32,
field_of_view: f32,
near: f32,
far: f32,
) -> Matrix4x4
pub fn projection_perspective( aspect_ratio: f32, field_of_view: f32, near: f32, far: f32, ) -> Matrix4x4
Construct a new perspective projection matrix using the given aspect ratio, field of view, and near/far plane clip distances
Sourcepub fn load_identity_simd()
👎Deprecated since 0.1.16: Dreambox v2.x now directly supports compiling with SIMD intrinsics
pub fn load_identity_simd()
Load an identity matrix into the SIMD register
Sourcepub fn load_simd(matrix: &Matrix4x4)
👎Deprecated since 0.1.16: Dreambox v2.x now directly supports compiling with WASM SIMD intrinsics
pub fn load_simd(matrix: &Matrix4x4)
Load a matrix into the SIMD register
Sourcepub fn store_simd(matrix: &mut Matrix4x4)
👎Deprecated since 0.1.16: Dreambox v2.x now directly supports compiling with WASM SIMD intrinsics
pub fn store_simd(matrix: &mut Matrix4x4)
Store the current value of the SIMD register to the given matrix
Sourcepub fn mul_simd(matrix: &Matrix4x4)
👎Deprecated since 0.1.16: Dreambox v2.x now directly supports compiling with WASM SIMD intrinsics
pub fn mul_simd(matrix: &Matrix4x4)
Multiply the matrix in the SIMD register by the given matrix
Sourcepub fn transform_vector_simd(data: &mut [Vector4])
👎Deprecated since 0.1.16: Dreambox v2.x now directly supports compiling with WASM SIMD intrinsics
pub fn transform_vector_simd(data: &mut [Vector4])
Transform an array of vectors using the SIMD matrix register
Sourcepub fn transform_vertex_simd<T>(data: &mut [T], field: FieldOffset<T, Vector4>)
👎Deprecated since 0.1.16: Dreambox v2.x now directly supports compiling with WASM SIMD intrinsics
pub fn transform_vertex_simd<T>(data: &mut [T], field: FieldOffset<T, Vector4>)
Transform a field of an array of input vertex structs using the SIMD matrix register