Documentation


x3dGLMapBuilder.cpp

Go to the documentation of this file.
00001 #include "x3dGLMapBuilder.h"
00002 #include "x3dGLMapVisitor.h"
00003 
00004 
00005 namespace X3DTK {
00006 namespace GL {
00007 
00008 X3DGLMapBuilder::X3DGLMapBuilder()
00009 {
00010   dfs = new DFSGraphTraversal();
00011   
00012   // StateVariables assignation.
00013   _stateVariables = Singleton<X3DGLMapStateVariables>::getInstance();//GraphTraversal::getInstanceOf<X3DGLMapStateVariables>();
00014   
00015   dfs->setComponentVisitor(new X3DGLMapVisitor());
00016 }
00017 
00018 X3DGLMapBuilder::~X3DGLMapBuilder()
00019 {
00020   delete dfs; 
00021 }
00022 
00023 // void X3DGLMapBuilder::setComponentVisitor(X3DComponentVisitor *component)
00024 // {
00025 //   dfs->setComponentVisitor(component);
00026 // } 
00027 
00029 X3DGLMap * X3DGLMapBuilder::build(SFNode N)
00030 {
00031   X3DGLMap  * x3dGLMap = _stateVariables->getX3dGLMap(); 
00032   x3dGLMap->clear();
00033   dfs->traverse(N);
00034   return x3dGLMap;  
00035 }
00036 
00037 }
00038 }

Generated on Thu Dec 23 13:52:27 2004 by doxygen 1.3.6