-
Notifications
You must be signed in to change notification settings - Fork 0
/
modelerview.h
46 lines (33 loc) · 1.03 KB
/
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
45
46
// 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 "GL/glew.h"
#include <FL/Fl_Gl_Window.H>
#include "model.h"
#include "modelerui.h"
class Camera;
class ModelerView;
typedef ModelerView* (*ModelerViewCreator_f)(int x, int y, int w, int h, char *label);
class ModelerView : public Fl_Gl_Window
{
protected:
/** True if GLEW couldn't be loaded. This prevents any drawing. */
bool failed;
/** True if model resources should be reloaded. */
bool reloadResources;
public:
ModelerView(int x, int y, int w, int h, char *label=0);
virtual ~ModelerView();
virtual int handle(int event);
void draw();
void setModel(Model* model);
Camera* m_camera;
Model* model;
void retry();
};
#endif