Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Maths Namespace Reference


Compounds

class  Teddy::Maths::Matrix
 4x4 Matrix. More...

class  Teddy::Maths::Plane
 Plane. More...

class  Teddy::Maths::Quaternion
class  Teddy::Maths::TCrossVector4
class  Teddy::Maths::TRect
class  Teddy::Maths::TVector
 Template Class TVector. More...

class  Teddy::Maths::TVector2
 Template Class TVector2. More...

class  Teddy::Maths::TVector4
 Template Class: TVector4. More...

class  Teddy::Maths::Vector4

Functions

Quaternion slerp (const Quaternion &q1, const Quaternion &q2, const double t)
 Spherical linear interpolation between two quaternions. More...

template<class T> TVector< T > normalVector (const TVector< T > &v1, const TVector< T > &v2)
template<class T> TVector< T > normalVector (const TVector< T > &p1, const TVector< T > &p2, const TVector< T > &p3)
template<class T> TVector< T > directionVector (const TVector< T > &p1, const TVector< T > &p2)
template<class T> TVector2< T > directionVector (const TVector2< T > &p1, const TVector2< T > &p2)

Variables

const float a_identity_matrix []
const float a_swap_xy_matrix []
const float a_swap_xz_matrix []
const float a_swap_yz_matrix []
const float a_mirror_x_matrix []
const float a_mirror_y_matrix []
const float a_mirror_z_matrix []
const float *const mat_i = &a_identity_matrix[0]
const float *const mat_sxy = &a_swap_xy_matrix [0]
const float *const mat_sxz = &a_swap_xz_matrix [0]
const float *const mat_syz = &a_swap_yz_matrix [0]
const float *const mat_mx = &a_mirror_x_matrix[0]
const float *const mat_my = &a_mirror_y_matrix[0]
const float *const mat_mz = &a_mirror_z_matrix[0]


Detailed Description

The Maths namespace contains mathematical tools useful in three dimensional work. Included are Vector, four-vector (Vector4) and Matrix. OpenGL Matrix interface is way too limited for serious Matrix operations, so I have replaced all modelview and projection Matrix manipulations.

There is not much to say about the methods in the classes - either you are familiar with them or not. Understading some linear algebra helps a great deal.


Function Documentation

template<class T>
TVector2<T> directionVector const TVector2< T > &    p1,
const TVector2< T > &    p2
[inline]
 

Definition at line 162 of file Vector2.h.

template<class T>
TVector<T> directionVector const TVector< T > &    p1,
const TVector< T > &    p2
[inline]
 

Definition at line 200 of file Vector.h.

template<class T>
TVector<T> normalVector const TVector< T > &    p1,
const TVector< T > &    p2,
const TVector< T > &    p3
[inline]
 

Definition at line 195 of file Vector.h.

template<class T>
TVector<T> normalVector const TVector< T > &    v1,
const TVector< T > &    v2
[inline]
 

Definition at line 188 of file Vector.h.

Quaternion Teddy::Maths::slerp const Quaternion   q1,
const Quaternion   q2,
const double    t
 

Spherical linear interpolation between two quaternions.

Definition at line 282 of file Quaternion.cpp.


Variable Documentation

const float Teddy::Maths::a_identity_matrix[] [static]
 

Initial value:

 {
    1,0,0,0, 
    0,1,0,0,
    0,0,1,0,
    0,0,0,1
}

Definition at line 39 of file Matrix.cpp.

const float Teddy::Maths::a_mirror_x_matrix[] [static]
 

Initial value:

 {
   -1, 0, 0, 0, 
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
}

Definition at line 63 of file Matrix.cpp.

const float Teddy::Maths::a_mirror_y_matrix[] [static]
 

Initial value:

 {
    1, 0, 0, 0, 
    0,-1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
}

Definition at line 69 of file Matrix.cpp.

const float Teddy::Maths::a_mirror_z_matrix[] [static]
 

Initial value:

 {
    1, 0, 0, 0, 
    0, 1, 0, 0,
    0, 0,-1, 0,
    0, 0, 0, 1
}

Definition at line 75 of file Matrix.cpp.

const float Teddy::Maths::a_swap_xy_matrix[] [static]
 

Initial value:

 {
    0,1,0,0, 
    1,0,0,0,
    0,0,1,0,
    0,0,0,1
}

Definition at line 45 of file Matrix.cpp.

const float Teddy::Maths::a_swap_xz_matrix[] [static]
 

Initial value:

 {
    0,0,1,0, 
    0,1,0,0,
    1,0,0,0,
    0,0,0,1
}

Definition at line 51 of file Matrix.cpp.

const float Teddy::Maths::a_swap_yz_matrix[] [static]
 

Initial value:

 {
    1,0,0,0, 
    0,0,1,0,
    0,1,0,0,
    0,0,0,1
}

Definition at line 57 of file Matrix.cpp.

const float* const Teddy::Maths::mat_i = &a_identity_matrix[0] [static]
 

Definition at line 81 of file Matrix.cpp.

const float* const Teddy::Maths::mat_mx = &a_mirror_x_matrix[0] [static]
 

Definition at line 85 of file Matrix.cpp.

const float* const Teddy::Maths::mat_my = &a_mirror_y_matrix[0] [static]
 

Definition at line 86 of file Matrix.cpp.

const float* const Teddy::Maths::mat_mz = &a_mirror_z_matrix[0] [static]
 

Definition at line 87 of file Matrix.cpp.

const float* const Teddy::Maths::mat_sxy = &a_swap_xy_matrix [0] [static]
 

Definition at line 82 of file Matrix.cpp.

const float* const Teddy::Maths::mat_sxz = &a_swap_xz_matrix [0] [static]
 

Definition at line 83 of file Matrix.cpp.

const float* const Teddy::Maths::mat_syz = &a_swap_yz_matrix [0] [static]
 

Definition at line 84 of file Matrix.cpp.