Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sreekanth Arikatla
iMSTK
Commits
033b76ba
Commit
033b76ba
authored
Aug 01, 2017
by
Sreekanth Arikatla
Browse files
ENH: Add scene object initialization at the start of the simulation
parent
11331b87
Pipeline
#66802
passed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Base/Scene/imstkScene.cpp
View file @
033b76ba
...
...
@@ -27,7 +27,6 @@
namespace
imstk
{
bool
Scene
::
initialize
()
{
...
...
Base/SimulationManager/imstkSimulationManager.cpp
View file @
033b76ba
...
...
@@ -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"
;
...
...
Examples/Sandbox/main.cpp
View file @
033b76ba
...
...
@@ -1862,7 +1862,7 @@ void testPbdFluidBenchmarking()
cube
->
setPhysicsGeometry
(
cubeMesh
);
auto
pbdModel
=
std
::
make_shared
<
PbdModel
>
();
pbdModel
->
setModelGeometry
(
cubeMesh
Physics
);
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
(
volTet
Mesh
);
pbdModel
->
setModelGeometry
(
fluid
Mesh
);
pbdModel
->
configure
(
/*Number of Constraints*/
1
,
/*Constraint configuration*/
"ConstantDensity 1.0 0.3"
,
/*Mass*/
1.0
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment