Struct Mat4ColumnMajor
#[repr(C)]pub struct Mat4ColumnMajor {
pub cols: [[f32; 4]; 4],
}Expand description
A 4x4 column-major floating-point matrix for camera projection and transforms.
Fields§
§cols: [[f32; 4]; 4]Implementations§
§impl Mat4ColumnMajor
impl Mat4ColumnMajor
pub const IDENTITY: Mat4ColumnMajor
pub const fn from_cols(cols: [[f32; 4]; 4]) -> Mat4ColumnMajor
pub const fn from_cols(cols: [[f32; 4]; 4]) -> Mat4ColumnMajor
Builds Mat4ColumnMajor from cols.
pub const fn from_f32_16(raw: [f32; 16]) -> Mat4ColumnMajor
pub const fn from_f32_16(raw: [f32; 16]) -> Mat4ColumnMajor
Builds Mat4ColumnMajor from f32_16.
pub fn transform_point3(&self, point: [f32; 3]) -> [f32; 4]
pub fn transform_point3(&self, point: [f32; 3]) -> [f32; 4]
Transform a 3D point [x, y, z] into homogeneous clip space [x, y, z, w].
pub fn mul(&self, rhs: &Mat4ColumnMajor) -> Mat4ColumnMajor
pub fn mul(&self, rhs: &Mat4ColumnMajor) -> Mat4ColumnMajor
Multiply two 4x4 column-major matrices: self * rhs.
pub fn inverse(&self) -> Option<Mat4ColumnMajor>
pub fn inverse(&self) -> Option<Mat4ColumnMajor>
Compute the inverse matrix, or return None if the matrix is singular or non-finite.
Trait Implementations§
§impl Clone for Mat4ColumnMajor
impl Clone for Mat4ColumnMajor
§fn clone(&self) -> Mat4ColumnMajor
fn clone(&self) -> Mat4ColumnMajor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Mat4ColumnMajor
§impl Debug for Mat4ColumnMajor
impl Debug for Mat4ColumnMajor
§impl PartialEq for Mat4ColumnMajor
impl PartialEq for Mat4ColumnMajor
impl Pod for Mat4ColumnMajor
impl StructuralPartialEq for Mat4ColumnMajor
Auto Trait Implementations§
impl Freeze for Mat4ColumnMajor
impl RefUnwindSafe for Mat4ColumnMajor
impl Send for Mat4ColumnMajor
impl Sync for Mat4ColumnMajor
impl Unpin for Mat4ColumnMajor
impl UnsafeUnpin for Mat4ColumnMajor
impl UnwindSafe for Mat4ColumnMajor
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Interleave for Twhere
T: Pod,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more