ConeDrawArray.h

Go to the documentation of this file.
00001 #ifndef X3DTK_GL_CONEARRAY_H
00002 #define X3DTK_GL_CONEARRAY_H
00003 
00004 #include "GL_SceneGraphTypes.h"
00005 
00006 #include <vector>
00007 #include <utility>
00008 
00009 namespace X3DTK {
00010 namespace GL {
00011 
00021 class ConeDrawArray
00022 {
00023 public:
00025   static ConeDrawArray *getInstanceOfSection(unsigned int section);
00027   void removeInstance();
00028   
00030   unsigned int getConeSideSize() const;
00032   unsigned int getConeBottomSize() const;
00033 
00035   const void *getConeSideVertexArrayAddress() const;
00037   const void *getConeBottomVertexArrayAddress() const;
00038   
00040   const unsigned int *getConeSideIndexArrayAddress() const;
00042   const unsigned int *getConeBottomIndexArrayAddress() const;
00043  
00044 private:
00045   unsigned int _section;
00046   
00048   ConeDrawArray(unsigned int section);
00049   
00050   typedef struct 
00051   {
00052     unsigned int count;
00053     ConeDrawArray *ref;
00054   } data;
00055   
00056   typedef std::list<std::pair<unsigned int, data> > refList;
00057 
00058   static refList _refList;
00059 
00060   std::vector<N3F_V3F> _coneSideVertexArray;
00061   std::vector<N3F_V3F> _coneBottomVertexArray;
00062   std::vector<unsigned int> _coneSideIndexArray;
00063   std::vector<unsigned int> _coneBottomIndexArray;
00064 };
00065 
00066 }
00067 }
00068 
00069 #endif

Generated on Fri Jul 30 12:02:27 2004 for X3DToolKit by doxygen 1.3.6