pub struct Mat4 { /* private fields */ }Expand description
Column-major 4x4 transformation and perspective projection matrix.
Implementations§
Source§impl Mat4
Matrix constructors, projection, and point projection for Mat4.
impl Mat4
Matrix constructors, projection, and point projection for Mat4.
Sourcepub fn from_trs_euler(
position: Vec3,
yaw_rad: f32,
pitch_rad: f32,
roll_rad: f32,
scale: Vec3,
) -> Self
pub fn from_trs_euler( position: Vec3, yaw_rad: f32, pitch_rad: f32, roll_rad: f32, scale: Vec3, ) -> Self
Builds a full 3D Euler TRS model matrix (translate * rotate_y(yaw) * rotate_x(pitch) * rotate_z(roll) * scale).
§Arguments
Vec3- World translation.f32- Y-axis yaw rotation in radians.f32- X-axis pitch rotation in radians.f32- Z-axis roll rotation in radians.Vec3- Non-uniform scale.
§Returns
Self- Composed 3D model transform matrix.
Trait Implementations§
impl Copy for Mat4
impl StructuralPartialEq for Mat4
Auto Trait Implementations§
impl Forget for Mat4
impl Freeze for Mat4
impl Move 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§
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