vmath vmath-0.13

Classes | Macros | Typedefs | Functions | Variables
vmath.h File Reference
`#include <cmath>`
`#include <cstring>`
`#include <iostream>`
`#include <sstream>`
`#include <string>`
`#include <cassert>`
Include dependency graph for vmath.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | Vector2< T >
| Class for two dimensional vector. More...
class | Vector3< T >
| Class for three dimensional vector. More...
class | Vector4< T >
| Class for four dimensional vector. More...
class | Matrix3< T >
| Class for matrix 3x3. More...
class | Matrix4< T >
| Class for matrix 4x4. More...
class | Quaternion< T >
| Quaternion class implementing some quaternion algebra operations. More...
class | Aabb3< T >
| Axes-aligned bounding-box (aka AABB) class. More...

## Macros
#define | M_PI 3.14159265358979323846 /* pi */
#define | DEG2RAD(x) ((x * M_PI) / 180.0)
#define | EPSILON epsilon
#define | VEC2 Vector2
#define | VEC3 Vector3
#define | VEC4 Vector4

## Typedefs
typedef class Vector2< float > | Vector2f
| Two dimensional Vector of floats. More...
typedef class Vector2< double > | Vector2d
| Two dimensional Vector of doubles. More...
typedef class Vector2< int > | Vector2i
| Two dimensional Vector of ints. More...
typedef Vector3< float > | Vector3f
| Three dimensional Vector of floats. More...
typedef Vector3< double > | Vector3d
| Three dimensional Vector of doubles. More...
typedef Vector3< int > | Vector3i
| Three dimensional Vector of ints. More...
typedef Vector4< float > | Vector4f
| Three dimensional Vector of floats. More...
typedef Vector4< double > | Vector4d
| Three dimensional Vector of doubles. More...
typedef Vector4< int > | Vector4i
| Three dimensional Vector of ints. More...
typedef Matrix3< float > | Matrix3f
| Matrix 3x3 of floats. More...
typedef Matrix3< double > | Matrix3d
| Matrix 3x3 of doubles. More...
typedef Matrix3< int > | Matrix3i
| Matrix 3x3 of int. More...
typedef Matrix4< float > | Matrix4f
| Matrix 4x4 of floats. More...
typedef Matrix4< double > | Matrix4d
| Matrix 4x4 of doubles. More...
typedef Matrix4< int > | Matrix4i
| Matrix 4x4 of int. More...
typedef Quaternion< float > | Quatf
typedef Quaternion< double > | Quatd
typedef Aabb3< float > | Aabb3f
typedef Aabb3< double > | Aabb3d

## Functions
template<typename T >
VEC2< T > | std::min (const VEC2< T > &a, const VEC2< T > &b)
| Gets vector containing minimal values of a and b coordinates. More...
template<typename T >
VEC3< T > | std::min (const VEC3< T > &a, const VEC3< T > &b)
| Gets vector containing minimal values of a and b coordinates. More...
template<typename T >
VEC4< T > | std::min (const VEC4< T > &a, const VEC4< T > &b)
| Gets vector containing minimal values of a and b coordinates. More...
template<typename T >
VEC2< T > | std::max (const VEC2< T > &a, const VEC2< T > &b)
| Gets vector containing maximal values of a and b coordinates. More...
template<typename T >
VEC3< T > | std::max (const VEC3< T > &a, const VEC3< T > &b)
| Gets vector containing maximal values of a and b coordinates. More...
template<typename T >
VEC4< T > | std::max (const VEC4< T > &a, const VEC4< T > &b)
| Gets vector containing maximal values of a and b coordinates. More...

## Variables
const double | epsilon = 4.37114e-05

## Macro Definition Documentation

## ◆ DEG2RAD

#define DEG2RAD | ( |  | x | ) | ((x * M_PI) / 180.0)

## ◆ EPSILON

#define EPSILON epsilon

## ◆ M_PI

