Matrix3

Inherited: None

Description

Internally the data is stored as column-major format, so as to be optimal for passing to OpenGL functions, which expect column-major data.

Public Methods

Matrix3 ()

areal

determinant () const

Vector3

euler ()

void

identity ()

Matrix3

inverse () const

void

orthonormalize ()

void

rotate (const Vector3 & axis, areal angle)

void

rotate (const Vector3 & angles)

void

scale (const Vector3 & vector)

Matrix3

transpose () const

void

zero ()

bool

operator!= (const Matrix3 & matrix) const

Vector3

operator* (const Vector3 & vector) const

Vector4

operator* (const Vector4 & vector) const

Matrix3

operator* (areal factor) const

Matrix3

operator* (const Matrix3 & matrix) const

Matrix3 &

operator*= (areal factor)

Matrix3 &

operator*= (const Matrix3 & matrix)

Matrix3

operator+ (const Matrix3 & matrix) const

Matrix3 &

operator+= (const Matrix3 & matrix)

Matrix3

operator- (const Matrix3 & matrix) const

Matrix3 &

operator-= (const Matrix3 & matrix)

bool

operator== (const Matrix3 & matrix) const

areal

operator[] (int i)

areal

operator[] (int i) const

Static Methods

None

Methods Description

Matrix3::Matrix3 ()

Constructs a identity matrix.


areal Matrix3::determinant () const

Returns the matrix determinant.


Vector3 Matrix3::euler ()

Returns an Euler angles represented by Vector3(pitch, yaw, roll) in rotation degrees.


void Matrix3::identity ()

Resets this matrix to an identity matrix.


Matrix3 Matrix3::inverse () const

Returns an inverted copy of this matrix.


void Matrix3::orthonormalize ()

Orthonormalize this matrix.


void Matrix3::rotate (Vector3 & axis, areal angle)

Rotate this matrix around axis to angle in rotation degrees.


void Matrix3::rotate (Vector3 & angles)

Rotate this matrix with Euler angles represented by Vector3(pitch, yaw, roll) in rotation degrees.


void Matrix3::scale (Vector3 & vector)

Scales the coordinate system by vector.


Matrix3 Matrix3::transpose () const

Returns this matrix, transposed about its diagonal.


void Matrix3::zero ()

Clear this matrix, with 0.0 value for all components.


bool Matrix3::operator!= (Matrix3 & matrix) const

Returns true if this matrix is NOT equal to given matrix; otherwise returns false. This operator uses an exact floating-point comparison.


Vector3 Matrix3::operator* (Vector3 & vector) const

Returns the result of multiplying this matrix and the given 3D vector.


Vector4 Matrix3::operator* (Vector4 & vector) const

Returns the result of multiplying this matrix and the given 4D vector.


Matrix3 Matrix3::operator* (areal factor) const

Returns the result of multiplying this matrix and the given factor.


Matrix3 Matrix3::operator* (Matrix3 & matrix) const

Returns the result of multiplying this matrix by the given matrix.

Note that matrix multiplication is not commutative, i.e. a*b != b*a.


:ref:`Matrix3<api_Matrix3>`& Matrix3::operator*= (areal factor)

Multiplies all elements of this matrix by factor.


Matrix3 & matrix)

Returns the result of multiplying this matrix by the given matrix.


Matrix3 Matrix3::operator+ (Matrix3 & matrix) const

Returns the sum of this matrix and the given matrix.


Matrix3 & matrix)

Adds the contents of matrix to this matrix.


Matrix3 Matrix3::operator- (Matrix3 & matrix) const

Returns the difference of this matrix and the given matrix.


Matrix3 & matrix)

Subtracts the contents of matrix from this matrix.


bool Matrix3::operator== (Matrix3 & matrix) const

Returns true if this matrix is equal to given matrix; otherwise returns false. This operator uses an exact floating-point comparison.


areal Matrix3::operator[] (int i)

Returns the component of the matrix at i*ndex position *i as a modifiable reference. i must be a valid i*ndex position *i*n the matrix (i.e., 0 <= *i < 9). Data *i*s stored as column-major format so this function retrieving data from rows *i*n colmns.

areal Matrix3::operator[] (int i) const

Returns the component of the matrix at i*ndex position. *i must be a valid i*ndex position *i*n the matrix (i.e., 0 <= *i < 9). Data *i*s stored as column-major format so this function retrieving data from rows *i*n colmns.