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