1 |
/* |
2 |
** Author: Christian Reetz ([email protected]) |
3 |
*/ |
4 |
#ifndef __G3AFFINE_H |
5 |
#define __G3AFFINE_H |
6 |
|
7 |
|
8 |
|
9 |
#ifdef __cplusplus |
10 |
extern "C" { |
11 |
#endif |
12 |
|
13 |
#include "g3vector.h" |
14 |
|
15 |
#ifdef GL_CONVERSIONS |
16 |
#include "GL/gl.h" |
17 |
#endif |
18 |
|
19 |
|
20 |
typedef g3Float g3AVec[4]; |
21 |
typedef g3Float g3ATrans[4][4]; |
22 |
|
23 |
|
24 |
void g3av_copy(g3AVec res,g3AVec v); |
25 |
void g3at_tounit(g3ATrans t); |
26 |
void g3av_vectohom(g3AVec res,g3Vec v); |
27 |
void g3av_homtovec(g3Vec res,g3AVec h); |
28 |
int g3av_tonorm(g3AVec v); |
29 |
|
30 |
#ifdef GL_CONVERSIONS |
31 |
void g3at_get_openGL(g3ATrans t,GLdouble* glm); |
32 |
void g3at_from_openGL(g3ATrans t,GLdouble* glm); |
33 |
#endif |
34 |
|
35 |
|
36 |
void g3at_copy(g3ATrans t,g3ATrans tsrc); |
37 |
void g3at_print(g3ATrans t,FILE* outf); |
38 |
void g3at_comb(g3ATrans t,g3ATrans tf); |
39 |
void g3at_comb_to(g3ATrans res,g3ATrans t,g3ATrans tf); |
40 |
void g3at_translate(g3ATrans t,g3Vec tv); |
41 |
void g3at_add_trans(g3ATrans t,g3Vec tv); |
42 |
void g3at_prepend_trans(g3ATrans t,g3Vec tv); |
43 |
void g3at_rotate(g3ATrans t,g3Vec rnorm,g3Float ang); |
44 |
void g3at_add_rot(g3ATrans t,g3Vec rnorm,g3Float ang); |
45 |
void g3at_prepend_rot(g3ATrans t,g3Vec rnorm,g3Float ang); |
46 |
|
47 |
void g3at_btrans(g3ATrans t,g3Vec xv,g3Vec yv,g3Vec zv); |
48 |
int g3at_sph_ctrans(g3ATrans t,g3Vec vdir,g3Vec vup); |
49 |
int g3at_ctrans(g3ATrans t,g3Vec vdir,g3Vec vup); |
50 |
int g3at_inverse(g3ATrans t); |
51 |
void g3at_apply_h(g3ATrans t,g3AVec v); |
52 |
void g3at_iapply_h(g3Vec v,g3ATrans t); |
53 |
void g3at_apply(g3ATrans t,g3Vec v); |
54 |
void g3at_iapply(g3Vec v,g3ATrans t); |
55 |
|
56 |
#ifdef __cplusplus |
57 |
} |
58 |
#endif |
59 |
|
60 |
|
61 |
#endif |