33 #ifndef _MONO_TRIANGULATION_H
34 #define _MONO_TRIANGULATION_H
36 #include "definitions.h"
37 #include "primitiveStream.h"
38 #include "directedLine.h"
58 void insert(Real u, Real v);
59 void insert(Real v[2]);
61 void processNewVertex(Real v[2],
primStream* pStream);
62 void outputFan(Real v[2],
primStream* pStream);
64 void processNewVertex(Real v[2],
Backend* backend);
65 void outputFan(Real v[2],
Backend* backend);
85 void appendVertex(Real* ptr);
86 Real* getVertex(Int i) {
return array[i];}
87 Real** getArray() {
return array;}
88 Int getNumElements() {
return index;}
89 Int findIndexAbove(Real v);
90 Int findIndexAboveGen(Real v, Int startIndex, Int EndIndex);
91 Int findIndexBelowGen(Real v, Int startIndex, Int EndIndex);
92 Int findIndexStrictBelowGen(Real v, Int startIndex, Int EndIndex);
93 Int findIndexFirstAboveEqualGen(Real v, Int startIndex, Int endIndex);
94 Int skipEqualityFromStart(Real v, Int start, Int end);
96 Int findDecreaseChainFromEnd(Int begin, Int end);
102 void monoTriangulationRec(Real* topVertex, Real* botVertex,
107 void monoTriangulationRec(
directedLine* inc_chain, Int inc_index,
119 void monoTriangulation2(Real* topVertex, Real* botVertex,
122 Int is_increase_chain,
124 void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
125 vertexArray* inc_chain, Int inc_current, Int inc_end,
126 vertexArray* dec_chain, Int dec_current, Int dec_end,
129 void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
130 vertexArray* inc_chain, Int inc_current, Int inc_end,
131 vertexArray* dec_chain, Int dec_current, Int dec_end,
134 void triangulateXYMonoTB(Int n_left, Real** leftVerts,
135 Int n_right, Real** rightVerts,
138 void monoTriangulationRecGenTBOpt(Real* topVertex, Real* botVertex,
139 vertexArray* inc_chain, Int inc_current, Int inc_end,
140 vertexArray* dec_chain, Int dec_current, Int dec_end,
143 void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
148 void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
149 vertexArray* inc_chain, Int inc_current, Int inc_end,
150 vertexArray* dec_chain, Int dec_current, Int dec_end,
151 Int (*compFun)(Real*, Real*),
154 void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
157 Int (*compFun)(Real*, Real*),
160 Int (*compFun)(Real*, Real*),
primStream* pStream);
165 void monoTriangulationRec(Real* topVertex, Real* botVertex,
170 void monoTriangulationFunBackend(Arc_ptr loop, Int (*compFun)(Real*, Real*),
Backend* backend);
172 void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
175 Int (*compFun)(Real*, Real*),