X3D_GLBuilderStateVariables.h

Go to the documentation of this file.
00001 #ifndef X3DTK_X3D_GLBUILDERSTATEVARIABLES_H
00002 #define X3DTK_X3D_GLBUILDERSTATEVARIABLES_H
00003 
00004 #include "StateVariables.h"
00005 #include "GL_X3DNode.h"
00006 
00007 #include <map>
00008 
00009 namespace X3DTK {
00010 namespace X3D {
00011 
00018 class GLBuilderStateVariables : public StateVariables
00019 {
00020 public:
00022   GLBuilderStateVariables();
00024   virtual ~GLBuilderStateVariables();
00026   virtual void init();
00028   virtual void finish();
00029   
00031   void addCoupleNode(SFNode N, GL::X3DNode *GN);
00033   void pushNode(GL::X3DNode *N);
00035   void popNode();
00036     
00038   inline GL::X3DNode *getRoot() const {return _root;};
00040   inline GL::X3DNode *getTop() const {return static_cast<GL::X3DNode *>((!_nodeStack.empty() ? _nodeStack.front() : 0));};
00042   GL::X3DNode *getNode(SFNode N) const;
00043   
00044 private:
00045   GL::X3DNode *_root;
00046   MFNode _nodeStack;
00047   std::map<SFNode, GL::X3DNode *> _nodeCoupleMap;
00048   char *_cwd;
00049 };
00050 
00051 }
00052 }
00053 
00054 #endif

Generated on Mon Jul 12 09:40:00 2004 for X3DToolKit by doxygen 1.3.6