650 Int total_num_chains = 0;
654 if(total_num_chains<=2)
658 *retSampledLines =
NULL;
674 *retSampledLines =
NULL;
683 assert(diagonal_vertices);
707 for(
i=0;
i<num_diagonals;
i++)
708 removedDiagonals[
i] = 0;
712 for(
i=0,
k=0;
i<num_diagonals;
i++,
k+=2)
737 removedDiagonals[
i] = 1;
742 v1->connectDiagonal(
v1,
v2, &ret_p1, &ret_p2, &generatedLine, ret_polygons);
746 newSampledLines = generatedLine->
insert(newSampledLines);
776 for(ii=0, kk=0; ii<num_diagonals; ii++, kk+=2)
777 if( removedDiagonals[ii]==0)
785 v1->head(),
v1->tail(), d2->
head()))
798 v2->head(),
v2->tail(), d2->
head()))
812 v1->head(),
v1->tail(), d1->
head()))
824 v2->head(),
v2->tail(), d1->
head()))
844 for(
i=0,
k=0;
i<num_diagonals;
i++,
k += 2)
845 if(removedDiagonals[
i] == 0)
874 v1->connectDiagonal(
v1,
v2, &ret_p1, &ret_p2, &generatedLine, ret_polygons);
875 newSampledLines = generatedLine->
insert(newSampledLines);
885 for(
Int j=
i+1;
j<num_diagonals;
j++)
887 if(removedDiagonals[
j] ==0)
892 if(temp1==
v1 || temp1==
v2 || temp2==
v1 || temp2==
v2)
929 free(diagonal_vertices);
930 free(removedDiagonals);
932 *retSampledLines = newSampledLines;
void rootLinkSet(directedLine *r)
static int compChainHeadInY(monoChain *mc1, monoChain *mc2)
void quicksort(void *v[], int left, int right, int(*comp)(void *, void *))
sampledLine * insert(sampledLine *nline)
Int samePolygon(directedLine *v1, directedLine *v2)
directedLine * insertPolygon(directedLine *newpolygon)
monoChain * directedLineLoopListToMonoChainLoopList(directedLine *list)
void MC_findDiagonals(Int total_num_edges, monoChain **sortedVertices, sweepRange **ranges, Int &num_diagonals, directedLine **diagonal_vertices)
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
directedLine * rootLinkFindRoot()
Int MC_sweepY(Int nVertices, monoChain **sortedVertices, sweepRange **ret_ranges)
Int deleteRepeatDiagonals(Int num_diagonals, directedLine **diagonal_vertices, directedLine **new_vertices)
GLfloat GLfloat GLfloat v2
Int pointLeft2Lines(Real A[2], Real B[2], Real C[2], Real P[2])
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
directedLine * cutoffPolygon(directedLine *p)
directedLine * findRoot()
monoChain ** toArrayAllLoops(Int &num_chains)