481{
482 if(up_leftCornerWhere == 1 && up_rightCornerWhere == 1)
483 {
487 topVertex,
488 pStream);
489 return;
490 }
491
492 else if(up_leftCornerWhere != 0)
493 {
496 if(up_leftCornerWhere == 1){
497 tempRightStart = rightStartIndex;
498 tempTop = topVertex;
499 }
500 else
501 {
502 tempRightStart = up_leftCornerIndex+1;
503 tempTop = rightChain->
getVertex(up_leftCornerIndex);
504 }
510 pStream);
511 }
512 else if(up_rightCornerWhere != 2)
513 {
516 if(up_rightCornerWhere == 1)
517 {
518 tempLeftStart = leftStartIndex;
519 tempTop = topVertex;
520 }
521 else
522 {
523 tempLeftStart = up_rightCornerIndex+1;
524 tempTop = leftChain->
getVertex(up_rightCornerIndex);
525 }
526
527
528
529
530
531
532
533
535 leftChain,
536 leftStartIndex,
537 rightChain,
538 rightStartIndex,
539 leftGridChain,
540 rightGridChain,
541 gridIndex1,
542 up_leftCornerWhere,
543 up_leftCornerIndex,
544 up_rightCornerWhere,
545 up_rightCornerIndex,
546 pStream);
547 }
548 else
549 {
551 leftChain,
552 leftStartIndex,
553 rightChain,
554 rightStartIndex,
555 leftGridChain,
556 rightGridChain,
557 gridIndex1,
558 up_leftCornerWhere,
559 up_leftCornerIndex,
560 up_rightCornerWhere,
561 up_rightCornerIndex,
562 pStream);
563 return;
564#ifdef NOT_REACHABLE
565
566 Int sep_left, sep_right;
568 leftStartIndex,
569 up_leftCornerIndex,
570 rightChain,
571 rightStartIndex,
572 up_rightCornerIndex,
573 sep_left,
574 sep_right)
575 )
576 {
577
580 {
582 Int segLeftSmall, segLeftLarge, segRightSmall, segRightLarge;
585 sep_left,
586 up_leftCornerIndex,
588 segLeftSmall,
589 segLeftLarge);
591 sep_right,
592 up_rightCornerIndex,
594 segRightSmall,
595 segRightLarge);
597 {
600 gridSep--;
601 if(segLeftSmall<segLeftLarge)
603 {
605 }
606 }
607 else
608 {
611 gridSep++;
612 if(segRightSmall<segRightLarge)
614 {
616 }
617 }
618
620 {
622 leftChain,
623 leftStartIndex,
624 rightChain,
625 rightStartIndex,
626 leftGridChain,
627 rightGridChain,
628 gridIndex1,
629 up_leftCornerWhere,
630 up_leftCornerIndex,
631 up_rightCornerWhere,
632 up_rightCornerIndex,
633 pStream);
634 }
635 else
636 {
638 leftChain,
639 segLeftSmall+1,
640 segLeftSmall+1,
641 segLeftLarge,
642 up_leftCornerIndex,
646 gridSep,
647 pStream);
649 rightChain,
650 segRightSmall+1,
651 segRightSmall+1,
652 segRightLarge,
653 up_rightCornerIndex,
656 gridSep,
658 pStream);
661 tempBot[1] = leftGridChain->
get_v_value(gridIndex1);
663 leftChain, leftStartIndex, segLeftSmall,
664 rightChain, rightStartIndex, segRightSmall,
665 pStream);
666 }
667 }
669 {
670
671 Int segLeftSmall, segLeftLarge;
673 sep_left,
674 up_leftCornerIndex,
676 segLeftSmall,
677 segLeftLarge);
678 assert(segLeftLarge >= sep_left);
681 leftChain,
682 segLeftLarge+1,
683 up_leftCornerIndex,
684 1,
685 pStream);
686
692 pStream, 0);
693
694
696 leftChain, leftStartIndex, segLeftSmall,
697 rightChain, rightStartIndex, up_rightCornerIndex,
698 pStream);
699 }
701 {
702 Int segRightSmall, segRightLarge;
704 sep_right,
705 up_rightCornerIndex,
707 segRightSmall,
708 segRightLarge);
709 assert(segRightLarge>=sep_right);
712 rightChain,
713 segRightLarge+1,
714 up_rightCornerIndex,
715 0,
716 pStream);
722 pStream, 0);
723
724
726 leftChain, leftStartIndex, up_leftCornerIndex,
727 rightChain, rightStartIndex,segRightSmall,
728 pStream);
729
730 }
731 else
732 {
733
735 leftChain,
736 leftStartIndex,
737 rightChain,
738 rightStartIndex,
739 leftGridChain,
740 rightGridChain,
741 gridIndex1,
742 up_leftCornerWhere,
743 up_leftCornerIndex,
744 up_rightCornerWhere,
745 up_rightCornerIndex,
746 pStream);
747 }
748 }
749 else
750 {
751
753 leftChain,
754 leftStartIndex,
755 rightChain,
756 rightStartIndex,
757 leftGridChain,
758 rightGridChain,
759 gridIndex1,
760 up_leftCornerWhere,
761 up_leftCornerIndex,
762 up_rightCornerWhere,
763 up_rightCornerIndex,
764 pStream);
765 }
766#endif
767 }
768}
void outputFanWithPoint(Int v, Int uleft, Int uright, Real vert[2], primStream *pStream)
void monoTriangulationRecGen(Real *topVertex, Real *botVertex, vertexArray *inc_chain, Int inc_current, Int inc_end, vertexArray *dec_chain, Int dec_current, Int dec_end, primStream *pStream)
void monoTriangulation2(Real *topVertex, Real *botVertex, vertexArray *inc_chain, Int inc_smallIndex, Int inc_largeIndex, Int is_increase_chain, primStream *pStream)
void stripOfFanRight(vertexArray *rightChain, Int largeIndex, Int smallIndex, gridWrap *grid, Int vlineIndex, Int ulineSmallIndex, Int ulineLargeIndex, primStream *pStream, Int gridLineUp)
void sampleCompTopSimple(Real *topVertex, vertexArray *leftChain, Int leftStartIndex, vertexArray *rightChain, Int rightStartIndex, gridBoundaryChain *leftGridChain, gridBoundaryChain *rightGridChain, Int gridIndex1, Int up_leftCornerWhere, Int up_leftCornerIndex, Int up_rightCornerWhere, Int up_rightCornerIndex, primStream *pStream)
Int findTopSeparator(vertexArray *leftChain, Int leftStartIndex, Int leftEndIndex, vertexArray *rightChain, Int rightStartIndex, Int rightEndIndex, Int &ret_sep_left, Int &ret_sep_right)
void sampleTopRightWithGridLinePost(Real *topVertex, vertexArray *rightChain, Int rightStart, Int segIndexSmall, Int segIndexLarge, Int rightEnd, gridWrap *grid, Int gridV, Int leftU, Int rightU, primStream *pStream)
void sampleTopLeftWithGridLinePost(Real *topVertex, vertexArray *leftChain, Int leftStart, Int segIndexSmall, Int segIndexLarge, Int leftEnd, gridWrap *grid, Int gridV, Int leftU, Int rightU, primStream *pStream)
void findTopLeftSegment(vertexArray *leftChain, Int leftStart, Int leftEnd, Real u, Int &ret_index_small, Int &ret_index_large)
void findTopRightSegment(vertexArray *rightChain, Int rightStart, Int rightEnd, Real u, Int &ret_index_small, Int &ret_index_large)
void sampleTopRightWithGridLine(Real *topVertex, vertexArray *rightChain, Int rightStart, Int rightEnd, gridWrap *grid, Int gridV, Int leftU, Int rightU, primStream *pStream)
void stripOfFanLeft(vertexArray *leftChain, Int largeIndex, Int smallIndex, gridWrap *grid, Int vlineIndex, Int ulineSmallIndex, Int ulineLargeIndex, primStream *pStream, Int gridLineUp)