00001 00002 // GLRendererStateVariables.h // 00004 00005 #ifndef GLRENDERERGLOBALVARIABLES_H 00006 #define GLRENDERERGLOBALVARIABLES_H 00007 00008 #include "StateVariables.h" 00009 #include "GL_X3DShapeNode.h" 00010 00011 #include <list> 00012 #include <vector> 00013 00014 namespace X3DTK { 00015 namespace GL { 00016 00018 00019 class RendererStateVariables : public StateVariables 00020 { 00021 public: 00023 RendererStateVariables(); 00025 virtual ~RendererStateVariables(); 00026 00028 void initSelect(double x, double y); 00030 void finishSelect(); 00031 00032 /*// Pushes the transformation matrix. 00033 void pushMatrix(const MFFloat &transformation); 00034 // Pops the transformation matrix. 00035 void popMatrix(); */ 00037 void storeShape(X3DShapeNode *S); 00039 inline int getCurrentId() const {return _shapeVector.size() - 1;}; 00041 void setSelectionMode(bool value); 00042 00044 inline X3DShapeNode *getShape() const {return _shape;}; 00046 inline bool getSelectionMode() const {return _selectionMode;}; 00047 00048 private: 00049 //std::list<MFFloat> _matrixStack; 00050 //std::vector<MFFloat> _matrixVector; 00051 std::vector<X3DShapeNode *> _shapeVector; 00052 bool _selectionMode; 00053 X3DShapeNode *_shape; 00054 GLuint _hits[32768]; 00055 }; 00056 00057 } 00058 } 00059 00060 #endif