X3D_MeshBuilderStateVariables.h

Go to the documentation of this file.
00001 #ifndef X3DTK_X3D_MESHBUILDERSTATEVARIABLES_H
00002 #define X3DTK_X3D_MESHBUILDERSTATEVARIABLES_H
00003 
00004 #include "StateVariables.h"
00005 #include "Cloner.h"
00006 #include "X3D_X3DNode.h"
00007 #include "MESH_X3DNode.h"
00008 #include "X3D_X3DAppearanceNode.h"
00009 #include "X3D_Shape.h"
00010 
00011 #include <map>
00012 
00013 namespace X3DTK {
00014 namespace X3D {
00015 
00016 class X3DAppearanceNode;
00017 class Shape;
00018 
00025 template<class MData, class VData, class EData, class FData, bool RW> 
00026 class TemplateMeshBuilderStateVariables : public StateVariables
00027 {
00028 public:
00030   TemplateMeshBuilderStateVariables();
00032   virtual ~TemplateMeshBuilderStateVariables();
00034   void init();
00036   virtual void finish();
00037   
00039   void enableChildrenVisit();
00041   void disableChildrenVisit();
00042   
00044   inline bool getChildrenVisit() const {return _childrenVisit;};
00046   X3DNode *clone(X3DNode *N);
00047   
00049   void addCoupleNode(SFNode N, MESH::X3DNode *MN);
00051   void pushNode(MESH::X3DNode *N);
00053   void popNode();
00054     
00056   inline MESH::X3DNode *getRoot() const {return _root;};
00058   inline MESH::X3DNode *getTop() const {return _nodeStack.front();};
00060   MESH::X3DNode *getNode(SFNode N) const;
00061   
00062 private:
00063   MESH::X3DNode *_root;
00064   std::list<MESH::X3DNode *> _nodeStack;
00065   std::map<SFNode, MESH::X3DNode *> _nodeCoupleMap; 
00066   
00067   bool _childrenVisit;
00068   Cloner *_cloner;
00069 };
00070 
00071 }
00072 }
00073 
00074 #include "X3D_MeshBuilderStateVariables.inl"
00075 
00076 #endif

Generated on Fri Aug 27 13:16:23 2004 for X3DToolKit by doxygen 1.3.6