iMSTK
Interactive Medical Simulation Toolkit
imstkFeDeformableObject.cpp
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #include "imstkFeDeformableObject.h"
8 #include "imstkFemDeformableBodyModel.h"
9 #include "imstkLogger.h"
10 
11 namespace imstk
12 {
13 bool
15 {
16  m_femModel = std::dynamic_pointer_cast<FemDeformableBodyModel>(m_dynamicalModel);
17  if (m_femModel == nullptr)
18  {
19  LOG(FATAL) << "Dynamics pointer cast failure in DeformableObject::initialize()";
20  return false;
21  }
22 
24  m_femModel->initialize();
25 
26  return true;
27 }
28 
29 std::shared_ptr<FemDeformableBodyModel>
30 FeDeformableObject::getFEMModel()
31 {
32  m_femModel = std::dynamic_pointer_cast<FemDeformableBodyModel>(m_dynamicalModel);
33  return m_femModel;
34 }
35 } // namespace imstk
Compound Geometry.
bool initialize() override
Initialize the scene object.
std::shared_ptr< AbstractDynamicalModel > m_dynamicalModel
Dynamical model.
Mathematical model of the physics governing the dynamic deformable object.
bool initialize() override
Initialize the deformable object.