 ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki # Math::Matrix< 3, 3 > Class Template Reference

`#include <matrix3.h>`

Inheritance diagram for Math::Matrix< 3, 3 >: [legend]
Collaboration diagram for Math::Matrix< 3, 3 >: [legend]

List of all members.

## Public Member Functions

Matrix ()
Matrix (const MatrixBase< 3, 3 > &m)
void transpose ()
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.
Matrix< 3, 3 > operator* (const Matrix< 3, 3 > &m2) const

## Detailed Description

### template<> class Math::Matrix< 3, 3 >

Definition at line 33 of file matrix3.h.

## Constructor & Destructor Documentation

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

Definition at line 27 of file matrix3.cpp.

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

Definition at line 32 of file matrix3.cpp.

## Member Function Documentation

 void Math::Matrix< 3, 3 >::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 51 of file matrix3.cpp.

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

Definition at line 56 of file matrix3.h.

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

Definition at line 41 of file matrix3.cpp.

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

Generated on Sat Aug 1 2020 05:04:07 for ResidualVM by 1.7.1  