Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::Matrix4< T > Class Template Reference

#include "OVR_Math.h"

Inheritance diagram for OVR::Matrix4< T >:
Inheritance graph
Collaboration diagram for OVR::Matrix4< T >:
Collaboration graph

Public Types

enum  NoInitType { NoInit }
 

Public Member Functions

 Matrix4 (NoInitType)
 
 Matrix4 ()
 
 Matrix4 (T m11, T m12, T m13, T m14, T m21, T m22, T m23, T m24, T m31, T m32, T m33, T m34, T m41, T m42, T m43, T m44)
 
 Matrix4 (T m11, T m12, T m13, T m21, T m22, T m23, T m31, T m32, T m33)
 
 Matrix4 (const Quat< T > &q)
 
 Matrix4 (const Transform< T > &p)
 
 Matrix4 (const Matrix4< typename Math< T >::OtherFloatType > &src)
 
 Matrix4 (const typename CompatibleTypes< Matrix4< T > >::Type &s)
 
 operator typename CompatibleTypes< Matrix4< T > >::Type () const
 
void ToString (char *dest, UPInt destsize) const
 
void SetIdentity ()
 
bool operator== (const Matrix4 &b) const
 
Matrix4 operator+ (const Matrix4 &b) const
 
Matrix4operator+= (const Matrix4 &b)
 
Matrix4 operator- (const Matrix4 &b) const
 
Matrix4operator-= (const Matrix4 &b)
 
Matrix4 operator* (const Matrix4 &b) const
 
Matrix4operator*= (const Matrix4 &b)
 
Matrix4 operator* (T s) const
 
Matrix4operator*= (T s)
 
Matrix4 operator/ (T s) const
 
Matrix4operator/= (T s)
 
Vector3< T > Transform (const Vector3< T > &v) const
 
Matrix4 Transposed () const
 
void Transpose ()
 
SubDet (const UPInt *rows, const UPInt *cols) const
 
Cofactor (UPInt I, UPInt J) const
 
Determinant () const
 
Matrix4 Adjugated () const
 
Matrix4 Inverted () const
 
void Invert ()
 
Matrix4 InvertedHomogeneousTransform () const
 
void InvertHomogeneousTransform ()
 
template<Axis A1, Axis A2, Axis A3, RotateDirection D, HandedSystem S>
void ToEulerAngles (T *a, T *b, T *c)
 
template<Axis A1, Axis A2, RotateDirection D, HandedSystem S>
void ToEulerAnglesABA (T *a, T *b, T *c)
 
void SetTranslation (const Vector3< T > &v)
 
Vector3< T > GetTranslation () const
 
Distance (const Matrix4 &m2) const
 

Static Public Member Functions

static Matrix4 FromString (const char *src)
 
static const Matrix4Identity ()
 
static Matrix4Multiply (Matrix4 *d, const Matrix4 &a, const Matrix4 &b)
 
static Matrix4 AxisConversion (const WorldAxes &to, const WorldAxes &from)
 
static Matrix4 Translation (const Vector3< T > &v)
 
static Matrix4 Translation (T x, T y, T z=0.0f)
 
static Matrix4 Scaling (const Vector3< T > &v)
 
static Matrix4 Scaling (T x, T y, T z)
 
static Matrix4 Scaling (T s)
 
static Matrix4 RotationAxis (Axis A, T angle, RotateDirection d, HandedSystem s)
 
static Matrix4 RotationX (T angle)
 
static Matrix4 RotationY (T angle)
 
static Matrix4 RotationZ (T angle)
 
static Matrix4 LookAtRH (const Vector3< T > &eye, const Vector3< T > &at, const Vector3< T > &up)
 
static Matrix4 LookAtLH (const Vector3< T > &eye, const Vector3< T > &at, const Vector3< T > &up)
 
static Matrix4 PerspectiveRH (T yfov, T aspect, T znear, T zfar)
 
static Matrix4 PerspectiveLH (T yfov, T aspect, T znear, T zfar)
 
static Matrix4 Ortho2D (T w, T h)
 

Data Fields

M [4][4]
 

Private Member Functions

template<>
const Matrix4< float > IdentityValue
 
template<>
const Matrix4< double > IdentityValue
 

Static Private Attributes

