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_MONO_INDEXED_GEO_STRIP_SET_HPP
00026 #define __SGL_MONO_INDEXED_GEO_STRIP_SET_HPP
00027
00028 #include <sgl.h>
00029 #include <sglMonoIndexedGeoSet.hpp>
00030
00031
00032
00080 class SGL_DLL_API sglMonoIndexedGeoStripSet : public sglMonoIndexedGeoSet
00081 {
00082 public:
00084 sglMonoIndexedGeoStripSet();
00086 virtual ~sglMonoIndexedGeoStripSet();
00087
00089 virtual unsigned int getPrimSize() const {return 0;}
00090
00092 sglDataPtr *getPrimLengths() const {return m_lengths.getDataPtr();}
00093
00095 void setPrimLengths(sglIndexType *alist)
00096 { setPrimLengths(new sglNoRefDataPtr(alist)); }
00097
00110 void setPrimLengths(sglDataPtr *data,
00111 int offset = 0,
00112 int stride = 0);
00113
00115 int getPrimLengthsOffset() const { return m_lengths.getOffset(); }
00116
00118 int getPrimLengthsStride() const { return m_lengths.getStride(); }
00119
00121 virtual void addStats(sglStats &stats) const;
00122
00123 protected:
00124 virtual bool computeBounds();
00125 virtual void updateDrawFunc();
00126
00127 private:
00128 sglMonoIndexedGeoStripSet(const sglMonoIndexedGeoStripSet &);
00129 sglMonoIndexedGeoStripSet &operator=(const sglMonoIndexedGeoStripSet &);
00130
00131 void drawVT(const vector<sglTexCoords> &tex_coords) const;
00132 void drawVNoT(const vector<sglTexCoords> &tex_coords) const;
00133 void drawVNpT(const vector<sglTexCoords> &tex_coords) const;
00134 void drawVNvT(const vector<sglTexCoords> &tex_coords) const;
00135 void drawVCoT(const vector<sglTexCoords> &tex_coords) const;
00136 void drawVCoNoT(const vector<sglTexCoords> &tex_coords) const;
00137 void drawVCoNpT(const vector<sglTexCoords> &tex_coords) const;
00138 void drawVCoNvT(const vector<sglTexCoords> &tex_coords) const;
00139 void drawVCpT(const vector<sglTexCoords> &tex_coords) const;
00140 void drawVCpNoT(const vector<sglTexCoords> &tex_coords) const;
00141 void drawVCpNpT(const vector<sglTexCoords> &tex_coords) const;
00142 void drawVCpNvT(const vector<sglTexCoords> &tex_coords) const;
00143 void drawVCvT(const vector<sglTexCoords> &tex_coords) const;
00144 void drawVCvNoT(const vector<sglTexCoords> &tex_coords) const;
00145 void drawVCvNpT(const vector<sglTexCoords> &tex_coords) const;
00146 void drawVCvNvT(const vector<sglTexCoords> &tex_coords) const;
00147
00148 #ifndef SGL_NO_VERTEX_ARRAYS
00149 void drawVTm(const vector<sglTexCoords> &tex_coords) const;
00150 void drawVNoTm(const vector<sglTexCoords> &tex_coords) const;
00151 void drawVNpTm(const vector<sglTexCoords> &tex_coords) const;
00152 void drawVNvTm(const vector<sglTexCoords> &tex_coords) const;
00153 void drawVCoTm(const vector<sglTexCoords> &tex_coords) const;
00154 void drawVCoNoTm(const vector<sglTexCoords> &tex_coords) const;
00155 void drawVCoNpTm(const vector<sglTexCoords> &tex_coords) const;
00156 void drawVCoNvTm(const vector<sglTexCoords> &tex_coords) const;
00157 void drawVCpTm(const vector<sglTexCoords> &tex_coords) const;
00158 void drawVCpNoTm(const vector<sglTexCoords> &tex_coords) const;
00159 void drawVCpNpTm(const vector<sglTexCoords> &tex_coords) const;
00160 void drawVCpNvTm(const vector<sglTexCoords> &tex_coords) const;
00161 void drawVCvTm(const vector<sglTexCoords> &tex_coords) const;
00162 void drawVCvNoTm(const vector<sglTexCoords> &tex_coords) const;
00163 void drawVCvNpTm(const vector<sglTexCoords> &tex_coords) const;
00164 void drawVCvNvTm(const vector<sglTexCoords> &tex_coords) const;
00165
00166 void drawPrefetchVT(const vector<sglTexCoords> &tex_coords) const;
00167 void drawPrefetchVNoT(const vector<sglTexCoords> &tex_coords) const;
00168 void drawPrefetchVNpT(const vector<sglTexCoords> &tex_coords) const;
00169 void drawPrefetchVNvT(const vector<sglTexCoords> &tex_coords) const;
00170 void drawPrefetchVCoT(const vector<sglTexCoords> &tex_coords) const;
00171 void drawPrefetchVCoNoT(const vector<sglTexCoords> &tex_coords) const;
00172 void drawPrefetchVCoNpT(const vector<sglTexCoords> &tex_coords) const;
00173 void drawPrefetchVCoNvT(const vector<sglTexCoords> &tex_coords) const;
00174 void drawPrefetchVCpT(const vector<sglTexCoords> &tex_coords) const;
00175 void drawPrefetchVCpNoT(const vector<sglTexCoords> &tex_coords) const;
00176 void drawPrefetchVCpNpT(const vector<sglTexCoords> &tex_coords) const;
00177 void drawPrefetchVCpNvT(const vector<sglTexCoords> &tex_coords) const;
00178 void drawPrefetchVCvT(const vector<sglTexCoords> &tex_coords) const;
00179 void drawPrefetchVCvNoT(const vector<sglTexCoords> &tex_coords) const;
00180 void drawPrefetchVCvNpT(const vector<sglTexCoords> &tex_coords) const;
00181 void drawPrefetchVCvNvT(const vector<sglTexCoords> &tex_coords) const;
00182
00183 void drawPrefetchVTm(const vector<sglTexCoords> &tex_coords) const;
00184 void drawPrefetchVNoTm(const vector<sglTexCoords> &tex_coords) const;
00185 void drawPrefetchVNpTm(const vector<sglTexCoords> &tex_coords) const;
00186 void drawPrefetchVNvTm(const vector<sglTexCoords> &tex_coords) const;
00187 void drawPrefetchVCoTm(const vector<sglTexCoords> &tex_coords) const;
00188 void drawPrefetchVCoNoTm(const vector<sglTexCoords> &tex_coords) const;
00189 void drawPrefetchVCoNpTm(const vector<sglTexCoords> &tex_coords) const;
00190 void drawPrefetchVCoNvTm(const vector<sglTexCoords> &tex_coords) const;
00191 void drawPrefetchVCpTm(const vector<sglTexCoords> &tex_coords) const;
00192 void drawPrefetchVCpNoTm(const vector<sglTexCoords> &tex_coords) const;
00193 void drawPrefetchVCpNpTm(const vector<sglTexCoords> &tex_coords) const;
00194 void drawPrefetchVCpNvTm(const vector<sglTexCoords> &tex_coords) const;
00195 void drawPrefetchVCvTm(const vector<sglTexCoords> &tex_coords) const;
00196 void drawPrefetchVCvNoTm(const vector<sglTexCoords> &tex_coords) const;
00197 void drawPrefetchVCvNpTm(const vector<sglTexCoords> &tex_coords) const;
00198 void drawPrefetchVCvNvTm(const vector<sglTexCoords> &tex_coords) const;
00199 #endif
00200
00201 class Initializer;
00202 friend class Initializer;
00203 static void setupFuncTable();
00204
00205 protected:
00206 sglIndexPtr m_lengths;
00207
00208 private:
00209 static DrawFunc s_func_table[(ePREFETCH|eMULTI_TEXTURE|eCOLORS|eNORMALS)+1];
00210 static Initializer sInitializer;
00211 };
00212
00213 #endif