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.
More...
#include <SurgSim/DataStructures/AabbTree.h>
|
| AabbTree () |
| Constructor. More...
|
|
| AabbTree (size_t maxObjectsPerNode) |
| Constructor. More...
|
|
virtual | ~AabbTree () |
| Destructor. More...
|
|
size_t | getMaxObjectsPerNode () const |
|
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, but no checks are made in the inside of the tree. More...
|
|
const SurgSim::Math::Aabbd & | getAabb () const |
|
std::list< TreeNodePairType > | spatialJoin (const AabbTree &otherTree) const |
| Query to find all pairs of intersecting nodes between two aabb r-trees. More...
|
|
void | spatialJoin (std::shared_ptr< AabbTreeNode > lhsParent, std::shared_ptr< AabbTreeNode > rhsParent, std::list< TreeNodePairType > *result) const |
| Query to find all pairs of intersecting nodes between two aabb r-trees. More...
|
|
| Tree () |
| Constructor. After construction, the root is null. More...
|
|
virtual | ~Tree () |
| Destructor. More...
|
|
void | setRoot (std::shared_ptr< TreeNode > root) |
| Sets the root of the tree. More...
|
|
std::shared_ptr< TreeNode > | getRoot () const |
|
bool | operator== (const Tree &tree) const |
| If the trees are not of the same type, returns false; otherwise, compares with the implementation of isEqual(const Tree&). More...
|
|
bool | operator!= (const Tree &tree) const |
| If the trees are not of the same type, returns false; otherwise, compares with the implementation of isEqual(const Tree&). More...
|
|
|
virtual bool | isEqual (const Tree &tree) const |
| Recurses through the tree, starting at the root. More...
|
|
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.
Type indicating a relationship between two AabbTreeNodes.
SurgSim::DataStructures::AabbTree::AabbTree |
( |
| ) |
|
SurgSim::DataStructures::AabbTree::AabbTree |
( |
size_t |
maxObjectsPerNode | ) |
|
|
explicit |
Constructor.
- Parameters
-
maxObjectsPerNode | if the number of objects exceeds this a split of the node will be triggered |
SurgSim::DataStructures::AabbTree::~AabbTree |
( |
| ) |
|
|
virtual |
Add a give object identified by objectId to the tree, this id should be unqiue on the users side, but no checks are made in the inside of the tree.
- Parameters
-
aabb | AABB of this object. |
objectId | Id for the object to be identified with this bounding box |
size_t SurgSim::DataStructures::AabbTree::getMaxObjectsPerNode |
( |
| ) |
const |
- Returns
- the number of objects per node that will trigger a split for this tree
Query to find all pairs of intersecting nodes between two aabb r-trees.
- Parameters
-
otherTree | The other tree to compare against return The list of all pairs of intersecting nodes |
Query to find all pairs of intersecting nodes between two aabb r-trees.
- Parameters
-
lhsParent | root node of the first tree |
rhsParent | root node of the second tree |
result | the list of all pairs of intersecting nodes |
size_t SurgSim::DataStructures::AabbTree::m_maxObjectsPerNode |
|
private |
Number of objects in a node that will trigger a split.
std::shared_ptr<AabbTreeNode> SurgSim::DataStructures::AabbTree::m_typedRoot |
|
private |
A typed version of the root for access without typecasting.
The documentation for this class was generated from the following files: