Bases: object
This class implements a (distributed) axis aligned bounding box tree (AABB tree). Bounding box trees can be created from meshes and [other data structures, to be filled in].
Create empty bounding box tree
Overloaded versions
build(mesh)
Build bounding box tree for cells of mesh.
The mesh for which to compute the bounding box tree.
build(mesh, tdim)
Build bounding box tree for mesh entities of given dimension.
The mesh for which to compute the bounding box tree.
The entity dimension (topological dimension) for which to compute the bounding box tree.
build(points, gdim)
Build bounding box tree for point cloud.
The list of points.
The geometric dimension.
Check whether given point collides with the bounding box tree. This is equivalent to calling compute_first_collision and checking whether any collision was detected.
Check whether given point collides with any entity contained in the bounding box tree. This is equivalent to calling compute_first_entity_collision and checking whether any collision was detected.
Compute closest entity to Point.
Compute closest point to Point. This function assumes that the tree has been built for a point cloud.
Developer note: This function should not be confused with computing the closest point in all entities of a mesh. That function could be added with relative ease since we actually compute the closest points to get the distance in the above function (compute_closest_entity) inside the specialized implementations in TetrahedronCell.cpp etc.
Overloaded versions
compute_collisions(point)
Compute all collisions between bounding boxes and Point.
A list of local indices for entities contained in (leaf) bounding boxes that collide with (intersect) the given point.
The point.
compute_collisions(tree)
Compute all collisions between bounding boxes and BoundingBoxTree.
A list of local indices for entities in this tree that collide with (intersect) entities in other tree.
A list of local indices for entities in other tree that collide with (intersect) entities in this tree.
The two lists have equal length and contain matching entities, such that entity i in the first list collides with entity i in the second list.
Note that this means that the entity lists may contain duplicate entities since a single entity may collide with several different entities.
The bounding box tree.
Note that this function only checks collisions between bounding boxes of entities. It does not check that the entities themselves actually collide. To compute entity collisions, use the function compute_entity_collisions.
Overloaded versions
compute_entity_collisions(point)
Compute all collisions between entities and Point.
A list of local indices for entities that collide with (intersect) the given point.
The point.
compute_entity_collisions(tree)
Compute all collisions between entities and BoundingBoxTree.
A list of local indices for entities in this tree that collide with (intersect) entities in other tree.
A list of local indices for entities in other tree that collide with (intersect) entities in this tree.
The two lists have equal length and contain matching entities, such that entity i in the first list collides with entity i in the second list.
Note that this means that the entity lists may contain duplicate entities since a single entity may collide with several different entities.
The bounding box tree.
Compute first collision between bounding boxes and Point.
Compute first collision between entities and Point.
The membership flag