Gl Graph
Gl Graph Source of glscene.h
#ifndef GL_SCENE_H #define GL_SCENE_H #include <GL/gl.h> class DrawableSet; // forward declaration class GlCamera; // forward declaration class GlAxes; // forward declaration class GlVersion; // forward declaration class GlCanvas; // forward declaration class GlSceneStat; // forward declaration class MouseKeybordState; // forward declaration class GlScene { private: DrawableSet * set; GlCamera * camera; GlAxes * axes; GlVersion * version; GlCanvas * canvas; GlSceneStat * stat; bool isInitDone; bool isKeepProportionXY; bool isRedrawNeeded; bool isTextInfo; bool isDepthBufferEnable; unsigned int width; unsigned int height; GLenum polygonMode; CameraView view; public: GlScene(unsigned int width,unsigned int height); ~GlScene(); void init(DrawableSet * set); // Manage redraw void setReDraw(); void unsetReDraw(); bool isReDraw(); // Manage Keep proportion (ratio) void setKeepProportionXY(bool keepProportionXY); bool getKeepProportionXY(); void swapKeepProportionXY(); // Manage text info void setTextInfo(bool textInfo); bool getTextInfo(); void swapTextInfo(); // Manage depth buffer void setDepthBuffer(bool isDepthBufferEnable); bool getDepthBuffer(); void swapDepthBuffer(); // Manage Set change bool isSetChange(); //Manage pologone swapPolygonMode void swapPolygonMode(); void setPolygonMode(GLenum mode); GLenum getPolygonMode(); // Manage view const char* getViewName(); void swapView(); void setFreeView(); //Manage Event void onResize(unsigned int width,unsigned int height); //Manage Draw operation void reset(); void drawAll(MouseKeybordState* state); void draw(); void drawSelectionSquare(MouseKeybordState* state); void drawText(int xButtonMotion,int yButtonMotion); void drawText(); void drawTextOpengl(); void drawTextMinMax(); void drawTextZoom(); void drawTextCameraPosition(); void drawTextMousePosition(int xButtonMotion,int yButtonMotion); void drawTextPolygonMode(); void drawTextViewName(); void drawTextFps(); void drawTextNbElement(); void drawTextDepthBuffer(); // Manage access DrawableSet *getDrawableSet() { return set; }; GlCamera *getCamera() { return camera; }; GlAxes *getAxes() { return axes; }; GlCanvas *getCanvas() { return canvas; }; GlVersion *getVersion() { return version; }; //Manage opengl basic operation void clearBuffer(); void loadIdentity(); void updateView(); void updateDepthBuffer(); void setOpenglPojectionMatrix(); void setOpenglModelViewMatrix(); void pushMatrix(); void popMatrix(); float getXPixelSize(); float getYPixelSize(); }; #endif