ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

void monoTriangulationOpt ( directedLine poly,
primStream pStream 
)

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);
}

Generated on Sun May 27 2012 05:09:33 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.