-
Notifications
You must be signed in to change notification settings - Fork 2
/
tools.h
93 lines (76 loc) · 2.22 KB
/
tools.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* --------------------------------------------------------------------
EXTREME TUXRACER
Copyright (C) 1999-2001 Jasmin F. Patry (Tuxracer)
Copyright (C) 2010 Extreme Tuxracer Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
---------------------------------------------------------------------*/
#ifndef TOOLS_H
#define TOOLS_H
#include "bh.h"
#include "env.h"
class CCamera {
private:
GLfloat xview; // x-Position der Kamera
GLfloat yview; // Y-Position der Kamera
GLfloat zview; // z-Position der Kamera
GLfloat vhead; // heading - Rundumsicht
GLfloat vpitch; // pitch - Drehung nach oben/unten
void XMove (GLfloat step);
void YMove (GLfloat step);
void ZMove (GLfloat step);
void RotateHead (GLfloat step);
void RotatePitch (GLfloat step);
public:
CCamera ();
bool fore;
bool back;
bool left;
bool right;
bool up;
bool down;
bool headleft;
bool headright;
bool pitchup;
bool pitchdown;
void Update (float timestep);
};
// ---------------------------------------------------------------
// CGluCamera works with gluLookAt but is reduced to a simple
// go-around-camera that ist strictly focused on an object in
// identity position (0,0,0).
class CGluCamera {
private:
public:
CGluCamera ();
double distance;
double angle;
void Update (double timestep);
bool turnright;
bool turnleft;
bool nearer;
bool farther;
};
extern CGluCamera GluCamera;
// --------------------------------------------------------------------
void ToolsInit (void);
void SetToolLight ();
void QuitTool ();
void SetToolMode (int newmode);
bool ToolsFinalStage ();
void SetCharChanged (bool val);
void SetFrameChanged (bool val);
bool CharHasChanged ();
bool FrameHasChanged ();
void SaveToolCharacter ();
void SaveToolFrame ();
void ReloadToolCharacter ();
void DrawChanged ();
void RegisterToolFuncs ();
#endif