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

GLUpdater.cpp

Go to the documentation of this file.
00001 #include "GLUpdater.h"
00002 #include "DefaultGLDFS.h"
00003 #include "GLUpdaterGLCoreVisitor.h"
00004 #include "GLUpdaterGLGeometry3DVisitor.h"
00005 #include "GLUpdaterGLGroupingVisitor.h"
00006 #include "GLUpdaterGLRenderingVisitor.h"
00007 #include "GLUpdaterGLShapeVisitor.h"
00008 #include "GLUpdaterGLTexturingVisitor.h"
00009 #include "GLScene.h"
00010 
00011 using namespace X3DTK;
00012 
00013 GLUpdater::GLUpdater()
00014 : X3DGLUpdater()
00015 {
00016   globalVariables = GVManager::getInstanceOf<GLUpdaterGlobalVariables>();
00017   dfs = new DefaultGLDFS();
00018   
00019   dfs->setComponentVisitor(new GLUpdaterGLCoreVisitor());
00020   dfs->setComponentVisitor(new GLUpdaterGLGeometry3DVisitor());
00021   dfs->setComponentVisitor(new GLUpdaterGLGroupingVisitor());
00022   dfs->setComponentVisitor(new GLUpdaterGLRenderingVisitor());
00023   dfs->setComponentVisitor(new GLUpdaterGLShapeVisitor());
00024   dfs->setComponentVisitor(new GLUpdaterGLTexturingVisitor());
00025 }
00026 
00027 GLUpdater::~GLUpdater()
00028 {
00029   delete dfs;
00030 }
00031 
00032 void GLUpdater::setComponentVisitor(X3DComponentVisitor *component)
00033 {
00034   dfs->setComponentVisitor(component);
00035 }
00036 
00037 void GLUpdater::update(GLScene *S)
00038 {
00039   globalVariables->setPath(static_cast<Scene *>(S->getLink())->getFileName().getPath());
00040   dfs->traverse(S);
00041 }

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