MCPcopy Create free account
hub / github.com/RenderKit/embree / createPrimRefMBArray

Method createPrimRefMBArray

kernels/common/scene_grid_mesh.h:455–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453#endif
454
455 PrimInfoMB createPrimRefMBArray(mvector<PrimRefMB>& prims, mvector<SubGridBuildData>& sgrids, const BBox1f& t0t1, const range<size_t>& r, size_t k, unsigned int geomID) const override
456 {
457 PrimInfoMB pinfoMB(empty);
458 for (size_t j=r.begin(); j<r.end(); j++)
459 {
460 if (!valid(j, timeSegmentRange(t0t1))) continue;
461 const GridMesh::Grid &g = grid(j);
462
463 for (unsigned int y=0; y<g.resY-1u; y+=2)
464 {
465 for (unsigned int x=0; x<g.resX-1u; x+=2)
466 {
467 const PrimRefMB prim(linearBounds(g,x,y,t0t1),numTimeSegments(),time_range,numTimeSegments(),unsigned(geomID),unsigned(k));
468 pinfoMB.add_primref(prim);
469 sgrids[k] = SubGridBuildData(x | g.get3x3FlagsX(x), y | g.get3x3FlagsY(y), unsigned(j));
470 prims[k++] = prim;
471 }
472 }
473 }
474 return pinfoMB;
475 }
476 };
477 }
478

Callers

nothing calls this directly

Calls 9

numTimeSegmentsFunction · 0.85
SubGridBuildDataClass · 0.85
get3x3FlagsXMethod · 0.80
get3x3FlagsYMethod · 0.80
validFunction · 0.70
timeSegmentRangeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
add_primrefMethod · 0.45

Tested by

no test coverage detected