16 #ifndef SURGSIM_PHYSICS_FEM3DREPRESENTATION_H 17 #define SURGSIM_PHYSICS_FEM3DREPRESENTATION_H 21 #include <unordered_map> 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(
126 #endif // SURGSIM_PHYSICS_FEM3DREPRESENTATION_H Definition: CompoundShapeToGraphics.cpp:29
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, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
std::shared_ptr< Fem3D > m_fem
The Fem3DRepresentation's asset as a Fem3D.
Definition: Fem3DRepresentation.h:120
std::unordered_map< size_t, size_t > m_triangleIdToElementIdMap
Mapping from collision triangle's id to fem element id.
Definition: Fem3DRepresentation.h:117
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
Definitions of small fixed-size square matrix types.
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
Definitions of small fixed-size vector types.