16 #ifndef SURGSIM_DATASTRUCTURES_AABBTREE_H 17 #define SURGSIM_DATASTRUCTURES_AABBTREE_H 28 namespace DataStructures
45 explicit AabbTree(
size_t maxObjectsPerNode);
63 typedef std::pair<std::shared_ptr<AabbTreeNode>, std::shared_ptr<AabbTreeNode>>
TreeNodePairType;
74 void spatialJoin(std::shared_ptr<AabbTreeNode> lhsParent,
75 std::shared_ptr<AabbTreeNode> rhsParent,
76 std::list<TreeNodePairType>* result)
const;
Definition: DriveElementFromInputBehavior.cpp:27
std::list< TreeNodePairType > spatialJoin(const AabbTree &otherTree) const
Query to find all pairs of intersecting nodes between two aabb r-trees.
Definition: AabbTree.cpp:60
Basic tree structure.
Definition: Tree.h:32
size_t getMaxObjectsPerNode() const
Definition: AabbTree.cpp:50
const SurgSim::Math::Aabbd & getAabb() const
Definition: AabbTree.cpp:55
AabbTree is a tree that is organized by the bounding boxes of the referenced objects, the bounding box used is the Axis Aligned Bounding Box (AABB), with the extents of an AABB describing the min and max of each coordinate for the given object.
Definition: AabbTree.h:36
Eigen::AlignedBox< double, 3 > Aabbd
Wrapper around the Eigen type.
Definition: Aabb.h:30
virtual ~AabbTree()
Destructor.
Definition: AabbTree.cpp:40
size_t m_maxObjectsPerNode
Number of objects in a node that will trigger a split.
Definition: AabbTree.h:81
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
AabbTree()
Constructor.
Definition: AabbTree.cpp:26
std::pair< std::shared_ptr< AabbTreeNode >, std::shared_ptr< AabbTreeNode > > TreeNodePairType
Type indicating a relationship between two AabbTreeNodes.
Definition: AabbTree.h:63
std::shared_ptr< AabbTreeNode > m_typedRoot
A typed version of the root for access without typecasting.
Definition: AabbTree.h:84