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

GLBuilderGeometry3DVisitor.h

Go to the documentation of this file.
00001 
00002 //                            GLBuilderGeometry3DVisitor.h                    //
00004 
00005 #ifndef GLBUILDERGEOMETRY3DVISITOR_H
00006 #define GLBUILDERGEOMETRY3DVISITOR_H
00007 
00008 #include "Geometry3DVisitor.h"
00009 #include "GLBuilderGlobalVariables.h"
00010 
00011 #include <iostream>
00012 
00013 namespace X3DTK {
00014 namespace X3D {
00015 
00017 
00018 class GLBuilderGeometry3DVisitor : public Geometry3DVisitor
00019 {
00020 public:
00022   GLBuilderGeometry3DVisitor();
00024   virtual ~GLBuilderGeometry3DVisitor();
00025 
00026   template<class T, class G>
00027   void enterNode(T *N) const
00028   {
00029     GL::SFNode GN = globalVariables->getNode(N);
00030     if (GN == 0)
00031     {
00032       GN = new G();
00033       GN->setX3DReference(N);
00034       globalVariables->addCoupleNode(N, GN);
00035     }
00036     globalVariables->pushNode(GN);
00037   };
00038   
00039 protected:
00040   GLBuilderGlobalVariables *globalVariables;
00041 };
00042 
00043 }
00044 }
00045 
00046 #endif

Generated on Thu Oct 9 13:50:53 2003 for X3DToolKit by doxygen1.2.18