Lines Matching refs:index2
461 Int index1, index2;
464 index2 = rightChain->findIndexBelowGen(v, rightChainStartIndex, rightChainEndIndex);
466 if(index2 <= rightChainEndIndex) //index2 was found above
467 index2 = rightChain->skipEqualityFromStart(v, index2, rightChainEndIndex);
469 if(index1>leftChainEndIndex && index2 > rightChainEndIndex) /*no point below v on left chain or right chain*/
476 else if(index1>leftChainEndIndex ) /*index2 <= rightChainEndIndex*/
480 ret_rightCornerIndex = index2;
483 Real tempMin = rightChain->getVertex(index2)[0];
484 Int tempI = index2;
485 for(i=index2+1; i<= rightChainEndIndex; i++)
499 ret_leftCornerIndex = index2; //should use tempI???
509 else if(index2> rightChainEndIndex) /*index1<=leftChainEndIndex*/
558 else /*index1<=leftChainEndIndex and index2 <=rightChainEndIndex*/
560 if(leftChain->getVertex(index1)[1] >= rightChain->getVertex(index2)[1]) /*left point above right point*/
571 /*find the maximum u for all the points on the left above the right point index2*/
574 if(leftChain->getVertex(i)[1] < rightChain->getVertex(index2)[1])
583 //we consider if we can use rightChain(index2) as right corner
584 //we check if (rightChain(index2), rightGidPoint) intersecs left chain or not.
585 if(DBG_intersectChain(leftChain, leftChainStartIndex,leftChainEndIndex, rightGridPoint, rightChain->getVertex(index2)))
590 else if(tempMax >= rightChain->getVertex(index2)[0] ||
601 ret_rightCornerIndex = index2;
607 ret_rightCornerIndex = index2;
612 tempI = index2;
613 tempMin = rightChain->getVertex(index2)[0];
616 for(i=index2+1; i<= rightChainEndIndex; i++)
632 ret_leftCornerIndex = index2; //should use tempI???
676 Int index1, index2;
681 index2 = rightChain->findIndexFirstAboveEqualGen(v, rightChainStartIndex, rightChainEndIndex);
683 if(index2>= leftChainStartIndex) //index2 was found above
684 index2 = rightChain->skipEqualityFromStart(v, index2, rightChainEndIndex);
686 if(index1<leftChainStartIndex && index2 <rightChainStartIndex) /*no point above v on left chain or right chain*/
692 else if(index1<leftChainStartIndex ) /*index2 >= rightChainStartIndex*/
695 ret_rightCornerIndex = index2;
697 //find the minimum u on right top, either that, or top, or right[index2] is the left corner
698 Real tempMin = rightChain->getVertex(index2)[0];
699 Int tempI = index2;
700 for(i=index2-1; i>=rightChainStartIndex; i--)
713 ret_leftCornerIndex = index2;
724 else if(index2< rightChainStartIndex) /*index1>=leftChainStartIndex*/
759 else /*index1>=leftChainStartIndex and index2 >=rightChainStartIndex*/
761 if(leftChain->getVertex(index1)[1] <= rightChain->getVertex(index2)[1]) /*left point below right point*/
772 /*find the maximum u for all the points on the left below the right point index2*/
775 if(leftChain->getVertex(i)[1] > rightChain->getVertex(index2)[1])
784 //chek whether (rightChain(index2), rightGridPoint) intersects leftchian or not
785 if(DBG_intersectChain(leftChain, leftChainStartIndex, leftChainEndIndex, rightGridPoint, rightChain->getVertex(index2)))
790 else if(tempMax >= rightChain->getVertex(index2)[0] ||
799 ret_rightCornerIndex = index2;
805 ret_rightCornerIndex = index2;
810 tempI = index2;
811 tempMin = rightChain->getVertex(index2)[0];
814 for(i=index2-1; i>= rightChainStartIndex; i--)
829 ret_leftCornerIndex = index2;
1417 Int index1, index2; /*the first and last grid line of the first connected component*/
1489 /*find index2 so that left_inner_index <= right_inner_index holds until index2*/
1490 index2=index1+1;
1491 if(index2 < leftGridChain->get_nVlines())
1492 while(leftGridChain->getInnerIndex(index2) <= rightGridChain->getInnerIndex(index2))
1494 index2++;
1495 if(index2 >= leftGridChain->get_nVlines())
1499 index2--;
1522 /*find the points below the grid line index2 on both chains*/
1524 leftGridChain->get_v_value(index2),
1528 rightGridChain->get_v_value(index2),
1536 leftGridChain, rightGridChain, index2, neckLeftIndex, neckRightIndex))
1609 leftGridChain->get_v_value(index2),
1610 leftGridChain->get_u_value(index2),
1611 rightGridChain->get_u_value(index2),
1631 index2,
1650 index1, index2,
1674 index2+1,
1759 * Find the last grid line index2 which is above nextTrimVert.
1761 * leftGridChain, leftGridChainStartIndex+1, index2).
1766 Int index2 = leftGridChainStartIndex+1;
1768 while(leftGridChain->get_v_value(index2) >= lowervert[1])
1770 index2++;
1771 if(index2 > leftGridChainEndIndex)
1774 index2--;
1775 sampleLeftSingleTrimEdgeRegion(uppervert, lowervert, leftGridChain, leftGridChainStartIndex+1, index2, pStream);
1781 index2,
1786 sampleLeftStripRec(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream);
1873 * Find the last grid line index2 which is above nextTrimVert.
1875 * leftGridChain, leftGridChainStartIndex+1, index2).
1880 Int index2 = leftGridChainStartIndex+1;
1883 while(leftGridChain->get_v_value(index2) >= lowervert[1])
1885 index2++;
1886 if(index2 > leftGridChainEndIndex)
1889 index2--;
1892 sampleLeftSingleTrimEdgeRegion(uppervert, lowervert, leftGridChain, leftGridChainStartIndex+1, index2, pStream);
1896 sampleLeftStripRecF(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream);