Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

X3D_MeshBuilderStateVariables.h

Go to the documentation of this file.
00001 
00002 //                            X3D_MeshBuilderStateVariables.h                 //
00004 
00005 #ifndef TEMPLATEMESHBUILDERGLOBALVARIABLES_H
00006 #define TEMPLATEMESHBUILDERGLOBALVARIABLES_H
00007 
00008 #include "StateVariables.h"
00009 #include "Cloner.h"
00010 #include "X3D_X3DNode.h"
00011 #include "MESH_X3DNode.h"
00012 
00013 #include <map>
00014 
00015 namespace X3DTK {
00016 namespace X3D {
00017 
00018 class X3DAppearanceNode;
00019 class Shape;
00020 
00022 
00023 class MeshBuilderStateVariables : public StateVariables
00024 {
00025 public:
00027   MeshBuilderStateVariables();
00029   virtual ~MeshBuilderStateVariables();
00031   void init();
00033   virtual void finish();
00034   
00036   void enableChildrenVisit();
00038   void disableChildrenVisit();
00040   void setX3DAppearanceNode(X3DAppearanceNode *N);
00042   void addCoupleShape(Shape *S1, Shape *S2);
00043   
00045   inline bool getChildrenVisit() const {return _childrenVisit;};
00047   inline X3DAppearanceNode *getX3DAppearanceNode() const {return _x3dAppearance;};
00049   bool hasShape(Shape *S) const;
00051   Shape *getShape(Shape *S) const;
00053   X3DNode *clone(X3DNode *N);
00054   
00056   void addCoupleNode(SFNode N, MESH::SFNode MN);
00058   void pushNode(MESH::SFNode N);
00060   void popNode();
00061     
00063   inline MESH::SFNode getRoot() const {return _root;};
00065   inline MESH::SFNode getTop() const {return _nodeStack.front();};
00067   MESH::SFNode getNode(SFNode N) const;
00068   
00069 private:
00070   MESH::SFNode _root;
00071   MESH::MFNode _nodeStack;
00072   std::map<SFNode, MESH::SFNode> _nodeCoupleMap; 
00073   std::map<Shape *, Shape *> _shapeCoupleMap;
00074   
00075   bool _childrenVisit;
00076   X3DAppearanceNode *_x3dAppearance;
00077   Cloner *_cloner;
00078 };
00079 
00080 }
00081 }
00082 
00083 #endif

Generated on Mon Jan 19 10:32:07 2004 for X3DToolKit by doxygen1.2.18