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

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 
00019 
00020 class CylinderDrawArray
00021 {
00022 public:
00024   static CylinderDrawArray *getInstanceOfSection(unsigned int section);
00026   void removeInstance();
00027   
00029   unsigned int CylinderDrawArray::getCylinderBottomSize() const;
00031   unsigned int CylinderDrawArray::getCylinderSideSize() const;
00033   unsigned int CylinderDrawArray::getCylinderTopSize() const;
00035   const void *CylinderDrawArray::getCylinderBottomVertexArrayAddress() const;
00037   const void *CylinderDrawArray::getCylinderSideVertexArrayAddress() const;
00039   const void *CylinderDrawArray::getCylinderTopVertexArrayAddress() const;
00041   const unsigned int *CylinderDrawArray::getCylinderBottomIndexArrayAddress() const;
00043   const unsigned int *CylinderDrawArray::getCylinderSideIndexArrayAddress() const;
00045   const unsigned int *CylinderDrawArray::getCylinderTopIndexArrayAddress() const;
00046 
00047 private:
00048   unsigned int _section;
00049   
00050   CylinderDrawArray(unsigned int section); 
00051 
00052   typedef struct 
00053   {
00054     unsigned int count;
00055     CylinderDrawArray *ref;
00056   } data;
00057   
00058   typedef std::list<std::pair<unsigned int, data> > refList;
00059 
00060   static refList _refList;
00061   
00062   std::vector<N3F_V3F> _cylinderBottomVertexArray;
00063   std::vector<N3F_V3F> _cylinderSideVertexArray;
00064   std::vector<N3F_V3F>_cylinderTopVertexArray;
00065   std::vector<unsigned int> _cylinderBottomIndexArray;
00066   std::vector<unsigned int> _cylinderSideIndexArray;
00067   std::vector<unsigned int> _cylinderTopIndexArray;
00068 };
00069 
00070 }
00071 
00072 #endif

Generated on Wed May 14 10:38:09 2003 for X3DToolKit by doxygen1.3