Go to the documentation of this file.
16 #ifndef SURGSIM_DATASTRUCTURES_AABBTREE_H
17 #define SURGSIM_DATASTRUCTURES_AABBTREE_H
28 namespace DataStructures
45 explicit AabbTree(
size_t maxObjectsPerNode);
61 void set(
const std::list<AabbTreeData::Item>& items);
65 void set(std::list<AabbTreeData::Item>&& items);
71 typedef std::pair<std::shared_ptr<AabbTreeNode>, std::shared_ptr<AabbTreeNode>>
TreeNodePairType;
82 void spatialJoin(std::shared_ptr<AabbTreeNode> lhsParent,
83 std::shared_ptr<AabbTreeNode> rhsParent,
84 std::list<TreeNodePairType>* result)
const;
void set(const std::list< AabbTreeData::Item > &items)
Create the tree from a list of tree items, all the tree information will be deleted.
Definition: AabbTree.cpp:50
void add(const SurgSim::Math::Aabbd &aabb, size_t objectId)
Add a give object identified by objectId to the tree, this id should be unqiue on the users side,...
Definition: AabbTree.cpp:45
std::list< TreeNodePairType > spatialJoin(const AabbTree &otherTree) const
Query to find all pairs of intersecting nodes between two aabb r-trees.
Definition: AabbTree.cpp:74
Basic tree structure.
Definition: Tree.h:33
Definition: CompoundShapeToGraphics.cpp:30
Eigen::AlignedBox< double, 3 > Aabbd
Wrapper around the Eigen type.
Definition: Aabb.h:30
virtual ~AabbTree()
Destructor.
Definition: AabbTree.cpp:40
std::pair< std::shared_ptr< AabbTreeNode >, std::shared_ptr< AabbTreeNode > > TreeNodePairType
Type indicating a relationship between two AabbTreeNodes.
Definition: AabbTree.h:71
AabbTree()
Constructor.
Definition: AabbTree.cpp:26
size_t m_maxObjectsPerNode
Number of objects in a node that will trigger a split.
Definition: AabbTree.h:89
const SurgSim::Math::Aabbd & getAabb() const
Definition: AabbTree.cpp:69
std::shared_ptr< AabbTreeNode > m_typedRoot
A typed version of the root for access without typecasting.
Definition: AabbTree.h:92
size_t getMaxObjectsPerNode() const
Definition: AabbTree.cpp:64
AabbTree is a tree that is organized by the bounding boxes of the referenced objects,...
Definition: AabbTree.h:37