AnimaL |
Tutorial |
Documentation |
00001 00002 // myGLRendererStateVariables.h // 00004 00005 #ifndef MY_GL_RENDERER_STATE_VARIABLES_H 00006 #define MY_GL_RENDERER_STATE_VARIABLES_H 00007 00008 #include <X3DTK/private/StateVariables.h> 00009 #include <X3DTK/private/X3D_X3DBoundedObject.h> 00010 #include <X3DTK/private/GL_X3DShapeNode.h> 00011 00012 #include <list> 00013 #include <vector> 00014 00015 namespace X3DTK { 00016 namespace GL { 00017 00019 00020 class MyRendererStateVariables : public StateVariables 00021 { 00022 public: 00024 MyRendererStateVariables(); 00026 virtual ~MyRendererStateVariables(); 00027 00029 void initSelect(double x, double y); 00031 void finishSelect(); 00032 00033 /*// Pushes the transformation matrix. 00034 void pushMatrix(const MFFloat &transformation); 00035 // Pops the transformation matrix. 00036 void popMatrix(); */ 00038 void storeShape(X3DShapeNode *S); 00040 inline int getCurrentId() const {return _shapeVector.size() - 1;}; 00042 void setSelectionMode(bool value); 00043 00045 inline X3DShapeNode *getShape() const {return _shape;}; 00047 inline bool getSelectionMode() const {return _selectionMode;}; 00048 00049 public: 00051 X3D::X3DBoundedObject * boundedObject; 00052 00053 private: 00054 //std::list<MFFloat> _matrixStack; 00055 //std::vector<MFFloat> _matrixVector; 00056 std::vector<X3DShapeNode *> _shapeVector; 00057 bool _selectionMode; 00058 X3DShapeNode *_shape; 00059 GLuint _hits[32768]; 00060 00061 00062 }; 00063 00064 } 00065 } 00066 00067 #endif