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

GLBuilderTexturingVisitor.h

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

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