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

Method ISPCGridMesh

tutorials/common/tutorial/scene_device.cpp:345–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343 }
344
345 ISPCGridMesh::ISPCGridMesh (RTCDevice device, TutorialScene* scene_in, Ref<SceneGraph::GridMeshNode> in)
346 : geom(GRID_MESH), positions(nullptr)
347 {
348 geom.geometry = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_GRID);
349
350 positions = (Vec3fa**) alignedUSMMalloc(sizeof(Vec3fa*)*in->numTimeSteps());
351 for (size_t i=0; i<in->numTimeSteps(); i++)
352 positions[i] = copyArrayToUSM(in->positions[i]);
353
354 startTime = in->time_range.lower;
355 endTime = in->time_range.upper;
356 numTimeSteps = (unsigned) in->numTimeSteps();
357 numVertices = (unsigned) in->numVertices();
358 numGrids = (unsigned) in->numPrimitives();
359 geom.materialID = scene_in->materialID(in->material);
360 grids = (ISPCGrid*) copyArrayToUSM(in->grids);
361 }
362
363 ISPCGridMesh::~ISPCGridMesh ()
364 {

Callers

nothing calls this directly

Calls 6

alignedUSMMallocFunction · 0.85
copyArrayToUSMFunction · 0.85
materialIDMethod · 0.80
numTimeStepsMethod · 0.45
numVerticesMethod · 0.45
numPrimitivesMethod · 0.45

Tested by

no test coverage detected