CylinderDrawArray.h

Go to the documentation of this file.
00001 #ifndef X3DTK_GL_CYLINDERARRAY_H
00002 #define X3DTK_GL_CYLINDERARRAY_H
00003 
00004 #include "GL_SceneGraphTypes.h"
00005 
00006 #include <vector>
00007 #include <list>
00008 #include <utility>
00009 
00010 namespace X3DTK {
00011 namespace GL {
00012 
00022 class CylinderDrawArray
00023 {
00024 public:
00026   static CylinderDrawArray *getInstanceOfSection(unsigned int section);
00028   void removeInstance();
00029   
00031   unsigned int getCylinderBottomSize() const;
00033   unsigned int getCylinderSideSize() const;
00035   unsigned int getCylinderTopSize() const;
00037   const void *getCylinderBottomVertexArrayAddress() const;
00039   const void *getCylinderSideVertexArrayAddress() const;
00041   const void *getCylinderTopVertexArrayAddress() const;
00043   const unsigned int *getCylinderBottomIndexArrayAddress() const;
00045   const unsigned int *getCylinderSideIndexArrayAddress() const;
00047   const unsigned int *getCylinderTopIndexArrayAddress() const;
00048 
00049 private:
00050   unsigned int _section;
00051   
00052   CylinderDrawArray(unsigned int section); 
00053 
00054   typedef struct 
00055   {
00056     unsigned int count;
00057     CylinderDrawArray *ref;
00058   } data;
00059   
00060   typedef std::list<std::pair<unsigned int, data> > refList;
00061 
00062   static refList _refList;
00063   
00064   std::vector<N3F_V3F> _cylinderBottomVertexArray;
00065   std::vector<N3F_V3F> _cylinderSideVertexArray;
00066   std::vector<N3F_V3F>_cylinderTopVertexArray;
00067   std::vector<unsigned int> _cylinderBottomIndexArray;
00068   std::vector<unsigned int> _cylinderSideIndexArray;
00069   std::vector<unsigned int> _cylinderTopIndexArray;
00070 };
00071 
00072 }
00073 }
00074 
00075 #endif

Generated on Fri Aug 27 13:16:21 2004 for X3DToolKit by doxygen 1.3.6