Public Member Functions | Static Public Member Functions
rtc::SMat2< T > Class Template Reference

#include <rtcSMat2.h>

Inheritance diagram for rtc::SMat2< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

det () const
int invert ()
SMat2< T > inverted () const
void set (const T x11, const T x12, const T x21, const T x22)
void setCols (const Vec2< T > &v0, const Vec2< T > &v1)
void setRows (const Vec2< T > &v0, const Vec2< T > &v1)
 SMat2 ()
 SMat2 (const T *d)
 SMat2 (const T diagVal)
 SMat2 (const Vec2< T > &diagVec)
 SMat2 (const Mat< T, 2, 2 > &m)
 SMat2 (const T x11, const T x12, const T x21, const T x22)
 SMat2 (const Vec2< T > &q0, const Vec2< T > &q1)
template<class U >
 SMat2 (const Mat< U, 2, 2 > &m)

Static Public Member Functions

static SMat2< T > fromCols (const Vec2< T > &v0, const Vec2< T > &v1)
static SMat2< T > fromRows (const Vec2< T > &v0, const Vec2< T > &v1)

Detailed Description

template<class T>
class rtc::SMat2< T >

A 2x2 matrix. A specialization of a square matrix.

Definition at line 40 of file rtcSMat2.h.


Constructor & Destructor Documentation

template<class T >
rtc::SMat2< T >::SMat2 ( ) [inline]

Ctor that doesn't initialize anything.

Definition at line 91 of file rtcSMat2.h.

template<class T >
rtc::SMat2< T >::SMat2 ( const T *  d) [inline]

Ctor that initializes from an array.

Parameters:
dthe (row major) data array of length 4

Definition at line 97 of file rtcSMat2.h.

template<class T >
rtc::SMat2< T >::SMat2 ( const T  diagVal) [inline]

Ctor that makes a multiple of the identity matrix.

Parameters:
diagValthe value to which all diagonal entries will be set

Definition at line 103 of file rtcSMat2.h.

template<class T >
rtc::SMat2< T >::SMat2 ( const Vec2< T > &  diagVec) [inline]

Ctor that makes a (mostly) zero matrix with diagonal entries from vec.

Parameters:
diagVecthe vector of values that should appear on the diagonal

Definition at line 109 of file rtcSMat2.h.

template<class T >
rtc::SMat2< T >::SMat2 ( const Mat< T, 2, 2 > &  m) [inline]

Ctor that initializes from a Mat<T,2,2>.

Definition at line 115 of file rtcSMat2.h.

template<class T >
rtc::SMat2< T >::SMat2 ( const T  x11,
const T  x12,
const T  x21,
const T  x22 
) [inline]

Ctor that initializes matrix entries directly.

Definition at line 120 of file rtcSMat2.h.

template<class T >
rtc::SMat2< T >::SMat2 ( const Vec2< T > &  v0,
const Vec2< T > &  v1 
) [inline]

Ctor that initializes matrix from col vectors.

Definition at line 128 of file rtcSMat2.h.

template<class T >
template<class U >
rtc::SMat2< T >::SMat2 ( const Mat< U, 2, 2 > &  m) [inline]

Casting Ctor that initializes from a Mat<U,2,2> with type cast

Definition at line 138 of file rtcSMat2.h.


Member Function Documentation

template<class T >
T rtc::SMat2< T >::det ( ) const [inline]

Calculate the determinant.

Reimplemented from rtc::SMat< T, 2 >.

Definition at line 193 of file rtcSMat2.h.

template<class T >
SMat2< T > rtc::SMat2< T >::fromCols ( const Vec2< T > &  v0,
const Vec2< T > &  v1 
) [inline, static]

Construct matrix given the cols

Definition at line 154 of file rtcSMat2.h.

template<class T >
SMat2< T > rtc::SMat2< T >::fromRows ( const Vec2< T > &  v0,
const Vec2< T > &  v1 
) [inline, static]

Construct matrix given the rows

Definition at line 145 of file rtcSMat2.h.

template<class T >
int rtc::SMat2< T >::invert ( ) [inline]

Calculate the inverse in place.

Reimplemented from rtc::SMat< T, 2 >.

Definition at line 213 of file rtcSMat2.h.

template<class T >
SMat2< T > rtc::SMat2< T >::inverted ( ) const [inline]

Invert the matrix. (matrix set to its inverse)

Exceptions:
domain_errorwhen matrix nearly singular

Reimplemented from rtc::SMat< T, 2 >.

Definition at line 201 of file rtcSMat2.h.

template<class T >
void rtc::SMat2< T >::set ( const T  x11,
const T  x12,
const T  x21,
const T  x22 
) [inline]

Set the matrix entries directly.

Definition at line 166 of file rtcSMat2.h.

template<class T >
void rtc::SMat2< T >::setCols ( const Vec2< T > &  v0,
const Vec2< T > &  v1 
) [inline]

Set the columns of the matrix.

Definition at line 183 of file rtcSMat2.h.

template<class T >
void rtc::SMat2< T >::setRows ( const Vec2< T > &  v0,
const Vec2< T > &  v1 
) [inline]

Set the rows of the matrix.

Definition at line 175 of file rtcSMat2.h.


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


rtc
Author(s): Benjamin Pitzer
autogenerated on Mon Oct 6 2014 10:07:35