00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00037 #ifndef MANIPWORLD_H
00038 #define MANIPWORLD_H
00039
00040
00041 #ifdef __APPLE__
00042 #include <OpenGL/gl.h>
00043 #else
00044 #include <GL/gl.h>
00045 #endif
00046
00047
00048 namespace Tools
00049 {
00098 class ManipWorld
00099 {
00100 public:
00101 ManipWorld();
00102 ~ManipWorld();
00103
00105 void init();
00106
00110 void translateAxis(float dx, float dy, float dz);
00111
00114 void translate(float dx, float dy, float dz);
00115
00117 void zoom(float zoom);
00118
00120 void rotateXAxis(float delta);
00121
00123 void rotateYAxis(float delta);
00124
00126 void rotateZAxis(float delta);
00127
00129 void rotateX(float delta);
00130
00132 void rotateY(float delta);
00133
00135 void rotateZ(float delta);
00136
00139 void loadModelViewMatrix() const;
00140
00143 void loadInverseModelViewMatrix() const;
00144
00148 void saveModelViewMatrix();
00149
00151 void getModelViewMatrix(float m[]) const;
00152
00154 void setModelViewMatrix(const float m[]);
00155
00161 static bool pick(int mouse_x, int mouse_y, float &x, float &y, float &z);
00162
00163 private:
00164 static void transp(float m[]);
00165
00166 private:
00167 float m_modelview[16];
00168 };
00169
00170
00171 }
00172
00173
00174 #endif