Float3x3
A 3x3 matrix of floating-point values.
A Float3x3
can represent any linear transformation in 3D space without a translation component,
such as rotation, scale or shear. If a translation component is needed, use Float3x4
or
Float4x4
.
The matrix is stored in column-major order. In other words, it's an array of three Float3
column
vectors.
Header File
#include <ply-math/Matrix.h>
Also included from <ply-math/Base.h>
.
Constructors
-
Constructs an uninitialized
Float3x3
. -
Constructs a 3x3 matrix from the given column vectors.
Float3x3 m = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
-
Accesses the column vector at the specified index.
Float3x3 m = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; m[0].x = -1; StdOut::text() << m[2]; // "{0, 0, 1}"
bool operator==(const Float3x3& a, const Float3x3& b)
[code]bool operator!=(const Float3x3& a, const Float3x3& b)
[code]-
Returns
true
if the matrices are equal (or not equal) using floating-point comparison. In particular, a component with a value of0.f
is equal to a component with a value of-0.f
. -
Returns the identity matrix
{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
. -
Returns a scale matrix.
-
Returns a matrix that performs a counter-clockwise rotation around the specified axis following the right-hand rule.
unitAxis
must have have unit length and the angle is specified in radians. -
Returns a matrix that performs the same rotation as
q
. -
Returns the transpose of the 3x3 matrix. If the matrix is orthogonal (in other words, it consists only of a rotation and/or reflection), this function also returns the inverse matrix.
-
Transform a vector using a matrix.
v
is treated as a column vector and premultiplied by the matrixm
. Float3x3 operator*(const Float3x3& a, const Float3x3& b)
[code]-
Matrix multiplication.