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

Function main

tutorials/minimal/minimal.cpp:225–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223/* -------------------------------------------------------------------------- */
224
225int main()
226{
227 /* Initialization. All of this may fail, but we will be notified by
228 * our errorFunction. */
229 RTCDevice device = initializeDevice();
230 RTCScene scene = initializeScene(device);
231
232 /* This will hit the triangle at t=1. */
233 castRay(scene, 0.33f, 0.33f, -1, 0, 0, 1);
234
235 /* This will not hit anything. */
236 castRay(scene, 1.00f, 1.00f, -1, 0, 0, 1);
237
238 /* Though not strictly necessary in this example, you should
239 * always make sure to release resources allocated through Embree. */
240 rtcReleaseScene(scene);
241 rtcReleaseDevice(device);
242
243 /* wait for user input under Windows when opened in separate window */
244 waitForKeyPressedUnderWindows();
245
246 return 0;
247}
248

Callers

nothing calls this directly

Calls 6

rtcReleaseSceneFunction · 0.85
rtcReleaseDeviceFunction · 0.85
initializeDeviceFunction · 0.70
initializeSceneFunction · 0.70
castRayFunction · 0.70

Tested by

no test coverage detected