64 Bin headonleft, headonright, tailonleft, tailonright;
66 for(
Arc_ptr jarc =
bin.removearc(); jarc; jarc =
bin.removearc() ) {
74 }
else if( hdiff == 0.0 ) {
75 tailonright.
addarc( jarc );
80 tailonright.
addarc( jarc );
81 headonleft.
addarc( jarc->next );
86 tailonright.
addarc( jtemp = jarc->next );
87 headonleft.
addarc( jtemp->next );
91 tailonright .
addarc( jarc );
92 headonleft.
addarc( jtemp = jarc->next );
93 left.addarc( jtemp->next );
97 tailonright.
addarc( jtemp = jarc->next );
98 headonleft.
addarc( jtemp = jtemp->next );
99 left.addarc( jtemp->next );
102 }
else if( tdiff == 0.0 ) {
104 headonright.
addarc( jarc );
105 }
else if( hdiff == 0.0 ) {
108 headonleft.
addarc( jarc );
115 tailonleft.
addarc( jarc );
116 headonright.
addarc( jarc->next );
121 tailonleft.
addarc( jtemp = jarc->next );
122 headonright.
addarc( jtemp->next );
126 tailonleft.
addarc( jarc );
127 headonright.
addarc( jtemp = jarc->next );
128 right.addarc( jtemp->next );
132 tailonleft.
addarc( jtemp = jarc->next );
133 headonright.
addarc( jtemp = jtemp->next );
134 right.addarc( jtemp->next );
136 }
else if( hdiff == 0.0 ) {
137 tailonleft.
addarc( jarc );
165 if(
l->param[1-
p] !=
r->param[1-
p] ) {
166 REAL ratio = (
val -
l->param[
p]) / (
r->param[
p] -
l->param[
p]);
167 n->param[1-
p] =
l->param[1-
p] +
168 ratio * (
r->param[1-
p] -
l->param[1-
p]);
170 n->param[1-
p] =
l->param[1-
p];
177 int maxvertex = jarc->pwlArc->npts;
188 jarc1->next = jarc->next;
189 jarc1->next->prev = jarc1;
192 assert(jarc->check() != 0);
222 for(
k=0;
k<maxvertex-
i;
k++)
224 newjunk[
k+1] =
v[
i+
k];
225 newjunk[
k+1].
nuid = jarc->nuid;
229 for(
k=0;
k<maxvertex;
k++)
234 jarc->pwlArc->pts=vcopy;
237 v[
j].nuid = jarc->nuid;
251 jarc1->next = jarc->next;
252 jarc1->next->prev = jarc1;
255 assert(jarc->check() != 0);
265 v[
j].nuid = jarc->nuid;
274 if (maxvertex == 2) {
277 jarc->pwlArc->pts = newjunk;
278 jarc1->next = jarc->next;
279 jarc1->next->prev = jarc1;
282 assert(jarc->check() != 0);
287 }
else if (maxvertex -
j == 2) {
291 jarc2->next = jarc->next;
292 jarc2->next->prev = jarc2;
297 assert(jarc->check() != 0);
306 jarc->pwlArc->pts = newjunk;
307 jarc2->next = jarc->next;
308 jarc2->next->prev = jarc2;
313 assert(jarc->check() != 0);
322 jarc3->next = jarc->next;
323 jarc3->next->prev = jarc3;
330 assert(jarc->check() != 0);
409 tdiff = jarc->tail()[0] -
value;
410 hdiff = jarc->head()[0] -
value;
412 tdiff = jarc->tail()[1] -
value;
413 hdiff = jarc->head()[1] -
value;
419 }
else if( hdiff == 0.0 ) {
424 }
else if( tdiff == 0.0 ) {
427 }
else if( hdiff == 0.0 ) {
435 }
else if( hdiff == 0.0 ) {
450 while( (
j =
bin.removearc()) !=
NULL ) {
454 REAL diff =
j->next->head()[0] -
val;
457 }
else if( diff < 0.0 ) {
463 if(
j->next->tail()[1] >
j->next->head()[1] )
477 while( (
j =
bin.removearc()) !=
NULL ) {
481 REAL diff =
j->next->head()[1] -
val;
484 }
else if( diff < 0.0 ) {
490 if (
j->next->tail()[0] >
j->next->head()[0] )
504 while( (
j =
bin.removearc()) !=
NULL ) {
509 REAL diff =
j->prev->tail()[0] -
val;
512 }
else if( diff < 0.0 ) {
518 if(
j->prev->tail()[1] >
j->prev->head()[1] )
532 while( (
j =
bin.removearc()) !=
NULL ) {
536 REAL diff =
j->prev->tail()[1] -
val;
539 }
else if( diff < 0.0 ) {
545 if(
j->prev->tail()[0] >
j->prev->head()[0] )
560 while( (
j =
bin.removearc()) !=
NULL ) {
565 REAL diff =
j->next->head()[0] -
val;
571 }
else if( diff < 0.0 ) {
574 if(
j->next->tail()[1] >
j->next->head()[1] )
588 while( (
j =
bin.removearc()) !=
NULL ) {
593 REAL diff =
j->next->head()[1] -
val;
599 }
else if( diff < 0.0 ) {
602 if(
j->next->tail()[0] >
j->next->head()[0] )
616 while( (
j =
bin.removearc()) !=
NULL ) {
621 REAL diff =
j->prev->tail()[0] -
val;
627 }
else if( diff < 0.0 ) {
630 if(
j->prev->tail()[1] >
j->prev->head()[1] )
644 while( (
j =
bin.removearc()) !=
NULL ) {
649 REAL diff =
j->prev->tail()[1] -
val;
655 }
else if( diff < 0.0 ) {
658 if(
j->prev->tail()[0] >
j->prev->head()[0] )
void triangle(TrimVertex *, TrimVertex *, TrimVertex *)
void classify_tailonright_s(Bin &, Bin &, Bin &, REAL)
void classify_tailonleft_s(Bin &, Bin &, Bin &, REAL)
int ccwTurn_sr(Arc_ptr, Arc_ptr)
void classify_tailonleft_t(Bin &, Bin &, Bin &, REAL)
int ccwTurn_tl(Arc_ptr, Arc_ptr)
void classify_tailonright_t(Bin &, Bin &, Bin &, REAL)
void partition(Bin &, Bin &, Bin &, Bin &, Bin &, int, REAL)
void classify_headonleft_t(Bin &, Bin &, Bin &, REAL)
int showingDegenerate(void)
void classify_headonleft_s(Bin &, Bin &, Bin &, REAL)
void classify_headonright_s(Bin &, Bin &, Bin &, REAL)
int arc_split(Arc_ptr, int, REAL, int)
int ccwTurn_sl(Arc_ptr, Arc_ptr)
TrimVertexPool trimvertexpool
int ccwTurn_tr(Arc_ptr, Arc_ptr)
void classify_headonright_t(Bin &, Bin &, Bin &, REAL)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
GLdouble GLdouble GLdouble r
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static void vert_interp(TrimVertex *n, TrimVertex *l, TrimVertex *r, int p, REAL val)
static enum i_result pwlarc_intersect(PwlArc *, int, REAL, int, int[3])
static int arc_classify(Arc_ptr, int, REAL)
static struct _PeImage bin