57 #ifndef TRISTRIP_TRI_STRIPPER_H 58 #define TRISTRIP_TRI_STRIPPER_H 82 triangle(
const indice
A,
const indice
B,
const indice
C);
106 size_t TriPos()
const;
121 size_t Degree()
const;
122 size_t TriPos()
const;
124 void SetDegree(
const size_t Degree);
138 triangle_strip(
size_t StartTriPos, start_order StartOrder,
size_t Size);
140 size_t StartTriPos()
const;
141 start_order StartOrder()
const;
145 size_t m_StartTriPos;
146 start_order m_StartOrder;
170 PT_Triangles = 0x0004,
171 PT_Triangle_Strip = 0x0005
189 inline void SetCacheSize(
const size_t CacheSize = 16);
190 inline void SetMinStripSize(
const size_t MinStripSize = 2);
193 void Strip(primitives_vector * out_pPrimitivesVector);
205 typedef std::vector<triangle_edge> triangle_edges;
206 typedef std::vector<size_t> triangle_indices;
207 typedef std::deque<indice> indices_cache;
214 void AddLeftTriangles();
216 void LinkNeighboursTri(
const triangle_edges & TriInterface,
const triangle_edge Edge);
217 void MarkTriAsTaken(
const size_t i);
224 void AddIndice(
const indice
i);
225 void AddIndiceToCache(
const indice
i,
bool CacheHitCount =
false);
229 const indices & m_TriIndices;
231 size_t m_MinStripSize;
234 primitives_vector m_PrimitivesVector;
235 triangles_graph m_Triangles;
236 triangles_heap m_TriHeap;
237 triangle_indices m_NextCandidates;
238 indices_cache m_IndicesCache;
256 inline void tri_stripper::SetCacheSize(
const size_t CacheSize) {
257 m_CacheSize = CacheSize;
261 inline void tri_stripper::SetMinStripSize(
const size_t MinStripSize) {
262 m_MinStripSize = MinStripSize;
266 inline triangle::triangle() { }
269 inline triangle::triangle(
const indice A,
const indice B,
const indice C) : m_A(A), m_B(B), m_C(C), m_StripID(0) { }
272 inline void triangle::SetStripID(
const size_t StripID) {
277 inline indice triangle::A()
const {
282 inline indice triangle::B()
const {
287 inline indice triangle::C()
const {
292 inline size_t triangle::StripID()
const {
297 inline triangle_edge::triangle_edge(
const indice A,
const indice B,
const size_t TriPos) : m_A(A), m_B(B), m_TriPos(TriPos) { }
310 inline size_t triangle_edge::TriPos()
const {
340 : m_StartTriPos(StartTriPos), m_StartOrder(StartOrder), m_Size(Size) { }
344 return m_StartTriPos;
360 const indice B1 = a.
B();
361 const indice A2 = b.
A();
362 const indice B2 = b.
B();
364 if ((A1 < A2) || ((A1 == A2) && (B1 < B2)))
GLboolean GLboolean GLboolean GLboolean a
start_order StartOrder() const
GLboolean GLboolean GLboolean b
std::vector< indice > indices
void SetStripID(size_t StripID)
void SetDegree(const size_t Degree)
tri_stripper(const indices &TriIndices)
bool operator()(const triangle_degree &a, const triangle_degree &b) const
std::vector< index > indices
bool operator()(const triangle_edge &a, const triangle_edge &b) const
std::vector< primitives > primitives_vector
size_t StartTriPos() const