Utilities
ImplicitBVH.BVHOptions — Typestruct BVHOptions{I<:Integer, T}Options for building and traversing bounding volume hierarchies, including parallel strategy settings.
An exemplar of an index (e.g. Int32(0)) is used to deduce the types of indices used in the BVH building (ImplicitTree, order) and traversal (IndexPair).
If compute_extrema=false and mins / maxs are defined, they will not be computed from the distribution of bounding volumes; useful if you have a fixed simulation box, for example. You must ensure that no bounding volume centers will touch or be outside these bounds, otherwise logically incorrect results will be silently produced.
Methods
BVHOptions(;
# Example index from which to deduce type
index_exemplar::I = Int32(0),
# CPU threading
num_threads::Int = Threads.nthreads(),
min_mortons_per_thread::Int = 1000,
min_sorts_per_thread::Int = 1000,
min_boundings_per_thread::Int = 1000,
min_traversals_per_thread::Int = 1000,
# GPU scheduling
block_size::Int = 256,
# Minima / maxima
compute_extrema::Bool = true,
mins::NTuple{3, T} = (NaN32, NaN32, NaN32),
maxs::NTuple{3, T} = (NaN32, NaN32, NaN32),
) where {I <: Integer, T}Fields
index_exemplar::Integernum_threads::Int64min_mortons_per_thread::Int64min_sorts_per_thread::Int64min_boundings_per_thread::Int64min_traversals_per_thread::Int64block_size::Int64compute_extrema::Boolmins::Tuple{T, T, T} where Tmaxs::Tuple{T, T, T} where T
ImplicitBVH.get_index_type — FunctionGet index type from options or derived data types.
Methods
get_index_type(::ImplicitTree{I}) where I
get_index_type(bvh::BVH)
get_index_type(options::BVHOptions)