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

CylinderDrawArray.h

Go to the documentation of this file.
00001 
00002 //                            CylinderDrawArray.h                             //
00004 
00005 #ifndef CYLINDERARRAY_H
00006 #define CYLINDERARRAY_H
00007 
00008 #include "X3DTypes.h"
00009 #include "X3DGLTypes.h"
00010 
00011 #include <vector>
00012 #include <list>
00013 #include <utility>
00014 
00015 namespace X3DTK {
00016 namespace GL {
00017 
00020 
00021 class CylinderDrawArray
00022 {
00023 public:
00025   static CylinderDrawArray *getInstanceOfSection(unsigned int section);
00027   void removeInstance();
00028   
00030   unsigned int CylinderDrawArray::getCylinderBottomSize() const;
00032   unsigned int CylinderDrawArray::getCylinderSideSize() const;
00034   unsigned int CylinderDrawArray::getCylinderTopSize() const;
00036   const void *CylinderDrawArray::getCylinderBottomVertexArrayAddress() const;
00038   const void *CylinderDrawArray::getCylinderSideVertexArrayAddress() const;
00040   const void *CylinderDrawArray::getCylinderTopVertexArrayAddress() const;
00042   const unsigned int *CylinderDrawArray::getCylinderBottomIndexArrayAddress() const;
00044   const unsigned int *CylinderDrawArray::getCylinderSideIndexArrayAddress() const;
00046   const unsigned int *CylinderDrawArray::getCylinderTopIndexArrayAddress() const;
00047 
00048 private:
00049   unsigned int _section;
00050   
00051   CylinderDrawArray(unsigned int section); 
00052 
00053   typedef struct 
00054   {
00055     unsigned int count;
00056     CylinderDrawArray *ref;
00057   } data;
00058   
00059   typedef std::list<std::pair<unsigned int, data> > refList;
00060 
00061   static refList _refList;
00062   
00063   std::vector<N3F_V3F> _cylinderBottomVertexArray;
00064   std::vector<N3F_V3F> _cylinderSideVertexArray;
00065   std::vector<N3F_V3F>_cylinderTopVertexArray;
00066   std::vector<unsigned int> _cylinderBottomIndexArray;
00067   std::vector<unsigned int> _cylinderSideIndexArray;
00068   std::vector<unsigned int> _cylinderTopIndexArray;
00069 };
00070 
00071 }
00072 }
00073 
00074 #endif

Generated on Tue Jul 15 16:46:51 2003 for X3DToolKit by doxygen1.3