16#ifndef Octree_Double_included
17#define Octree_Double_included
19#include <Octree_Int.h>
38template <
typename _SIZE_>
50 template<
class _TAB_TYPE_>
51 void build_elements(
const _TAB_TYPE_& coords,
const IntTab_t& elements,
const double epsilon,
const bool include_virtual);
70 template<
class _TAB_TYPE_>
85template <
typename _SIZE_>
93 if (rnd_x >= -0.49 && rnd_x <= coord_max + 0.49)
95 ix = (int) floor(rnd_x + 0.5);
102template <
typename _SIZE_>
112 if (xmin > coord_max || xmax < 0.)
117 x0 = (int) (floor(xmin+0.5));
118 if (xmax > coord_max)
121 x1 = (int) (floor(xmax+0.5));
128#include <Octree_Double.tpp>
: An octree allowing to search in space for elements or points described by real-valued coordinates.
const ArrOfInt_t & floor_elements() const
bool integer_position(double x, int direction, int &ix) const
Converts a real coordinate to an integer coordinate for the octree_int.
DoubleTab_T< _SIZE_ > DoubleTab_t
void compute_origin_factors(const _TAB_TYPE_ &coords, const double epsilon, const int include_virtual)
Helper method for build_nodes and build_elements: computes the conversion factors from real to intege...
static int_t search_nodes_close_to(const ArrOfDouble &point, const DoubleTab_t &coords, ArrOfInt_t &node_list, double epsilon)
Same as search_nodes_close_to(double x, double y, double z, ...).
static int_t search_nodes_close_to(double x, double y, double z, const DoubleTab_t &coords, ArrOfInt_t &node_list, double epsilon)
Non-member method. Searches among the vertices in node_list for those within a distance.
ArrOfInt_T< _SIZE_ > ArrOfInt_t
bool integer_position_clip(double xmin, double xmax, int &x0, int &x1, int direction) const
int_t search_elements_box(const ArrOfDouble ¢er, const double radius, ArrOfInt_t &elements) const
Searches for all elements or points potentially having a non-empty intersection with the given box (c...
void build_nodes(const DoubleTab_t &coords, const bool include_virtual, const double epsilon=0.)
builds an octree containing the points with coordinates coords.
Octree_Int_32_64< int > octree_int_
ArrOfDouble_T< _SIZE_ > ArrOfDouble_t
int_t search_elements(double x, double y, double z, int_t &index) const
searches for the elements or points contained in the octree_floor that contains the point (x,...
int_t search_elements_box(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax, ArrOfInt_t &elements) const
searches for all elements or points potentially having a non-empty intersection with the given box.
IntTab_T< _SIZE_ > IntTab_t
void build_elements(const _TAB_TYPE_ &coords, const IntTab_t &elements, const double epsilon, const bool include_virtual)
Builds an octree from volumetric elements described by sets of vertices.
: An octree allowing retrieval of point-like or parallelepiped-shaped objects in 1D,...
static const int coord_max_