00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VIEWPORT_CONTROLLER_H
00018 #define VIEWPORT_CONTROLLER_H
00019
00020 #define VIEWPORT_CONTROLLER_DEBUG false
00021
00022 #include "options.h"
00023 #include <vector>
00024 #include <cmath>
00025 #include "Viewport.h"
00026
00028
00031 class ViewportController {
00032 std::vector <Viewport> viewportList;
00033 Viewport * currentViewport;
00034 int width;
00035 int height;
00036 std::string filename;
00037 Viewport * remove(Viewport * v);
00038 Viewport * getViewport(int viewportID);
00039 void fixViewportIDs(int viewportID);
00040
00041 public:
00042 ViewportController(int maxNumViewports, int w, int h);
00043 ~ViewportController();
00044
00045 void renderScene();
00046 int numViewports();
00047 Scene * getScene(int viewportID);
00048 bool selectCurrentViewport(int x, int y);
00049 bool deleteViewport();
00050 bool createViewport(std::string file = "NONE_SPECIFIED");
00051 bool resizeScene(int Width, int Height);
00052
00053 std::string getFilename();
00054 int getWidth();
00055 int getHeight();
00056
00057 bool save();
00058 bool save(std::string file);
00059 bool decimateEvent(GLfloat f, GLint TYPE);
00060
00061 void reportStatistics();
00062 void resetViewport();
00063 void makeSmooth();
00064 void makeFlat();
00065 void switchViewPoints();
00066 void switchViewEdges();
00067 void switchViewTriangles();
00068 void switchLighting();
00069 void switchNormals();
00070 void switchVertNormals();
00071
00072 void setCameraControl(int control);
00073
00074 void decreaseX_Off();
00075 void increaseX_Off();
00076 void decreaseY_Off();
00077 void increaseY_Off();
00078 void decreaseZ_Off();
00079 void increaseZ_Off();
00080
00081 void mouseX_Rot(float f);
00082 void mouseY_Rot(float f);
00083 void mouseZ_Rot(float f);
00084
00085 void decreaseX_Rot();
00086 void increaseX_Rot();
00087 void decreaseY_Rot();
00088 void increaseY_Rot();
00089 void decreaseZ_Rot();
00090 void increaseZ_Rot();
00091 };
00092
00093 #endif
00094