Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 57 of file monoTriangulation.cc.
Referenced by sampleLeftOneGridStep(), and sampleRightOneGridStep().
{ Int n_cusps; Int n_edges = poly->numEdges(); directedLine** cusps = (directedLine**) malloc(sizeof(directedLine*)*n_edges); assert(cusps); findInteriorCuspsX(poly, n_cusps, cusps); if(n_cusps ==0) //u monotine { monoTriangulationFun(poly, compV2InX, pStream); } else if(n_cusps == 1) // one interior cusp { directedLine* new_polygon = polygonConvert(cusps[0]); directedLine* other = findDiagonal_singleCuspX(new_polygon); //<other> should NOT be null unless there are self-intersecting //trim curves. In that case, we don't want to core dump, instead, //we triangulate anyway, and print out error message. if(other == NULL) { monoTriangulationFun(poly, compV2InX, pStream); } else { directedLine* ret_p1; directedLine* ret_p2; new_polygon->connectDiagonal_2slines(new_polygon, other, &ret_p1, &ret_p2, new_polygon); monoTriangulationFun(ret_p1, compV2InX, pStream); monoTriangulationFun(ret_p2, compV2InX, pStream); ret_p1->deleteSinglePolygonWithSline(); ret_p2->deleteSinglePolygonWithSline(); } } else { //we need a general partitionX funtion (supposed to be in partitionX.C, //not implemented yet. XXX monoTriangulationFun(poly, compV2InY, pStream); } free(cusps); }