glSpline/src/scene.h
2018-10-09 23:29:30 +02:00

40 lines
753 B
C++

#ifndef SCENE_H
#define SCENE_H
#include <vector>
#include "opengl_stuff.h"
#include "mainwindow.h"
/** Simple classe for managing an OpenGL scene
*/
class Scene {
public:
explicit Scene(int width, int height, MainWindow* w);
virtual ~Scene();
virtual void resize(int width, int height);
virtual void draw();
virtual void mouseclick(int button, float xpos, float ypos);
virtual void mousemove(float xpos, float ypos);
virtual void keyboardmove(int key, double time);
virtual bool keyboard(unsigned char k);
void toggledrawmode();
protected:
// Width and heigth of the viewport
int _width;
int _height;
MainWindow* _w;
private:
// Rendering mode
int _drawfill;
};
#endif // SCENE_H