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

# vl::Matrix2< scalar_type > Class Template Reference

The Matrix2 class is a template class that implements a generic 2x2 matrix, see also vl::dmat2, vl::fmat2, vl::umat2, vl::imat2. More...

`#include <Matrix2.hpp>`

List of all members.

## Public Member Functions
template<typename T >
| Matrix2 (const T &m)
| Matrix2 ()
| Matrix2 (scalar_type n)
| Matrix2 (scalar_type e00, scalar_type e01, scalar_type e10, scalar_type e11)
const Vector2< scalar_type > & | operator[] (unsigned int i) const
Vector2< scalar_type > & | operator[] (unsigned int i)
bool | operator== (const Matrix2 &m) const
bool | operator!= (const Matrix2 &m) const
Matrix2 & | operator= (const Matrix2 &m)
Matrix2 | operator+ (const Matrix2 &m) const
Matrix2 & | operator+= (const Matrix2 &m)
Matrix2 | operator- (const Matrix2 &m) const
Matrix2 & | operator-= (const Matrix2 &m)
Matrix2 & | operator*= (const Matrix2 &m)
Matrix2 | operator- () const
Matrix2 | operator+ (scalar_type d) const
Matrix2 & | operator+= (scalar_type d)
Matrix2 | operator- (scalar_type d) const
Matrix2 & | operator-= (scalar_type d)
Matrix2 | operator* (scalar_type d) const
Matrix2 & | operator*= (scalar_type d)
Matrix2 | operator/ (scalar_type d) const
Matrix2 & | operator/= (scalar_type d)
bool | isIdentity () const
scalar_type * | ptr ()
const scalar_type * | ptr () const
Matrix2 & | transpose ()
bool | isNull () const
void | setIdentity ()
Matrix2 | inverse (bool *invertible=NULL) const
Matrix2 & | invert (bool *invertible=NULL)
const scalar_type & | e (int i, int j) const
scalar_type & | e (int i, int j)
## Protected Attributes
Vector2< scalar_type > | mVec [2]

## Detailed Description

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

The Matrix2 class is a template class that implements a generic 2x2 matrix, see also vl::dmat2, vl::fmat2, vl::umat2, vl::imat2.

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

## Constructor & Destructor Documentation

template<typename scalar_type >
template<typename T >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

vl::Matrix2< scalar_type >::Matrix2 | ( | scalar_type | e00,
|  | scalar_type | e01,
|  | scalar_type | e10,
|  | scalar_type | e11 |
| ) |  |  | `[inline, explicit]`

## Member Function Documentation

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

template<typename scalar_type >

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

## Member Data Documentation

template<typename scalar_type >

Vector2<scalar_type> vl::Matrix2< scalar_type >::mVec[2]`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Matrix2.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.