#include <iostream>
#include <cmath>
#include <cfloat>
#include <tmconfig.h>
#include <vector2.h>
#include <vector3.h>
#include <vector4.h>
#include <vectorn.h>
#include <quaternion.h>
#include <matrix2.h>
#include <matrix3.h>
#include <matrix4.h>
#include <matrix.h>
Include dependency graph for tm.h:
Functions | |
template<typename T> | |
STARTNAMESPACE std::ifstream & | operator>> (std::ifstream &in, tmath::vectorn< T, 2 > &v) |
template<typename T> | |
std::ifstream & | operator>> (std::ifstream &in, tmath::vectorn< T, 3 > &v) |
template<typename T> | |
std::ifstream & | operator>> (std::ifstream &in, tmath::vectorn< T, 4 > &v) |
template<typename T> | |
std::ifstream & | operator>> (std::ifstream &in, tmath::matrix< T, 3, 3 > &m) |
template<typename T> | |
std::ifstream & | operator>> (std::ifstream &in, tmath::quaternion< T > &q) |
template<typename T> | |
std::ifstream & | operator>> (std::ifstream &in, tmath::matrix< T, 4, 4 > &m) |
template<typename T> | |
const tmath::vectorn< T, 3 > | cross (const tmath::vectorn< T, 3 > &v1, const tmath::vectorn< T, 3 > &v2) |
Calculates the cross product of two vectorn<T,3>. | |
template<typename T> | |
void | cross (const tmath::vectorn< T, 3 > &v1, const tmath::vectorn< T, 3 > &v2, tmath::vectorn< T, 3 > &rv) |
Calculates the cross product of two vectorn<T,3>. | |
template<typename T> | |
quaternion< T > | conj (const quaternion< T > &q) |
conjugate the quaternion<T> | |
template<typename T> | |
quaternion< T > | inv (const quaternion< T > &q) |
invert the quaternion<T> | |
template<typename T> | |
void | identity (quaternion< T > &q) |
Make an identity quaternion<T>. | |
template<class T> | |
T | norm (const tmath::quaternion< T > &q) |
Calculates the norm of a quaternion. | |
template<class T> | |
T | len (const tmath::quaternion< T > &q) |
Calculates the length of a quaternion. | |
template<class T> | |
tmath::quaternion< T > & | normalize (tmath::quaternion< T > &q) |
Normalize the quaternion. | |
template<typename T> | |
const tmath::matrix< T, 4, 4 > & | conv (const tmath::quaternion< T > &q, tmath::matrix< T, 4, 4 > &m) |
Converts a quaternion into a matrix4x4<T>. | |
template<typename T> | |
T | norm (const vectorn< T, 2 > &v) |
Calculate the normal of a vector2. | |
template<typename T> | |
vectorn< T, 2 > & | normalize (vectorn< T, 2 > &v) |
Normalize a vector2. | |
template<typename T> | |
T | len (const vectorn< T, 2 > &v) |
Calculate the length of a vector2. | |
template<typename T> | |
void | conv (const vectorn< T, 3 > &v1, vectorn< T, 2 > &v2) |
Convert vectorn<T,3> to vector2. | |
template<typename T> | |
void | conv (const vectorn< T, 4 > &v1, vectorn< T, 2 > &v2) |
Convert vectorn to vector2. | |
template<typename T> | |
void | conv (const vectorn< T, 2 > &v1, vectorn< T, 3 > &v2) |
Convert vectorn to vector2. | |
template<typename T> | |
void | conv (const vectorn< T, 2 > &v1, vectorn< T, 4 > &v2) |
Convert vectorn to vector2. | |
template<typename T> | |
T | norm (const vectorn< T, 3 > &v) |
Calculate the normal of a vectorn<T,3>. | |
template<typename T> | |
vectorn< T, 3 > & | normalize (vectorn< T, 3 > &v) |
Normalize a vectorn<T,3>. | |
template<typename T> | |
T | len (const vectorn< T, 3 > &v) |
Calculate the length of a vectorn<T,3>. | |
template<typename T> | |
T | norm (const vectorn< T, 4 > &v) |
Calculate the normal of a vectorn. | |
template<typename T> | |
void | conv (const vectorn< T, 4 > &v1, vectorn< T, 3 > &v2) |
Convert vectorn to vectorn<T,3>. | |
template<typename T> | |
void | conv (const vectorn< T, 3 > &v1, vectorn< T, 4 > &v2) |
Convert vectorn<T,3> to vectorn. | |
template<typename T> | |
vectorn< T, 4 > & | normalize (vectorn< T, 4 > &v) |
Normalize a vectorn. | |
template<typename T> | |
T | len (const vectorn< T, 4 > &v) |
Calculate the length of a vectorn. | |
template<typename T, int NUM> | |
T | norm (const vectorn< T, NUM > &v) |
Calculate the normal of a vectorn. | |
template<typename T, int NUM> | |
const vectorn< T, NUM > | normalize (vectorn< T, NUM > &v) |
Normalize a vectorn. | |
template<typename T, int NUM> | |
T | len (const vectorn< T, NUM > &v) |
Calculate the length of a vectorn. | |
template<typename T> | |
T | det (const tmath::matrix< T, 3, 3 > &m) |
Calculate the determinant of a matrix. | |
template<typename T> | |
const tmath::matrix< T, 3, 3 > | inv (const tmath::matrix< T, 3, 3 > &m) |
template<typename T> | |
const tmath::matrix< T, 3, 3 > & | inv (const tmath::matrix< T, 3, 3 > &m, tmath::matrix< T, 3, 3 > &mdst) |
Calculate the inverse of a matrix. | |
template<typename T> | |
T | det (const tmath::matrix< T, 4, 4 > &m) |
Calculates the determinant of a matrix<T,4,4>. | |
template<typename T> | |
const tmath::matrix< T, 4, 4 > | inv (const tmath::matrix< T, 4, 4 > &m) |
Calculates the inverse of a matrix<T,4,4>. | |
template<typename T> | |
const tmath::matrix< T, 4, 4 > & | inv (const tmath::matrix< T, 4, 4 > &m, tmath::matrix< T, 4, 4 > &mdst) |
Calculates the inverse of a matrix4<t>. | |
template<typename T> | |
const tmath::matrix< T, 3, 3 > & | conv (const tmath::quaternion< T > &q, tmath::matrix< T, 3, 3 > &mres) |
Converts a quaternion into a matrix<T,3,3>. | |
template<typename T> | |
void | transp (const tmath::matrix< T, 2, 2 > &m, tmath::matrix< T, 2, 2 > &rm) |
Transpose the matrix<T,2,2>. | |
template<typename T> | |
const tmath::matrix< T, 2, 2 > | transp (const tmath::matrix< T, 2, 2 > &m) |
Transpose the matrix<T,2,2>. | |
template<typename T> | |
const tmath::matrix< T, 3, 3 > | transp (const tmath::matrix< T, 3, 3 > &m) |
Transpose the matrix<T,3,3>. | |
template<typename T> | |
void | transp (const tmath::matrix< T, 3, 3 > &m, tmath::matrix< T, 3, 3 > &rm) |
Transpose the matrix<T,3,3>. | |
template<typename T> | |
const tmath::matrix< T, 4, 4 > | transp (const tmath::matrix< T, 4, 4 > &m) |
Transpose the matrix<T,4,4>. | |
template<typename T> | |
void | transp (const tmath::matrix< T, 4, 4 > &m, tmath::matrix< T, 4, 4 > &rm) |
Transpose the matrix<T,4,4>. | |
template<typename T> | |
tmath::matrix< T, 2, 2 > & | null (tmath::matrix< T, 2, 2 > &mat) |
Make a null matrix<T,2,2>. | |
template<typename T> | |
tmath::matrix< T, 2, 2 > & | identity (tmath::matrix< T, 2, 2 > &mat) |
Make a identity matrix<T,2,2>. | |
template<typename T> | |
tmath::matrix< T, 3, 3 > & | null (tmath::matrix< T, 3, 3 > &mat) |
Make a null matrix<T,3,3>. | |
template<typename T> | |
tmath::matrix< T, 3, 3 > & | identity (tmath::matrix< T, 3, 3 > &mat) |
Make a identity matrix<T,3,3>. | |
template<typename T> | |
tmath::matrix< T, 4, 4 > & | null (tmath::matrix< T, 4, 4 > &mat) |
Make a null matrix<T,4,4>. | |
template<typename T> | |
tmath::matrix< T, 4, 4 > & | identity (tmath::matrix< T, 4, 4 > &mat) |
Make a identity matrix<T,4,4>. | |
template<typename T> | |
const tmath::matrix< T, 4, 4 > & | conv (const tmath::matrix< T, 3, 3 > &m1, tmath::matrix< T, 4, 4 > &m2) |
Convert a matrix3 into a matrix4. | |
template<typename T> | |
const tmath::matrix< T, 3, 3 > & | conv (const tmath::matrix< T, 4, 4 > &m1, tmath::matrix< T, 3, 3 > &m2) |
Convert a matrix3 into a matrix3. | |
template<typename T> | |
const tmath::matrix< T, 4, 4 > & | conv (const tmath::matrix< T, 2, 2 > &m1, tmath::matrix< T, 4, 4 > &m2) |
Convert a matrix2 into a matrix4. | |
template<typename T> | |
const tmath::matrix< T, 2, 2 > & | conv (const tmath::matrix< T, 4, 4 > &m1, tmath::matrix< T, 2, 2 > &m2) |
Convert a matrix4 into a matrix2. | |
template<typename T> | |
const tmath::matrix< T, 3, 3 > & | conv (const tmath::matrix< T, 2, 2 > &m1, tmath::matrix< T, 3, 3 > &m2) |
Convert a matrix2 into a matrix3. | |
template<typename T> | |
const tmath::matrix< T, 2, 2 > & | conv (const tmath::matrix< T, 3, 3 > &m1, tmath::matrix< T, 2, 2 > &m2) |
Convert a matrix3 into a matrix2. |
quaternion<T> conj | ( | const quaternion< T > & | q | ) | [inline] |
conjugate the quaternion<T>
const tmath::matrix<T,2,2>& conv | ( | const tmath::matrix< T, 3, 3 > & | m1, | |
tmath::matrix< T, 2, 2 > & | m2 | |||
) | [inline] |
Convert a matrix3 into a matrix2.
const tmath::matrix<T,3,3>& conv | ( | const tmath::matrix< T, 2, 2 > & | m1, | |
tmath::matrix< T, 3, 3 > & | m2 | |||
) | [inline] |
Convert a matrix2 into a matrix3.
const tmath::matrix<T,2,2>& conv | ( | const tmath::matrix< T, 4, 4 > & | m1, | |
tmath::matrix< T, 2, 2 > & | m2 | |||
) | [inline] |
Convert a matrix4 into a matrix2.
const tmath::matrix<T,4,4>& conv | ( | const tmath::matrix< T, 2, 2 > & | m1, | |
tmath::matrix< T, 4, 4 > & | m2 | |||
) | [inline] |
Convert a matrix2 into a matrix4.
const tmath::matrix<T,3,3>& conv | ( | const tmath::matrix< T, 4, 4 > & | m1, | |
tmath::matrix< T, 3, 3 > & | m2 | |||
) | [inline] |
Convert a matrix3 into a matrix3.
const tmath::matrix<T,4,4>& conv | ( | const tmath::matrix< T, 3, 3 > & | m1, | |
tmath::matrix< T, 4, 4 > & | m2 | |||
) | [inline] |
Convert a matrix3 into a matrix4.
const tmath::matrix<T,3,3>& conv | ( | const tmath::quaternion< T > & | q, | |
tmath::matrix< T, 3, 3 > & | mres | |||
) | [inline] |
Converts a quaternion into a matrix<T,3,3>.
Convert vectorn<T,3> to vectorn.
Convert vectorn to vectorn<T,3>.
Convert vectorn to vector2.
Convert vectorn to vector2.
Convert vectorn to vector2.
Convert vectorn<T,3> to vector2.
const tmath::matrix<T,4,4>& conv | ( | const tmath::quaternion< T > & | q, | |
tmath::matrix< T, 4, 4 > & | m | |||
) | [inline] |
Converts a quaternion into a matrix4x4<T>.
void cross | ( | const tmath::vectorn< T, 3 > & | v1, | |
const tmath::vectorn< T, 3 > & | v2, | |||
tmath::vectorn< T, 3 > & | rv | |||
) | [inline] |
Calculates the cross product of two vectorn<T,3>.
const tmath::vectorn<T,3> cross | ( | const tmath::vectorn< T, 3 > & | v1, | |
const tmath::vectorn< T, 3 > & | v2 | |||
) | [inline] |
Calculates the cross product of two vectorn<T,3>.
T det | ( | const tmath::matrix< T, 4, 4 > & | m | ) | [inline] |
Calculates the determinant of a matrix<T,4,4>.
T det | ( | const tmath::matrix< T, 3, 3 > & | m | ) | [inline] |
Calculate the determinant of a matrix.
tmath::matrix<T,4,4>& identity | ( | tmath::matrix< T, 4, 4 > & | mat | ) | [inline] |
Make a identity matrix<T,4,4>.
tmath::matrix<T,3,3>& identity | ( | tmath::matrix< T, 3, 3 > & | mat | ) | [inline] |
Make a identity matrix<T,3,3>.
tmath::matrix<T,2,2>& identity | ( | tmath::matrix< T, 2, 2 > & | mat | ) | [inline] |
Make a identity matrix<T,2,2>.
void identity | ( | quaternion< T > & | q | ) | [inline] |
Make an identity quaternion<T>.
const tmath::matrix<T,4,4>& inv | ( | const tmath::matrix< T, 4, 4 > & | m, | |
tmath::matrix< T, 4, 4 > & | mdst | |||
) | [inline] |
Calculates the inverse of a matrix4<t>.
const tmath::matrix<T,4,4> inv | ( | const tmath::matrix< T, 4, 4 > & | m | ) | [inline] |
Calculates the inverse of a matrix<T,4,4>.
const tmath::matrix<T,3,3>& inv | ( | const tmath::matrix< T, 3, 3 > & | m, | |
tmath::matrix< T, 3, 3 > & | mdst | |||
) | [inline] |
Calculate the inverse of a matrix.
const tmath::matrix<T,3,3> inv | ( | const tmath::matrix< T, 3, 3 > & | m | ) | [inline] |
quaternion<T> inv | ( | const quaternion< T > & | q | ) | [inline] |
invert the quaternion<T>
T len | ( | const vectorn< T, NUM > & | v | ) | [inline] |
Calculate the length of a vectorn.
T len | ( | const vectorn< T, 4 > & | v | ) | [inline] |
Calculate the length of a vectorn.
T len | ( | const vectorn< T, 3 > & | v | ) | [inline] |
Calculate the length of a vectorn<T,3>.
T len | ( | const vectorn< T, 2 > & | v | ) | [inline] |
Calculate the length of a vector2.
T len | ( | const tmath::quaternion< T > & | q | ) | [inline] |
Calculates the length of a quaternion.
T norm | ( | const vectorn< T, NUM > & | v | ) | [inline] |
Calculate the normal of a vectorn.
T norm | ( | const vectorn< T, 4 > & | v | ) | [inline] |
Calculate the normal of a vectorn.
T norm | ( | const vectorn< T, 3 > & | v | ) | [inline] |
Calculate the normal of a vectorn<T,3>.
T norm | ( | const vectorn< T, 2 > & | v | ) | [inline] |
Calculate the normal of a vector2.
T norm | ( | const tmath::quaternion< T > & | q | ) | [inline] |
Calculates the norm of a quaternion.
Normalize a vectorn.
Normalize a vectorn<T,3>.
tmath::quaternion<T>& normalize | ( | tmath::quaternion< T > & | q | ) | [inline] |
Normalize the quaternion.
tmath::matrix<T,4,4>& null | ( | tmath::matrix< T, 4, 4 > & | mat | ) | [inline] |
Make a null matrix<T,4,4>.
tmath::matrix<T,3,3>& null | ( | tmath::matrix< T, 3, 3 > & | mat | ) | [inline] |
Make a null matrix<T,3,3>.
tmath::matrix<T,2,2>& null | ( | tmath::matrix< T, 2, 2 > & | mat | ) | [inline] |
Make a null matrix<T,2,2>.
std::ifstream& operator>> | ( | std::ifstream & | in, | |
tmath::matrix< T, 4, 4 > & | m | |||
) | [inline] |
std::ifstream& operator>> | ( | std::ifstream & | in, | |
tmath::quaternion< T > & | q | |||
) | [inline] |
std::ifstream& operator>> | ( | std::ifstream & | in, | |
tmath::matrix< T, 3, 3 > & | m | |||
) | [inline] |
std::ifstream& operator>> | ( | std::ifstream & | in, | |
tmath::vectorn< T, 4 > & | v | |||
) | [inline] |
std::ifstream& operator>> | ( | std::ifstream & | in, | |
tmath::vectorn< T, 3 > & | v | |||
) | [inline] |
STARTNAMESPACE std::ifstream& operator>> | ( | std::ifstream & | in, | |
tmath::vectorn< T, 2 > & | v | |||
) | [inline] |
void transp | ( | const tmath::matrix< T, 4, 4 > & | m, | |
tmath::matrix< T, 4, 4 > & | rm | |||
) | [inline] |
Transpose the matrix<T,4,4>.
const tmath::matrix<T,4,4> transp | ( | const tmath::matrix< T, 4, 4 > & | m | ) | [inline] |
Transpose the matrix<T,4,4>.
void transp | ( | const tmath::matrix< T, 3, 3 > & | m, | |
tmath::matrix< T, 3, 3 > & | rm | |||
) | [inline] |
Transpose the matrix<T,3,3>.
const tmath::matrix<T,3,3> transp | ( | const tmath::matrix< T, 3, 3 > & | m | ) | [inline] |
Transpose the matrix<T,3,3>.
const tmath::matrix<T,2,2> transp | ( | const tmath::matrix< T, 2, 2 > & | m | ) | [inline] |
Transpose the matrix<T,2,2>.
void transp | ( | const tmath::matrix< T, 2, 2 > & | m, | |
tmath::matrix< T, 2, 2 > & | rm | |||
) | [inline] |
Transpose the matrix<T,2,2>.