istereo

view libs/vmath/basis.h @ 35:23e5d274b2a2

added options panel, also added the xib files to the repository as they're needed
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 09 Sep 2011 10:03:42 +0300
parents
children ff055bff6a15
line source
1 #ifndef VMATH_BASIS_H_
2 #define VMATH_BASIS_H_
4 #include "vector.h"
5 #include "matrix.h"
7 enum {
8 LEFT_HANDED,
9 RIGHT_HANDED
10 };
12 #ifdef __cplusplus
13 extern "C" {
14 #endif /* __cplusplus */
16 void basis_matrix(mat4_t res, vec3_t i, vec3_t j, vec3_t k);
17 void basis_matrix_dir(mat4_t res, vec3_t dir);
19 #ifdef __cplusplus
20 } /* extern "C" */
22 class Basis {
23 public:
24 Vector3 i, j, k;
26 Basis();
27 Basis(const Vector3 &i, const Vector3 &j, const Vector3 &k);
28 Basis(const Vector3 &dir, bool left_handed = true);
30 void rotate(scalar_t x, scalar_t y, scalar_t z);
31 void rotate(const Vector3 &axis, scalar_t angle);
32 void rotate(const Matrix4x4 &mat);
33 void rotate(const Quaternion &quat);
35 Matrix3x3 create_rotation_matrix() const;
36 };
37 #endif /* __cplusplus */
39 #endif /* VMATH_BASIS_H_ */