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

Function device_init

tutorials/grid_geometry/grid_geometry_device.cpp:535–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533
534/* called by the C++ code for initialization */
535extern "C" void device_init (char* cfg)
536{
537 /* create scene */
538 TutorialData_Constructor(&data);
539 g_scene = data.g_scene = rtcNewScene(g_device);
540 rtcSetSceneFlags(data.g_scene,RTC_SCENE_FLAG_ROBUST);
541
542 addGroundPlane(data.g_scene);
543
544 createGridGeometry(data.gmesh);
545 rtcAttachGeometry(data.g_scene,data.gmesh.geom);
546 //rtcAttachGeometry(g_scene,gmesh.geomNormals);
547
548 /* commit changes to scene */
549 rtcCommitScene (data.g_scene);
550 data.g_traversable = rtcGetSceneTraversable(data.g_scene);
551}
552
553Vec3fa mylerp(float f, const Vec3fa& a, const Vec3fa& b) { // FIXME: use lerpr, need to make ISPC lerpr and C++ lerpr compatible first
554 return (1.0f-f)*a + f*b;

Callers

nothing calls this directly

Calls 7

rtcNewSceneFunction · 0.85
rtcSetSceneFlagsFunction · 0.85
createGridGeometryFunction · 0.85
rtcAttachGeometryFunction · 0.85
rtcCommitSceneFunction · 0.85
TutorialData_ConstructorFunction · 0.70
addGroundPlaneFunction · 0.70

Tested by

no test coverage detected