pub struct Matrix3 {
pub m: [[f64; 3]; 3],
}Expand description
3x3 matrix for 2D transformations and rotations
Fields§
§m: [[f64; 3]; 3]Matrix elements stored in row-major order
Implementations§
Source§impl Matrix3
impl Matrix3
Sourcepub fn from_rows(row0: [f64; 3], row1: [f64; 3], row2: [f64; 3]) -> Self
pub fn from_rows(row0: [f64; 3], row1: [f64; 3], row2: [f64; 3]) -> Self
Create matrix from rows
Sourcepub fn rotation_z(angle: f64) -> Self
pub fn rotation_z(angle: f64) -> Self
Create rotation matrix around Z axis
Sourcepub fn arbitrary_axis(normal: Vector3) -> Self
pub fn arbitrary_axis(normal: Vector3) -> Self
Create arbitrary axis matrix for OCS to WCS conversion
Implements the AutoCAD arbitrary axis algorithm
Sourcepub fn determinant(&self) -> f64
pub fn determinant(&self) -> f64
Calculate determinant
Sourcepub fn transform_point(&self, v: Vector3) -> Vector3
pub fn transform_point(&self, v: Vector3) -> Vector3
Transform a Vector3
Trait Implementations§
impl Copy for Matrix3
impl StructuralPartialEq for Matrix3
Auto Trait Implementations§
impl Freeze for Matrix3
impl RefUnwindSafe for Matrix3
impl Send for Matrix3
impl Sync for Matrix3
impl Unpin for Matrix3
impl UnsafeUnpin for Matrix3
impl UnwindSafe for Matrix3
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