istereo
view libs/vmath/vmath_types.h @ 37:e60f9d8af28d
fixed the orientation of the tunnel when in non-stereo mode
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Fri, 09 Sep 2011 23:37:38 +0300 |
parents | |
children | ff055bff6a15 |
line source
1 #ifndef VMATH_TYPES_H_
2 #define VMATH_TYPES_H_
4 #include "vmath_config.h"
6 #define SMALL_NUMBER 1.e-4
7 #define XSMALL_NUMBER 1.e-8
8 #define ERROR_MARGIN 1.e-6
11 #ifdef SINGLE_PRECISION_MATH
12 typedef float scalar_t;
13 #else
14 typedef double scalar_t;
15 #endif /* floating point precision */
17 /* vectors */
18 typedef struct { scalar_t x, y; } vec2_t;
19 typedef struct { scalar_t x, y, z; } vec3_t;
20 typedef struct { scalar_t x, y, z, w; } vec4_t;
22 /* quaternions */
23 typedef vec4_t quat_t;
25 /* matrices */
26 typedef scalar_t mat3_t[3][3];
27 typedef scalar_t mat4_t[4][4];
30 #ifdef __cplusplus
31 class Vector2;
32 class Vector3;
33 class Vector4;
34 class Quaternion;
35 class Matrix3x3;
36 class Matrix4x4;
37 class SphVector;
38 #endif /* __cplusplus */
40 #endif /* VMATH_TYPES_H_ */