![]() |
Kochol Game Engine
0.1.0
|
#include <Matrix.h>
Public Member Functions | |
Matrix () | |
Constructor: Identity the matrix. | |
Matrix (float *f) | |
Sazande ba float*. | |
Matrix (float f11, float f12, float f13, float f14, float f21, float f22, float f23, float f24, float f31, float f32, float f33, float f34, float f41, float f42, float f43, float f44) | |
sazande ba 16 ta float | |
void | Identity () |
make identity matrix | |
float | operator[] (u32 i) const |
bool | Inverse () |
Makes the inverse of this matrix. | |
bool | GetInverse (Matrix &m) |
Create the inverse of this matrix. | |
const Matrix | operator* (const Matrix &m) const |
Zarb do ta matrix dar ham. | |
Matrix & | operator*= (const Matrix &m) |
Zarb do ta matrix dar ham. | |
Vector | operator* (const Vector &v) const |
Tranform a vector with this matrix. | |
float & | operator() (int row, int col) |
void | Translate (float dx, float dy, float dz) |
Baraye jabe jaee noghat az in estefade mishe. | |
void | RotY (float angle) |
Chrkhesh dore mehvare Y ha. | |
void | Set (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) |
Sets matrix elements. | |
void | SetRotation (const gfx::Vertex3 *v3) |
Build a rotation matrix. | |
void | SetRotation (const float *f) |
Build a rotation matrix. | |
void | SetTranslation (const gfx::Vertex3 *v3) |
Set the translation values of the matrix. | |
Vector | GetTranslation () |
Get the translation values from the matrix. | |
void | SetTranslation (const float *f) |
Set the translation values of the matrix. | |
void | SetScale (const math::Vector &v) |
Set the scale values of the matrix. | |
void | TransformSphere (const Sphere &sphere, Sphere &result) const |
Transform a sphere. | |
void | TransformBox (const AABB &box, AABB &result) const |
Transform an AABB. | |
void | TransformBox2 (const AABB &box, AABB &result) const |
Transform an AABB. | |
void | InverseTranslateVec (gfx::Vertex3 &v3) const |
Translate a vector based on the inverse matrix. | |
void | InverseRotateVec (gfx::Vertex3 &v3) const |
Rotate a vector using the inverse of the matrix. | |
void | InverseTranslateVec (Vector &v3) const |
Translate a vector based on the inverse matrix. | |
void | InverseRotateVec (Vector &v3) const |
Rotate a vector using the inverse of the matrix. | |
void | TranslateVec (Vector &v3) const |
Translate a vector using this matrix. | |
void | RotateVec (Vector &v3) const |
Rotate a vector using this matrix. | |
void | TransFormVec (Vector &v3) const |
Transform a vector using this matrix. | |
void | TransFormVec2 (Vector &v3) const |
Transform a vector using this matrix. | |
void | TransFormVec2 (gfx::Vertex3 &v3) const |
Transform a vector using this matrix. | |
void | TransFormVec2 (gfx::Vertex3 *v3Out, gfx::Vertex3 *vIn, int size) const |
Transform a vector using this matrix. | |
void | Transform2DVec (kge::gfx::Vertex2 &v2) const |
Transform. | |
const void | operator= (const Matrix &rMat) |
Copy operator. | |
void | SetOrthoLH (float width, float height, float znear, float zfar) |
makes this a left handed Orthogonal projection matrix | |
void | SetOrthoOffscreenLH (float minx, float maxx, float miny, float maxy, float znear, float zfar) |
makes this a left handed Orthogonal projection matrix | |
void | SetPerspectiveLH (float width, float height, float Fov, float Near, float Far) |
Sets the left hand perspective projection matrix. | |
void | SetViewLookatLH (math::Vector &vPos, math::Vector &vPoint, math::Vector &vUp) |
Create a view look at matrix. | |
void | Get4x3Matrix (float *pOut) |
Public Attributes | |
union { | |
float m_fMat [16] | |
struct { | |
float _11 | |
float _12 | |
float _13 | |
float _14 | |
float _21 | |
float _22 | |
float _23 | |
float _24 | |
float _31 | |
float _32 | |
float _33 | |
float _34 | |
float _41 | |
float _42 | |
float _43 | |
float _44 | |
} | |
}; |
|
inline |
kge::math::Matrix::Matrix | ( | float * | f | ) |
Sazande ba float*.
kge::math::Matrix::Matrix | ( | float | f11, |
float | f12, | ||
float | f13, | ||
float | f14, | ||
float | f21, | ||
float | f22, | ||
float | f23, | ||
float | f24, | ||
float | f31, | ||
float | f32, | ||
float | f33, | ||
float | f34, | ||
float | f41, | ||
float | f42, | ||
float | f43, | ||
float | f44 | ||
) |
sazande ba 16 ta float
void kge::math::Matrix::Get4x3Matrix | ( | float * | pOut | ) |
bool kge::math::Matrix::GetInverse | ( | Matrix & | m | ) |
Create the inverse of this matrix.
Vector kge::math::Matrix::GetTranslation | ( | ) |
Get the translation values from the matrix.
|
inline |
bool kge::math::Matrix::Inverse | ( | ) |
Makes the inverse of this matrix.
Referenced by kge::math::Ray::TransformRayInverse().
void kge::math::Matrix::InverseRotateVec | ( | gfx::Vertex3 & | v3 | ) | const |
Rotate a vector using the inverse of the matrix.
void kge::math::Matrix::InverseRotateVec | ( | Vector & | v3 | ) | const |
Rotate a vector using the inverse of the matrix.
void kge::math::Matrix::InverseTranslateVec | ( | gfx::Vertex3 & | v3 | ) | const |
Translate a vector based on the inverse matrix.
void kge::math::Matrix::InverseTranslateVec | ( | Vector & | v3 | ) | const |
Translate a vector based on the inverse matrix.
|
inline |
const void kge::math::Matrix::operator= | ( | const Matrix & | rMat | ) |
Copy operator.
void kge::math::Matrix::RotateVec | ( | Vector & | v3 | ) | const |
Rotate a vector using this matrix.
Referenced by kge::math::Ray::TransformRayInverse().
void kge::math::Matrix::RotY | ( | float | angle | ) |
Chrkhesh dore mehvare Y ha.
void kge::math::Matrix::Set | ( | float | m11, |
float | m12, | ||
float | m13, | ||
float | m14, | ||
float | m21, | ||
float | m22, | ||
float | m23, | ||
float | m24, | ||
float | m31, | ||
float | m32, | ||
float | m33, | ||
float | m34, | ||
float | m41, | ||
float | m42, | ||
float | m43, | ||
float | m44 | ||
) |
Sets matrix elements.
void kge::math::Matrix::SetOrthoLH | ( | float | width, |
float | height, | ||
float | znear, | ||
float | zfar | ||
) |
makes this a left handed Orthogonal projection matrix
void kge::math::Matrix::SetOrthoOffscreenLH | ( | float | minx, |
float | maxx, | ||
float | miny, | ||
float | maxy, | ||
float | znear, | ||
float | zfar | ||
) |
makes this a left handed Orthogonal projection matrix
void kge::math::Matrix::SetPerspectiveLH | ( | float | width, |
float | height, | ||
float | Fov, | ||
float | Near, | ||
float | Far | ||
) |
Sets the left hand perspective projection matrix.
void kge::math::Matrix::SetRotation | ( | const gfx::Vertex3 * | v3 | ) |
Build a rotation matrix.
void kge::math::Matrix::SetRotation | ( | const float * | f | ) |
Build a rotation matrix.
void kge::math::Matrix::SetScale | ( | const math::Vector & | v | ) |
Set the scale values of the matrix.
void kge::math::Matrix::SetTranslation | ( | const gfx::Vertex3 * | v3 | ) |
Set the translation values of the matrix.
void kge::math::Matrix::SetTranslation | ( | const float * | f | ) |
Set the translation values of the matrix.
void kge::math::Matrix::SetViewLookatLH | ( | math::Vector & | vPos, |
math::Vector & | vPoint, | ||
math::Vector & | vUp | ||
) |
Create a view look at matrix.
void kge::math::Matrix::Transform2DVec | ( | kge::gfx::Vertex2 & | v2 | ) | const |
Transform.
Transform a 2D vector
Transform a sphere.
|
inline |
Transform a vector using this matrix.
Definition at line 150 of file Matrix.h.
References kge::math::Vector::x, kge::math::Vector::y, and kge::math::Vector::z.
void kge::math::Matrix::TransFormVec2 | ( | Vector & | v3 | ) | const |
Transform a vector using this matrix.
void kge::math::Matrix::TransFormVec2 | ( | gfx::Vertex3 & | v3 | ) | const |
Transform a vector using this matrix.
void kge::math::Matrix::TransFormVec2 | ( | gfx::Vertex3 * | v3Out, |
gfx::Vertex3 * | vIn, | ||
int | size | ||
) | const |
Transform a vector using this matrix.
void kge::math::Matrix::Translate | ( | float | dx, |
float | dy, | ||
float | dz | ||
) |
Baraye jabe jaee noghat az in estefade mishe.
void kge::math::Matrix::TranslateVec | ( | Vector & | v3 | ) | const |
Translate a vector using this matrix.
Referenced by kge::math::Ray::TransformRayInverse().
union { ... } |
float kge::math::Matrix::m_fMat[16] |
Definition at line 36 of file Matrix.h.
Referenced by kge::math::Ray::CalcPickingRay(), kge::math::Quat::ToMatrix(), kge::gfx::Vertex3::Transform3(), and kge::gfx::Vertex3::Transform4().