Gl Graph
Gl Graph Source of drawabledata.h
#ifndef DrawableData_H
#define DrawableData_H
#include "math.h"
#include "Vec3f.h"
#include "glcamera.h"
#include "glversion.h"
class GlScene;
class DrawableData {
private:
bool changed;
bool debug;
protected:
GlScene * glScene;
GlCamera * glCamera;
GlVersion * glVersion;
float color[3];
public:
DrawableData();
virtual ~DrawableData();
void init(GlScene * glScene) ;
void setDebug(bool debug) {
this->debug=debug;
};
virtual void draw() = 0;
virtual void init() = 0;
virtual float getMinX() = 0;
virtual float getMaxX() = 0;
virtual float getMinY() = 0;
virtual float getMaxY() = 0;
virtual void onClick(Vec3f &point,Vec3f &xvect,Vec3f &yvect,Vec3f &zvect);
virtual void onButtonUp() {};
virtual void onButtonDown() {};
virtual void onButtonRight() {};
virtual void onButtonLeft() {};
virtual int getElementNb() const {
return 0;
};
virtual float getMinZ() {
return 0;
};
virtual float getMaxZ() {
return 0;
};
void setColor(float c1,float c2,float c3);
void setColor( int c1,int c2,int c3);
float getMaxSize();
Vec3f getCenter();
bool isChanged() {
return changed;
};
void setChanged() {
changed = true;
};
void consummeChanged() {
changed = false;
};
virtual void waitUntilLoad() {
};
virtual void stop() {};
void printGlError(const char *msg);
};
#endif