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

Method addUserGeometryEmpty

tutorials/verify/verify.cpp:364–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362 }
363
364 std::pair<unsigned,Ref<SceneGraph::Node>> addUserGeometryEmpty (RandomSampler& sampler, RTCBuildQuality quality, Sphere* sphere)
365 {
366 RTCGeometry geom = rtcNewGeometry (device, RTC_GEOMETRY_TYPE_USER);
367 rtcSetGeometryUserPrimitiveCount(geom,1);
368 rtcSetGeometryBuildQuality(geom,quality);
369 AssertNoError(device);
370 rtcSetGeometryBoundsFunction(geom,BoundsFunc,nullptr);
371 rtcSetGeometryUserData(geom,sphere);
372 rtcSetGeometryIntersectFunction(geom,IntersectFuncN);
373 rtcSetGeometryOccludedFunction(geom,OccludedFuncN);
374 rtcCommitGeometry(geom);
375 unsigned int geomID = rtcAttachGeometry(scene,geom);
376 rtcReleaseGeometry(geom);
377 return std::make_pair(geomID,Ref<SceneGraph::Node>(nullptr));
378 }
379
380 void resizeRandomly (std::pair<unsigned,Ref<SceneGraph::Node>> geom, RandomSampler& sampler)
381 {

Callers 3

runMethod · 0.80

Calls 10

AssertNoErrorFunction · 0.85
rtcSetGeometryUserDataFunction · 0.85
rtcCommitGeometryFunction · 0.85
rtcAttachGeometryFunction · 0.85
rtcReleaseGeometryFunction · 0.85

Tested by

no test coverage detected