Go to the documentation of this file.
16 #ifndef SURGSIM_DATASTRUCTURES_AABBTREEDATA_H
17 #define SURGSIM_DATASTRUCTURES_AABBTREEDATA_H
29 namespace DataStructures
38 typedef std::pair<SurgSim::Math::Aabbd, size_t>
Item;
AabbTreeData(const AabbTreeData &data)
Copy Constructor.
bool hasIntersections(const SurgSim::Math::Aabbd &aabb) const
Check whether there could be any intersections with a given bounding box.
Definition: AabbTreeData.cpp:144
SurgSim::Math::Aabbd m_aabb
AABB containg all items.
Definition: AabbTreeData.h:95
bool isEqual(const TreeData *data) const override
Returns true if the trees are equal; otherwise, returns false.
Definition: AabbTreeData.cpp:46
size_t getSize() const
Definition: AabbTreeData.cpp:91
~AabbTreeData()
Destructor.
Definition: AabbTreeData.cpp:41
std::list< Item > m_data
The items that were added to this list.
Definition: AabbTreeData.h:98
Definition: CompoundShapeToGraphics.cpp:30
Abstract base class for data stored in a Tree.
Definition: TreeData.h:30
const SurgSim::Math::Aabbd & getAabb() const
Definition: AabbTreeData.cpp:80
Eigen::AlignedBox< double, 3 > Aabbd
Wrapper around the Eigen type.
Definition: Aabb.h:30
bool isEmpty() const
Definition: AabbTreeData.cpp:86
void getIntersections(const SurgSim::Math::Aabbd &aabb, std::list< size_t > *result) const
Check all items bounding boxes against the one passed as a parameter and append items that overlap to...
Definition: AabbTreeData.cpp:133
std::shared_ptr< AabbTreeData > takeLargerElements()
Split the current items into two geometric halves, keep the first half and return a pointer to the se...
Definition: AabbTreeData.cpp:96
void add(const SurgSim::Math::Aabbd aabb, size_t id)
Add an item to the data.
Definition: AabbTreeData.cpp:74
AabbTreeData()
Constructor.
Definition: AabbTreeData.cpp:26
Internal class to hold a list of AABBs and their respective object ids, it can calculate the elements...
Definition: AabbTreeData.h:35
void recalculateAabb()
Recalculate the aabb of this class, in case items where updated.
Definition: AabbTreeData.cpp:124
std::pair< SurgSim::Math::Aabbd, size_t > Item
Definition: AabbTreeData.h:38