Commit 033b76ba authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

ENH: Add scene object initialization at the start of the simulation

parent 11331b87
Pipeline #66802 passed with stage
......@@ -27,7 +27,6 @@
namespace imstk
{
bool
Scene::initialize()
{
......
......@@ -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";
......
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment