#[repr(C)]pub struct NiMatrix3 {
pub entry: [[f32; 3]; 3],
}
Expand description
3x3 matrix structure compatible with C++ layout.
Fields§
§entry: [[f32; 3]; 3]
3x3 matrix represented as an array of arrays
Implementations§
Source§impl NiMatrix3
impl NiMatrix3
Sourcepub const fn from_vectors(x: NiPoint3, y: NiPoint3, z: NiPoint3) -> Self
pub const fn from_vectors(x: NiPoint3, y: NiPoint3, z: NiPoint3) -> Self
Constructs a matrix from three vectors.
Sourcepub const fn get_vector_x(&self) -> NiPoint3
pub const fn get_vector_x(&self) -> NiPoint3
Returns the X axis vector.
Sourcepub const fn get_vector_y(&self) -> NiPoint3
pub const fn get_vector_y(&self) -> NiPoint3
Returns the Y axis vector.
Sourcepub const fn get_vector_z(&self) -> NiPoint3
pub const fn get_vector_z(&self) -> NiPoint3
Returns the Z axis vector.
Sourcepub fn mul_matrix(&self, rhs: &Self) -> Self
pub fn mul_matrix(&self, rhs: &Self) -> Self
Multiplies the matrix by another matrix.
Sourcepub fn mul_scalar(&self, scalar: f32) -> Self
pub fn mul_scalar(&self, scalar: f32) -> Self
Multiplies the matrix by a scalar.
Sourcepub fn mul_vector(&self, v: &NiPoint3) -> NiPoint3
pub fn mul_vector(&self, v: &NiPoint3) -> NiPoint3
Multiplies the matrix by a vector.
Sourcepub fn to_euler_xyz(&self) -> Option<NiPoint3>
pub fn to_euler_xyz(&self) -> Option<NiPoint3>
Converts the matrix to Euler angles (XYZ) and returns the angles.
Sourcepub fn set_euler_xyz(&mut self, x: f32, y: f32, z: f32)
pub fn set_euler_xyz(&mut self, x: f32, y: f32, z: f32)
Sets the matrix from Euler angles (XYZ).
Sourcepub fn from_euler_xyz(x: f32, y: f32, z: f32) -> Self
pub fn from_euler_xyz(x: f32, y: f32, z: f32) -> Self
Constructs a matrix from Euler angles.
Trait Implementations§
impl Copy for NiMatrix3
impl StructuralPartialEq for NiMatrix3
Auto Trait Implementations§
impl Freeze for NiMatrix3
impl RefUnwindSafe for NiMatrix3
impl Send for NiMatrix3
impl Sync for NiMatrix3
impl Unpin for NiMatrix3
impl UnwindSafe for NiMatrix3
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