pub struct Mat4(pub [f32; 16]);Expand description
A column-major 4x4 affine transform matrix.
Interpolation decomposes translation, scale, and rotation, interpolates each component, then recomposes. Non-affine perspective terms are ignored.
Tuple Fields§
§0: [f32; 16]Implementations§
Source§impl Mat4
impl Mat4
Sourcepub fn from_translation_rotation_scale(
translation: [f32; 3],
rotation: Quaternion,
scale: [f32; 3],
) -> Self
pub fn from_translation_rotation_scale( translation: [f32; 3], rotation: Quaternion, scale: [f32; 3], ) -> Self
Create a matrix from translation, rotation, and scale.
Sourcepub fn translation(self) -> [f32; 3]
pub fn translation(self) -> [f32; 3]
Extract translation from the affine matrix.
Trait Implementations§
impl Copy for Mat4
Source§impl Interpolate for Mat4
impl Interpolate for Mat4
impl StructuralPartialEq for Mat4
Auto Trait Implementations§
impl Freeze for Mat4
impl RefUnwindSafe for Mat4
impl Send for Mat4
impl Sync for Mat4
impl Unpin for Mat4
impl UnsafeUnpin for Mat4
impl UnwindSafe for Mat4
Blanket Implementations§
impl<T> Animatable for Twhere
T: Interpolate + Clone + 'static,
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