OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vector_math.h File Reference
#include <string.h>
#include <math.h>

Go to the source code of this file.

Classes

struct  vec2
 
struct  vec3
 
struct  vec4
 
struct  mat4
 

Macros

#define PI   3.141592653f
 

Functions

template<typename T >
operator- (const T &a)
 
template<typename T >
operator* (const T &a, const T &b)
 
template<typename T >
operator/ (const T &a, const T &b)
 
template<typename T >
operator+ (const T &a, const T &b)
 
template<typename T >
operator- (const T &a, const T &b)
 
template<typename T >
T & operator*= (T &a, const T &b)
 
template<typename T >
T & operator/= (T &a, const T &b)
 
template<typename T >
T & operator+= (T &a, const T &b)
 
template<typename T >
T & operator-= (T &a, const T &b)
 
mat4 operator* (const mat4 &a, const mat4 &b)
 
vec4 operator* (const mat4 &mat, const vec4 &vec)
 
mat4operator*= (mat4 &mat, float v)
 
vec3 vec_cross (const vec3 &a, const vec3 &b)
 
template<typename T >
float vec_dot (const T &a, const T &b)
 
template<typename T >
float vec_length (const T &vec)
 
template<typename T >
vec_normalize (const T &vec)
 
template<typename T >
vec_floor (const T &vec)
 
template<typename T >
vec_fract (const T &vec)
 
vec3 vec_project (const vec4 &vec)
 
mat4 mat_look_at (const vec3 &eye, const vec3 &center, const vec3 &up)
 
mat4 mat_perspective_fov (float fovy, float aspect, float zn, float zf)
 
mat4 mat_inverse (const mat4 &a)
 

Macro Definition Documentation

#define PI   3.141592653f

Definition at line 28 of file vector_math.h.

Function Documentation

mat4 mat_inverse ( const mat4 a)
inline

Definition at line 298 of file vector_math.h.

mat4 mat_look_at ( const vec3 eye,
const vec3 center,
const vec3 up 
)
inline

Definition at line 274 of file vector_math.h.

mat4 mat_perspective_fov ( float  fovy,
float  aspect,
float  zn,
float  zf 
)
inline

Definition at line 287 of file vector_math.h.

template<typename T >
T operator* ( const T &  a,
const T &  b 
)
inline

Definition at line 126 of file vector_math.h.

mat4 operator* ( const mat4 a,
const mat4 b 
)
inline

Definition at line 193 of file vector_math.h.

vec4 operator* ( const mat4 mat,
const vec4 vec 
)
inline

Definition at line 210 of file vector_math.h.

template<typename T >
T& operator*= ( T &  a,
const T &  b 
)
inline

Definition at line 162 of file vector_math.h.

mat4& operator*= ( mat4 mat,
float  v 
)
inline

Definition at line 218 of file vector_math.h.

template<typename T >
T operator+ ( const T &  a,
const T &  b 
)
inline

Definition at line 144 of file vector_math.h.

template<typename T >
T& operator+= ( T &  a,
const T &  b 
)
inline

Definition at line 178 of file vector_math.h.

template<typename T >
T operator- ( const T &  a)
inline

Definition at line 117 of file vector_math.h.

template<typename T >
T operator- ( const T &  a,
const T &  b 
)
inline

Definition at line 153 of file vector_math.h.

template<typename T >
T& operator-= ( T &  a,
const T &  b 
)
inline

Definition at line 186 of file vector_math.h.

template<typename T >
T operator/ ( const T &  a,
const T &  b 
)
inline

Definition at line 135 of file vector_math.h.

template<typename T >
T& operator/= ( T &  a,
const T &  b 
)
inline

Definition at line 170 of file vector_math.h.

vec3 vec_cross ( const vec3 a,
const vec3 b 
)
inline

Definition at line 225 of file vector_math.h.

template<typename T >
float vec_dot ( const T &  a,
const T &  b 
)
inline

Definition at line 234 of file vector_math.h.

template<typename T >
T vec_floor ( const T &  vec)
inline

Definition at line 255 of file vector_math.h.

template<typename T >
T vec_fract ( const T &  vec)
inline

Definition at line 264 of file vector_math.h.

template<typename T >
float vec_length ( const T &  vec)
inline

Definition at line 243 of file vector_math.h.

template<typename T >
T vec_normalize ( const T &  vec)
inline

Definition at line 249 of file vector_math.h.

vec3 vec_project ( const vec4 vec)
inline

Definition at line 269 of file vector_math.h.