00001
00002
00004
00005 #ifndef CLONERGLOBALVARIABLES_H
00006 #define CLONERGLOBALVARIABLES_H
00007
00008 #include "StateVariables.h"
00009
00010 namespace X3DTK {
00011
00013
00014 class ClonerStateVariables : public StateVariables
00015 {
00016 public:
00018 ClonerStateVariables();
00020 virtual ~ClonerStateVariables();
00021
00023 virtual void init();
00025 virtual void finish();
00026
00028 void addCoupleNode(SFAbstractNode N, SFAbstractNode NN);
00030 void pushNode(SFAbstractNode N);
00032 void popNode();
00033
00035 inline SFAbstractNode getRoot() const {return _root;};
00037 inline SFAbstractNode getTop() const {return (!_nodeStack.empty() ? _nodeStack.front() : 0);};
00039 SFAbstractNode getNode(SFAbstractNode N) const;
00040
00041 private:
00042 SFAbstractNode _root;
00043 MFAbstractNode _nodeStack;
00044 std::map<SFAbstractNode, SFAbstractNode> _nodeCoupleMap;
00045 };
00046
00047 }
00048
00049 #endif