zenilib
0.5.3.0
|
A Featureful 4-Space Matrix Class. More...
#include <Matrix4f.h>
Classes | |
class | Matrix4f_Row |
Public Member Functions | |
Matrix4f () | |
Matrix4f (const float &aw, const float &ax, const float &ay, const float &az, const float &bw, const float &bx, const float &by, const float &bz, const float &cw, const float &cx, const float &cy, const float &cz, const float &dw, const float &dx, const float &dy, const float &dz) | |
Matrix4f (const Vector3f &first, const Vector3f &second, const Vector3f &third, const bool &rows=false) | |
Matrix4f (const Matrix4f &rhs) | |
float | determinant () const |
Get the determinant. More... | |
Vector3f | get_column (const int &column) const |
Get a column of the upper-left 3x3 matrix. More... | |
Vector3f | get_row (const int &row) const |
Get a row of the upper left 3x3 matrix. More... | |
Matrix4f & | invert () |
Invert the matrix. More... | |
Matrix4f | inverted () const |
Get the inverse. More... | |
Matrix4f | operator* (const Matrix4f &rhs) const |
Get the product. More... | |
Matrix4f | operator* (const float &rhs) const |
Get the scalar multiple. More... | |
Vector3f | operator* (const Vector3f &vector) const |
Transform a Vector3f. More... | |
Matrix4f | operator*= (const Matrix4f &rhs) |
Get the product. More... | |
Matrix4f & | operator*= (const float &rhs) |
Set equal to the scalar multiple. More... | |
Matrix4f | operator+ (const Matrix4f &rhs) const |
Get the sum. More... | |
Matrix4f & | operator+= (const Matrix4f &rhs) |
Set equal to the sum. More... | |
Matrix4f | operator- (const Matrix4f &rhs) const |
Get the difference. More... | |
Matrix4f | operator- () const |
Get the negation. More... | |
Matrix4f & | operator-= (const Matrix4f &rhs) |
Set equal to the difference. More... | |
Matrix4f | operator/ (const Matrix4f &rhs) const |
Get the product with the inverse. More... | |
Matrix4f | operator/ (const float &rhs) const |
Get the scalar... something. More... | |
Matrix4f | operator/= (const Matrix4f &rhs) |
Set equal to the product with the inverse. More... | |
Matrix4f & | operator/= (const float &rhs) |
Set equal to the scalar something. More... | |
const Matrix4f_Row | operator[] (const int &index) const |
Get row 'index'. More... | |
Matrix4f_Row | operator[] (const int &index) |
Get row 'index'. More... | |
Matrix4f & | transpose () |
Transpose the matrix. More... | |
Matrix4f | transposed () const |
Get the transpose. More... | |
Static Public Member Functions | |
static Matrix4f | Frustum (const Point2f &upper_left, const Point2f &lower_right, const float &near, const float &far) |
Similar to glFrustum. More... | |
static Matrix4f | Identity () |
static Matrix4f | Orthographic (const float &left, const float &right, const float &bottom, const float &top, const float &near, const float &far) |
Similar to gluOrtho. More... | |
static Matrix4f | Perspective (const float &fov_rad_y, const float &aspect, const float &near, const float &far) |
Similar to gluPerspective. More... | |
static Matrix4f | Rotate (const Quaternion &rotation) |
static Matrix4f | Scale (const Vector3f &scaling_factor) |
static Matrix4f | Translate (const Vector3f &translation_factor) |
static Matrix4f | View (const Point3f &position, const Vector3f &forward, const Vector3f &up) |
Similar to gluLookAt. More... | |
static Matrix4f | Zero () |
A Featureful 4-Space Matrix Class.
Matrix4f provides all the most basic functions of a Matrix class class: addition and subtraction, multiplication, scalar multiplication, inverse, transpose, and determinant. Additionally, it offers static creator functions for Zero and Identity matrices, and more advanced rendering-specific matrices as well.
Contact: bazal d@ze nipex .com
Definition at line 47 of file Matrix4f.h.
Zeni::Matrix4f::Matrix4f | ( | ) |
Definition at line 25 of file Matrix4f.cpp.
References memset.
Referenced by Frustum(), Identity(), inverted(), Orthographic(), Perspective(), Scale(), Translate(), View(), and Zero().
Zeni::Matrix4f::Matrix4f | ( | const float & | aw, |
const float & | ax, | ||
const float & | ay, | ||
const float & | az, | ||
const float & | bw, | ||
const float & | bx, | ||
const float & | by, | ||
const float & | bz, | ||
const float & | cw, | ||
const float & | cx, | ||
const float & | cy, | ||
const float & | cz, | ||
const float & | dw, | ||
const float & | dx, | ||
const float & | dy, | ||
const float & | dz | ||
) |
Definition at line 30 of file Matrix4f.cpp.
Zeni::Matrix4f::Matrix4f | ( | const Vector3f & | first, |
const Vector3f & | second, | ||
const Vector3f & | third, | ||
const bool & | rows = false |
||
) |
Definition at line 57 of file Matrix4f.cpp.
References Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.
Definition at line 88 of file Matrix4f.cpp.
float Zeni::Matrix4f::determinant | ( | ) | const |
Get the determinant.
Definition at line 153 of file Matrix4f.cpp.
References term.
Referenced by inverted().
|
inlinestatic |
Similar to glFrustum.
Definition at line 122 of file Matrix4f.hxx.
References Matrix4f(), Zeni::Point2f::x, and Zeni::Point2f::y.
Get a column of the upper-left 3x3 matrix.
Definition at line 275 of file Matrix4f.hxx.
References assert.
Get a row of the upper left 3x3 matrix.
Definition at line 280 of file Matrix4f.hxx.
References assert.
|
inlinestatic |
Definition at line 52 of file Matrix4f.hxx.
References Matrix4f().
Referenced by Zeni::Video::set_2d_view(), and Zeni::Video_DX9::set_3d_view().
Matrix4f & Zeni::Matrix4f::invert | ( | ) |
Matrix4f Zeni::Matrix4f::inverted | ( | ) | const |
Get the inverse.
Definition at line 98 of file Matrix4f.cpp.
References determinant(), m, and Matrix4f().
Referenced by invert(), operator/(), and operator/=().
Get the scalar multiple.
Definition at line 228 of file Matrix4f.hxx.
Transform a Vector3f.
Definition at line 179 of file Matrix4f.cpp.
References Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.
Get the product.
Definition at line 216 of file Matrix4f.hxx.
Set equal to the scalar multiple.
Definition at line 250 of file Matrix4f.hxx.
Get the sum.
Definition at line 154 of file Matrix4f.hxx.
Set equal to the sum.
Definition at line 180 of file Matrix4f.hxx.
Get the difference.
Definition at line 167 of file Matrix4f.hxx.
|
inline |
Get the negation.
Definition at line 264 of file Matrix4f.hxx.
Set equal to the difference.
Definition at line 191 of file Matrix4f.hxx.
Get the product with the inverse.
Definition at line 220 of file Matrix4f.hxx.
References inverted().
Get the scalar... something.
Definition at line 239 of file Matrix4f.hxx.
Set equal to the product with the inverse.
Definition at line 224 of file Matrix4f.hxx.
References inverted().
Set equal to the scalar something.
Definition at line 257 of file Matrix4f.hxx.
|
inline |
|
inline |
|
inlinestatic |
Similar to gluOrtho.
Definition at line 89 of file Matrix4f.hxx.
References Matrix4f().
Referenced by Zeni::Video::set_2d_view().
|
inlinestatic |
Similar to gluPerspective.
Definition at line 104 of file Matrix4f.hxx.
References cotangent, and Matrix4f().
Referenced by Zeni::Camera::get_projection_matrix().
|
inlinestatic |
Definition at line 66 of file Matrix4f.hxx.
References Zeni::Quaternion::get_matrix().
Definition at line 59 of file Matrix4f.hxx.
References Zeni::Vector3f::i, Zeni::Vector3f::j, Zeni::Vector3f::k, and Matrix4f().
Referenced by Zeni::Video_DX9::set_2d_view(), and Zeni::Video_GL_Shader::set_projection_matrix().
Definition at line 70 of file Matrix4f.hxx.
References Zeni::Vector3f::i, Zeni::Vector3f::j, Zeni::Vector3f::k, and Matrix4f().
Referenced by Zeni::Video_DX9::set_2d_view(), and View().
Matrix4f & Zeni::Matrix4f::transpose | ( | ) |
Matrix4f Zeni::Matrix4f::transposed | ( | ) | const |
|
inlinestatic |
Similar to gluLookAt.
Definition at line 77 of file Matrix4f.hxx.
References Zeni::Vector3f::i, Zeni::Vector3f::j, Zeni::Vector3f::k, Matrix4f(), Zeni::Vector3f::normalized(), Translate(), and u.
Referenced by Zeni::Camera::get_view_matrix().
|
inlinestatic |
Definition at line 48 of file Matrix4f.hxx.
References Matrix4f().