-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodelerview.h
44 lines (32 loc) · 984 Bytes
/
modelerview.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
// modelerview.h
// This is the base class for all your models. It contains
// a camera control for your use. The draw() function will
// set up default lighting and apply the projection, so if you
// inherit, you will probably want to call ModelerView::draw()
// to set up the camera.
#ifndef MODELERVIEW_H
#define MODELERVIEW_H
#include <FL/Fl_Gl_Window.H>
class Camera;
class ModelerView;
typedef ModelerView* (*ModelerViewCreator_f)(int x, int y, int w, int h, char *label);
typedef enum { CTRL_MODE, CURVE_MODE } cam_mode_t;
class ModelerView : public Fl_Gl_Window
{
public:
ModelerView(int x, int y, int w, int h, char *label=0);
virtual ~ModelerView();
virtual int handle(int event);
virtual void draw();
void setBMP(const char *fname);
void saveBMP(const char* szFileName);
void endDraw();
void camera(cam_mode_t mode);
Camera *m_camera;
Camera *m_ctrl_camera;
Camera *m_curve_camera;
float t;
void update();
bool save_bmp;
};
#endif