Exemplo n.º 1
0
u32 occRasterizer::rasterize	(occTri* T)
{
	// Order the vertices by Y
	currentTri			= T;
	dwPixels			= 0;
	i_order				(&(T->raster[0].x), &(T->raster[1].x),&(T->raster[2].x));

	// Rasterize sections
	if (currentB[1]-iFloor(currentB[1]) > .5f)	
	{
		i_section_b1	();	// Rasterise First Section
		i_section_t0	();	// Rasterise Second Section
	} else {
		i_section_b0	();	// Rasterise First Section
		i_section_t1	();	// Rasterise Second Section
	}
	return				dwPixels;
}
Exemplo n.º 2
0
int main() {
  int T;
  scanf("%d", &T);
  for (int t = 0; t < T; ++t) {
      scanf("%d", &N);
      std::vector<int> p_order(N);
      std::vector<int> i_order(N);
      for (int i = 0; i < N; ++i)
          scanf("%d", &p_order[i]);
      for (int i = 0; i < N; ++i)
          scanf("%d", &i_order[i]);
      Solve(p_order, i_order);
      printf("\n");
  }
  // std::vector<int> a(10);
  // std::vector<int> b = slice(a, 0, 1);
  // printf("%lu\n", b.size());

  return 0;
}