# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Matrix3< scalar_type > 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 Member Functions
template<typename T >
| Matrix3 (const T &m)
| Matrix3 ()
| Matrix3 (scalar_type n)
| Matrix3 (scalar_type e00, scalar_type e01, scalar_type e02, scalar_type e10, scalar_type e11, scalar_type e12, scalar_type e20, scalar_type e21, scalar_type e22)
const Vector3< scalar_type > & | operator[] (unsigned int i) const
Vector3< scalar_type > & | operator[] (unsigned int i)
Vector2< scalar_type > | getX () const
Vector2< scalar_type > | getY () const
Vector2< scalar_type > | getT () const
Matrix3 & | setX (const Vector2< scalar_type > &v)
Matrix3 & | setY (const Vector2< scalar_type > &v)
Matrix3 & | setT (const Vector2< scalar_type > &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+ (scalar_type d) const
Matrix3 & | operator+= (scalar_type d)
Matrix3 | operator- (scalar_type d) const
Matrix3 & | operator-= (scalar_type d)
Matrix3 | operator* (scalar_type d) const
Matrix3 & | operator*= (scalar_type d)
Matrix3 | operator/ (scalar_type d) const
Matrix3 & | operator/= (scalar_type d)
bool | isIdentity () const
Matrix2< scalar_type > | get2x2 () const
void | set2x2 (const Matrix2< scalar_type > &m)
| This writes only on the upper 2x2 part of the matrix without touching the last row and column.
scalar_type * | ptr ()
const scalar_type * | ptr () const
Matrix3 & | transpose ()
bool | isNull () const
void | setIdentity ()
Matrix3 | inverse (bool *invertible=NULL) const
Matrix3 & | invert (bool *invertible=NULL)
const scalar_type & | e (int i, int j) const
scalar_type & | e (int i, int j)
Matrix3 & | rotate (scalar_type degrees)
Matrix3 & | translate (scalar_type x, scalar_type y)
Matrix3 & | translate (const Vector2< scalar_type > &v)
Matrix3 & | scale (scalar_type x, scalar_type y)
## Static Public Member Functions
static Matrix3 | rotation (scalar_type degrees)
static Matrix3 | translation (const Vector2< scalar_type > &v)
static Matrix3 | translation (scalar_type x, scalar_type y)
static Matrix3 | scaling (scalar_type x, scalar_type y)
## Protected Attributes
Vector3< scalar_type > | mVec [3]

## Detailed Description

### template<typename scalar_type>
class vl::Matrix3< scalar_type >

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

## Constructor & Destructor Documentation

template<typename scalar_type >
template<typename T >

vl::Matrix3< scalar_type >::Matrix3 | ( | const T & | m | ) | `[inline, explicit]`

template<typename scalar_type >

vl::Matrix3< scalar_type >::Matrix3 | ( |  | ) | `[inline]`

template<typename scalar_type >

vl::Matrix3< scalar_type >::Matrix3 | ( | scalar_type | n | ) | `[inline]`

template<typename scalar_type >

vl::Matrix3< scalar_type >::Matrix3 | ( | scalar_type | e00,
|  | scalar_type | e01,
|  | scalar_type | e02,
|  | scalar_type | e10,
|  | scalar_type | e11,
|  | scalar_type | e12,
|  | scalar_type | e20,
|  | scalar_type | e21,
|  | scalar_type | e22 |
| ) |  |  | `[inline, explicit]`

## Member Function Documentation

template<typename scalar_type >

const Vector3<scalar_type>& vl::Matrix3< scalar_type >::operator[] | ( | unsigned int | i | ) | const`[inline]`

template<typename scalar_type >

Vector3<scalar_type>& vl::Matrix3< scalar_type >::operator[] | ( | unsigned int | i | ) | `[inline]`

template<typename scalar_type >

Vector2<scalar_type> vl::Matrix3< scalar_type >::getX | ( |  | ) | const`[inline]`

template<typename scalar_type >

Vector2<scalar_type> vl::Matrix3< scalar_type >::getY | ( |  | ) | const`[inline]`

template<typename scalar_type >

Vector2<scalar_type> vl::Matrix3< scalar_type >::getT | ( |  | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::setX | ( | const Vector2< scalar_type > & | v | ) | `[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::setY | ( | const Vector2< scalar_type > & | v | ) | `[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::setT | ( | const Vector2< scalar_type > & | v | ) | `[inline]`

template<typename scalar_type >

bool vl::Matrix3< scalar_type >::operator== | ( | const Matrix3< scalar_type > & | m | ) | const`[inline]`

template<typename scalar_type >

bool vl::Matrix3< scalar_type >::operator!= | ( | const Matrix3< scalar_type > & | m | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator= | ( | const Matrix3< scalar_type > & | m | ) | `[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator+ | ( | const Matrix3< scalar_type > & | m | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator+= | ( | const Matrix3< scalar_type > & | m | ) | `[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator- | ( | const Matrix3< scalar_type > & | m | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator-= | ( | const Matrix3< scalar_type > & | m | ) | `[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator*= | ( | const Matrix3< scalar_type > & | m | ) | `[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator- | ( |  | ) | const`[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator+ | ( | scalar_type | d | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator+= | ( | scalar_type | d | ) | `[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator- | ( | scalar_type | d | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator-= | ( | scalar_type | d | ) | `[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator* | ( | scalar_type | d | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator*= | ( | scalar_type | d | ) | `[inline]`

template<typename scalar_type >

Matrix3 vl::Matrix3< scalar_type >::operator/ | ( | scalar_type | d | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::operator/= | ( | scalar_type | d | ) | `[inline]`

template<typename scalar_type >

bool vl::Matrix3< scalar_type >::isIdentity | ( |  | ) | const`[inline]`

template<typename scalar_type >

Matrix2<scalar_type> vl::Matrix3< scalar_type >::get2x2 | ( |  | ) | const`[inline]`

template<typename scalar_type >

void vl::Matrix3< scalar_type >::set2x2 | ( | const Matrix2< scalar_type > & | m | ) | `[inline]`

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

template<typename scalar_type >

scalar_type* vl::Matrix3< scalar_type >::ptr | ( |  | ) | `[inline]`

template<typename scalar_type >

const scalar_type* vl::Matrix3< scalar_type >::ptr | ( |  | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::transpose | ( |  | ) | `[inline]`

template<typename scalar_type >

bool vl::Matrix3< scalar_type >::isNull | ( |  | ) | const`[inline]`

template<typename scalar_type >

void vl::Matrix3< scalar_type >::setIdentity | ( |  | ) | `[inline]`

template<typename scalar_type >

Matrix3< scalar_type > vl::Matrix3< scalar_type >::inverse | ( | bool * | invertible = `NULL` | ) | const`[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::invert | ( | bool * | invertible = `NULL` | ) | `[inline]`

template<typename scalar_type >

const scalar_type& vl::Matrix3< scalar_type >::e | ( | int | i,
|  | int | j |
| ) |  |  | const`[inline]`

template<typename scalar_type >

scalar_type& vl::Matrix3< scalar_type >::e | ( | int | i,
|  | int | j |
| ) |  |  | `[inline]`

template<typename scalar_type >

Matrix3< scalar_type > vl::Matrix3< scalar_type >::rotation | ( | scalar_type | degrees | ) | `[inline, static]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::rotate | ( | scalar_type | degrees | ) | `[inline]`

template<typename scalar_type >

static Matrix3 vl::Matrix3< scalar_type >::translation | ( | const Vector2< scalar_type > & | v | ) | `[inline, static]`

template<typename scalar_type >

static Matrix3 vl::Matrix3< scalar_type >::translation | ( | scalar_type | x,
|  | scalar_type | y |
| ) |  |  | `[inline, static]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::translate | ( | scalar_type | x,
|  | scalar_type | y |
| ) |  |  | `[inline]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::translate | ( | const Vector2< scalar_type > & | v | ) | `[inline]`

template<typename scalar_type >

static Matrix3 vl::Matrix3< scalar_type >::scaling | ( | scalar_type | x,
|  | scalar_type | y |
| ) |  |  | `[inline, static]`

template<typename scalar_type >

Matrix3& vl::Matrix3< scalar_type >::scale | ( | scalar_type | x,
|  | scalar_type | y |
| ) |  |  | `[inline]`

## Member Data Documentation

template<typename scalar_type >

Vector3<scalar_type> vl::Matrix3< scalar_type >::mVec[3]`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Matrix3.hpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 29 11:11:47 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.