89 if(cur_sign != prev_sign)
93 if(n_changes ==2)
return 1;
118 V_count +=
temp->get_npoints();
120 U_count +=
temp->get_npoints();
129 if(U_count > V_count)
return 1;
166 if((l1->
head()[0] == l2->
head()[0] &&
235 for(temp2=temp1->
getNext(); temp2 != temp1; temp2=temp2->
getNext())
244 for(temp1=poly->
getNext(); temp1 != poly; temp1 = temp1->
getNext())
245 for(temp2=temp1->
getNext(); temp2 != temp1; temp2=temp2->
getNext())
365 if(nomEdge == denom) {
371 if(denom*nomRay>0 && denom*nomEdge>0 && nomEdge/denom <=1.0)
454 oldNext =
temp->getNext();
456 temp->putPrev(oldNext);
463 if(polygon ==
NULL)
return 1;
470 if(
temp->head()[0] !=
temp->getPrev()->tail()[0] ||
471 temp->head()[1] !=
temp->getPrev()->tail()[1])
485 if(polyList ==
NULL)
return 0;
491 fprintf(
stderr,
"DBG_check: there are self intersections, don't know to modify the polygons\n");
519 if(correctDir != actualDir)
521 fprintf(
stderr,
"DBG_check: polygon with incorrect orientations. reversed\n");
659 if(intersect !=
NULL)
688 tempNext =
temp->getNextPolygon();
705 if(polygonList ==
NULL)
732 retHead =
temp->getSampledLine()->insert(retHead);
void putDirection(short dir)
directedLine * deleteChain(directedLine *begin, directedLine *end)
void putPrev(directedLine *p)
void putNext(directedLine *p)
sampledLine * getSampledLine()
directedLine * getNextPolygon()
sampledLine * insert(sampledLine *nline)
Int compV2InX(Real A[2], Real B[2])
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLfloat GLfloat GLfloat v2
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 * u
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
Int DBG_pointInsidePoly(Real v[2], directedLine *poly)
void DBG_reverse(directedLine *poly)
static Real area(Real A[2], Real B[2], Real C[2])
Int DBG_checkConnectivity(directedLine *polygon)
Int DBG_edgesIntersectGen(Real A[2], Real B[2], Real C[2], Real D[2])
Int DBG_is_U_monotone(directedLine *poly)
void DBG_collectSampledLinesPoly(directedLine *polygon, sampledLine *&retHead, sampledLine *&retTail)
Int DBG_isConvex(directedLine *poly)
Int DBG_rayIntersectPoly(Real v0[2], Real dx, Real dy, directedLine *poly)
Int DBG_rayIntersectEdge(Real v0[2], Real dx, Real dy, Real v10[2], Real v1[2], Real v2[2])
Int DBG_enclosingPolygons(directedLine *poly, directedLine *list)
Int DBG_check(directedLine *polyList)
Int DBG_edgeIntersectPoly(directedLine *edge, directedLine *poly)
Int DBG_edgesIntersect(directedLine *l1, directedLine *l2)
Int DBG_is_U_direction(directedLine *poly)
Int DBG_polygonsIntersect(directedLine *p1, directedLine *p2)
directedLine * DBG_cutIntersectionPoly(directedLine *polygon, int &cutOccur)
Int DBG_polygonListIntersect(directedLine *pList)
Int DBG_polygonSelfIntersect(directedLine *poly)
directedLine * DBG_cutIntersectionAllPoly(directedLine *list)
sampledLine * DBG_collectSampledLinesAllPoly(directedLine *polygonList)
Int DBG_intersectChain(vertexArray *chain, Int start, Int end, Real A[2], Real B[2])
static directedLine * DBG_edgeIntersectChainD(directedLine *e, directedLine *begin, directedLine *end)
Int DBG_isCounterclockwise(directedLine *poly)
static unsigned __int64 next