#include <Matrix2.h>
Public Member Functions | |
Matrix2 () | |
Default constructor. Does NOT initialise data for performance. | |
Matrix2 (const Matrix2 &m) | |
Copy Constructor. | |
Matrix2 (const Vector2 &v1, const Vector2 &v2) | |
Builds a matrix from 2 vectors that serve as columns. | |
Matrix2 (const float m00, const float m10, const float m01, const float m11) | |
Builds a matrix from 4 values. m00 and m10 are the first column, while m01 and m11 are the second one. | |
Matrix2 (const float values[2][2]) | |
Builds a matrix from an array of values. | |
TestResult | Test () |
Tests this class and returns the result in a TestResult structure. | |
std::string | ToString () |
Returns a string that represents the actual object. | |
const Vector2 * | operator[] (unsigned int col) |
Array indexing operator. | |
const Vector2 * | operator[] (unsigned int col) const |
Array indexing operator. | |
Matrix2 & | operator= (const Matrix2 &m) |
Assign operator. | |
Matrix2 & | operator+= (const Matrix2 &m) |
Adds a Matrix2 to this one. | |
Matrix2 & | operator-= (const Matrix2 &m) |
Subtracts a Matrix2 from this one. | |
Matrix2 & | operator *= (const Matrix2 &m) |
Multiplies the Matrix2 by another Matrix2. | |
Matrix2 & | operator *= (float f) |
Multiplies the Matrix2 by a float. | |
Matrix2 & | operator/= (float f) |
Divides the Matrix2 by a float. | |
Protected Attributes | |
float | mat2 [2][2] |
Friends | |
bool | operator== (const Matrix2 &m1, const Matrix2 &m2) |
Are these two Matrix2's equal ? | |
bool | operator!= (const Matrix2 &m1, const Matrix2 &m2) |
Are these two Matrix2's not equal ? | |
Matrix2 | operator+ (const Matrix2 &m1, const Matrix2 &m2) |
Add two Matrix2's. | |
Matrix2 | operator- (const Matrix2 &m1, const Matrix2 &m2) |
Subtracts one Matrix2 from another. | |
Matrix2 | operator * (const Matrix2 &m1, const Matrix2 &m2) |
Multiplies a Matrix2 by another one. | |
Vector2 | operator * (const Matrix2 &m, const Vector2 &v) |
Multiplies a Matrix2 by a Vector2. | |
Vector2 | operator * (const Vector2 &v, const Matrix2 &m) |
Multiplies a Vector2 by a Matrix2. | |
Matrix2 | operator * (const Matrix2 &m, float f) |
Multiplies a Matrix2 by a float. | |
Matrix2 | operator * (float f, const Matrix2 &m) |
Multiplies a Matrix2 by a float. |
|
Default constructor. Does NOT initialise data for performance. Note that internally data is stored column-wise. |
|
Copy Constructor.
|
|
Builds a matrix from 2 vectors that serve as columns.
|
|
Builds a matrix from 4 values. m00 and m10 are the first column, while m01 and m11 are the second one.
|
|
Builds a matrix from an array of values.
|
|
Multiplies the Matrix2 by a float.
|
|
Multiplies the Matrix2 by another Matrix2.
|
|
Adds a Matrix2 to this one.
|
|
Subtracts a Matrix2 from this one.
|
|
Divides the Matrix2 by a float.
|
|
Assign operator.
|
|
Array indexing operator.
|
|
Array indexing operator.
|
|
Tests this class and returns the result in a TestResult structure.
|
|
Returns a string that represents the actual object.
|
|
Multiplies a Matrix2 by a float.
|
|
Multiplies a Matrix2 by a float.
|
|
Multiplies a Vector2 by a Matrix2.
|
|
Multiplies a Matrix2 by a Vector2.
|
|
Multiplies a Matrix2 by another one.
|
|
Are these two Matrix2's not equal ?
|
|
Add two Matrix2's.
|
|
Subtracts one Matrix2 from another.
|
|
Are these two Matrix2's equal ?
|
|
|