#define M_PI 3.14159265358979323846 /* pi */

## ◆ VEC2

#define VEC2 Vector2

## ◆ VEC3

#define VEC3 Vector3

## ◆ VEC4

#define VEC4 Vector4

## Typedef Documentation

## ◆ Aabb3d

typedef Aabb3<double> Aabb3d

## ◆ Aabb3f

typedef Aabb3<float> Aabb3f

## ◆ Matrix3d

typedef Matrix3<double> Matrix3d

Matrix 3x3 of doubles.

## ◆ Matrix3f

typedef Matrix3<float> Matrix3f

Matrix 3x3 of floats.

## ◆ Matrix3i

typedef Matrix3<int> Matrix3i

Matrix 3x3 of int.

## ◆ Matrix4d

typedef Matrix4<double> Matrix4d

Matrix 4x4 of doubles.

## ◆ Matrix4f

typedef Matrix4<float> Matrix4f

Matrix 4x4 of floats.

## ◆ Matrix4i

typedef Matrix4<int> Matrix4i

Matrix 4x4 of int.

## ◆ Quatd

typedef Quaternion<double> Quatd

## ◆ Quatf

typedef Quaternion<float> Quatf

## ◆ Vector2d

typedef class Vector2< double > Vector2d

Two dimensional Vector of doubles.

## ◆ Vector2f

typedef class Vector2< float > Vector2f

Two dimensional Vector of floats.

## ◆ Vector2i

typedef class Vector2< int > Vector2i

Two dimensional Vector of ints.

## ◆ Vector3d

typedef Vector3<double> Vector3d

Three dimensional Vector of doubles.

## ◆ Vector3f

typedef Vector3<float> Vector3f

Three dimensional Vector of floats.

## ◆ Vector3i

typedef Vector3<int> Vector3i

Three dimensional Vector of ints.

## ◆ Vector4d

typedef Vector4<double> Vector4d

Three dimensional Vector of doubles.

## ◆ Vector4f

typedef Vector4<float> Vector4f

Three dimensional Vector of floats.

## ◆ Vector4i

typedef Vector4<int> Vector4i

Three dimensional Vector of ints.

## Function Documentation

## ◆ max() [1/3]

template<typename T >

VEC2<T> std::max | ( | const VEC2< T > & | a,
|  | const VEC2< T > & | b
| ) |  |

Gets vector containing maximal values of a and b coordinates.

Returns
  Vector of maximal coordinates.

## ◆ max() [2/3]

template<typename T >

VEC3<T> std::max | ( | const VEC3< T > & | a,
|  | const VEC3< T > & | b
| ) |  |

Gets vector containing maximal values of a and b coordinates.

Returns
  Vector of maximal coordinates.

## ◆ max() [3/3]

template<typename T >

VEC4<T> std::max | ( | const VEC4< T > & | a,
|  | const VEC4< T > & | b
| ) |  |

Gets vector containing maximal values of a and b coordinates.

Returns
  Vector of maximal coordinates.

## ◆ min() [1/3]

template<typename T >

VEC2<T> std::min | ( | const VEC2< T > & | a,
|  | const VEC2< T > & | b
| ) |  |

Gets vector containing minimal values of a and b coordinates.

Returns
  Vector of minimal coordinates.

## ◆ min() [2/3]

template<typename T >

VEC3<T> std::min | ( | const VEC3< T > & | a,
|  | const VEC3< T > & | b
| ) |  |

Gets vector containing minimal values of a and b coordinates.

Returns
  Vector of minimal coordinates.

## ◆ min() [3/3]

template<typename T >

VEC4<T> std::min | ( | const VEC4< T > & | a,
|  | const VEC4< T > & | b
| ) |  |

Gets vector containing minimal values of a and b coordinates.

Returns
  Vector of minimal coordinates.

## Variable Documentation

## ◆ epsilon

const double epsilon = 4.37114e-05