16 #ifndef SURGSIM_MATH_OCTREESHAPE_H 17 #define SURGSIM_MATH_OCTREESHAPE_H 19 #include "SurgSim/DataStructures/EmptyData.h" 20 #include "SurgSim/DataStructures/OctreeNode.h" 21 #include "SurgSim/Framework/Asset.h" 22 #include "SurgSim/Framework/ObjectFactory.h" 23 #include "SurgSim/Math/Shape.h" 30 SURGSIM_STATIC_REGISTRATION(OctreeShape);
77 void setOctree(std::shared_ptr<SurgSim::Framework::Asset> node);
82 void loadOctree(
const std::string& filePath);
90 bool isValid(std::shared_ptr<NodeType> node)
const;
93 std::shared_ptr<NodeType> m_rootNode;
99 #include "SurgSim/Math/OctreeShape-inl.h" 101 #endif // SURGSIM_MATH_OCTREESHAPE_H virtual ~OctreeShape()
Destructor.
Definition: OctreeShape.cpp:42
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
int getType() const override
Definition: OctreeShape.cpp:46
std::shared_ptr< NodeType > getOctree()
Get the root node.
Definition: OctreeShape.cpp:79
void setOctree(std::shared_ptr< SurgSim::Framework::Asset > node)
Set the root node.
Definition: OctreeShape.cpp:84
Matrix33d getSecondMomentOfVolume() const override
Get the second central moment of the volume, commonly used to calculate the moment of inertia matrix...
Definition: OctreeShape.cpp:73
double getVolume() const override
Get the volume of the shape.
Definition: OctreeShape.cpp:62
bool isValid() const override
Definition: OctreeShape.cpp:100
OctreeShape()
Constructor.
Definition: OctreeShape.cpp:29
Vector3d getCenter() const override
Get the volumetric center of the shape.
Definition: OctreeShape.cpp:68
Octree data structure.
Definition: OctreeNode.h:131
Octree Shape A defined by an octree data structure.
Definition: OctreeShape.h:34
Generic rigid shape class defining a shape.
Definition: Shape.h:65
const Math::Aabbd & getBoundingBox() const override
Definition: OctreeShape.cpp:105