1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef _GLFRAME_H_
#define _GLFRAME_H_
#include "math3d.h"
/* x axis gets calculated by taking cross product of y and z */
typedef struct
{
M3DVector3f v_location; /* location */
M3DVector3f v_forward; /* z axis, where am I heading */
M3DVector3f v_up; /* y axis, which way is up */
} GLFrame;
/* function prototypes */
void glframe_reset(GLFrame *);
extern void glframe_get_camera_orientation(GLFrame *, M3DMatrix44f);
extern void glframe_apply_camera_transform(GLFrame *, const int);
extern void glframe_move_forward(GLFrame *, const float);
extern void glframe_move_up(GLFrame *, const float);
extern void glframe_move_right(GLFrame *, const float);
extern void glframe_translate_world(GLFrame *, const float, const float, const float);
extern void glframe_translate_local(GLFrame *, const float, const float, const float);
void glframe_rotate_local_y(GLFrame *, const float);
void glframe_rotate_local_x(GLFrame *, const float);
void glframe_rotate_local_z(GLFrame *, const float);
void gl_frame_normalize(GLFrame *);
void glframe_get_matrix(GLFrame *, M3DMatrix44f, const int);
void gl_frame_apply_actor_transform(GLFrame *);
void glframe_rotate_world(GLFrame *, const float, const float, const float, const float);
void glframe_rotate_local(GLFrame *, const float, const float, const float, const float);
void glframe_local_to_world(GLFrame *, const M3DVector3f, M3DVector3f);
void glframe_world_to_local(GLFrame *, const M3DVector3f, M3DVector3f);
void glframe_transform_point(GLFrame *, const M3DVector3f, M3DVector3f);
void glframe_rotate_vector(GLFrame *, M3DVector3f, M3DVector3f);
#endif
|