16 #ifndef SURGSIM_PHYSICS_FEM3DREPRESENTATION_H 17 #define SURGSIM_PHYSICS_FEM3DREPRESENTATION_H 21 #include <unordered_map> 23 #include "SurgSim/Framework/FrameworkConvert.h" 27 #include "SurgSim/Physics/Fem3D.h" 28 #include "SurgSim/Physics/FemRepresentation.h" 32 namespace DataStructures
34 struct IndexedLocalCoordinate;
51 SURGSIM_STATIC_REGISTRATION(Fem3DRepresentation);
66 void loadFem(
const std::string& fileName)
override;
71 void setFem(std::shared_ptr<SurgSim::Framework::Asset> mesh);
74 std::shared_ptr<Fem3D> getFem()
const;
76 void addExternalGeneralizedForce(std::shared_ptr<Localization> localization,
84 bool doWakeUp()
override;
86 void transformState(std::shared_ptr<SurgSim::Math::OdeState> state,
89 bool doInitialize()
override;
96 std::unordered_map<size_t, size_t> createTriangleIdToElementIdMap(
97 std::shared_ptr<const SurgSim::Math::MeshShape> mesh);
102 std::shared_ptr<Localization> createNodeLocalization(
size_t nodeId);
107 std::shared_ptr<Localization> createTriangleLocalization(
113 std::shared_ptr<Localization> createElementLocalization(
117 std::unordered_map<size_t, size_t> m_triangleIdToElementIdMap;
120 std::shared_ptr<Fem3D> m_fem;
126 #endif // SURGSIM_PHYSICS_FEM3DREPRESENTATION_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Finite Element Model 3D is a fem built with 3D FemElement.
Definition: Fem3DRepresentation.h:54
A generic (size_t index, Vector coordinate) pair.
Definition: IndexedLocalCoordinate.h:29
Finite Element Model (a.k.a FEM) is a deformable model (a set of nodes connected by FemElement)...
Definition: FemRepresentation.h:46
A Location defines a local position w.r.t.
Definition: Location.h:39
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
Definitions of small fixed-size square matrix types.
Definitions of small fixed-size vector types.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65