16 #ifndef SURGSIM_MATH_SEGMENTMESHSHAPE_H 17 #define SURGSIM_MATH_SEGMENTMESHSHAPE_H 19 #include "SurgSim/DataStructures/AabbTree.h" 20 #include "SurgSim/DataStructures/SegmentMesh.h" 21 #include "SurgSim/Framework/ObjectFactory.h" 23 #include "SurgSim/Math/Shape.h" 24 #include "SurgSim/Math/VerticesShape.h" 31 SURGSIM_STATIC_REGISTRATION(SegmentMeshShape);
51 template <
class VertexData,
class EdgeData>
53 double radius = Geometry::DistanceEpsilon);
70 std::shared_ptr<const DataStructures::AabbTree>
getAabbTree()
const;
87 bool doLoad(
const std::string& fileName)
override;
96 std::shared_ptr<DataStructures::AabbTree> m_aabbTree;
97 std::vector<SurgSim::Math::Aabbd> m_aabbCache;
100 Vector3d m_segmentEndBoundingBoxHalfExtent;
106 #include "SurgSim/Math/SegmentMeshShape-inl.h" 108 #endif // SURGSIM_MATH_SEGMENTMESHSHAPE_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
std::shared_ptr< const DataStructures::AabbTree > getAabbTree() const
Definition: SegmentMeshShape.cpp:126
void setRadius(double radius)
Definition: SegmentMeshShape.cpp:77
void buildAabbTree()
Build the AabbTree, which is an axis-aligned bounding box r-tree used to accelerate spatial searches...
Definition: SegmentMeshShape.cpp:139
SegmentMeshShape()
Constructor.
Definition: SegmentMeshShape.cpp:32
bool isValid() const override
Check if the shape is valid.
Definition: SegmentMeshShape.cpp:69
void setPose(const RigidTransform3d &pose) override
Set the pose on a transformable shape.
Definition: SegmentMeshShape.cpp:184
A Shape that also inherits from Vertices is transformable and carries a member variable of the initia...
Definition: VerticesShape.h:30
void updateShapePartial() override
Update some of the internals of a transformable shape.
Definition: SegmentMeshShape.cpp:93
Class to hold the type of a SegmentMesh.
Definition: SegmentMesh.h:33
void updateShape() override
Update the internals of a transformable shape.
Definition: SegmentMeshShape.cpp:88
Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: SegmentMeshShape.cpp:57
bool doLoad(const std::string &fileName) override
Derived classes will overwrite this method to do actual loading.
Definition: SegmentMeshShape.cpp:104
double getRadius() const
Definition: SegmentMeshShape.cpp:83
SegmentMeshShape defines a shape based on a mesh, like MeshShape.
Definition: SegmentMeshShape.h:37
int getType() const override
Definition: SegmentMeshShape.cpp:46
void updateAabbTree()
Update the AabbTree, which is an axis-aligned bounding box r-tree used to accelerate spatial searches...
Definition: SegmentMeshShape.cpp:163
std::shared_ptr< Shape > getTransformed(const RigidTransform3d &pose) const override
Get a copy of this shape with an applied rigid transform.
Definition: SegmentMeshShape.cpp:131
Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
Definition: SegmentMeshShape.cpp:63
double getVolume() const override
Get the volume of the shape.
Definition: SegmentMeshShape.cpp:51
bool doUpdate() override
Performs any updates that are required when the vertices are modified.
Definition: SegmentMeshShape.cpp:98
a collection of functions that calculation geometric properties of various basic geometric shapes...