MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / switchScene

Method switchScene

testbed/src/TestbedApplication.cpp:524–544  ·  view source on GitHub ↗

Change the current scene

Source from the content-addressed store, hash-verified

522
523// Change the current scene
524void TestbedApplication::switchScene(Scene* newScene) {
525
526 if (newScene == mCurrentScene) return;
527
528 mCurrentScene = newScene;
529
530 mTimer.reset();
531
532 // Resize the camera viewport
533 mCurrentScene->reshape(mWidth, mHeight);
534
535 // Update the window size of the scene
536 mCurrentScene->setWindowDimension(mWidth, mHeight);
537
538 // Reset the scene
539 mCurrentScene->reset();
540
541 mCurrentScene->updateEngineSettings();
542
543 mGui.resetWithValuesFromCurrentScene();
544}
545
546// Notify that the engine settings have changed
547void TestbedApplication::notifyEngineSetttingsChanged() {

Callers 1

createSimulationPanelMethod · 0.80

Calls 5

reshapeMethod · 0.80
setWindowDimensionMethod · 0.80
updateEngineSettingsMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected