Template Function Acts::make_octree¶
Defined in File BoundingBox.hpp
Function Documentation¶
-
template<typename
box_t
>
box_t *Acts
::
make_octree
(std::vector<std::unique_ptr<box_t>> &store, const std::vector<box_t*> &prims, size_t max_depth = 1, typename box_t::value_type envelope1 = 0)¶ Build an octree from a list of bounding boxes.
- Note
store
andprims
do not need to contain the same objects.store
is only used to pass ownership back to the caller while preserving memory location.- Return
Pointer to the top most bounding box, containing the entire octree
- Template Parameters
box_t
: Works will all box types.
- Parameters
store
: Owns the created boxes by means ofstd::unique_ptr
.prims
: Boxes to store. This is a read only vector.max_depth
: No subdivisions beyond this level.envelope1
: Envelope to add/subtract to dimensions in all directions.