Drag[en]gine Game Engine
1.21
|
3x2 component texture matrix in row major order. More...
#include <decTexMatrix2.h>
Public Member Functions | |
Constructors and Destructors | |
decTexMatrix2 () | |
Create identity matrix. More... | |
Management | |
void | SetIdentity () |
Set identity matrix. More... | |
void | SetTranslation (float u, float v) |
Set translation matrix. More... | |
void | SetTranslation (const decVector2 &translation) |
Set translation matrix. More... | |
void | SetScale (float su, float sv) |
Set scaling matrix. More... | |
void | SetScale (const decVector2 &scaling) |
Set scaling matrix. More... | |
void | SetRotation (float rotation) |
Set rotation matrix. More... | |
void | SetShear (float shearU, float shearV) |
Set shear matrix. More... | |
void | SetShear (const decVector2 &shear) |
Set shear matrix. More... | |
void | SetST (float su, float sv, float tu, float tv) |
Set scale-translation matrix. More... | |
void | SetST (const decVector2 &scaling, const decVector2 &translation) |
Set scale-translation matrix. More... | |
void | SetSRT (float su, float sv, float rotation, float tu, float tv) |
Set scale-rotation-translation matrix. More... | |
void | SetSRT (const decVector2 &scaling, float rotation, const decVector2 &translation) |
Set scale-rotation-translation matrix. More... | |
void | SetCenterSRT (float su, float sv, float rotation, float tu, float tv) |
Set scale-rotation-translation matrix. More... | |
void | SetCenterSRT (const decVector2 &scaling, float rotation, const decVector2 &translation) |
Set center scale-rotation-translation matrix. More... | |
bool | IsEqualTo (const decTexMatrix2 &matrix, float threshold=TEXEL_THRESHOLD) const |
Determines if this matrix is cell wise equal to anither one in respect to a threshold. More... | |
float | Determinant () const |
Determinant. More... | |
decTexMatrix | Invert () const |
Inverse of matrix. More... | |
decTexMatrix | ToTexMatrix () const |
Convert to 3x3 texture matrix. More... | |
decVector2 | GetPosition () const |
Position part of matrix. More... | |
decVector2 | GetAxisX () const |
X axis part of matrix. More... | |
decVector2 | GetAxisY () const |
Y axis part of matrix. More... | |
decVector2 | GetScaling () const |
Scaling of X and Y axis. More... | |
float | GetRotation () const |
Rotation in degrees. More... | |
float | GetShearing () const |
Shearing in X direction. More... | |
decTexMatrix2 | GetRotationMatrix () const |
Rotation part of matrix. More... | |
Operators | |
decTexMatrix2 & | operator= (const decTexMatrix2 &m) |
Set cells of this matrix to the values of another one. More... | |
decTexMatrix2 & | operator+= (const decTexMatrix2 &m) |
Add cells of another matrix to this one. More... | |
decTexMatrix2 & | operator-= (const decTexMatrix2 &m) |
Subtract cells of another matrix from this vector. More... | |
decTexMatrix2 & | operator*= (float k) |
Multiply cells of this matrix with a value k. More... | |
decTexMatrix2 & | operator/= (float k) |
Divide cells of this matrix by a value k. If the value k is 0 an exception is thrown. More... | |
decTexMatrix2 & | operator*= (const decTexMatrix2 &m) |
Multiply matrix with another one. More... | |
decTexMatrix2 | operator+ (const decTexMatrix2 &m) const |
Matrix with the sum of this matrix with another one. More... | |
decTexMatrix2 | operator- (const decTexMatrix2 &m) const |
Matrix with the difference of this matrix to another one. More... | |
decTexMatrix2 | operator* (float k) const |
Matrix with this matrix scaled by k. More... | |
decTexMatrix2 | operator/ (float k) const |
Matrix with this matrix divided by k. If k is 0 an exception is thrown. More... | |
decTexMatrix2 | operator* (const decTexMatrix2 &m) const |
Matrix with this matrix multiplied with another one. More... | |
decVector2 | operator* (const decVector2 &v) const |
Transform vector by this matrix. More... | |
Static Public Member Functions | |
Matrix Creation | |
static decTexMatrix2 | CreateIdentity () |
Create identity matrix. More... | |
static decTexMatrix2 | CreateTranslation (float u, float v) |
Create translation matrix. More... | |
static decTexMatrix2 | CreateTranslation (const decVector2 &translation) |
Create translation matrix. More... | |
static decTexMatrix2 | CreateScale (float su, float sv) |
Create scaling matrix. More... | |
static decTexMatrix2 | CreateScale (const decVector2 &scaling) |
Create scaling matrix. More... | |
static decTexMatrix2 | CreateRotation (float rotation) |
Create rotation matrix. More... | |
static decTexMatrix2 | CreateShear (float shearU, float shearV) |
Create shear matrix. More... | |
static decTexMatrix2 | CreateShear (const decVector2 &shear) |
Create shear matrix. More... | |
static decTexMatrix2 | CreateST (float su, float sv, float tu, float tv) |
Create scale-translation matrix. More... | |
static decTexMatrix2 | CreateST (const decVector2 &scaling, const decVector2 &translation) |
Create scale-translation matrix. More... | |
static decTexMatrix2 | CreateSRT (float su, float sv, float rotation, float tu, float tv) |
Create scale-rotation-translation matrix. More... | |
static decTexMatrix2 | CreateSRT (const decVector2 &scaling, float rotation, const decVector2 &translation) |
Create scale-rotation-translation matrix. More... | |
static decTexMatrix2 | CreateCenterSRT (float su, float sv, float rotation, float tu, float tv) |
Create center scale-rotation-translation matrix. More... | |
static decTexMatrix2 | CreateCenterSRT (const decVector2 &scaling, float rotation, const decVector2 &translation) |
Create center scale-rotation-translation matrix. More... | |
static decTexMatrix2 | CreateCenterRotation (float rotation) |
Create center rotation matrix. More... | |
Public Attributes | |
float | a11 |
float | a12 |
float | a13 |
float | a21 |
float | a22 |
float | a23 |
3x2 component texture matrix in row major order.
decTexMatrix2::decTexMatrix2 | ( | ) |
Create identity matrix.
|
static |
Create center rotation matrix.
|
static |
Create center scale-rotation-translation matrix.
|
static |
Create center scale-rotation-translation matrix.
|
static |
Create identity matrix.
|
static |
Create rotation matrix.
|
static |
Create scaling matrix.
|
static |
Create scaling matrix.
|
static |
Create shear matrix.
|
static |
Create shear matrix.
|
static |
Create scale-rotation-translation matrix.
|
static |
Create scale-rotation-translation matrix.
|
static |
Create scale-translation matrix.
|
static |
Create scale-translation matrix.
|
static |
Create translation matrix.
|
static |
Create translation matrix.
float decTexMatrix2::Determinant | ( | ) | const |
Determinant.
decVector2 decTexMatrix2::GetAxisX | ( | ) | const |
X axis part of matrix.
decVector2 decTexMatrix2::GetAxisY | ( | ) | const |
Y axis part of matrix.
decVector2 decTexMatrix2::GetPosition | ( | ) | const |
Position part of matrix.
float decTexMatrix2::GetRotation | ( | ) | const |
Rotation in degrees.
decTexMatrix2 decTexMatrix2::GetRotationMatrix | ( | ) | const |
Rotation part of matrix.
decVector2 decTexMatrix2::GetScaling | ( | ) | const |
Scaling of X and Y axis.
float decTexMatrix2::GetShearing | ( | ) | const |
Shearing in X direction.
Due to rotation only X direction shearing can be retrieved. Y is 0.
decTexMatrix decTexMatrix2::Invert | ( | ) | const |
Inverse of matrix.
bool decTexMatrix2::IsEqualTo | ( | const decTexMatrix2 & | matrix, |
float | threshold = TEXEL_THRESHOLD |
||
) | const |
Determines if this matrix is cell wise equal to anither one in respect to a threshold.
decTexMatrix2 decTexMatrix2::operator* | ( | const decTexMatrix2 & | m | ) | const |
Matrix with this matrix multiplied with another one.
decVector2 decTexMatrix2::operator* | ( | const decVector2 & | v | ) | const |
Transform vector by this matrix.
decTexMatrix2 decTexMatrix2::operator* | ( | float | k | ) | const |
Matrix with this matrix scaled by k.
decTexMatrix2& decTexMatrix2::operator*= | ( | const decTexMatrix2 & | m | ) |
Multiply matrix with another one.
decTexMatrix2& decTexMatrix2::operator*= | ( | float | k | ) |
Multiply cells of this matrix with a value k.
decTexMatrix2 decTexMatrix2::operator+ | ( | const decTexMatrix2 & | m | ) | const |
Matrix with the sum of this matrix with another one.
decTexMatrix2& decTexMatrix2::operator+= | ( | const decTexMatrix2 & | m | ) |
Add cells of another matrix to this one.
decTexMatrix2 decTexMatrix2::operator- | ( | const decTexMatrix2 & | m | ) | const |
Matrix with the difference of this matrix to another one.
decTexMatrix2& decTexMatrix2::operator-= | ( | const decTexMatrix2 & | m | ) |
Subtract cells of another matrix from this vector.
decTexMatrix2 decTexMatrix2::operator/ | ( | float | k | ) | const |
Matrix with this matrix divided by k. If k is 0 an exception is thrown.
decTexMatrix2& decTexMatrix2::operator/= | ( | float | k | ) |
Divide cells of this matrix by a value k. If the value k is 0 an exception is thrown.
decTexMatrix2& decTexMatrix2::operator= | ( | const decTexMatrix2 & | m | ) |
Set cells of this matrix to the values of another one.
void decTexMatrix2::SetCenterSRT | ( | const decVector2 & | scaling, |
float | rotation, | ||
const decVector2 & | translation | ||
) |
Set center scale-rotation-translation matrix.
void decTexMatrix2::SetCenterSRT | ( | float | su, |
float | sv, | ||
float | rotation, | ||
float | tu, | ||
float | tv | ||
) |
Set scale-rotation-translation matrix.
void decTexMatrix2::SetIdentity | ( | ) |
Set identity matrix.
void decTexMatrix2::SetRotation | ( | float | rotation | ) |
Set rotation matrix.
void decTexMatrix2::SetScale | ( | const decVector2 & | scaling | ) |
Set scaling matrix.
void decTexMatrix2::SetScale | ( | float | su, |
float | sv | ||
) |
Set scaling matrix.
void decTexMatrix2::SetShear | ( | const decVector2 & | shear | ) |
Set shear matrix.
void decTexMatrix2::SetShear | ( | float | shearU, |
float | shearV | ||
) |
Set shear matrix.
void decTexMatrix2::SetSRT | ( | const decVector2 & | scaling, |
float | rotation, | ||
const decVector2 & | translation | ||
) |
Set scale-rotation-translation matrix.
void decTexMatrix2::SetSRT | ( | float | su, |
float | sv, | ||
float | rotation, | ||
float | tu, | ||
float | tv | ||
) |
Set scale-rotation-translation matrix.
void decTexMatrix2::SetST | ( | const decVector2 & | scaling, |
const decVector2 & | translation | ||
) |
Set scale-translation matrix.
void decTexMatrix2::SetST | ( | float | su, |
float | sv, | ||
float | tu, | ||
float | tv | ||
) |
Set scale-translation matrix.
void decTexMatrix2::SetTranslation | ( | const decVector2 & | translation | ) |
Set translation matrix.
void decTexMatrix2::SetTranslation | ( | float | u, |
float | v | ||
) |
Set translation matrix.
decTexMatrix decTexMatrix2::ToTexMatrix | ( | ) | const |
Convert to 3x3 texture matrix.
float decTexMatrix2::a11 |
float decTexMatrix2::a12 |
float decTexMatrix2::a13 |
float decTexMatrix2::a21 |
float decTexMatrix2::a22 |
float decTexMatrix2::a23 |