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 sampleCompLeft ( Real topVertex,
Real botVertex,
vertexArray leftChain,
Int  leftStartIndex,
Int  leftEndIndex,
vertexArray rightChain,
Int  rightStartIndex,
Int  rightEndIndex,
gridBoundaryChain leftGridChain,
Int  gridIndex1,
Int  gridIndex2,
Int  up_leftCornerWhere,
Int  up_leftCornerIndex,
Int  down_leftCornerWhere,
Int  down_leftCornerIndex,
primStream pStream 
)

Definition at line 144 of file sampleComp.cc.

Referenced by sampleConnectedComp().

{
  /*find out whether there is a trim vertex which is
   *inbetween the top and bot grid lines or not.
   */
  Int midIndex1 = 0;
  Int midIndex2 = 0;
  Int gridMidIndex1 = 0, gridMidIndex2 = 0;
  //midIndex1: array[i] <= v, array[i-1] > v
  //midIndex2: array[i] >= v, array[i+1] < v
  // v(gridMidIndex1) >= v(midindex1) > v(gridMidIndex1+1)
  // v(gridMidIndex2-1) >= v(midIndex2) > v(gridMidIndex2) ??
  midIndex1 = leftChain->findIndexBelowGen(
                       leftGridChain->get_v_value(gridIndex1),
                       leftStartIndex,
                       leftEndIndex);

  midIndex2 = -1; /*initilization*/
  if(midIndex1<= leftEndIndex && gridIndex1<gridIndex2)
    if(leftChain->getVertex(midIndex1)[1] >= leftGridChain->get_v_value(gridIndex2))
      {
    midIndex2 = leftChain->findIndexAboveGen(
                         leftGridChain->get_v_value(gridIndex2),
                         midIndex1, //midIndex1 <= midIndex2.
                         leftEndIndex);
    gridMidIndex1  = leftGridChain->lookfor(leftChain->getVertex(midIndex1)[1],
                        gridIndex1, gridIndex2);
    gridMidIndex2 = 1+leftGridChain->lookfor(leftChain->getVertex(midIndex2)[1],
                           gridMidIndex1, gridIndex2);  
      }


  /*to interprete the corner information*/
  Real* cornerTop;
  Real* cornerBot;
  Int cornerLeftStart;
  Int cornerLeftEnd;
  Int cornerRightUpEnd;
  Int cornerRightDownStart;
  if(up_leftCornerWhere == 0) /*left corner is on left chain*/
    {
      cornerTop = leftChain->getVertex(up_leftCornerIndex);
      cornerLeftStart = up_leftCornerIndex+1;
      cornerRightUpEnd = -1; /*no right*/
    }
  else if(up_leftCornerWhere == 1) /*left corner is on top*/
    {
      cornerTop = topVertex;
      cornerLeftStart = leftStartIndex;
      cornerRightUpEnd = -1; /*no right*/
    }
  else /*left corner is on right chain*/
    {
      cornerTop = topVertex;
      cornerLeftStart = leftStartIndex;
      cornerRightUpEnd = up_leftCornerIndex;
    }
  
  if(down_leftCornerWhere == 0) /*left corner is on left chain*/
    {
      cornerBot = leftChain->getVertex(down_leftCornerIndex);
      cornerLeftEnd = down_leftCornerIndex-1;
      cornerRightDownStart = rightEndIndex+1; /*no right*/
    }
  else if(down_leftCornerWhere == 1) /*left corner is on bot*/
    {
      cornerBot = botVertex;
      cornerLeftEnd = leftEndIndex;
      cornerRightDownStart = rightEndIndex+1; /*no right*/
    }
  else /*left corner is on the right chian*/
    {
      cornerBot = botVertex;
      cornerLeftEnd = leftEndIndex;
      cornerRightDownStart = down_leftCornerIndex;
    }
      



  /*sample*/
  if(midIndex2 >= 0) /*there is a trim point inbewteen grid lines*/
    {

      sampleLeftSingleTrimEdgeRegionGen(cornerTop, leftChain->getVertex(midIndex1),
                    leftChain,
                    cornerLeftStart,
                    midIndex1-1,
                    leftGridChain,
                    gridIndex1,
                    gridMidIndex1,
                    rightChain,
                    rightStartIndex,
                    cornerRightUpEnd,
                    0, //no right down section
                    -1,
                    pStream);

      sampleLeftSingleTrimEdgeRegionGen(leftChain->getVertex(midIndex2),
                    cornerBot,
                    leftChain,
                    midIndex2+1,
                    cornerLeftEnd,
                    leftGridChain,
                    gridMidIndex2,
                    gridIndex2,
                    rightChain,
                    0, //no right up section
                    -1,
                    cornerRightDownStart,
                    rightEndIndex,
                    pStream);


      sampleLeftStripRecF(leftChain,
              midIndex1,
              midIndex2,
              leftGridChain,
              gridMidIndex1,
              gridMidIndex2,
              pStream);
    }
  else
    {
      sampleLeftSingleTrimEdgeRegionGen(cornerTop, cornerBot,
                    leftChain,
                    cornerLeftStart,
                    cornerLeftEnd,
                    leftGridChain,
                    gridIndex1,
                    gridIndex2,
                    rightChain,
                    rightStartIndex,
                    cornerRightUpEnd,
                    cornerRightDownStart,
                    rightEndIndex,
                    pStream);
    }                    
}

Generated on Sat May 26 2012 05:08:23 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.