static const Matrix4 IdentityValue
 

Detailed Description

template<class T>
class OVR::Matrix4< T >

Definition at line 127 of file OVR_Math.h.

Member Enumeration Documentation

template<class T>
enum OVR::Matrix4::NoInitType
Enumerator
NoInit 

Definition at line 1199 of file OVR_Math.h.

Constructor & Destructor Documentation

template<class T>
OVR::Matrix4< T >::Matrix4 ( NoInitType  )
inline

Definition at line 1202 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( )
inline

Definition at line 1205 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( m11,
m12,
m13,
m14,
m21,
m22,
m23,
m24,
m31,
m32,
m33,
m34,
m41,
m42,
m43,
m44 
)
inline

Definition at line 1210 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( m11,
m12,
m13,
m21,
m22,
m23,
m31,
m32,
m33 
)
inline

Definition at line 1221 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( const Quat< T > &  q)
inlineexplicit

Definition at line 1231 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( const Transform< T > &  p)
inlineexplicit

Definition at line 1244 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( const Matrix4< typename Math< T >::OtherFloatType > &  src)
inlineexplicit

Definition at line 1252 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::Matrix4 ( const typename CompatibleTypes< Matrix4< T > >::Type &  s)
inline

Definition at line 1260 of file OVR_Math.h.

Member Function Documentation

template<class T>
Matrix4 OVR::Matrix4< T >::Adjugated ( ) const
inline

Definition at line 1444 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::AxisConversion ( const WorldAxes to,
const WorldAxes from 
)
inlinestatic

Definition at line 1564 of file OVR_Math.h.

template<class T>
T OVR::Matrix4< T >::Cofactor ( UPInt  I,
UPInt  J 
) const
inline

Definition at line 1433 of file OVR_Math.h.

template<class T>
T OVR::Matrix4< T >::Determinant ( ) const
inline

Definition at line 1439 of file OVR_Math.h.

template<class T>
T OVR::Matrix4< T >::Distance ( const Matrix4< T > &  m2) const
inline

Definition at line 1651 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::FromString ( const char *  src)
inlinestatic

Definition at line 1282 of file OVR_Math.h.

template<class T>
Vector3<T> OVR::Matrix4< T >::GetTranslation ( ) const
inline

Definition at line 1615 of file OVR_Math.h.

template<class T>
static const Matrix4& OVR::Matrix4< T >::Identity ( )
inlinestatic

Definition at line 1297 of file OVR_Math.h.

template<>
const Matrix4< float > OVR::Matrix4< float >::IdentityValue ( )
private

Definition at line 78 of file OVR_Math.cpp.

template<>
const Matrix4< double > OVR::Matrix4< double >::IdentityValue ( )
private

Definition at line 84 of file OVR_Math.cpp.

template<class T>
void OVR::Matrix4< T >::Invert ( )
inline

Definition at line 1459 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::Inverted ( ) const
inline

Definition at line 1452 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::InvertedHomogeneousTransform ( ) const
inline

Definition at line 1466 of file OVR_Math.h.

template<class T>
void OVR::Matrix4< T >::InvertHomogeneousTransform ( )
inline

Definition at line 1479 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::LookAtLH ( const Vector3< T > &  eye,
const Vector3< T > &  at,
const Vector3< T > &  up 
)
inlinestatic

Definition at line 1757 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::LookAtRH ( const Vector3< T > &  eye,
const Vector3< T > &  at,
const Vector3< T > &  up 
)
inlinestatic

Definition at line 1741 of file OVR_Math.h.

template<class T>
static Matrix4& OVR::Matrix4< T >::Multiply ( Matrix4< T > *  d,
const Matrix4< T > &  a,
const Matrix4< T > &  b 
)
inlinestatic

Definition at line 1348 of file OVR_Math.h.

template<class T>
OVR::Matrix4< T >::operator typename CompatibleTypes< Matrix4< T > >::Type ( ) const
inline

Definition at line 1266 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::operator* ( const Matrix4< T > &  b) const
inline

Definition at line 1362 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::operator* ( s) const
inline

Definition at line 1374 of file OVR_Math.h.

template<class T>
Matrix4& OVR::Matrix4< T >::operator*= ( const Matrix4< T > &  b)
inline

