15#ifndef Octree_Int_included
16#define Octree_Int_included
18#include <TRUSTArrays.h>
26template <
typename _SIZE_>
40 void build(
const int dimension,
const IntTab_t& elements_boxes);
54 const int octree_half_width,
: Un octree permettant de retrouver des objets ponctuels ou parallelipipediques dans un espace 1D,...
int_t search_octree_floor(int x_pos, int y_pos, int z_pos) const
renvoie l'octree_id de l'octree_floor contenant le sommet (x,y,z) (peut renvoyer l'octree EMPTY)
ArrOfDouble_T< _SIZE_ > ArrOfDouble_t
static Octree_Type octree_type(int_t octree_id)
Renvoie le type d'un octree en fonction de son octree_id.
void search_elements_box_recursively(IntBoxData< _SIZE_ > &boxdata, int_t octree_id, int cx, int cy, int cz, int half_width) const
cherche recursivement les elements inclus dans la boite boxdata pour l'octree_id donne,...
int_t search_elements_box(int xmin, int ymin, int zmin, int xmax, int ymax, int zmax, ArrOfInt_t &elements) const
cherche les elements ayant potentiellement une intersection non vide avec la boite xmin....
ArrOfInt_T< _SIZE_ > ArrOfInt_t
IntTab_T< _SIZE_ > IntTab_t
ArrOfInt_t floor_elements_
int_t build_octree_recursively(const int octree_center_x, const int octree_center_y, const int octree_center_z, const int octree_half_width, const IntTab_t &elements_boxes, ArrsOfInt_t &vect_elements_list, const int level, AOFlagS_ &tmp_elem_flags)
octree_center_i est le premier int de la moitie superieure de l'octree dans la direction i.
static const int root_octree_half_width_
static int_t octree_id(int_t index, Octree_Type type)
construction d'un octree_id (voir octree_structure_)
TRUSTArray< int, _SIZE_ > AOFlag_
IntTab_t octree_structure_
DoubleTab_T< _SIZE_ > DoubleTab_t
ArrsOfInt_T< _SIZE_ > ArrsOfInt_t
int_t search_elements(int x, int y, int z, int_t &floor_elements_index) const
renvoie la liste des elements contenant potentiellement le point (x,y,z) On renvoie n=nombre d'elemen...
static int_t octree_index(int_t octree_id, Octree_Type type)
calcul de l'index de l'octree dans octree_structure ou floor_elements en fonction du type de l'octree...
void search_elements_box_floor(IntBoxData< _SIZE_ > &boxdata, int_t octree_floor_id) const
ajoute des elements de l'octree_floor a boxdata.
const ArrOfInt_t & floor_elements() const
TRUST_Vector< AOFlag_ > AOFlagS_
static const int coord_max_
int_t build_octree_floor(const ArrOfInt_t &elements_list)
construit un octree_floor avec la liste d'elements donnee et renvoie l'octree_id de cet octree_floor
void build(const int dimension, const IntTab_t &elements_boxes)
construction de l'octree.
Represents a an array of int/int64/double/... values.