16 #ifndef SURGSIM_MATH_MESHSHAPE_H 17 #define SURGSIM_MATH_MESHSHAPE_H 30 namespace DataStructures
38 SURGSIM_STATIC_REGISTRATION(MeshShape);
55 SurgSim::DataStructures::EmptyData, SurgSim::DataStructures::NormalData>
70 template <
class V,
class E,
class T>
75 int getType()
const override;
82 double getVolume()
const override;
86 Matrix33d getSecondMomentOfVolume()
const override;
88 std::shared_ptr<Shape> getTransformed(
const RigidTransform3d& pose)
const override;
92 const std::shared_ptr<const SurgSim::DataStructures::AabbTree> getAabbTree()
const;
96 bool isTransformable()
const override;
99 bool doUpdate()
override;
101 bool doLoad(
const std::string& fileName)
override;
106 bool calculateNormals();
109 void updateAabbTree();
113 virtual void computeVolumeIntegrals();
126 std::shared_ptr<SurgSim::DataStructures::AabbTree>
m_aabbTree;
134 #endif // SURGSIM_MATH_MESHSHAPE_H
Definition: CompoundShapeToGraphics.cpp:29
::SurgSim::Math::Vector3d Vector3d
Definition: Shape.h:68
Mesh shape: shape made of a triangle mesh The triangle mesh needs to be watertight to produce valid v...
Definition: MeshShape.h:54
double m_volume
Volume (in m^-3)
Definition: MeshShape.h:119
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
bool isValid(float value)
Check if a float value is valid.
Definition: Valid-inl.h:98
std::shared_ptr< SurgSim::DataStructures::AabbTree > m_aabbTree
The aabb tree used to accelerate collision detection against the mesh.
Definition: MeshShape.h:126
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
SurgSim::Math::Matrix33d m_secondMomentOfVolume
Second moment of volume.
Definition: MeshShape.h:122
Basic class for storing Triangle Meshes, handling basic vertex, edge, and triangle functionality...
Definition: TriangleMesh.h:62
::SurgSim::Math::Matrix33d Matrix33d
Definition: Shape.h:69
SurgSim::Math::Vector3d m_center
Center (considering a uniform distribution in the mesh volume)
Definition: MeshShape.h:116
Eigen::Matrix< double, 3, 3, Eigen::RowMajor > Matrix33d
A 3x3 matrix of doubles.
Definition: Matrix.h:51
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
Generic rigid shape class defining a shape.
Definition: Shape.h:65