Definition at line 1369 of file OVR_Math.h.

template<class T>
Matrix4& OVR::Matrix4< T >::operator*= ( s)
inline

Definition at line 1381 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::operator+ ( const Matrix4< T > &  b) const
inline

Definition at line 1317 of file OVR_Math.h.

template<class T>
Matrix4& OVR::Matrix4< T >::operator+= ( const Matrix4< T > &  b)
inline

Definition at line 1324 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::operator- ( const Matrix4< T > &  b) const
inline

Definition at line 1332 of file OVR_Math.h.

template<class T>
Matrix4& OVR::Matrix4< T >::operator-= ( const Matrix4< T > &  b)
inline

Definition at line 1339 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::operator/ ( s) const
inline

Definition at line 1390 of file OVR_Math.h.

template<class T>
Matrix4& OVR::Matrix4< T >::operator/= ( s)
inline

Definition at line 1397 of file OVR_Math.h.

template<class T>
bool OVR::Matrix4< T >::operator== ( const Matrix4< T > &  b) const
inline

Definition at line 1307 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::Ortho2D ( w,
h 
)
inlinestatic

Definition at line 1822 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::PerspectiveLH ( yfov,
aspect,
znear,
zfar 
)
inlinestatic

Definition at line 1803 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::PerspectiveRH ( yfov,
aspect,
znear,
zfar 
)
inlinestatic

Definition at line 1779 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::RotationAxis ( Axis  A,
angle,
RotateDirection  d,
HandedSystem  s 
)
inlinestatic

Definition at line 1666 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::RotationX ( angle)
inlinestatic

Definition at line 1696 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::RotationY ( angle)
inlinestatic

Definition at line 1712 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::RotationZ ( angle)
inlinestatic

Definition at line 1728 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::Scaling ( const Vector3< T > &  v)
inlinestatic

Definition at line 1621 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::Scaling ( x,
y,
z 
)
inlinestatic

Definition at line 1631 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::Scaling ( s)
inlinestatic

Definition at line 1641 of file OVR_Math.h.

template<class T>
void OVR::Matrix4< T >::SetIdentity ( )
inline

Definition at line 1299 of file OVR_Math.h.

template<class T>
void OVR::Matrix4< T >::SetTranslation ( const Vector3< T > &  v)
inline

Definition at line 1608 of file OVR_Math.h.

template<class T>
T OVR::Matrix4< T >::SubDet ( const UPInt rows,
const UPInt cols 
) const
inline

Definition at line 1426 of file OVR_Math.h.

template<class T>
template<Axis A1, Axis A2, Axis A3, RotateDirection D, HandedSystem S>
void OVR::Matrix4< T >::ToEulerAngles ( T *  a,
T *  b,
T *  c 
)
inline

Definition at line 1491 of file OVR_Math.h.

template<class T>
template<Axis A1, Axis A2, RotateDirection D, HandedSystem S>
void OVR::Matrix4< T >::ToEulerAnglesABA ( T *  a,
T *  b,
T *  c 
)
inline

Definition at line 1529 of file OVR_Math.h.

template<class T>
void OVR::Matrix4< T >::ToString ( char *  dest,
UPInt  destsize 
) const
inline

Definition at line 1274 of file OVR_Math.h.

template<class T>
Vector3<T> OVR::Matrix4< T >::Transform ( const Vector3< T > &  v) const
inline

Definition at line 1405 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::Translation ( const Vector3< T > &  v)
inlinestatic

Definition at line 1588 of file OVR_Math.h.

template<class T>
static Matrix4 OVR::Matrix4< T >::Translation ( x,
y,
z = 0.0f 
)
inlinestatic

Definition at line 1598 of file OVR_Math.h.

template<class T>
void OVR::Matrix4< T >::Transpose ( )
inline

Definition at line 1420 of file OVR_Math.h.

template<class T>
Matrix4 OVR::Matrix4< T >::Transposed ( ) const
inline

Definition at line 1412 of file OVR_Math.h.

Field Documentation

template<class T>
const Matrix4 OVR::Matrix4< T >::IdentityValue
staticprivate

Definition at line 1194 of file OVR_Math.h.

template<class T>
T OVR::Matrix4< T >::M[4][4]

Definition at line 1197 of file OVR_Math.h.


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