Class for O(log N) lookup for intersections with a set of bounding boxes.
double estimate_median(unsigned char axis, const BIHNode &node)
unsigned int max_n_levels
Maximal count of BIH tree levels.
std::vector< double > coors_
temporary vector stored values of coordinations for calculating median
unsigned int get_element_count() const
static const unsigned int default_leaf_size_limit
Default leaf size limit.
std::vector< BoundingBox > elements_
mesh
void add_boxes(const std::vector< BoundingBox > &boxes)
unsigned int leaf_size_limit
Maximal number of elements stored in a leaf node of BIH tree.
void split_node(const BoundingBox &node_box, unsigned int node_idx)
create bounding boxes of element
uint make_node(const BoundingBox &box, unsigned int node_idx)
void find_point(const Space< 3 >::Point &point, std::vector< unsigned int > &result_list, bool full_list=false) const
static const unsigned int dimension
count of dimensions
void find_bounding_box(const BoundingBox &boundingBox, std::vector< unsigned int > &result_list, bool full_list=false) const
BoundingBox main_box_
Main bounding box. (from mesh)
std::vector< BIHNode > nodes_
vector of tree nodes
BIHTree(unsigned int soft_leaf_size_limit=BIHTree::default_leaf_size_limit)
const BoundingBox & ele_bounding_box(unsigned int ele_idx) const
Gets bounding box of element of given index ele_index.
std::vector< BoundingBox > & get_elements()
std::vector< unsigned int > in_leaves_
vector stored element indexes in leaf nodes
std::vector< unsigned int > node_stack_
Stack for search algorithms.
static const unsigned int max_median_sample_size
max count of elements to estimate median - value must be even
const BoundingBox & tree_box() const
static const double size_reduce_factor
required reduction in size of box to allow further splitting
Bounding box in 3d ambient space.
Armor::ArmaVec< double, spacedim > Point