Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GL_TriangleFanSet.h

Go to the documentation of this file.
00001 #ifndef X3DTK_GL_TRIANGLEFANSET_H
00002 #define X3DTK_GL_TRIANGLEFANSET_H
00003 
00004 #include "GL_X3DComposedGeometryNode.h"
00005 
00006 #include <vector>
00007 
00008 namespace X3DTK {
00009 namespace GL {
00010 
00017 class TriangleFanSet : public X3DComposedGeometryNode
00018 {
00019 public:
00021   TriangleFanSet();
00023   virtual SFAbstractNode clone() const;
00025   virtual ~TriangleFanSet();
00026   
00028   void setN3F_V3F_vertexArrayArray(const std::vector<std::vector<N3F_V3F> > &N3F_V3F_vertexArrayArray);  
00030   void setC4F_N3F_V3F_vertexArrayArray(const std::vector<std::vector<C4F_N3F_V3F> > &C4F_N3F_V3F_vertexArrayArray);  
00032   void setT2F_N3F_V3F_vertexArrayArray(const std::vector<std::vector<T2F_N3F_V3F> > &T2F_N3F_V3F_vertexArrayArray);  
00034   void setT2F_C4F_N3F_V3F_vertexArrayArray(const std::vector<std::vector<T2F_C4F_N3F_V3F> > &T2F_C4F_N3F_V3F_vertexArrayArray);  
00035 
00037   inline std::vector<std::vector<N3F_V3F> > &N3F_V3F_vertexArrayArray() {return _N3F_V3F_vertexArrayArray;};  
00039   inline std::vector<std::vector<C4F_N3F_V3F> > &C4F_N3F_V3F_vertexArrayArray() {return _C4F_N3F_V3F_vertexArrayArray;};  
00041   inline std::vector<std::vector<T2F_N3F_V3F> > &T2F_N3F_V3F_vertexArrayArray() {return _T2F_N3F_V3F_vertexArrayArray;};  
00043   inline std::vector<std::vector<T2F_C4F_N3F_V3F> > &T2F_C4F_N3F_V3F_vertexArrayArray() {return _T2F_C4F_N3F_V3F_vertexArrayArray;};  
00044   
00046   virtual void update();
00048   virtual void draw() const;  
00049 
00050 protected:
00052   TriangleFanSet(const TriangleFanSet &T);
00053 
00054 private:  
00056   std::vector<std::vector<N3F_V3F> > _N3F_V3F_vertexArrayArray;
00058   std::vector<std::vector<C4F_N3F_V3F> > _C4F_N3F_V3F_vertexArrayArray;  
00060   std::vector<std::vector<T2F_N3F_V3F> > _T2F_N3F_V3F_vertexArrayArray;
00062   std::vector<std::vector<T2F_C4F_N3F_V3F> > _T2F_C4F_N3F_V3F_vertexArrayArray;
00063 
00065   void computeNoColorNoTexCoord(const MFVec3f &vertexArray, const MFVec3f &normalArray);
00067   void computeColorNoTexCoord(const MFVec3f &vertexArray, const MFVec3f &normalArray);
00069   void computeNoColorTexCoord(const MFVec3f &vertexArray, const MFVec3f &normalArray);
00071   void computeColorTexCoord(const MFVec3f &vertexArray, const MFVec3f &normalArray);
00073   void computeArrays(const MFVec3f &vertexArray, MFVec3f &normalArray); 
00074 };
00075 
00076 }
00077 }
00078 
00079 #endif

Generated on Thu Jun 3 10:12:08 2004 for X3DToolKit by doxygen 1.3.6