- affineMult
auto affineMult(ML ml, MR mr)
Affine matrix multiplication.
- affineRotation
Mat2x3!T affineRotation(T angle)
Undocumented in source. Be warned that the author may not have intended to support it.
- affineScale
Mat2x3!(CommonType!(X, Y)) affineScale(X x, Y y)
auto affineScale(V v)
- affineTranslation
auto affineTranslation(X x, Y y)
auto affineTranslation(V v)
Build a translation matrix.
- eulerAngles
Mat3!T eulerAngles(T a, T b, T c)
Build a rotation matrix from Euler angles
The convention taken is Xa, Zb, Xc
- eulerAngles
auto eulerAngles(V angles)
Undocumented in source. Be warned that the author may not have intended to support it.
- rotate
M rotate(M m, T angle)
M rotate(M m, T angle, V axis)
M rotate(M m, T angle, T x, T y, T z)
Append a rotation transform inferred from arguments to the matrix m.
This is equivalent to the expression
rotation(...) * m
but actually save computation by knowing
where the ones and zeros are in a pure rotation matrix.
- rotation
Mat3x3!T rotation(T angle)
auto rotation(T angle, V axis)
auto rotation(T angle, T x, T y, T z)
Build a rotation matrix.
angle in radians.
- rotationPure
auto rotationPure(T angle, V axis)
Build a pure 3d rotation matrix with angle in radians
- scale
Mat3!(CommonType!(X, Y)) scale(X x, Y y)
auto scale(V v)
Mat4!(CommonType!(X, Y, Z)) scale(X x, Y y, Z z)
- scale
M scale(M m, X x, Y y)
M scale(M m, V v)
M scale(M m, X x, Y y, Z z)
Append a scale transform inferred from arguments to the matrix m.
This is equivalent to the expression
scale(...) * m
but actually save computation by knowing
where the ones and zeros are in a pure scale matrix.
- transform
auto transform(V v, M m)
Transform a vector by a matrix in homogenous coordinates.
- translate
M translate(M m, X x, Y y)
M translate(M m, V v)
M translate(M m, X x, Y y, Z z)
Append a translation transform inferred from arguments to the matrix m.
This is equivalent to the expression
translation(...) * m
but actually save computation by knowing
where the ones and zeros are in a pure translation matrix.
- translation
auto translation(X x, Y y)
auto translation(V v)
auto translation(X x, Y y, Z z)
Build a translation matrix.
Affine transforms module