16 #ifndef SURGSIM_DATASTRUCTURES_AABBTREEDATA_H
17 #define SURGSIM_DATASTRUCTURES_AABBTREEDATA_H
29 namespace DataStructures
47 typedef std::pair<SurgSim::Math::Aabbd, size_t>
Item;
AabbTreeData()
Constructor.
Definition: AabbTreeData.cpp:25
Definition: DriveElementFromInputBehavior.cpp:27
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:113
std::pair< SurgSim::Math::Aabbd, size_t > Item
Definition: AabbTreeData.h:47
size_t getSize() const
Definition: AabbTreeData.cpp:80
Internal class to hold a list of AABBs and their respective object ids, it can calculate the elements...
Definition: AabbTreeData.h:34
const SurgSim::Math::Aabbd & getAabb() const
Definition: AabbTreeData.cpp:69
Eigen::AlignedBox< double, 3 > Aabbd
Wrapper around the Eigen type.
Definition: Aabb.h:30
std::list< Item > m_data
The items that were added to this list.
Definition: AabbTreeData.h:91
Abstract base class for data stored in a Tree.
Definition: TreeData.h:29
bool isEmpty() const
Definition: AabbTreeData.cpp:75
void recalculateAabb()
Recalculate the aabb of this class, in case items where updated.
Definition: AabbTreeData.cpp:104
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:85
virtual bool isEqual(const TreeData *data) const override
Returns true if the trees are equal; otherwise, returns false.
Definition: AabbTreeData.cpp:35
bool hasIntersections(const SurgSim::Math::Aabbd &aabb) const
Check whether there could be any intersections with a given bounding box.
Definition: AabbTreeData.cpp:124
SurgSim::Math::Aabbd m_aabb
AABB containg all items.
Definition: AabbTreeData.h:88
~AabbTreeData()
Destructor.
Definition: AabbTreeData.cpp:30
void add(const SurgSim::Math::Aabbd aabb, size_t id)
Add an item to the data.
Definition: AabbTreeData.cpp:63