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

GLCreator.cpp

Go to the documentation of this file.
00001 #include "GLCreator.h"
00002 #include "DefaultDFS.h"
00003 #include "GLCreatorCoreVisitor.h"
00004 #include "GLCreatorGeometry3DVisitor.h"
00005 #include "GLCreatorGroupingVisitor.h"
00006 #include "GLCreatorRenderingVisitor.h"
00007 #include "GLCreatorShapeVisitor.h"
00008 #include "GLCreatorTexturingVisitor.h"
00009 #include "GLScene.h"
00010 
00011 using namespace X3DTK;
00012 
00013 GLCreator::GLCreator()
00014 : X3DGLCreator()
00015 {
00016   globalVariables = GVManager::getInstanceOf<GLCreatorGlobalVariables>();
00017   dfs = new DefaultDFS();
00018   
00019   dfs->setComponentVisitor(new GLCreatorCoreVisitor());
00020   dfs->setComponentVisitor(new GLCreatorGeometry3DVisitor());
00021   dfs->setComponentVisitor(new GLCreatorGroupingVisitor());
00022   dfs->setComponentVisitor(new GLCreatorRenderingVisitor());
00023   dfs->setComponentVisitor(new GLCreatorShapeVisitor());
00024   dfs->setComponentVisitor(new GLCreatorTexturingVisitor());
00025 }
00026 
00027 GLCreator::~GLCreator()
00028 {
00029   delete dfs;
00030 }
00031 
00032 void GLCreator::setComponentVisitor(X3DComponentVisitor *component)
00033 {
00034   dfs->setComponentVisitor(component);
00035 }
00036 
00037 X3DGLNode *GLCreator::create(X3DNode *N)
00038 {
00039   globalVariables->init();
00040   dfs->traverse(N);
00041   globalVariables->finish();
00042   
00043   return globalVariables->getRoot();
00044 }

Generated on Wed May 14 10:03:08 2003 for X3DToolKit by doxygen1.3