Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The Matrix4 class is a template class that implements a generic 4x4 matrix, see also vl::dmat4, vl::fmat4, vl::umat4, vl::imat4. More...
#include <Matrix4.hpp>
Public Types | |
typedef T_Scalar | scalar_type |
Public Member Functions | |
template<typename T > | |
Matrix4 (const Matrix4< T > &m) | |
Matrix4 () | |
Matrix4 (T_Scalar n) | |
Matrix4 (T_Scalar *val) | |
Matrix4 (T_Scalar e00, T_Scalar e01, T_Scalar e02, T_Scalar e03, T_Scalar e10, T_Scalar e11, T_Scalar e12, T_Scalar e13, T_Scalar e20, T_Scalar e21, T_Scalar e22, T_Scalar e23, T_Scalar e30, T_Scalar e31, T_Scalar e32, T_Scalar e33) | |
Matrix4 & | fill (T_Scalar val) |
Matrix4 & | fillPtr (T_Scalar *val) |
T_Scalar | diff (const Matrix4 &other) const |
Vector3< T_Scalar > | getX () const |
Vector3< T_Scalar > | getY () const |
Vector3< T_Scalar > | getZ () const |
Vector3< T_Scalar > | getT () const |
Matrix4 & | setX (const Vector3< T_Scalar > &v) |
Matrix4 & | setY (const Vector3< T_Scalar > &v) |
Matrix4 & | setZ (const Vector3< T_Scalar > &v) |
Matrix4 & | setT (const Vector3< T_Scalar > &v) |
bool | operator== (const Matrix4 &m) const |
bool | operator!= (const Matrix4 &m) const |
Matrix4 & | operator= (const Matrix4 &m) |
Matrix4 | operator+ (const Matrix4 &m) const |
Matrix4 & | operator+= (const Matrix4 &m) |
Matrix4 | operator- (const Matrix4 &m) const |
Matrix4 & | operator-= (const Matrix4 &m) |
Matrix4 & | operator*= (const Matrix4 &m) |
Matrix4 | operator- () const |
Matrix4 | operator+ (T_Scalar d) const |
Matrix4 & | operator+= (T_Scalar d) |
Matrix4 | operator- (T_Scalar d) const |
Matrix4 & | operator-= (T_Scalar d) |
Matrix4 | operator* (T_Scalar d) const |
Matrix4 & | operator*= (T_Scalar d) |
Matrix4 | operator/ (T_Scalar d) const |
Matrix4 & | operator/= (T_Scalar d) |
bool | isIdentity () const |
Matrix4 | as3x3 () const |
Matrix3< T_Scalar > | get3x3 () const |
void | set3x3 (const Matrix3< T_Scalar > &m) |
This writes only on the upper 3x3 part of the matrix without touching the last row and column. | |
T_Scalar * | ptr () |
const T_Scalar * | ptr () const |
Matrix4 & | transpose () |
Matrix4 | getTransposed () const |
Matrix4 & | getTransposed (Matrix4 &dest) const |
bool | isNull () const |
Matrix4 & | setNull () |
Matrix4 & | setIdentity () |
T_Scalar | getInverse (Matrix4 &dest) const |
Matrix4 | getInverse (T_Scalar *determinant=NULL) const |
Matrix4 & | invert (T_Scalar *determinant=NULL) |
void | getAsLookAtModeling (Vector3< T_Scalar > &eye, Vector3< T_Scalar > &at, Vector3< T_Scalar > &up, Vector3< T_Scalar > &right) const |
void | getAsLookAt (Vector3< T_Scalar > &eye, Vector3< T_Scalar > &at, Vector3< T_Scalar > &up, Vector3< T_Scalar > &right) const |
void | getYXRotationAngles (T_Scalar °rees_y, T_Scalar °rees_x) const |
If this matrix can be represented as RY(degrees_y) * RX(degrees_x) , where RX and RY are getRotation matrices around the X and Y axis respectively, this function returns the getRotation angles degrees_y and degrees_x . | |
Matrix4 & | rotate (T_Scalar degrees, const Vector3< T_Scalar > &v) |
Matrix4 & | rotate (T_Scalar degrees, T_Scalar x, T_Scalar y, T_Scalar z) |
Matrix4 & | rotate (T_Scalar degrees1, const Vector3< T_Scalar > &v1, T_Scalar degrees2, const Vector3< T_Scalar > &v2) |
Matrix4 & | rotate (T_Scalar degrees1, const Vector3< T_Scalar > &v1, T_Scalar degrees2, const Vector3< T_Scalar > &v2, T_Scalar degrees3, const Vector3< T_Scalar > &v3) |
Matrix4 & | rotateXYZ (T_Scalar degX, T_Scalar degY, T_Scalar degZ) |
Matrix4 & | rotateZYX (T_Scalar degZ, T_Scalar degY, T_Scalar degX) |
Matrix4 & | rotate (const Vector4< T_Scalar > &from, const Vector4< T_Scalar > &to) |
Matrix4 & | rotate (const Vector3< T_Scalar > &from, const Vector3< T_Scalar > &to) |
Matrix4 & | translate (T_Scalar x, T_Scalar y, T_Scalar z) |
Matrix4 & | translate (const Vector3< T_Scalar > &v) |
Matrix4 & | scale (T_Scalar x, T_Scalar y, T_Scalar z) |
Matrix4 & | scale (const Vector3< T_Scalar > v) |
Matrix4 & | postMultiply (const Matrix4 &m) |
Matrix4 & | preMultiply (const Matrix4 &m) |
const T_Scalar & | e (int i, int j) const |
T_Scalar & | e (int i, int j) |
Static Public Member Functions | |
static Matrix4 & | getNull (Matrix4 &out) |
static Matrix4 | getNull () |
static Matrix4 | getIdentity () |
static Matrix4 & | getIdentity (Matrix4 &out) |
static Matrix4 | getPerspective (T_Scalar fovy, T_Scalar aspect_ratio, T_Scalar znear, T_Scalar zfar) |
static Matrix4 | getFrustum (T_Scalar pleft, T_Scalar pright, T_Scalar pbottom, T_Scalar ptop, T_Scalar pnear, T_Scalar pfar) |
static Matrix4 | getOrtho (T_Scalar pleft, T_Scalar pright, T_Scalar pbottom, T_Scalar ptop, T_Scalar pnear, T_Scalar pfar) |
static Matrix4 | getOrtho2D (T_Scalar pleft, T_Scalar pright, T_Scalar pbottom, T_Scalar ptop) |
static Matrix4 | getLookAtModeling (const Vector3< T_Scalar > &eye, const Vector3< T_Scalar > &at, const Vector3< T_Scalar > &up) |
static Matrix4 | getLookAt (const Vector3< T_Scalar > &eye, const Vector3< T_Scalar > &at, const Vector3< T_Scalar > &up) |
static Matrix4 & | getRotation (Matrix4 &out, T_Scalar degrees, T_Scalar x, T_Scalar y, T_Scalar z) |
static Matrix4 | getRotation (T_Scalar degrees, T_Scalar x, T_Scalar y, T_Scalar z) |
static Matrix4 | getRotation (T_Scalar degrees, const Vector3< T_Scalar > &v) |
static Matrix4 | getRotation (T_Scalar degrees1, const Vector3< T_Scalar > &v1, T_Scalar degrees2, const Vector3< T_Scalar > &v2) |
static Matrix4 | getRotation (T_Scalar degrees1, const Vector3< T_Scalar > &v1, T_Scalar degrees2, const Vector3< T_Scalar > &v2, T_Scalar degrees3, const Vector3< T_Scalar > &v3) |
static Matrix4 | getRotationXYZ (T_Scalar degX, T_Scalar degY, T_Scalar degZ) |
static Matrix4 | getRotationZYX (T_Scalar degZ, T_Scalar degY, T_Scalar degX) |
static Matrix4 & | getRotation (Matrix4 &out, const Vector3< T_Scalar > &from, const Vector3< T_Scalar > &to) |
static Matrix4 | getRotation (const Vector3< T_Scalar > &from, const Vector3< T_Scalar > &to) |
static Matrix4 & | getTranslation (Matrix4 &out, const Vector3< T_Scalar > &v) |
static Matrix4 | getTranslation (const Vector3< T_Scalar > &v) |
static Matrix4 | getTranslation (T_Scalar x, T_Scalar y, T_Scalar z) |
static Matrix4 & | getTranslation (Matrix4 &out, T_Scalar x, T_Scalar y, T_Scalar z) |
static Matrix4 & | getScaling (Matrix4 &out, const Vector3< T_Scalar > &v) |
static Matrix4 | getScaling (const Vector3< T_Scalar > &v) |
static Matrix4 | getScaling (T_Scalar x, T_Scalar y, T_Scalar z) |
static Matrix4 & | getScaling (Matrix4 &out, T_Scalar x, T_Scalar y, T_Scalar z) |
static Matrix4 & | multiply (Matrix4 &out, const Matrix4 &p, const Matrix4 &q) |
Protected Attributes | |
Vector4< T_Scalar > | mVec [4] |
The Matrix4 class is a template class that implements a generic 4x4 matrix, see also vl::dmat4, vl::fmat4, vl::umat4, vl::imat4.
Definition at line 48 of file Matrix4.hpp.
typedef T_Scalar vl::Matrix4< T_Scalar >::scalar_type |
Definition at line 51 of file Matrix4.hpp.
vl::Matrix4< T_Scalar >::Matrix4 | ( | const Matrix4< T > & | m ) | [inline, explicit] |
Definition at line 54 of file Matrix4.hpp.
vl::Matrix4< T_Scalar >::Matrix4 | ( | ) | [inline] |
Definition at line 62 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::getIdentity(), and vl::Matrix4< float >::getNull().
vl::Matrix4< T_Scalar >::Matrix4 | ( | T_Scalar | n ) | [inline, explicit] |
Definition at line 67 of file Matrix4.hpp.
vl::Matrix4< T_Scalar >::Matrix4 | ( | T_Scalar * | val ) | [inline, explicit] |
Definition at line 73 of file Matrix4.hpp.
vl::Matrix4< T_Scalar >::Matrix4 | ( | T_Scalar | e00, |
T_Scalar | e01, | ||
T_Scalar | e02, | ||
T_Scalar | e03, | ||
T_Scalar | e10, | ||
T_Scalar | e11, | ||
T_Scalar | e12, | ||
T_Scalar | e13, | ||
T_Scalar | e20, | ||
T_Scalar | e21, | ||
T_Scalar | e22, | ||
T_Scalar | e23, | ||
T_Scalar | e30, | ||
T_Scalar | e31, | ||
T_Scalar | e32, | ||
T_Scalar | e33 | ||
) | [inline, explicit] |
Definition at line 78 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::fill | ( | T_Scalar | val ) | [inline] |
Definition at line 89 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::getNull(), vl::SlicedVolume::setBox(), and vl::Matrix4< float >::setNull().
Matrix4& vl::Matrix4< T_Scalar >::fillPtr | ( | T_Scalar * | val ) | [inline] |
Definition at line 98 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::Matrix4().
T_Scalar vl::Matrix4< T_Scalar >::diff | ( | const Matrix4< T_Scalar > & | other ) | const [inline] |
Definition at line 104 of file Matrix4.hpp.
Vector3<T_Scalar> vl::Matrix4< T_Scalar >::getX | ( | ) | const [inline] |
Definition at line 116 of file Matrix4.hpp.
Referenced by vl::DaeLoader::load(), vl::TrackballManipulator::mouseMoveEvent(), and vl::GhostCameraManipulator::updateEvent().
Vector3<T_Scalar> vl::Matrix4< T_Scalar >::getY | ( | ) | const [inline] |
Definition at line 121 of file Matrix4.hpp.
Referenced by vl::Billboard::computeWorldMatrix(), vl::DaeLoader::load(), vl::TrackballManipulator::mouseMoveEvent(), and vl::GhostCameraManipulator::updateEvent().
Vector3<T_Scalar> vl::Matrix4< T_Scalar >::getZ | ( | ) | const [inline] |
Definition at line 126 of file Matrix4.hpp.
Referenced by vl::Camera::adjustView(), vl::Billboard::computeWorldMatrix(), vl::DaeLoader::load(), vl::TrackballManipulator::mouseMoveEvent(), vl::GhostCameraManipulator::updateEvent(), and vl::RaycastVolume::updateUniforms().
Vector3<T_Scalar> vl::Matrix4< T_Scalar >::getT | ( | ) | const [inline] |
Definition at line 131 of file Matrix4.hpp.
Referenced by vl::Camera::adjustView(), vl::Camera::computeRay(), vl::SceneManagerPortals::computeStartingSector(), vl::Billboard::computeWorldMatrix(), vl::DistanceLODEvaluator::evaluate(), vl::SceneManagerPortals::extractVisibleActors(), vl::TrackballManipulator::mouseDownEvent(), vl::Billboard::position(), vl::OcclusionCullRenderer::render_pass2(), vl::SlicedVolume::updateUniforms(), vl::RaycastVolume::updateUniforms(), and vl::vlx_toValue().
Matrix4& vl::Matrix4< T_Scalar >::setX | ( | const Vector3< T_Scalar > & | v ) | [inline] |
Definition at line 136 of file Matrix4.hpp.
Referenced by vl::Billboard::computeWorldMatrix(), vl::DaeLoader::parseAsset(), and vl::A3DSLoader::read_TRIANGULAR_MESH().
Matrix4& vl::Matrix4< T_Scalar >::setY | ( | const Vector3< T_Scalar > & | v ) | [inline] |
Definition at line 144 of file Matrix4.hpp.
Referenced by vl::Billboard::computeWorldMatrix(), vl::DaeLoader::parseAsset(), and vl::A3DSLoader::read_TRIANGULAR_MESH().
Matrix4& vl::Matrix4< T_Scalar >::setZ | ( | const Vector3< T_Scalar > & | v ) | [inline] |
Definition at line 152 of file Matrix4.hpp.
Referenced by vl::Billboard::computeWorldMatrix(), vl::DaeLoader::parseAsset(), and vl::A3DSLoader::read_TRIANGULAR_MESH().
Matrix4& vl::Matrix4< T_Scalar >::setT | ( | const Vector3< T_Scalar > & | v ) | [inline] |
Definition at line 160 of file Matrix4.hpp.
Referenced by vl::TrackballManipulator::mouseMoveEvent(), vl::A3DSLoader::read_TRIANGULAR_MESH(), and vl::vlx_isTranslation().
bool vl::Matrix4< T_Scalar >::operator== | ( | const Matrix4< T_Scalar > & | m ) | const [inline] |
Definition at line 168 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::operator!=().
bool vl::Matrix4< T_Scalar >::operator!= | ( | const Matrix4< T_Scalar > & | m ) | const [inline] |
Definition at line 173 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator= | ( | const Matrix4< T_Scalar > & | m ) | [inline] |
Definition at line 178 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator+ | ( | const Matrix4< T_Scalar > & | m ) | const [inline] |
Definition at line 184 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator+= | ( | const Matrix4< T_Scalar > & | m ) | [inline] |
Definition at line 194 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator- | ( | const Matrix4< T_Scalar > & | m ) | const [inline] |
Definition at line 202 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator-= | ( | const Matrix4< T_Scalar > & | m ) | [inline] |
Definition at line 212 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator*= | ( | const Matrix4< T_Scalar > & | m ) | [inline] |
Definition at line 220 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator- | ( | ) | const [inline] |
Definition at line 225 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator+ | ( | T_Scalar | d ) | const [inline] |
Definition at line 234 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator+= | ( | T_Scalar | d ) | [inline] |
Definition at line 243 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator- | ( | T_Scalar | d ) | const [inline] |
Definition at line 251 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator-= | ( | T_Scalar | d ) | [inline] |
Definition at line 260 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator* | ( | T_Scalar | d ) | const [inline] |
Definition at line 268 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator*= | ( | T_Scalar | d ) | [inline] |
Definition at line 277 of file Matrix4.hpp.
Matrix4 vl::Matrix4< T_Scalar >::operator/ | ( | T_Scalar | d ) | const [inline] |
Definition at line 285 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::operator/= | ( | T_Scalar | d ) | [inline] |
Definition at line 295 of file Matrix4.hpp.
bool vl::Matrix4< T_Scalar >::isIdentity | ( | ) | const [inline] |
Definition at line 304 of file Matrix4.hpp.
Referenced by vl::vlx_isScaling(), and vl::vlx_isTranslation().
Matrix4 vl::Matrix4< T_Scalar >::as3x3 | ( | ) | const [inline] |
Definition at line 310 of file Matrix4.hpp.
Referenced by vl::TextureMatrix::apply(), vl::DaeLoader::load(), vl::EdgeUpdateCallback::onActorRenderStarted(), vl::Geometry::transform(), and vl::ProjViewTransfCallback::updateMatrices().
Matrix3<T_Scalar> vl::Matrix4< T_Scalar >::get3x3 | ( | ) | const [inline] |
Definition at line 323 of file Matrix4.hpp.
Referenced by vl::Quaternion< T_Scalar >::setFromMatrix(), and vl::TrackballManipulator::trackballRotation().
void vl::Matrix4< T_Scalar >::set3x3 | ( | const Matrix3< T_Scalar > & | m ) | [inline] |
This writes only on the upper 3x3 part of the matrix without touching the last row and column.
Definition at line 333 of file Matrix4.hpp.
T_Scalar* vl::Matrix4< T_Scalar >::ptr | ( | ) | [inline] |
Definition at line 340 of file Matrix4.hpp.
Referenced by vl::Camera::applyModelViewMatrix(), vl::Camera::applyViewMatrix(), vl::Matrix4< float >::fillPtr(), vl::Matrix4< T_Scalar >::getInverse(), vl::Uniform::getUniform(), vl::GLSLProgram::getUniform(), vl::Matrix4< float >::isIdentity(), vl::Matrix4< float >::multiply(), vl::DaeLoader::parseNode(), vl::Text::renderBackground(), vl::Text::renderBorder(), vl::EdgeRenderer::renderLines(), vl::EdgeRenderer::renderSolids(), vl::Text::renderText(), vl::Uniform::setUniform(), vl::ProjViewTransfCallback::updateMatrices(), vl::vlx_mat4(), and vl::vlx_toValue().
const T_Scalar* vl::Matrix4< T_Scalar >::ptr | ( | ) | const [inline] |
Definition at line 345 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::transpose | ( | ) | [inline] |
Definition at line 350 of file Matrix4.hpp.
Referenced by vl::DaeLoader::load(), vl::DaeLoader::parseNode(), vl::Geometry::transform(), and vl::ProjViewTransfCallback::updateMatrices().
Matrix4 vl::Matrix4< T_Scalar >::getTransposed | ( | ) | const [inline] |
Definition at line 363 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::getTransposed | ( | Matrix4< T_Scalar > & | dest ) | const [inline] |
Definition at line 372 of file Matrix4.hpp.
bool vl::Matrix4< T_Scalar >::isNull | ( | ) | const [inline] |
Definition at line 380 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::setNull | ( | ) | [inline] |
Definition at line 389 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::getNull | ( | Matrix4< T_Scalar > & | out ) | [inline, static] |
Definition at line 395 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getNull | ( | ) | [inline, static] |
Definition at line 401 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::setIdentity | ( | ) | [inline] |
Definition at line 406 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::getIdentity(), vl::Matrix4< T_Scalar >::getRotation(), vl::Matrix4< float >::getScaling(), vl::Matrix4< float >::getTranslation(), vl::Matrix4< float >::Matrix4(), and vl::Text::resetMatrix().
static Matrix4 vl::Matrix4< T_Scalar >::getIdentity | ( | ) | [inline, static] |
Definition at line 419 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::getIdentity | ( | Matrix4< T_Scalar > & | out ) | [inline, static] |
Definition at line 424 of file Matrix4.hpp.
T_Scalar vl::Matrix4< T_Scalar >::getInverse | ( | Matrix4< T_Scalar > & | dest ) | const |
Definition at line 1009 of file Matrix4.hpp.
References vl::Matrix4< T_Scalar >::ptr(), and VL_CHECK.
Referenced by vl::Matrix4< float >::getInverse(), vl::Matrix4< float >::invert(), vl::SlicedVolume::onActorRenderStarted(), vl::EdgeUpdateCallback::onActorRenderStarted(), vl::Camera::setModelingMatrix(), vl::Camera::setViewMatrix(), vl::SlicedVolume::updateUniforms(), and vl::RaycastVolume::updateUniforms().
Matrix4 vl::Matrix4< T_Scalar >::getInverse | ( | T_Scalar * | determinant = NULL ) |
const [inline] |
Definition at line 432 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::invert | ( | T_Scalar * | determinant = NULL ) |
[inline] |
Definition at line 441 of file Matrix4.hpp.
Referenced by vl::Matrix4< T_Scalar >::getAsLookAt(), vl::DaeLoader::load(), vl::Geometry::transform(), and vl::ProjViewTransfCallback::updateMatrices().
Matrix4< T_Scalar > vl::Matrix4< T_Scalar >::getPerspective | ( | T_Scalar | fovy, |
T_Scalar | aspect_ratio, | ||
T_Scalar | znear, | ||
T_Scalar | zfar | ||
) | [static] |
Definition at line 825 of file Matrix4.hpp.
References vl::cos(), vl::dDEG_TO_RAD, vl::Matrix4< T_Scalar >::e(), and vl::sin().
Matrix4< T_Scalar > vl::Matrix4< T_Scalar >::getFrustum | ( | T_Scalar | pleft, |
T_Scalar | pright, | ||
T_Scalar | pbottom, | ||
T_Scalar | ptop, | ||
T_Scalar | pnear, | ||
T_Scalar | pfar | ||
) | [static] |
Definition at line 847 of file Matrix4.hpp.
References vl::Matrix4< T_Scalar >::e().
Matrix4< T_Scalar > vl::Matrix4< T_Scalar >::getOrtho | ( | T_Scalar | pleft, |
T_Scalar | pright, | ||
T_Scalar | pbottom, | ||
T_Scalar | ptop, | ||
T_Scalar | pnear, | ||
T_Scalar | pfar | ||
) | [static] |
Definition at line 870 of file Matrix4.hpp.
References vl::Matrix4< T_Scalar >::e().
Matrix4< T_Scalar > vl::Matrix4< T_Scalar >::getOrtho2D | ( | T_Scalar | pleft, |
T_Scalar | pright, | ||
T_Scalar | pbottom, | ||
T_Scalar | ptop | ||
) | [static] |
Definition at line 898 of file Matrix4.hpp.
Matrix4< T_Scalar > vl::Matrix4< T_Scalar >::getLookAtModeling | ( | const Vector3< T_Scalar > & | eye, |
const Vector3< T_Scalar > & | at, | ||
const Vector3< T_Scalar > & | up | ||
) | [static] |
Definition at line 764 of file Matrix4.hpp.
References vl::cross(), vl::Vector3< T_Scalar >::normalize(), vl::normalize(), vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().
Matrix4< T_Scalar > vl::Matrix4< T_Scalar >::getLookAt | ( | const Vector3< T_Scalar > & | eye, |
const Vector3< T_Scalar > & | at, | ||
const Vector3< T_Scalar > & | up | ||
) | [static] |
Definition at line 783 of file Matrix4.hpp.
References vl::cross(), vl::dot(), vl::Vector3< T_Scalar >::normalize(), vl::normalize(), vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().
void vl::Matrix4< T_Scalar >::getAsLookAtModeling | ( | Vector3< T_Scalar > & | eye, |
Vector3< T_Scalar > & | at, | ||
Vector3< T_Scalar > & | up, | ||
Vector3< T_Scalar > & | right | ||
) | const |
Definition at line 802 of file Matrix4.hpp.
Referenced by vl::Matrix4< T_Scalar >::getAsLookAt(), and vl::Camera::getViewMatrixAsLookAt().
void vl::Matrix4< T_Scalar >::getAsLookAt | ( | Vector3< T_Scalar > & | eye, |
Vector3< T_Scalar > & | at, | ||
Vector3< T_Scalar > & | up, | ||
Vector3< T_Scalar > & | right | ||
) | const |
Definition at line 817 of file Matrix4.hpp.
References vl::Matrix4< T_Scalar >::getAsLookAtModeling(), and vl::Matrix4< T_Scalar >::invert().
void vl::Matrix4< T_Scalar >::getYXRotationAngles | ( | T_Scalar & | degrees_y, |
T_Scalar & | degrees_x | ||
) | const |
If this matrix can be represented as RY(degrees_y)
* RX(degrees_x)
, where RX and RY are getRotation matrices around the X and Y axis respectively, this function returns the getRotation angles degrees_y
and degrees_x
.
Definition at line 1199 of file Matrix4.hpp.
References vl::acos(), vl::clamp(), vl::dot(), vl::dRAD_TO_DEG, and vl::Vector3< T_Scalar >::normalize().
Referenced by vl::GhostCameraManipulator::enableEvent().
Matrix4< T_Scalar > & vl::Matrix4< T_Scalar >::getRotation | ( | Matrix4< T_Scalar > & | out, |
T_Scalar | degrees, | ||
T_Scalar | x, | ||
T_Scalar | y, | ||
T_Scalar | z | ||
) | [static] |
Definition at line 904 of file Matrix4.hpp.
References vl::cos(), vl::dDEG_TO_RAD, vl::dot(), vl::Matrix4< T_Scalar >::e(), vl::Matrix4< T_Scalar >::setIdentity(), vl::sin(), and vl::sqrt().
Referenced by vl::Matrix4< float >::getRotation(), vl::Matrix4< float >::getRotationXYZ(), vl::Matrix4< float >::getRotationZYX(), and vl::Matrix4< float >::rotate().
static Matrix4 vl::Matrix4< T_Scalar >::getRotation | ( | T_Scalar | degrees, |
T_Scalar | x, | ||
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline, static] |
Definition at line 469 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getRotation | ( | T_Scalar | degrees, |
const Vector3< T_Scalar > & | v | ||
) | [inline, static] |
Definition at line 475 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getRotation | ( | T_Scalar | degrees1, |
const Vector3< T_Scalar > & | v1, | ||
T_Scalar | degrees2, | ||
const Vector3< T_Scalar > & | v2 | ||
) | [inline, static] |
Definition at line 480 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getRotation | ( | T_Scalar | degrees1, |
const Vector3< T_Scalar > & | v1, | ||
T_Scalar | degrees2, | ||
const Vector3< T_Scalar > & | v2, | ||
T_Scalar | degrees3, | ||
const Vector3< T_Scalar > & | v3 | ||
) | [inline, static] |
Definition at line 485 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::rotate | ( | T_Scalar | degrees, |
const Vector3< T_Scalar > & | v | ||
) | [inline] |
Definition at line 490 of file Matrix4.hpp.
Referenced by vl::Text::rotate(), and vl::Matrix4< float >::rotate().
Matrix4& vl::Matrix4< T_Scalar >::rotate | ( | T_Scalar | degrees, |
T_Scalar | x, | ||
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline] |
Definition at line 495 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::rotate | ( | T_Scalar | degrees1, |
const Vector3< T_Scalar > & | v1, | ||
T_Scalar | degrees2, | ||
const Vector3< T_Scalar > & | v2 | ||
) | [inline] |
Definition at line 500 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::rotate | ( | T_Scalar | degrees1, |
const Vector3< T_Scalar > & | v1, | ||
T_Scalar | degrees2, | ||
const Vector3< T_Scalar > & | v2, | ||
T_Scalar | degrees3, | ||
const Vector3< T_Scalar > & | v3 | ||
) | [inline] |
Definition at line 505 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getRotationXYZ | ( | T_Scalar | degX, |
T_Scalar | degY, | ||
T_Scalar | degZ | ||
) | [inline, static] |
Definition at line 510 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::rotateXYZ().
Matrix4& vl::Matrix4< T_Scalar >::rotateXYZ | ( | T_Scalar | degX, |
T_Scalar | degY, | ||
T_Scalar | degZ | ||
) | [inline] |
Definition at line 515 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getRotationZYX | ( | T_Scalar | degZ, |
T_Scalar | degY, | ||
T_Scalar | degX | ||
) | [inline, static] |
Definition at line 520 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::rotateZYX().
Matrix4& vl::Matrix4< T_Scalar >::rotateZYX | ( | T_Scalar | degZ, |
T_Scalar | degY, | ||
T_Scalar | degX | ||
) | [inline] |
Definition at line 525 of file Matrix4.hpp.
Matrix4< T_Scalar > & vl::Matrix4< T_Scalar >::getRotation | ( | Matrix4< T_Scalar > & | out, |
const Vector3< T_Scalar > & | from, | ||
const Vector3< T_Scalar > & | to | ||
) | [static] |
Definition at line 1176 of file Matrix4.hpp.
References vl::acos(), vl::clamp(), vl::cross(), vl::dot(), vl::dRAD_TO_DEG, vl::Vector3< T_Scalar >::normalize(), vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().
static Matrix4 vl::Matrix4< T_Scalar >::getRotation | ( | const Vector3< T_Scalar > & | from, |
const Vector3< T_Scalar > & | to | ||
) | [inline, static] |
Definition at line 532 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::rotate | ( | const Vector4< T_Scalar > & | from, |
const Vector4< T_Scalar > & | to | ||
) | [inline] |
Definition at line 538 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::rotate | ( | const Vector3< T_Scalar > & | from, |
const Vector3< T_Scalar > & | to | ||
) | [inline] |
Definition at line 543 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::getTranslation | ( | Matrix4< T_Scalar > & | out, |
const Vector3< T_Scalar > & | v | ||
) | [inline, static] |
Definition at line 548 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::getTranslation(), and vl::Matrix4< float >::translate().
static Matrix4 vl::Matrix4< T_Scalar >::getTranslation | ( | const Vector3< T_Scalar > & | v ) | [inline, static] |
Definition at line 553 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getTranslation | ( | T_Scalar | x, |
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline, static] |
Definition at line 559 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::getTranslation | ( | Matrix4< T_Scalar > & | out, |
T_Scalar | x, | ||
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline, static] |
Definition at line 565 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::translate | ( | T_Scalar | x, |
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline] |
Definition at line 574 of file Matrix4.hpp.
Referenced by vl::Text::boundingRectTransformed(), vl::Terrain::init(), vl::Text::renderText(), and vl::Text::translate().
Matrix4& vl::Matrix4< T_Scalar >::translate | ( | const Vector3< T_Scalar > & | v ) | [inline] |
Definition at line 579 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::getScaling | ( | Matrix4< T_Scalar > & | out, |
const Vector3< T_Scalar > & | v | ||
) | [inline, static] |
Definition at line 584 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::getScaling(), and vl::Matrix4< float >::scale().
static Matrix4 vl::Matrix4< T_Scalar >::getScaling | ( | const Vector3< T_Scalar > & | v ) | [inline, static] |
Definition at line 589 of file Matrix4.hpp.
static Matrix4 vl::Matrix4< T_Scalar >::getScaling | ( | T_Scalar | x, |
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline, static] |
Definition at line 595 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::getScaling | ( | Matrix4< T_Scalar > & | out, |
T_Scalar | x, | ||
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline, static] |
Definition at line 601 of file Matrix4.hpp.
Matrix4& vl::Matrix4< T_Scalar >::scale | ( | T_Scalar | x, |
T_Scalar | y, | ||
T_Scalar | z | ||
) | [inline] |
Definition at line 610 of file Matrix4.hpp.
Referenced by vl::Terrain::init().
Matrix4& vl::Matrix4< T_Scalar >::scale | ( | const Vector3< T_Scalar > | v ) | [inline] |
Definition at line 615 of file Matrix4.hpp.
static Matrix4& vl::Matrix4< T_Scalar >::multiply | ( | Matrix4< T_Scalar > & | out, |
const Matrix4< T_Scalar > & | p, | ||
const Matrix4< T_Scalar > & | q | ||
) | [inline, static] |
Definition at line 620 of file Matrix4.hpp.
Referenced by vl::operator*(), vl::Matrix4< float >::postMultiply(), and vl::Matrix4< float >::preMultiply().
Matrix4& vl::Matrix4< T_Scalar >::postMultiply | ( | const Matrix4< T_Scalar > & | m ) | [inline] |
Definition at line 647 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::operator*=().
Matrix4& vl::Matrix4< T_Scalar >::preMultiply | ( | const Matrix4< T_Scalar > & | m ) | [inline] |
Definition at line 653 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::rotate(), vl::Matrix4< float >::rotateXYZ(), vl::Matrix4< float >::rotateZYX(), vl::Matrix4< float >::scale(), and vl::Matrix4< float >::translate().
const T_Scalar& vl::Matrix4< T_Scalar >::e | ( | int | i, |
int | j | ||
) | const [inline] |
Definition at line 660 of file Matrix4.hpp.
Referenced by vl::Camera::applyModelViewMatrix(), vl::Camera::applyViewMatrix(), vl::Matrix4< float >::diff(), vl::Matrix4< float >::fill(), vl::Matrix4< float >::get3x3(), vl::Matrix4< T_Scalar >::getFrustum(), vl::Matrix4< T_Scalar >::getOrtho(), vl::Matrix4< T_Scalar >::getPerspective(), vl::Matrix4< T_Scalar >::getRotation(), vl::Matrix4< float >::getScaling(), vl::Matrix4< float >::getTranslation(), vl::Matrix4< float >::getTransposed(), vl::Matrix4< float >::isNull(), vl::Matrix4< float >::Matrix4(), vl::matrixCompMult(), vl::FlatManipulator::mouseDownEvent(), vl::Matrix4< float >::multiply(), vl::operator*(), vl::Matrix4< float >::operator*(), vl::Matrix4< float >::operator*=(), vl::Matrix4< float >::operator+(), vl::Matrix4< float >::operator+=(), vl::Matrix4< float >::operator-(), vl::Matrix4< float >::operator-=(), vl::Matrix4< float >::operator/(), vl::Matrix4< float >::operator/=(), vl::outerProduct(), vl::Matrix4< float >::ptr(), vl::Text::renderBackground(), vl::Text::renderBorder(), vl::Text::renderText(), vl::Matrix4< float >::set3x3(), vl::Matrix4< float >::transpose(), vl::transpose(), vl::vlx_isScaling(), and vl::vlx_toValue().
T_Scalar& vl::Matrix4< T_Scalar >::e | ( | int | i, |
int | j | ||
) | [inline] |
Definition at line 661 of file Matrix4.hpp.
Vector4<T_Scalar> vl::Matrix4< T_Scalar >::mVec[4] [protected] |
Definition at line 668 of file Matrix4.hpp.
Referenced by vl::Matrix4< float >::e(), vl::Matrix4< float >::getT(), vl::Matrix4< float >::getX(), vl::Matrix4< float >::getY(), vl::Matrix4< float >::getZ(), vl::Matrix4< float >::operator=(), vl::Matrix4< float >::operator==(), vl::Matrix4< float >::setIdentity(), vl::Matrix4< float >::setT(), vl::Matrix4< float >::setX(), vl::Matrix4< float >::setY(), and vl::Matrix4< float >::setZ().