pub trait Transform<F, V3, V4, M4, Q>: Clone + Copy + Debug + Display + Defaultwhere
F: Float,
V3: Vector<F, 3>,
V4: Vector<F, 4>,
M4: SqMatrix4<F, V3, V4>,
Q: Quaternion<F, V3, V4>,{
// Required methods
fn of_trs(t: V3, r: Q, s: F) -> Self;
fn scale(&self) -> F;
fn translation(&self) -> V3;
fn rotation(&self) -> Q;
fn inverse(&self) -> Self;
fn invert(&mut self);
fn as_mat(&self) -> M4;
}
Expand description
The Transform trait describes a translation, rotation and scaling for 3D, represented eventually as a Mat4
A transformation that is a translation . scaling . rotation (i.e. it applies the rotation to an object, then scales it, then translates it)
Required Methods§
sourcefn of_trs(t: V3, r: Q, s: F) -> Self
fn of_trs(t: V3, r: Q, s: F) -> Self
Create a transformation that is a translation, rotation and scaling
sourcefn translation(&self) -> V3
fn translation(&self) -> V3
Get a translation by a vector