#include <vuMatrix.h>
Collaboration diagram for vuMatrix:
Public Member Functions | |
vuMatrix () | |
Default constructor that sets all values to 0.0f. | |
vuMatrix (const vuMatrix &m) | |
Copy constructor. | |
vuMatrix (float v) | |
Constructor that sets all values to v. | |
vuMatrix (const float *v) | |
Constructor that initializes the vector from a float array. | |
~vuMatrix () | |
Destructor. | |
vuMatrix & | operator= (const vuMatrix &m) |
Assigns a matrix to the instance. | |
vuMatrix & | operator= (float v) |
Assigns a floating point value to each entry of the matrix. | |
vuMatrix & | operator= (const float *v) |
Assigns an array of floating point values to the matrix. | |
vuMatrix & | makeIdentity (void) |
Makes the matrix an identity matrix and returns a reference. | |
vuMatrix & | makeRotate (const vuVector &axis, float a) |
Makes a rotation matrix for a rotation of a degrees around the axis vector. | |
vuMatrix & | makeRotateX (float a) |
Makes this matrix a rotation matrix for a rotation of a degrees about the x axis. | |
vuMatrix & | makeRotateY (float a) |
Makes this matrix a rotation matrix for a rotation of a degrees about the y axis. | |
vuMatrix & | makeRotateZ (float a) |
Makes this matrix a rotation matrix for a rotation of a degrees about the z axis. | |
vuMatrix & | makeTranslate (float x, float y, float z) |
Makes this matrix a translation matrix corresponding to the given displacement. | |
vuMatrix & | makeScale (float x, float y, float z) |
Makes this matrix a scaling matrix. | |
vuMatrix & | makeShearXY (float s) |
Makes this matrix a shearing matrix in the XY plane. | |
vuMatrix & | makeShearXZ (float s) |
Makes this matrix a shearing matrix in the XZ plane. | |
vuMatrix & | makeShearYX (float s) |
Makes this matrix a shearing matrix in the YX plane. | |
vuMatrix & | makeShearYZ (float s) |
Makes this matrix a shearing matrix in the YZ plane. | |
vuMatrix & | makeShearZX (float s) |
Makes this matrix a shearing matrix in the ZX plane. | |
vuMatrix & | makeShearZY (float s) |
Makes this matrix a shearing matrix in the ZY plane. | |
vuMatrix & | makeReflectX (void) |
Makes this matrix a reflection matrix about the x axis. | |
vuMatrix & | makeReflectY (void) |
Makes this matrix a reflection matrix about the y axis. | |
vuMatrix & | makeReflectZ (void) |
Makes this matrix a reflection matrix about the z axis. | |
vuMatrix & | makePerspective (float d) |
Makes this matrix a perspective matrix for the distance d. | |
vuMatrix & | makePerspectiveKeepZ (float d) |
Makes this matrix a perspective matrix for the distance d, keeping the z value. | |
float * | operator[] (unsigned int index) |
The access operator. | |
const float * | operator[] (unsigned int index) const |
The const access operator. | |
float * | getData (void) |
Returns the data pointer. | |
float const * | getData (void) const |
returns const data pointer | |
vuMatrix | invOrtho () const |
Returns the transposed 3x3 matrix with negative translation. | |
vuMatrix | operator+ (const vuMatrix &m) const |
Returns the addition of the two matrices.. | |
vuMatrix | operator- (const vuMatrix &m) const |
Returns the subtraction a matrix from the instance. | |
vuMatrix | operator * (const vuMatrix &m) const |
Returns the product of the two matrices. | |
vuVector | operator * (const vuVector &v) const |
Returns the product of the instance with a vector. | |
vuMatrix | operator * (float s) const |
Returns the product of the instance with a scalar. | |
vuMatrix & | operator+= (const vuMatrix &m) |
Adds a matrix to the instance. | |
vuMatrix & | operator-= (const vuMatrix &m) |
Subtracts a matrix from the instance. | |
vuMatrix & | operator *= (const vuMatrix &m) |
Multiplies the instance by a matrix. | |
vuMatrix & | operator *= (float s) |
Multiplies the instance by a scalar. | |
bool | operator== (const vuMatrix &m) const |
An equality operator. | |
bool | operator!= (const vuMatrix &m) const |
An inequality operator. | |
vuMatrix | inverse (void) |
Returns the inverse of the matrix. | |
void | invertRotationMatrix () |
Inverts a rotation matrix. | |
Private Attributes | |
float | val [16] |
this is the buffer that stores the entries of the matrix | |
Friends | |
class | vuVector |
vuMatrix | operator * (float s, const vuMatrix &m) |
Multiplies a scalar by a matrix. |
The elements of the vuMatrix are all single precision floating-point numbers, stored in column-major order to be compatible with OpenGL.
Definition at line 19 of file vuMatrix.h.
|
Default constructor that sets all values to 0.0f.
Definition at line 8 of file vuMatrix.cpp. References val. |
|
Copy constructor.
Definition at line 15 of file vuMatrix.cpp. References val. |
|
Constructor that sets all values to v.
Definition at line 22 of file vuMatrix.cpp. References val. |
|
Constructor that initializes the vector from a float array.
Definition at line 29 of file vuMatrix.cpp. References val. |
|
Destructor.
Definition at line 36 of file vuMatrix.cpp. |
|
returns const data pointer
Definition at line 251 of file vuMatrix.cpp. |
|
Returns the data pointer. Same as calling operator[0]. Definition at line 246 of file vuMatrix.cpp. Referenced by invOrtho(). |
|
Returns the inverse of the matrix.
Definition at line 387 of file vuMatrix.cpp. References val. Referenced by vu111211A::computeEyePoint(), vu1512119::computeEyePoint(), vu111211A::computeWarpPerspective(), and vu1512119::computeWarpPerspective(). |
|
Inverts a rotation matrix. The inverse of a rotation matrix is simply its transpose, which takes 3 swaps Definition at line 497 of file vuMatrix.cpp. |
Here is the call graph for this function:
|
Returns the transposed 3x3 matrix with negative translation.
Definition at line 255 of file vuMatrix.cpp. |
Here is the call graph for this function:
|
Makes the matrix an identity matrix and returns a reference.
Definition at line 68 of file vuMatrix.cpp. References val. Referenced by vu111211A::computeShearPerspective(), vu1512119::computeShearPerspective(), vu111211A::computeViewMatrix(), vu1512119::computeViewMatrix(), vu111211A::computeWarpPerspective(), vu1512119::computeWarpPerspective(), makePerspective(), makePerspectiveKeepZ(), makeReflectX(), makeReflectY(), makeReflectZ(), makeRotateX(), makeRotateY(), makeRotateZ(), makeScale(), makeShearXY(), makeShearXZ(), makeShearYX(), makeShearYZ(), makeShearZX(), makeShearZY(), and makeTranslate(). |
|
Makes this matrix a perspective matrix for the distance d.
Definition at line 214 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a perspective matrix for the distance d, keeping the z value.
Definition at line 222 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a reflection matrix about the x axis.
Definition at line 193 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a reflection matrix about the y axis.
Definition at line 200 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a reflection matrix about the z axis.
Definition at line 207 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes a rotation matrix for a rotation of a degrees around the axis vector.
Definition at line 76 of file vuMatrix.cpp. References vuVector::mul(), PI_OVER_180, and val. Referenced by vu111211A::computeViewMatrix(), vu1512119::computeViewMatrix(), vuCamera::rotateAboutLookAt(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), Volume::rotateSliceX(), vu1112117::rotateSliceX(), Volume::rotateSliceY(), vu1112117::rotateSliceY(), Volume::rotateSliceZ(), vu1112117::rotateSliceZ(), and vuArcBall::turn(). |
Here is the call graph for this function:
|
Makes this matrix a rotation matrix for a rotation of a degrees about the x axis.
Definition at line 109 of file vuMatrix.cpp. References makeIdentity(), PI_OVER_180, and val. |
Here is the call graph for this function:
|
Makes this matrix a rotation matrix for a rotation of a degrees about the y axis.
Definition at line 117 of file vuMatrix.cpp. References makeIdentity(), PI_OVER_180, and val. |
Here is the call graph for this function:
|
Makes this matrix a rotation matrix for a rotation of a degrees about the z axis.
Definition at line 125 of file vuMatrix.cpp. References makeIdentity(), PI_OVER_180, and val. Referenced by vu111211A::computeViewMatrix(), and vu1512119::computeViewMatrix(). |
Here is the call graph for this function:
|
Makes this matrix a scaling matrix.
Definition at line 142 of file vuMatrix.cpp. References makeIdentity(), and val. Referenced by vu111211A::computeWarpPerspective(), and vu1512119::computeWarpPerspective(). |
Here is the call graph for this function:
|
Makes this matrix a shearing matrix in the XY plane.
Definition at line 151 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a shearing matrix in the XZ plane.
Definition at line 158 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a shearing matrix in the YX plane.
Definition at line 165 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a shearing matrix in the YZ plane.
Definition at line 172 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a shearing matrix in the ZX plane.
Definition at line 179 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a shearing matrix in the ZY plane.
Definition at line 186 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Makes this matrix a translation matrix corresponding to the given displacement.
Definition at line 133 of file vuMatrix.cpp. References makeIdentity(), and val. |
Here is the call graph for this function:
|
Returns the product of the instance with a scalar.
Definition at line 311 of file vuMatrix.cpp. References val. |
|
Returns the product of the instance with a vector.
Definition at line 299 of file vuMatrix.cpp. References val, and vuVector::val. |
|
Returns the product of the two matrices.
Definition at line 287 of file vuMatrix.cpp. References val. |
|
Multiplies the instance by a scalar.
Definition at line 357 of file vuMatrix.cpp. References val. |
|
Multiplies the instance by a matrix.
Definition at line 345 of file vuMatrix.cpp. References val. |
|
An inequality operator.
Definition at line 374 of file vuMatrix.cpp. References operator==(). |
Here is the call graph for this function:
|
Returns the addition of the two matrices..
Definition at line 269 of file vuMatrix.cpp. References val. |
|
Adds a matrix to the instance.
Definition at line 329 of file vuMatrix.cpp. References val. |
|
Returns the subtraction a matrix from the instance.
Definition at line 278 of file vuMatrix.cpp. References val. |
|
Subtracts a matrix from the instance.
Definition at line 337 of file vuMatrix.cpp. References val. |
|
Assigns an array of floating point values to the matrix.
Definition at line 60 of file vuMatrix.cpp. References val. |
|
Assigns a floating point value to each entry of the matrix.
Definition at line 52 of file vuMatrix.cpp. References val. |
|
Assigns a matrix to the instance.
Definition at line 41 of file vuMatrix.cpp. References val. |
|
An equality operator.
Definition at line 365 of file vuMatrix.cpp. References val. Referenced by operator!=(). |
|
The const access operator.
Definition at line 238 of file vuMatrix.cpp. References val. |
|
The access operator.
Definition at line 230 of file vuMatrix.cpp. References val. |
|
Multiplies a scalar by a matrix.
Definition at line 320 of file vuMatrix.cpp. |
|
Definition at line 21 of file vuMatrix.h. |
|
this is the buffer that stores the entries of the matrix
Definition at line 138 of file vuMatrix.h. Referenced by inverse(), invertRotationMatrix(), invOrtho(), makeIdentity(), makePerspective(), makePerspectiveKeepZ(), makeReflectX(), makeReflectY(), makeReflectZ(), makeRotate(), makeRotateX(), makeRotateY(), makeRotateZ(), makeScale(), makeShearXY(), makeShearXZ(), makeShearYX(), makeShearYZ(), makeShearZX(), makeShearZY(), makeTranslate(), vuVector::operator *(), operator *(), operator *(), vuVector::operator *=(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), operator[](), and vuMatrix(). |