ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Math::Matrix< 4, 4 > Class Template Reference

#include <matrix4.h>

Inheritance diagram for Math::Matrix< 4, 4 >:
Collaboration diagram for Math::Matrix< 4, 4 >:

List of all members.

Public Member Functions

 Matrix ()
 Matrix (const MatrixBase< 4, 4 > &m)
 Matrix (const Angle &first, const Angle &second, const Angle &third, EulerOrder order)
void transform (Vector3d *v, bool translate) const
void inverseTranslate (Vector3d *v) const
void inverseRotate (Vector3d *v) const
Vector3d getPosition () const
void setPosition (const Vector3d &v)
Matrix3 getRotation () const
void setRotation (const Matrix3 &m)
void translate (const Vector3d &v)
void buildFromTargetDir (const Math::Vector3d &modelForward, const Math::Vector3d &targetDirection, const Math::Vector3d &modelUp, const Math::Vector3d &worldUp)
 Builds a matrix that maps the given local space forward direction vector to point towards the given target direction, and the given local up direction towards the given target world up direction.
void invertAffineOrthonormal ()
 Inverts a matrix in place.
void transpose ()
Matrix< 4, 4 > operator* (const Matrix< 4, 4 > &m2) const
Vector4d transform (const Vector4d &v) const
bool inverse ()

Detailed Description

template<>
class Math::Matrix< 4, 4 >

Definition at line 36 of file matrix4.h.


Constructor & Destructor Documentation

Math::Matrix< 4, 4 >::Matrix (  ) 

Definition at line 42 of file matrix4.cpp.

Math::Matrix< 4, 4 >::Matrix ( const MatrixBase< 4, 4 > &  m  ) 

Definition at line 47 of file matrix4.cpp.

Math::Matrix< 4, 4 >::Matrix ( const Angle first,
const Angle second,
const Angle third,
EulerOrder  order 
) [inline]

Definition at line 40 of file matrix4.h.


Member Function Documentation

void Math::Matrix< 4, 4 >::buildFromTargetDir ( const Math::Vector3d modelForward,
const Math::Vector3d targetDirection,
const Math::Vector3d modelUp,
const Math::Vector3d worldUp 
)

Builds a matrix that maps the given local space forward direction vector to point towards the given target direction, and the given local up direction towards the given target world up direction.

Generates a lookat matrix.

Parameters:
modelForward The forward direction in the local space of the object.
targetDirection The desired world space direction the object should look at.
modelUp The up direction in the local space of the object. This vector must be perpendicular to the vector localForward.
worldUp The global up direction of the scene in world space. The worldUp and targetDirection vectors cannot be collinear, but they do not need to be perpendicular either. All the parameters MUST be normalized.

For reference, see http://clb.demon.fi/MathGeoLib/docs/float3x3_LookAt.php

Definition at line 115 of file matrix4.cpp.

Vector3d Math::Matrix< 4, 4 >::getPosition (  )  const

Definition at line 64 of file matrix4.cpp.

Matrix3 Math::Matrix< 4, 4 >::getRotation (  )  const

Definition at line 74 of file matrix4.cpp.

bool Math::Matrix< 4, 4 >::inverse (  )  [inline]

Definition at line 114 of file matrix4.h.

void Math::Matrix< 4, 4 >::inverseRotate ( Vector3d v  )  const

Definition at line 140 of file matrix4.cpp.

void Math::Matrix< 4, 4 >::inverseTranslate ( Vector3d v  )  const

Definition at line 134 of file matrix4.cpp.

void Math::Matrix< 4, 4 >::invertAffineOrthonormal (  ) 

Inverts a matrix in place.

This function avoid having to do generic Gaussian elimination on the matrix by assuming that the top-left 3x3 part of the matrix is orthonormal (columns and rows 0, 1 and 2 orthogonal and unit length). See e.g. Eric Lengyel's Mathematics for 3D Game Programming and Computer Graphics, p. 82.

Definition at line 123 of file matrix4.cpp.

Matrix<4, 4> Math::Matrix< 4, 4 >::operator* ( const Matrix< 4, 4 > &  m2  )  const [inline]

Definition at line 80 of file matrix4.h.

void Math::Matrix< 4, 4 >::setPosition ( const Vector3d v  ) 

Definition at line 68 of file matrix4.cpp.

void Math::Matrix< 4, 4 >::setRotation ( const Matrix3 m  ) 

Definition at line 90 of file matrix4.cpp.

void Math::Matrix< 4, 4 >::transform ( Vector3d v,
bool  translate 
) const

Definition at line 52 of file matrix4.cpp.

Vector4d Math::Matrix< 4, 4 >::transform ( const Vector4d v  )  const [inline]

Definition at line 98 of file matrix4.h.

void Math::Matrix< 4, 4 >::translate ( const Vector3d v  ) 

Definition at line 102 of file matrix4.cpp.

void Math::Matrix< 4, 4 >::transpose (  ) 

Definition at line 153 of file matrix4.cpp.


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


Generated on Sat Mar 16 2019 05:06:32 for ResidualVM by doxygen 1.7.1
curved edge   curved edge