00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __SGL_INDEXED_GEO_STRIP_SET_HPP
00026 #define __SGL_INDEXED_GEO_STRIP_SET_HPP
00027
00028 #include <sgl.h>
00029 #include <sglIndexedGeoSet.hpp>
00030
00031
00032
00088 class SGL_DLL_API sglIndexedGeoStripSet : public sglIndexedGeoSet
00089 {
00090 public:
00092 sglIndexedGeoStripSet();
00094 virtual ~sglIndexedGeoStripSet();
00095
00097 virtual unsigned int getPrimSize() const {return 0;}
00098
00100 sglDataPtr *getPrimLengths() const {return m_lengths.getDataPtr();}
00101
00103 void setPrimLengths(sglIndexType *alist)
00104 { setPrimLengths(new sglNoRefDataPtr(alist)); }
00105
00118 void setPrimLengths(sglDataPtr *data,
00119 int offset = 0,
00120 int stride = 0);
00121
00123 int getPrimLengthsOffset() const { return m_lengths.getOffset(); }
00124
00126 int getPrimLengthsStride() const { return m_lengths.getStride(); }
00127
00129 virtual void addStats(sglStats &stats) const;
00130
00131 protected:
00132 virtual bool computeBounds();
00133 virtual void updateDrawFunc();
00134
00135 private:
00136 sglIndexedGeoStripSet(const sglIndexedGeoStripSet &);
00137 sglIndexedGeoStripSet &operator=(const sglIndexedGeoStripSet &);
00138
00139 void drawVT(const vector<sglTexCoords> &tex_coords) const;
00140 void drawVNoT(const vector<sglTexCoords> &tex_coords) const;
00141 void drawVNpT(const vector<sglTexCoords> &tex_coords) const;
00142 void drawVNvT(const vector<sglTexCoords> &tex_coords) const;
00143 void drawVCoT(const vector<sglTexCoords> &tex_coords) const;
00144 void drawVCoNoT(const vector<sglTexCoords> &tex_coords) const;
00145 void drawVCoNpT(const vector<sglTexCoords> &tex_coords) const;
00146 void drawVCoNvT(const vector<sglTexCoords> &tex_coords) const;
00147 void drawVCpT(const vector<sglTexCoords> &tex_coords) const;
00148 void drawVCpNoT(const vector<sglTexCoords> &tex_coords) const;
00149 void drawVCpNpT(const vector<sglTexCoords> &tex_coords) const;
00150 void drawVCpNvT(const vector<sglTexCoords> &tex_coords) const;
00151 void drawVCvT(const vector<sglTexCoords> &tex_coords) const;
00152 void drawVCvNoT(const vector<sglTexCoords> &tex_coords) const;
00153 void drawVCvNpT(const vector<sglTexCoords> &tex_coords) const;
00154 void drawVCvNvT(const vector<sglTexCoords> &tex_coords) const;
00155
00156 class Initializer;
00157 friend class Initializer;
00158 static void setupFuncTable();
00159
00160 protected:
00161 sglIndexPtr m_lengths;
00162
00163 private:
00164 static DrawFunc s_func_table[(eCOLORS|eNORMALS)+1];
00165 static Initializer sInitializer;
00166 };
00167
00168 #endif