Lines Matching refs:grid

389 		    gridWrap* grid,
393 /*find the first(top) and the last (bottom) grid line which intersect the
396 Int firstGridIndex; /*the index in the grid*/
399 firstGridIndex = (Int) ((topV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1));
401 if(botV->head()[1] < grid->get_v_min())
404 lastGridIndex = (Int) ((botV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1)) + 1;
416 findLeftGridIndices(topV, firstGridIndex, lastGridIndex, grid, leftGridIndices, leftGridInnerIndices);
418 findRightGridIndices(topV, firstGridIndex, lastGridIndex, grid, rightGridIndices, rightGridInnerIndices);
420 leftGridChain = new gridBoundaryChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, leftGridIndices, leftGridInnerIndices);
422 rightGridChain = new gridBoundaryChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, rightGridIndices, rightGridInnerIndices);
866 Int lowerGridIndex; //the grid below leftChain and rightChian vertices
974 void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
978 Int n_ulines = grid->get_n_ulines();
979 Real uMin = grid->get_u_min();
980 Real uMax = grid->get_u_max();
982 Real vMin = grid->get_v_min();
983 Real vMax = grid->get_v_max();
988 //uintercBuf stores all the interction u value for each grid line
994 /*initialization to make vtail bigger than grid->...*/
996 Real vtail = grid->get_v_value(firstGridIndex) + 1.0;
997 Real tempMaxU = grid->get_u_min();
1000 /*for each grid line*/
1004 Real grid_v_value = grid->get_v_value(i);
1006 /*check whether this grid line is below the current trim edge.*/
1009 /*since the grid line is below the trim edge, we
1062 //for each grid line, compare the left grid point with the
1064 //we should move the grid point one grid to the right
1070 Real a = grid->get_u_value(ret_indices[k]-1);
1071 Real b = grid->get_u_value(ret_indices[k]);
1092 void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
1096 Int n_ulines = grid->get_n_ulines();
1097 Real uMin = grid->get_u_min();
1098 Real uMax = grid->get_u_max();
1100 Real vMin = grid->get_v_min();
1101 Real vMax = grid->get_v_max();
1106 //uintercBuf stores all the interction u value for each grid line
1112 /*initialization to make vhead bigger than grid->v_value...*/
1115 Real tempMinU = grid->get_u_max();
1117 /*for each grid line*/
1121 Real grid_v_value = grid->get_v_value(i);
1124 /*check whether this grid line is below the current trim edge.*/
1127 /*since the grid line is below the tail of the trim edge, we
1153 //in case unterc is outside of the grid due to floating point
1172 if(ret_indices[k] >= grid->get_n_ulines())
1188 //for each grid line, compare the left grid point with the
1190 //we should move the grid point one grid to the right
1196 Real a = grid->get_u_value(ret_indices[k]);
1197 Real b = grid->get_u_value(ret_indices[k]+1);
1219 void sampleMonoPoly(directedLine* polygon, gridWrap* grid, Int ulinear, Int vlinear, primStream* pStream, rectBlockArray* rbArray)
1223 grid->print();
1229 if(grid->get_n_ulines() == 2 ||
1230 grid->get_n_vlines() == 2)
1232 if(ulinear && grid->get_n_ulines() == 2)
1319 /*find the first(top) and the last (bottom) grid line which intersect the
1322 Int firstGridIndex; /*the index in the grid*/
1324 firstGridIndex = (Int) ((topV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1));
1325 lastGridIndex = (Int) ((botV->head()[1] - grid->get_v_min()) / (grid->get_v_max() - grid->get_v_min()) * (grid->get_n_vlines()-1)) + 1;
1338 findLeftGridIndices(topV, firstGridIndex, lastGridIndex, grid, leftGridIndices, leftGridInnerIndices);
1340 findRightGridIndices(topV, firstGridIndex, lastGridIndex, grid, rightGridIndices, rightGridInnerIndices);
1342 gridBoundaryChain leftGridChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, leftGridIndices, leftGridInnerIndices);
1344 gridBoundaryChain rightGridChain(grid, firstGridIndex, firstGridIndex-lastGridIndex+1, rightGridIndices, rightGridInnerIndices);
1352 /*(1) determine the grid boundaries (left and right).
1417 Int index1, index2; /*the first and last grid line of the first connected component*/
1422 /*find i so that the grid line is below the top vertex*/
1433 *grid line contains at least one inner grid point
1447 if(index1 >= leftGridChain->get_nVlines()) /*no grid line exists which has inner point*/
1451 // printf("no grid line exists\n");
1522 /*find the points below the grid line index2 on both chains*/
1697 *(1)find the last grid line which doesn'; pass below
1699 * possily multiple grid lines.
1733 /*now top left trim vertex is below the top grid line.
1740 /*find the last trim vertex which is above the second top grid line:
1758 * below the second grid line).
1759 * Find the last grid line index2 which is above nextTrimVert.
1798 * grid line.
1812 /*now top left trim vertex is below the top grid line.
1819 /*if there is only one grid Line, return.*/
1828 /*firs find the first trim vertex which is below or equal to the second top grid line:
1872 * below the second grid line).
1873 * Find the last grid line index2 which is above nextTrimVert.
1903 /*sample the left area in between one trim edge and multiple grid lines.
1904 * all the grid lines should be in between the two end poins of the
1922 /*output the fan of the grid points of the (i)th and (i-1)th grid line.
1992 *second grid line, there could be multiple points on the first (top)
1993 *grid line.
2009 /*sampling the left area in between two grid lines.
2034 gridWrap* grid = leftGridChain->getGrid();
2049 vert1[0]=grid->get_u_value(i);
2050 vert2[0]=grid->get_u_value(i-1);
2059 //the edge connecting upper grid with left chain
2060 vert1[0] = grid->get_u_value(upperInd);
2078 vert2[0] = grid->get_u_value(lowerInd);
2084 //the lower grid line
2088 vert1[0] = grid->get_u_value(i);
2089 vert2[0] = grid->get_u_value(i+1);
2095 //the vertical grid line segement
2096 vert1[0]=vert2[0] = grid->get_u_value(innerInd);
2115 ) /*the second grid line is beyond the first one to the left*/
2147 /*if j-1 is on the first grid line, then we want to skip to the vertex which is strictly
2148 *below the grid line. This vertexmust exist since there is a 'corner turn' inbetween the two grid lines
2177 1 /*the grid line is above the trim line*/
2186 0 /*the grid line is below the trim lines*/
2190 *two vertices on the two grid v-lines.
2231 1 /*the grid line is above the trim lines*/
2234 *two vertices on the two grid v-lines.
2371 gridWrap* grid,
2376 Int gridLineUp /*1 if the grid line is above the trim lines*/
2382 grid_v_value = grid->get_v_value(vlineIndex);
2392 if(gridLineUp) /*trim line is below grid line, so trim vertices are going right when index increases*/
2407 gridVerts[k][0] = grid->get_u_value(i);