Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The Matrix3 class is a template class that implements a generic 3x3 matrix, see also vl::dmat3, vl::fmat3, vl::umat3, vl::imat3. More...
#include <Matrix3.hpp>
Public Types | |
typedef T_Scalar | scalar_type |
Public Member Functions | |
template<typename T > | |
Matrix3 (const Matrix3< T > &m) | |
Matrix3 (const Matrix3 &other) | |
Matrix3 () | |
Matrix3 (T_Scalar n) | |
Matrix3 (T_Scalar e00, T_Scalar e01, T_Scalar e02, T_Scalar e10, T_Scalar e11, T_Scalar e12, T_Scalar e20, T_Scalar e21, T_Scalar e22) | |
Matrix3 & | fill (T_Scalar val) |
T_Scalar | diff (const Matrix3 &other) const |
Vector2< T_Scalar > | getX () const |
Vector2< T_Scalar > | getY () const |
Vector2< T_Scalar > | getT () const |
Matrix3 & | setX (const Vector2< T_Scalar > &v) |
Matrix3 & | setY (const Vector2< T_Scalar > &v) |
Matrix3 & | setT (const Vector2< T_Scalar > &v) |
bool | operator== (const Matrix3 &m) const |
bool | operator!= (const Matrix3 &m) const |
Matrix3 & | operator= (const Matrix3 &m) |
Matrix3 | operator+ (const Matrix3 &m) const |
Matrix3 & | operator+= (const Matrix3 &m) |
Matrix3 | operator- (const Matrix3 &m) const |
Matrix3 & | operator-= (const Matrix3 &m) |
Matrix3 & | operator*= (const Matrix3 &m) |
Matrix3 | operator- () const |
Matrix3 | operator+ (T_Scalar d) const |
Matrix3 & | operator+= (T_Scalar d) |
Matrix3 | operator- (T_Scalar d) const |
Matrix3 & | operator-= (T_Scalar d) |
Matrix3 | operator* (T_Scalar d) const |
Matrix3 & | operator*= (T_Scalar d) |
Matrix3 | operator/ (T_Scalar d) const |
Matrix3 & | operator/= (T_Scalar d) |
bool | isIdentity () const |
Matrix2< T_Scalar > | get2x2 () const |
void | set2x2 (const Matrix2< T_Scalar > &m) |
This writes only on the upper 2x2 part of the matrix without touching the last row and column. More... | |
T_Scalar * | ptr () |
const T_Scalar * | ptr () const |
Matrix3 & | transpose () |
Matrix3 | getTransposed () const |
Matrix3 & | getTransposed (Matrix3 &dest) const |
bool | isNull () const |
Matrix3 & | setNull () |
Matrix3 & | setIdentity () |
T_Scalar | getInverse (Matrix3 &dest) const |
Matrix3 | getInverse (T_Scalar *determinant=NULL) const |
Matrix3 & | invert (T_Scalar *determinant=NULL) |
Matrix3 & | rotate (T_Scalar degrees) |
Matrix3 & | translate (T_Scalar x, T_Scalar y) |
Matrix3 & | translate (const Vector2< T_Scalar > &v) |
Matrix3 & | scale (T_Scalar x, T_Scalar y) |
Matrix3 & | scale (const Vector2< T_Scalar > &v) |
Matrix3 & | postMultiply (const Matrix3 &m) |
Matrix3 & | preMultiply (const Matrix3 &m) |
const T_Scalar & | e (int i, int j) const |
T_Scalar & | e (int i, int j) |
Static Public Member Functions | |
static Matrix3 & | getNull (Matrix3 &out) |
static Matrix3 | getNull () |
static Matrix3 | getIdentity () |
static Matrix3 & | getIdentity (Matrix3 &out) |
static Matrix3 | getRotation (T_Scalar degrees) |
static Matrix3 & | getTranslation (Matrix3 &out, const Vector2< T_Scalar > &v) |
static Matrix3 | getTranslation (const Vector2< T_Scalar > &v) |
static Matrix3 | getTranslation (T_Scalar x, T_Scalar y) |
static Matrix3 & | getTranslation (Matrix3 &out, T_Scalar x, T_Scalar y) |
static Matrix3 & | getScaling (Matrix3 &out, const Vector2< T_Scalar > &v) |
static Matrix3 | getScaling (const Vector2< T_Scalar > &v) |
static Matrix3 | getScaling (T_Scalar x, T_Scalar y) |
static Matrix3 & | getScaling (Matrix3 &out, T_Scalar x, T_Scalar y) |
static Matrix3 & | multiply (Matrix3 &out, const Matrix3 &p, const Matrix3 &q) |
Protected Attributes | |
Vector3< T_Scalar > | mVec [3] |
The Matrix3 class is a template class that implements a generic 3x3 matrix, see also vl::dmat3, vl::fmat3, vl::umat3, vl::imat3.
Definition at line 48 of file Matrix3.hpp.
typedef T_Scalar vl::Matrix3< T_Scalar >::scalar_type |
Definition at line 51 of file Matrix3.hpp.
|
inlineexplicit |
Definition at line 54 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 61 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::operator=().
|
inline |
Definition at line 66 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::setIdentity().
Referenced by vl::Matrix3< T_Scalar >::getIdentity(), and vl::Matrix3< T_Scalar >::getNull().
|
inlineexplicit |
Definition at line 71 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::setIdentity().
|
inlineexplicit |
Definition at line 77 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 94 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 524 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::mVec.
Referenced by vl::Matrix3< T_Scalar >::diff(), vl::Matrix3< T_Scalar >::fill(), vl::Matrix3< T_Scalar >::get2x2(), vl::Matrix4< float >::get3x3(), vl::Matrix3< T_Scalar >::getInverse(), vl::Matrix3< T_Scalar >::getRotation(), vl::Matrix3< T_Scalar >::getScaling(), vl::Matrix3< T_Scalar >::getT(), vl::Matrix3< T_Scalar >::getTranslation(), vl::Matrix3< T_Scalar >::getTransposed(), vl::Matrix3< T_Scalar >::getX(), vl::Matrix3< T_Scalar >::getY(), vl::Matrix3< T_Scalar >::Matrix3(), vl::matrixCompMult(), vl::Matrix3< T_Scalar >::multiply(), vl::Matrix3< T_Scalar >::operator*(), vl::operator*(), vl::Matrix3< T_Scalar >::operator*=(), vl::Matrix3< T_Scalar >::operator+(), vl::Matrix3< T_Scalar >::operator+=(), vl::Matrix3< T_Scalar >::operator-(), vl::Matrix3< T_Scalar >::operator-=(), vl::Matrix3< T_Scalar >::operator/(), vl::Matrix3< T_Scalar >::operator/=(), vl::outerProduct(), vl::Matrix3< T_Scalar >::ptr(), vl::Matrix3< T_Scalar >::set2x2(), vl::Matrix4< float >::set3x3(), vl::Quaternion< T_Scalar >::setFromMatrix(), vl::Matrix3< T_Scalar >::setT(), vl::Matrix3< T_Scalar >::setX(), vl::Matrix3< T_Scalar >::setY(), vl::Matrix3< T_Scalar >::transpose(), and vl::transpose().
|
inline |
Definition at line 525 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::mVec, and VL_CHECK.
|
inline |
Definition at line 86 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
Referenced by vl::Matrix3< T_Scalar >::getInverse(), vl::Matrix3< T_Scalar >::getNull(), and vl::Matrix3< T_Scalar >::setNull().
|
inline |
Definition at line 291 of file Matrix3.hpp.
References vl::Matrix2< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::e().
|
inlinestatic |
Definition at line 386 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::Matrix3().
|
inlinestatic |
Definition at line 391 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getInverse(), and vl::Matrix3< T_Scalar >::setIdentity().
T_Scalar vl::Matrix3< T_Scalar >::getInverse | ( | Matrix3< T_Scalar > & | dest | ) | const |
Definition at line 617 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::fill().
Referenced by vl::PolygonSimplifier::QErr::analyticSolution(), vl::Matrix3< T_Scalar >::getIdentity(), vl::Matrix3< T_Scalar >::getInverse(), and vl::Matrix3< T_Scalar >::invert().
|
inline |
Definition at line 399 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getInverse().
|
inlinestatic |
Definition at line 363 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::fill().
|
inlinestatic |
Definition at line 369 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::Matrix3().
|
static |
Definition at line 603 of file Matrix3.hpp.
References vl::cos(), vl::dDEG_TO_RAD, vl::Matrix3< T_Scalar >::e(), and vl::sin().
Referenced by vl::Matrix3< T_Scalar >::invert(), and vl::Matrix3< T_Scalar >::rotate().
|
inlinestatic |
Definition at line 457 of file Matrix3.hpp.
References vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
Referenced by vl::Matrix3< T_Scalar >::getScaling(), and vl::Matrix3< T_Scalar >::scale().
|
inlinestatic |
Definition at line 462 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getScaling(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inlinestatic |
Definition at line 468 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getScaling().
|
inlinestatic |
Definition at line 474 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::setIdentity().
|
inline |
Definition at line 122 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inlinestatic |
Definition at line 423 of file Matrix3.hpp.
References vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
Referenced by vl::Matrix3< T_Scalar >::getTranslation(), and vl::Matrix3< T_Scalar >::translate().
|
inlinestatic |
Definition at line 428 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getTranslation(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inlinestatic |
Definition at line 433 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getTranslation().
|
inlinestatic |
Definition at line 439 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::setIdentity().
|
inline |
Definition at line 331 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 340 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 106 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inline |
Definition at line 114 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inline |
Definition at line 408 of file Matrix3.hpp.
References vl::degrees(), vl::Matrix3< T_Scalar >::getInverse(), and vl::Matrix3< T_Scalar >::getRotation().
|
inline |
Definition at line 285 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::ptr().
|
inline |
Definition at line 348 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::mVec.
|
inlinestatic |
Definition at line 492 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Matrix3< T_Scalar >::ptr(), and VL_CHECK.
Referenced by vl::operator*(), vl::Matrix3< T_Scalar >::postMultiply(), and vl::Matrix3< T_Scalar >::preMultiply().
|
inline |
Definition at line 156 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::operator==().
|
inline |
Definition at line 249 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 201 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::postMultiply().
|
inline |
Definition at line 258 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 167 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 215 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 176 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 224 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 184 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 206 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 232 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 193 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 241 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 266 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 276 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 161 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::mVec.
Referenced by vl::Matrix3< T_Scalar >::Matrix3().
|
inline |
Definition at line 151 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::mVec.
Referenced by vl::Matrix3< T_Scalar >::operator!=().
|
inline |
Definition at line 511 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::multiply().
Referenced by vl::Matrix3< T_Scalar >::operator*=().
|
inline |
Definition at line 517 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::multiply().
Referenced by vl::Matrix3< T_Scalar >::rotate(), vl::Matrix3< T_Scalar >::scale(), and vl::Matrix3< T_Scalar >::translate().
|
inline |
Definition at line 306 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
Referenced by vl::Uniform::getUniform(), vl::GLSLProgram::getUniform(), vl::Matrix3< T_Scalar >::isIdentity(), vl::Matrix3< T_Scalar >::multiply(), vl::Uniform::setUniform(), and vl::ProjViewTransfCallback::updateMatrices().
|
inline |
Definition at line 311 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 418 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getRotation(), and vl::Matrix3< T_Scalar >::preMultiply().
|
inline |
Definition at line 482 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getScaling(), and vl::Matrix3< T_Scalar >::preMultiply().
|
inline |
Definition at line 487 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getScaling(), vl::Matrix3< T_Scalar >::preMultiply(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inline |
This writes only on the upper 2x2 part of the matrix without touching the last row and column.
Definition at line 300 of file Matrix3.hpp.
References vl::Matrix2< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::e().
|
inline |
Definition at line 374 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::mVec.
Referenced by vl::Matrix3< T_Scalar >::getIdentity(), vl::Matrix3< T_Scalar >::getScaling(), vl::Matrix3< T_Scalar >::getTranslation(), and vl::Matrix3< T_Scalar >::Matrix3().
|
inline |
Definition at line 357 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::fill().
|
inline |
Definition at line 144 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inline |
Definition at line 130 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inline |
Definition at line 137 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().
|
inline |
Definition at line 447 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getTranslation(), and vl::Matrix3< T_Scalar >::preMultiply().
|
inline |
Definition at line 452 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::getTranslation(), and vl::Matrix3< T_Scalar >::preMultiply().
|
inline |
Definition at line 316 of file Matrix3.hpp.
References vl::Matrix3< T_Scalar >::e().
|
protected |
Definition at line 532 of file Matrix3.hpp.
Referenced by vl::Matrix3< T_Scalar >::e(), vl::Matrix3< T_Scalar >::isNull(), vl::Matrix3< T_Scalar >::operator=(), vl::Matrix3< T_Scalar >::operator==(), and vl::Matrix3< T_Scalar >::setIdentity().
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:52.
© Copyright Michele Bosi. All rights reserved.