Matrix4

qm::m::m4

Type Alias Matrix4 

Source
pub type Matrix4<F> = [[F; 4]; 4];
Expand description

Matrix4

Trait Implementations§

Source§

impl<F: Float + Debug> TM4<F> for Matrix4<F>

TM4 for Matrix4

Source§

fn from_q_left(q: &impl TQuaternion<F>) -> Self

from Quaternion (qp = Q4x4 p4)

Source§

fn from_p_right(p: &impl TQuaternion<F>) -> Self

from Quaternion (qp = P4x4 q4)

Source§

fn from_rot(q: &impl TQuaternion<F>) -> Self

from Quaternion rot (qrp = P4x4 Q4x4 r4)

Source§

impl<F: Float + Debug + Sum> TMatrix<F> for Matrix4<F>

TMatrix for Matrix4

Source§

fn colmajor4(m: Vec<Vector4<F>>) -> Self
where Self: Sized,

constructor col major from v4 (move)

Source§

fn rowmajor4(m: Vec<Vector4<F>>) -> Self
where Self: Sized,

constructor row major from v4 (move)

Source§

fn col_major(m: &Vec<Vec<F>>) -> Self

constructor col major

Source§

fn row_major(m: &Vec<Vec<F>>) -> Self

constructor row major

Source§

fn new(m: &Vec<Vec<F>>) -> Self

constructor row major

Source§

fn identity() -> Self

constructor

Source§

fn prec_eq(&self, e: F, m: &impl TMatrix<F>) -> bool

check equal with precision

Source§

fn mev4(&self) -> &[Vector4<F>]

like as slice v4

Source§

fn dot_m(&self, m: &impl TMatrix<F>) -> Self

m dot self

Source§

fn rowv4(&self, j: usize) -> Vector4<F>

row to v4

Source§

fn colv4(&self, i: usize) -> Vector4<F>

col to v4

Source§

fn to_vec(&self) -> Vec<Vec<F>>

to_vec

Source§

fn colmajor3(_m: Vec<Vector3<F>>) -> Self
where Self: Sized,

constructor col major from v3 (move)
Source§

fn rowmajor3(_m: Vec<Vector3<F>>) -> Self
where Self: Sized,

constructor row major from v3 (move)
Source§

fn mev3(&self) -> &[Vector3<F>]

like as slice v3
Source§

fn rowv3(&self, _j: usize) -> Vector3<F>

row to v3
Source§

fn colv3(&self, _i: usize) -> Vector3<F>

col to v3
Source§

fn transpose(&self) -> Self
where Self: Sized,

transpose
Source§

fn det(&self) -> F

det
Source§

fn inv(&self, p: F) -> Option<Self>
where Self: Sized,