diff --git a/Base/Scene/imstkScene.cpp b/Base/Scene/imstkScene.cpp index 2a3377ef79474123de880682ed31c12f849ab62d..fb798927db53bd75a690942feb705e18df0aecff 100644 --- a/Base/Scene/imstkScene.cpp +++ b/Base/Scene/imstkScene.cpp @@ -27,7 +27,6 @@ namespace imstk { - bool Scene::initialize() { diff --git a/Base/SimulationManager/imstkSimulationManager.cpp b/Base/SimulationManager/imstkSimulationManager.cpp index bd87151927fd7f9fdff1c6c2c5a3aa64af2beaaf..1eb11613cc84316ff4509a9fdf977a2259c5bee0 100644 --- a/Base/SimulationManager/imstkSimulationManager.cpp +++ b/Base/SimulationManager/imstkSimulationManager.cpp @@ -194,7 +194,7 @@ SimulationManager::setCurrentScene(std::string newSceneName, bool unloadCurrentS return; } - std::shared_ptr<Scene> newScene = this->getScene(newSceneName); + auto newScene = this->getScene(newSceneName); if (!newScene) { LOG(WARNING) << "Can not find scene"; @@ -253,6 +253,7 @@ SimulationManager::setCurrentScene(std::string newSceneName, bool unloadCurrentS void SimulationManager::startSimulation(bool debug) { + this->getCurrentScene()->initialize(); if (m_status != SimulationStatus::INACTIVE) { LOG(WARNING) << "Simulation already active"; diff --git a/Examples/Sandbox/main.cpp b/Examples/Sandbox/main.cpp index 945d2eb36db0bab95343c91a3bc9f4defc4193bb..ce15e5f9986dfe10a16ecd5bbe07874808374174 100644 --- a/Examples/Sandbox/main.cpp +++ b/Examples/Sandbox/main.cpp @@ -1862,7 +1862,7 @@ void testPbdFluidBenchmarking() cube->setPhysicsGeometry(cubeMesh); auto pbdModel = std::make_shared<PbdModel>(); - pbdModel->setModelGeometry(cubeMeshPhysics); + pbdModel->setModelGeometry(cubeMesh); pbdModel->configure(/*Number of Constraints*/ 1, /*Constraint configuration*/ "ConstantDensity 1.0 0.3", /*Mass*/ 1.0, @@ -2028,7 +2028,7 @@ void testPbdFluid() deformableObj->setPhysicsGeometry(fluidMesh); auto pbdModel = std::make_shared<PbdModel>(); - pbdModel->setModelGeometry(volTetMesh); + pbdModel->setModelGeometry(fluidMesh); pbdModel->configure(/*Number of Constraints*/ 1, /*Constraint configuration*/ "ConstantDensity 1.0 0.3", /*Mass*/ 1.0,