16 #ifndef SURGSIM_PHYSICS_FEM3DREPRESENTATION_H
17 #define SURGSIM_PHYSICS_FEM3DREPRESENTATION_H
21 #include <unordered_map>
31 namespace DataStructures
40 class FemPlyReaderDelegate;
72 virtual void transformState(std::shared_ptr<SurgSim::Math::OdeState> state,
76 virtual std::shared_ptr<FemPlyReaderDelegate>
getDelegate()
override;
92 #endif // SURGSIM_PHYSICS_FEM3DREPRESENTATION_H
Definition: DriveElementFromInputBehavior.cpp:27
Finite Element Model 3D is a fem built with 3D FemElement.
Definition: Fem3DRepresentation.h:43
RepresentationType
Definition: Representation.h:42
Finite Element Model (a.k.a.
Definition: FemRepresentation.h:38
Definition: Location.h:31
virtual bool doWakeUp() override
Interface to be implemented by derived classes.
Definition: Fem3DRepresentation.cpp:211
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
virtual RepresentationType getType() const override
Query the representation type.
Definition: Fem3DRepresentation.cpp:78
SURGSIM_CLASSNAME(SurgSim::Physics::Fem3DRepresentation)
virtual std::shared_ptr< FemPlyReaderDelegate > getDelegate() override
To be implemented by derived classes.
Definition: Fem3DRepresentation.cpp:146
std::unordered_map< size_t, size_t > m_triangleIdToElementIdMap
Mapping from collision triangle's id to fem element id.
Definition: Fem3DRepresentation.h:86
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:67
Fem3DRepresentation(const std::string &name)
Constructor.
Definition: Fem3DRepresentation.cpp:66
virtual void transformState(std::shared_ptr< SurgSim::Math::OdeState > state, const SurgSim::Math::RigidTransform3d &transform) override
Transform a state using a given transformation.
Definition: Fem3DRepresentation.cpp:293
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
virtual std::shared_ptr< Localization > createLocalization(const SurgSim::DataStructures::Location &) override
Computes a localized coordinate w.r.t this representation, given a Location object.
Definition: Fem3DRepresentation.cpp:229
A TriangleMesh stores normal information for the triangles.
Definition: TriangleMesh.h:62
virtual ~Fem3DRepresentation()
Destructor.
Definition: Fem3DRepresentation.cpp:74
virtual void addExternalGeneralizedForce(std::shared_ptr< Localization > localization, SurgSim::Math::Vector &generalizedForce, const SurgSim::Math::Matrix &K=SurgSim::Math::Matrix(), const SurgSim::Math::Matrix &D=SurgSim::Math::Matrix()) override
Add an external generalized force applied on a specific localization.
Definition: Fem3DRepresentation.cpp:83
SURGSIM_STATIC_REGISTRATION(DeformableCollisionRepresentation)
std::unordered_map< size_t, size_t > createTriangleIdToElementIdMap(const SurgSim::DataStructures::TriangleMesh &mesh)
Produces a mapping from the provided mesh's triangle ids to this object's fem element ids...
Definition: Fem3DRepresentation.cpp:154