35 Mat(0, 0) = Q.
w*Q.
w + Q.
x*Q.
x - Q.
y*Q.
y - Q.
z*Q.
z;
36 Mat(1, 1) = Q.
w*Q.
w - Q.
x*Q.
x + Q.
y*Q.
y - Q.
z*Q.
z;
37 Mat(2, 2) = Q.
w*Q.
w - Q.
x*Q.
x - Q.
y*Q.
y + Q.
z*Q.
z;
39 Mat(0, 1) = 2*Q.
x*Q.
y - 2*Q.
w*Q.
z;
40 Mat(0, 2) = 2*Q.
w*Q.
y + 2*Q.
x*Q.
z;
41 Mat(1, 2) = 2*Q.
y*Q.
z - 2*Q.
w*Q.
x;
43 Mat(1, 0) = 2*Q.
w*Q.
z + 2*Q.
x*Q.
y;
44 Mat(2, 0) = 2*Q.
x*Q.
z - 2*Q.
w*Q.
y;
45 Mat(2, 1) = 2*Q.
w*Q.
x + 2*Q.
y*Q.
z;
53 VecMat(0, 0) = Vector.
x;
54 VecMat(1, 0) = Vector.
y;
55 VecMat(2, 0) = Vector.
z;
56 VecMat = Transform * VecMat;
57 return XYZ(VecMat(0, 0), VecMat(1, 0), VecMat(2, 0));
Class to represent a matrix and perform various operations on it.
void Initialise(int iHeight, int iWidth)
void InitialiseIdentity(int iSize)
Namespace containing a series of customised math operations not found in the standard c++ library.
XYZ operator*(const CMatrix &Transform, const XYZ &Vector)
CMatrix ConvertRotation(WXYZ Q)
Struct for representing a quaternion.
Struct for representing points in 3D space.