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

Function updateScene

tutorials/collide/collide_device.cpp:335–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void updateScene ()
336{
337 auto & cloth = (collide2::ClothModel &) (*meshes[clothID]);
338 collide2::updatePositions (cloth, h);
339
340 rtcUpdateGeometryBuffer(rtcGetGeometry(g_scene, clothID), RTC_BUFFER_TYPE_VERTEX, 0);
341 rtcCommitGeometry(rtcGetGeometry(g_scene, clothID));
342 rtcCommitScene(g_scene);
343
344 // sim_collisions.clear();
345 double t0 = getSeconds();
346 rtcCollide(g_scene,g_scene,CollideFunc,&sim_collisions);
347 double t1 = getSeconds();
348 total_collision_time += t1-t0;
349 addCollisionConstraints (g_scene);
350
351 collide2::constrainPositions (cloth, h, nIters);
352 collide2::updateVelocities (cloth, h);
353
354 rtcUpdateGeometryBuffer(rtcGetGeometry(g_scene, clothID), RTC_BUFFER_TYPE_VERTEX, 0);
355 rtcCommitGeometry(rtcGetGeometry(g_scene, clothID));
356 rtcCommitScene(g_scene);
357
358 ++cur_time;
359}
360
361/* task that renders a single screen tile */
362Vec3fa renderPixelStandard(float x, float y, const ISPCCamera& camera)

Callers 2

keypressedMethod · 0.85
device_renderFunction · 0.85

Calls 9

updatePositionsFunction · 0.85
rtcUpdateGeometryBufferFunction · 0.85
rtcCommitGeometryFunction · 0.85
rtcCommitSceneFunction · 0.85
getSecondsFunction · 0.85
rtcCollideFunction · 0.85
addCollisionConstraintsFunction · 0.85
constrainPositionsFunction · 0.85
updateVelocitiesFunction · 0.85

Tested by

no test coverage detected