00001 00002 // ConeDrawArray.h // 00004 00005 #ifndef CONEARRAY_H 00006 #define CONEARRAY_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3DGLTypes.h" 00010 00011 #include <vector> 00012 #include <utility> 00013 00014 namespace X3DTK { 00015 00018 00019 class ConeDrawArray 00020 { 00021 public: 00023 static ConeDrawArray *getInstanceOfSection(unsigned int section); 00025 void removeInstance(); 00026 00028 unsigned int getConeSideSize() const; 00030 unsigned int getConeBottomSize() const; 00031 00033 const void *getConeSideVertexArrayAddress() const; 00035 const void *getConeBottomVertexArrayAddress() const; 00036 00038 const unsigned int *getConeSideIndexArrayAddress() const; 00040 const unsigned int *getConeBottomIndexArrayAddress() const; 00041 00042 private: 00043 unsigned int _section; 00044 00046 ConeDrawArray(unsigned int section); 00047 00048 typedef struct 00049 { 00050 unsigned int count; 00051 ConeDrawArray *ref; 00052 } data; 00053 00054 typedef std::list<std::pair<unsigned int, data> > refList; 00055 00056 static refList _refList; 00057 00058 std::vector<N3F_V3F> _coneSideVertexArray; 00059 std::vector<N3F_V3F> _coneBottomVertexArray; 00060 std::vector<unsigned int> _coneSideIndexArray; 00061 std::vector<unsigned int> _coneBottomIndexArray; 00062 }; 00063 00064 } 00065 00066 #endif