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 <AabbTree.h>
|
| AabbTree () |
| Constructor.
|
|
| AabbTree (size_t maxObjectsPerNode) |
| Constructor. More...
|
|
virtual | ~AabbTree () |
| Destructor.
|
|
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...
|
|
void | set (const AabbTreeData::ItemList &items) |
| Create the tree from a list of tree items, all the tree information will be deleted. More...
|
|
void | set (AabbTreeData::ItemList &&items) |
| Create the tree from a list of tree items, all the tree information will be deleted. More...
|
|
const SurgSim::Math::Aabbd & | getAabb () const |
|
std::vector< TreeNodePairType > | spatialJoin (const AabbTree &otherTree) const |
| Query to find all pairs of intersecting nodes between two aabb r-trees. More...
|
|
void | spatialJoin (AabbTreeNode *lhsParent, AabbTreeNode *rhsParent, std::vector< TreeNodePairType > *result) const |
| Query to find all pairs of intersecting nodes between two aabb r-trees. More...
|
|
void | updateBounds (const std::vector< Math::Aabbd > &bounds) |
|
void | updateNodeBounds (const std::vector< Math::Aabbd > &bounds, SurgSim::DataStructures::AabbTreeNode *node) |
|
| Tree () |
| Constructor. After construction, the root is null.
|
|
virtual | ~Tree () |
| Destructor.
|
|
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.
§ 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 |
§ add()
void SurgSim::DataStructures::AabbTree::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.
- Parameters
-
aabb | AABB of this object. |
objectId | Id for the object to be identified with this bounding box |
§ getAabb()
const SurgSim::Math::Aabbd & SurgSim::DataStructures::AabbTree::getAabb |
( |
| ) |
const |
- Returns
- the AABB for the tree
§ getMaxObjectsPerNode()
size_t SurgSim::DataStructures::AabbTree::getMaxObjectsPerNode |
( |
| ) |
const |
- Returns
- the number of objects per node that will trigger a split for this tree
§ set() [1/2]
void SurgSim::DataStructures::AabbTree::set |
( |
const AabbTreeData::ItemList & |
items | ) |
|
Create the tree from a list of tree items, all the tree information will be deleted.
- Parameters
-
items | list of items to insert into the tree |
§ set() [2/2]
void SurgSim::DataStructures::AabbTree::set |
( |
AabbTreeData::ItemList && |
items | ) |
|
Create the tree from a list of tree items, all the tree information will be deleted.
- Parameters
-
items | rvalue reference to list of items to insert into the tree |
§ spatialJoin() [1/2]
Query to find all pairs of intersecting nodes between two aabb r-trees.
- Parameters
-
otherTree | The other tree to compare against |
- Returns
- The list of all pairs of intersecting nodes
§ spatialJoin() [2/2]
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 |
The documentation for this class was generated from the following files:
- SurgSim/DataStructures/AabbTree.h
- SurgSim/DataStructures/AabbTree.cpp