Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes

vl::Matrix3< T_Scalar > Class Template Reference

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>

List of all members.

Public Types

typedef T_Scalar scalar_type

Public Member Functions

template<typename T >
 Matrix3 (const Matrix3< T > &m)
 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)
Matrix3fill (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
Matrix3setX (const Vector2< T_Scalar > &v)
Matrix3setY (const Vector2< T_Scalar > &v)
Matrix3setT (const Vector2< T_Scalar > &v)
bool operator== (const Matrix3 &m) const
bool operator!= (const Matrix3 &m) const
Matrix3operator= (const Matrix3 &m)
Matrix3 operator+ (const Matrix3 &m) const
Matrix3operator+= (const Matrix3 &m)
Matrix3 operator- (const Matrix3 &m) const
Matrix3operator-= (const Matrix3 &m)
Matrix3operator*= (const Matrix3 &m)
Matrix3 operator- () const
Matrix3 operator+ (T_Scalar d) const
Matrix3operator+= (T_Scalar d)
Matrix3 operator- (T_Scalar d) const
Matrix3operator-= (T_Scalar d)
Matrix3 operator* (T_Scalar d) const
Matrix3operator*= (T_Scalar d)
Matrix3 operator/ (T_Scalar d) const
Matrix3operator/= (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.
T_Scalar * ptr ()
const T_Scalar * ptr () const
Matrix3transpose ()
Matrix3 getTransposed () const
Matrix3getTransposed (Matrix3 &dest) const
bool isNull () const
Matrix3setNull ()
Matrix3setIdentity ()
T_Scalar getInverse (Matrix3 &dest) const
Matrix3 getInverse (T_Scalar *determinant=NULL) const
Matrix3invert (T_Scalar *determinant=NULL)
Matrix3rotate (T_Scalar degrees)
Matrix3translate (T_Scalar x, T_Scalar y)
Matrix3translate (const Vector2< T_Scalar > &v)
Matrix3scale (T_Scalar x, T_Scalar y)
Matrix3scale (const Vector2< T_Scalar > &v)
Matrix3postMultiply (const Matrix3 &m)
Matrix3preMultiply (const Matrix3 &m)
const T_Scalar & e (int i, int j) const
T_Scalar & e (int i, int j)

Static Public Member Functions

static Matrix3getNull (Matrix3 &out)
static Matrix3 getNull ()
static Matrix3 getIdentity ()
static Matrix3getIdentity (Matrix3 &out)
static Matrix3 getRotation (T_Scalar degrees)
static Matrix3getTranslation (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 Matrix3getTranslation (Matrix3 &out, T_Scalar x, T_Scalar y)
static Matrix3getScaling (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 Matrix3getScaling (Matrix3 &out, T_Scalar x, T_Scalar y)
static Matrix3multiply (Matrix3 &out, const Matrix3 &p, const Matrix3 &q)

Protected Attributes

Vector3< T_Scalar > mVec [3]

Detailed Description

template<typename T_Scalar>
class vl::Matrix3< T_Scalar >

The Matrix3 class is a template class that implements a generic 3x3 matrix, see also vl::dmat3, vl::fmat3, vl::umat3, vl::imat3.

See also:
Vector4, Vector3, Vector2, Matrix4, Matrix2

Definition at line 48 of file Matrix3.hpp.


Member Typedef Documentation

template<typename T_Scalar>
typedef T_Scalar vl::Matrix3< T_Scalar >::scalar_type

Definition at line 51 of file Matrix3.hpp.


Constructor & Destructor Documentation

template<typename T_Scalar>
template<typename T >
vl::Matrix3< T_Scalar >::Matrix3 ( const Matrix3< T > &  m ) [inline, explicit]

Definition at line 54 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
vl::Matrix3< T_Scalar >::Matrix3 (  ) [inline]
template<typename T_Scalar>
vl::Matrix3< T_Scalar >::Matrix3 ( T_Scalar  n ) [inline, explicit]
template<typename T_Scalar>
vl::Matrix3< T_Scalar >::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 
) [inline, explicit]

Definition at line 72 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().


Member Function Documentation

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::fill ( T_Scalar  val ) [inline]
template<typename T_Scalar>
T_Scalar vl::Matrix3< T_Scalar >::diff ( const Matrix3< T_Scalar > &  other ) const [inline]

Definition at line 89 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Vector2<T_Scalar> vl::Matrix3< T_Scalar >::getX (  ) const [inline]
template<typename T_Scalar>
Vector2<T_Scalar> vl::Matrix3< T_Scalar >::getY (  ) const [inline]
template<typename T_Scalar>
Vector2<T_Scalar> vl::Matrix3< T_Scalar >::getT (  ) const [inline]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::setX ( const Vector2< T_Scalar > &  v ) [inline]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::setY ( const Vector2< T_Scalar > &  v ) [inline]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::setT ( const Vector2< T_Scalar > &  v ) [inline]
template<typename T_Scalar>
bool vl::Matrix3< T_Scalar >::operator== ( const Matrix3< T_Scalar > &  m ) const [inline]

Definition at line 146 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::mVec.

Referenced by vl::Matrix3< T_Scalar >::operator!=().

template<typename T_Scalar>
bool vl::Matrix3< T_Scalar >::operator!= ( const Matrix3< T_Scalar > &  m ) const [inline]

Definition at line 151 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::operator==().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator= ( const Matrix3< T_Scalar > &  m ) [inline]

Definition at line 156 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::mVec.

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator+ ( const Matrix3< T_Scalar > &  m ) const [inline]

Definition at line 162 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator+= ( const Matrix3< T_Scalar > &  m ) [inline]

Definition at line 171 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator- ( const Matrix3< T_Scalar > &  m ) const [inline]

Definition at line 179 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator-= ( const Matrix3< T_Scalar > &  m ) [inline]

Definition at line 188 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator*= ( const Matrix3< T_Scalar > &  m ) [inline]

Definition at line 196 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::postMultiply().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator- (  ) const [inline]

Definition at line 201 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator+ ( T_Scalar  d ) const [inline]

Definition at line 210 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator+= ( T_Scalar  d ) [inline]

Definition at line 219 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator- ( T_Scalar  d ) const [inline]

Definition at line 227 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator-= ( T_Scalar  d ) [inline]

Definition at line 236 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator* ( T_Scalar  d ) const [inline]

Definition at line 244 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator*= ( T_Scalar  d ) [inline]

Definition at line 253 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::operator/ ( T_Scalar  d ) const [inline]

Definition at line 261 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::operator/= ( T_Scalar  d ) [inline]

Definition at line 271 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
bool vl::Matrix3< T_Scalar >::isIdentity (  ) const [inline]

Definition at line 280 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::ptr().

template<typename T_Scalar>
Matrix2<T_Scalar> vl::Matrix3< T_Scalar >::get2x2 (  ) const [inline]

Definition at line 286 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e(), and vl::Matrix2< T_Scalar >::e().

template<typename T_Scalar>
void vl::Matrix3< T_Scalar >::set2x2 ( const Matrix2< T_Scalar > &  m ) [inline]

This writes only on the upper 2x2 part of the matrix without touching the last row and column.

Definition at line 295 of file Matrix3.hpp.

References vl::Matrix2< T_Scalar >::e(), and vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
T_Scalar* vl::Matrix3< T_Scalar >::ptr (  ) [inline]
template<typename T_Scalar>
const T_Scalar* vl::Matrix3< T_Scalar >::ptr (  ) const [inline]

Definition at line 306 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::transpose (  ) [inline]

Definition at line 311 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::getTransposed (  ) const [inline]

Definition at line 324 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::getTransposed ( Matrix3< T_Scalar > &  dest ) const [inline]

Definition at line 333 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::e().

template<typename T_Scalar>
bool vl::Matrix3< T_Scalar >::isNull (  ) const [inline]

Definition at line 341 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::mVec.

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::setNull (  ) [inline]

Definition at line 350 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::fill().

template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::getNull ( Matrix3< T_Scalar > &  out ) [inline, static]

Definition at line 356 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::fill().

template<typename T_Scalar>
static Matrix3 vl::Matrix3< T_Scalar >::getNull (  ) [inline, static]

Definition at line 362 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::Matrix3().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::setIdentity (  ) [inline]
template<typename T_Scalar>
static Matrix3 vl::Matrix3< T_Scalar >::getIdentity (  ) [inline, static]

Definition at line 379 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::Matrix3().

template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::getIdentity ( Matrix3< T_Scalar > &  out ) [inline, static]

Definition at line 384 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::setIdentity().

template<typename T_Scalar >
T_Scalar vl::Matrix3< T_Scalar >::getInverse ( Matrix3< T_Scalar > &  dest ) const
template<typename T_Scalar>
Matrix3 vl::Matrix3< T_Scalar >::getInverse ( T_Scalar *  determinant = NULL ) const [inline]

Definition at line 392 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::getInverse().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::invert ( T_Scalar *  determinant = NULL ) [inline]

Definition at line 401 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::getInverse().

template<typename T_Scalar >
Matrix3< T_Scalar > vl::Matrix3< T_Scalar >::getRotation ( T_Scalar  degrees ) [static]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::rotate ( T_Scalar  degrees ) [inline]
template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::getTranslation ( Matrix3< T_Scalar > &  out,
const Vector2< T_Scalar > &  v 
) [inline, static]
template<typename T_Scalar>
static Matrix3 vl::Matrix3< T_Scalar >::getTranslation ( const Vector2< T_Scalar > &  v ) [inline, static]
template<typename T_Scalar>
static Matrix3 vl::Matrix3< T_Scalar >::getTranslation ( T_Scalar  x,
T_Scalar  y 
) [inline, static]

Definition at line 426 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::getTranslation().

template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::getTranslation ( Matrix3< T_Scalar > &  out,
T_Scalar  x,
T_Scalar  y 
) [inline, static]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::translate ( T_Scalar  x,
T_Scalar  y 
) [inline]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::translate ( const Vector2< T_Scalar > &  v ) [inline]
template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::getScaling ( Matrix3< T_Scalar > &  out,
const Vector2< T_Scalar > &  v 
) [inline, static]
template<typename T_Scalar>
static Matrix3 vl::Matrix3< T_Scalar >::getScaling ( const Vector2< T_Scalar > &  v ) [inline, static]
template<typename T_Scalar>
static Matrix3 vl::Matrix3< T_Scalar >::getScaling ( T_Scalar  x,
T_Scalar  y 
) [inline, static]

Definition at line 461 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::getScaling().

template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::getScaling ( Matrix3< T_Scalar > &  out,
T_Scalar  x,
T_Scalar  y 
) [inline, static]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::scale ( T_Scalar  x,
T_Scalar  y 
) [inline]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::scale ( const Vector2< T_Scalar > &  v ) [inline]
template<typename T_Scalar>
static Matrix3& vl::Matrix3< T_Scalar >::multiply ( Matrix3< T_Scalar > &  out,
const Matrix3< T_Scalar > &  p,
const Matrix3< T_Scalar > &  q 
) [inline, static]
template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::postMultiply ( const Matrix3< T_Scalar > &  m ) [inline]

Definition at line 504 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::multiply().

Referenced by vl::Matrix3< T_Scalar >::operator*=().

template<typename T_Scalar>
Matrix3& vl::Matrix3< T_Scalar >::preMultiply ( const Matrix3< T_Scalar > &  m ) [inline]
template<typename T_Scalar>
const T_Scalar& vl::Matrix3< T_Scalar >::e ( int  i,
int  j 
) const [inline]
template<typename T_Scalar>
T_Scalar& vl::Matrix3< T_Scalar >::e ( int  i,
int  j 
) [inline]

Definition at line 518 of file Matrix3.hpp.

References vl::Matrix3< T_Scalar >::mVec.


Member Data Documentation

template<typename T_Scalar>
Vector3<T_Scalar> vl::Matrix3< T_Scalar >::mVec[3] [protected]

The documentation for this class was generated from the following file:

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:06.
Permission is granted to use this page to write and publish articles regarding Visualization Library.