Struct scad_tree_math::Mt4
source · pub struct Mt4 {
pub x: Pt4,
pub y: Pt4,
pub z: Pt4,
pub w: Pt4,
}
Expand description
A matrix with column major order.
Fields§
§x: Pt4
§y: Pt4
§z: Pt4
§w: Pt4
Implementations§
source§impl Mt4
impl Mt4
pub fn new(x: Pt4, y: Pt4, z: Pt4, w: Pt4) -> Self
pub fn transposed(&self) -> Self
pub fn identity() -> Self
pub fn scale_matrix(x: f64, y: f64, z: f64) -> Self
pub fn translate_matrix(x: f64, y: f64, z: f64) -> Self
pub fn rot_x_matrix(degrees: f64) -> Self
pub fn rot_y_matrix(degrees: f64) -> Self
pub fn rot_z_matrix(degrees: f64) -> Self
pub fn rot_vec(x: f64, y: f64, z: f64, degrees: f64) -> Self
pub fn perspective_matrix(fovy: f64, aspect: f64, near: f64, far: f64) -> Self
pub fn inverse(&self) -> Option<Self>
pub fn look_at_matrix_rh(eye: Pt3, center: Pt3, up: Pt3) -> Self
pub fn look_at_matrix_lh(eye: Pt3, center: Pt3, up: Pt3) -> Self
pub fn rotation_from_direction(direction: Pt3, up: Pt3) -> Self
Trait Implementations§
impl Copy for Mt4
impl StructuralPartialEq for Mt4
Auto Trait Implementations§
impl RefUnwindSafe for Mt4
impl Send for Mt4
impl Sync for Mt4
impl Unpin for Mt4
impl UnwindSafe for Mt4
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