-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cmb3D.h
80 lines (56 loc) · 1.49 KB
/
Cmb3D.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
#ifndef CMB3D_H_
#define CMB3D_H_
#include "Cmb.h"
#include "SDL.h"
#include <GL/gl.h>
class Cmb3D
{
public:
Cmb3D();
virtual ~Cmb3D();
void setcmb(Cmb* pcmb);
void start();
private:
// distance of scene to the camera
float distance;
// rotation of the scene
float blorot[3];
// Cartesian offset of the scene
float ofs[3];
// Directions in which to show multible copies of the CMB.
// Last direction is usually the most interesting.
int show[3];
// Show aitoff projection?
int mFlat;
// the complete cmb
Cmb * cmb;
/* This is our SDL surface */
SDL_Surface *surface;
/* Flags to pass to SDL_SetVideoMode */
int videoFlags;
/* main loop variable */
int done;
/* used to collect events */
SDL_Event event;
/* this holds some info about our display */
const SDL_VideoInfo *videoInfo;
/* whether or not the window is active */
int isActive;
// Handle keyboard events
void handleKeyPress(SDL_keysym *keysym);
// Draw the CMB as spheres
void drawCMB(Cmb * pcmb);
// Draw Aitoff projection of CMB
void drawCMBFlat(Cmb * pcmb);
// Draw the scene
int drawGLScene();
// Resize hook
int resizeWindow(int width, int height);
// Start hook
int initGL();
// Quit hook
void Quit(int returnCode);
// Private copy constructor
Cmb3D(const Cmb3D&);
};
#endif /*CMB3D_H_*/