src/glux_engine/mat.h File Reference

Simple mathematical library to work with vectors and matrices. More...

#include "globals.h"

Go to the source code of this file.

Classes

class  TVector
 basic vector class (vertex, normal...) More...
class  TMatrix
 basic 4x4 Matrix class (row-major order OpenGL matrix) More...

Defines

#define PI   3.1415926535898f
 PI number, what to say more :).

Functions

TVector CrossProduct (const TVector &v1, const TVector &v2)
 Calculate cross product of two vectors.
float DotProduct (const TVector &v1, const TVector &v2)
 Calculate dot product of two vectors.
float VecAngle (TVector &v1, TVector &v2)
 Calculate angle of two vectors.

Detailed Description

Simple mathematical library to work with vectors and matrices.


Function Documentation

TVector CrossProduct ( const TVector v1,
const TVector v2 
)

Calculate cross product of two vectors.

Parameters:
v1 reference to first TVector
v2 reference to second TVector
Returns:
cross product as new TVector
float DotProduct ( const TVector v1,
const TVector v2 
)

Calculate dot product of two vectors.

Parameters:
v1 reference to first TVector
v2 reference to second TVector
Returns:
dot product as float number
float VecAngle ( TVector v1,
TVector v2 
)

Calculate angle of two vectors.

Parameters:
v1 reference to first TVector
v2 reference to second TVector
Returns:
vector angle in radians

Todo:
make possible to return angle also in degrees


Generated by  doxygen 1.6.2