TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Octree_Int_32_64< _SIZE_ > Class Template Reference

: Un octree permettant de retrouver des objets ponctuels ou parallelipipediques dans un espace 1D, 2D ou 3D et des coordonnees entieres More...

#include <Octree_Int.h>

Collaboration diagram for Octree_Int_32_64< _SIZE_ >:
[legend]

Public Types

using int_t = _SIZE_
using ArrOfInt_t = ArrOfInt_T<_SIZE_>
using IntTab_t = IntTab_T<_SIZE_>
using ArrOfDouble_t = ArrOfDouble_T<_SIZE_>
using DoubleTab_t = DoubleTab_T<_SIZE_>
using ArrsOfInt_t = ArrsOfInt_T<_SIZE_>
using AOFlag_ = TRUSTArray<int, _SIZE_>
using AOFlagS_ = TRUST_Vector<AOFlag_>

Public Member Functions

void build (const int dimension, const IntTab_t &elements_boxes)
 construction de l'octree.
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'elements de la liste et les elements sont dans
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..zmax. Les elements peuvent apparaitre plusieurs fois dans le tableau "elements"
void reset ()
const ArrOfInt_tfloor_elements () const

Static Public Attributes

static const int coord_max_
static const int root_octree_half_width_

Protected Types

enum  Octree_Type { EMPTY , OCTREE , FLOOR }

Protected Member Functions

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.
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
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)
void search_elements_box_floor (IntBoxData< _SIZE_ > &boxdata, int_t octree_floor_id) const
 ajoute des elements de l'octree_floor a boxdata.
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, de centre cx, cy, cz.

Static Protected Member Functions

static int_t octree_id (int_t index, Octree_Type type)
 construction d'un octree_id (voir octree_structure_)
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 et de son octree_id.
static Octree_Type octree_type (int_t octree_id)
 Renvoie le type d'un octree en fonction de son octree_id.

Protected Attributes

int_t root_octree_id_
int_t nb_elements_
IntTab_t octree_structure_
ArrOfInt_t floor_elements_

Detailed Description

template<typename _SIZE_>
class Octree_Int_32_64< _SIZE_ >

: Un octree permettant de retrouver des objets ponctuels ou parallelipipediques dans un espace 1D, 2D ou 3D et des coordonnees entieres

Definition at line 27 of file Octree_Int.h.

Member Typedef Documentation

◆ AOFlag_

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::AOFlag_ = TRUSTArray<int, _SIZE_>

Definition at line 36 of file Octree_Int.h.

◆ AOFlagS_

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::AOFlagS_ = TRUST_Vector<AOFlag_>

Definition at line 37 of file Octree_Int.h.

◆ ArrOfDouble_t

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::ArrOfDouble_t = ArrOfDouble_T<_SIZE_>

Definition at line 33 of file Octree_Int.h.

◆ ArrOfInt_t

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::ArrOfInt_t = ArrOfInt_T<_SIZE_>

Definition at line 31 of file Octree_Int.h.

◆ ArrsOfInt_t

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::ArrsOfInt_t = ArrsOfInt_T<_SIZE_>

Definition at line 35 of file Octree_Int.h.

◆ DoubleTab_t

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::DoubleTab_t = DoubleTab_T<_SIZE_>

Definition at line 34 of file Octree_Int.h.

◆ int_t

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::int_t = _SIZE_

Definition at line 30 of file Octree_Int.h.

◆ IntTab_t

template<typename _SIZE_>
using Octree_Int_32_64< _SIZE_ >::IntTab_t = IntTab_T<_SIZE_>

Definition at line 32 of file Octree_Int.h.

Member Enumeration Documentation

◆ Octree_Type

template<typename _SIZE_>
enum Octree_Int_32_64::Octree_Type
protected
Enumerator
EMPTY 
OCTREE 
FLOOR 

Definition at line 66 of file Octree_Int.h.

Member Function Documentation

◆ build()

template<typename _SIZE_>
void Octree_Int_32_64< _SIZE_ >::build ( const int dimension,
const IntTab_t & elements_boxes )

construction de l'octree.

On donne la dimension (1, 2 ou 3) et un tableau d'elements a stocker dans l'octree. Deux possibilites: 1) les elements sont ponctuels si elements_boxes.dimension(1) == dimension. Dans ce cas, chaque element se trouve dans un et un seul octree_floor 2) les elements sont des parallelipipedes, si elements_boxes.dimension(1) == dimension*2 Les "dimension" premieres colonnes sont les coordonnees inferieures, les "dimension" suivantes sont les coordonnees superieures. Un parallelipipede peut etre affecte a plusieurs octree_floor. Les coordonnees stockees dans elements_boxes peuvent aller de 0 a coord_max_ inclus. Il vaut mieux utiliser toute la plage des entiers en multipliant par un facteur adequat.

Definition at line 99 of file Octree_Int.cpp.

◆ build_octree_floor()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::build_octree_floor ( const ArrOfInt_t & elements_list)
protected

construit un octree_floor avec la liste d'elements donnee et renvoie l'octree_id de cet octree_floor

Definition at line 321 of file Octree_Int.cpp.

◆ build_octree_recursively()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::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 )
protected

octree_center_i est le premier int de la moitie superieure de l'octree dans la direction i.

octree_half_width est une puissance de 2 egale a octree_center_i-octree_min_i (octree_min_i est le premier int inclu dans cet octree dans la direction i) Valeur de retour: octree_id de l'octree construit (void octree_structure_)

Definition at line 340 of file Octree_Int.cpp.

◆ floor_elements()

template<typename _SIZE_>
const ArrOfInt_t & Octree_Int_32_64< _SIZE_ >::floor_elements ( ) const
inline

Definition at line 45 of file Octree_Int.h.

◆ octree_id()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::octree_id ( int_t index,
Octree_Type type )
inlinestaticprotected

construction d'un octree_id (voir octree_structure_)

Si type==EMPTY, l'octree_id est 0 Si type==OCTREE, on suppose que index est un indice dans octree_structure_ Si type==FLOOR, on suppose que index est un indice dans floor_elements_

Definition at line 36 of file Octree_Int.cpp.

◆ octree_index()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::octree_index ( int_t octree_id,
Octree_Type type )
inlinestaticprotected

calcul de l'index de l'octree dans octree_structure ou floor_elements en fonction du type de l'octree et de son octree_id.

En general on a deja determine le type avant, on le passe en parametre pour optimiser.

Definition at line 56 of file Octree_Int.cpp.

◆ octree_type()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::Octree_Type Octree_Int_32_64< _SIZE_ >::octree_type ( int_t octree_id)
inlinestaticprotected

Renvoie le type d'un octree en fonction de son octree_id.

Definition at line 75 of file Octree_Int.cpp.

◆ reset()

template<typename _SIZE_>
void Octree_Int_32_64< _SIZE_ >::reset ( )

Definition at line 309 of file Octree_Int.cpp.

◆ search_elements()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::search_elements ( int x,
int y,
int z,
int_t & index ) const

renvoie la liste des elements contenant potentiellement le point (x,y,z) On renvoie n=nombre d'elements de la liste et les elements sont dans

floor_elements()[index+i] pour 0 <= i < n. En realite on renvoie tous les elements qui ont une intersection non vide avec l'octree_floor contenant le point (x,y,z)

Definition at line 138 of file Octree_Int.cpp.

◆ search_elements_box()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::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..zmax. Les elements peuvent apparaitre plusieurs fois dans le tableau "elements"

Definition at line 185 of file Octree_Int.cpp.

◆ search_elements_box_floor()

template<typename _SIZE_>
void Octree_Int_32_64< _SIZE_ >::search_elements_box_floor ( IntBoxData< _SIZE_ > & boxdata,
int_t octree_floor_id ) const
protected

ajoute des elements de l'octree_floor a boxdata.

elements_

Definition at line 226 of file Octree_Int.cpp.

◆ search_elements_box_recursively()

template<typename _SIZE_>
void Octree_Int_32_64< _SIZE_ >::search_elements_box_recursively ( IntBoxData< _SIZE_ > & boxdata,
int_t octree_id,
int cx,
int cy,
int cz,
int half_width ) const
protected

cherche recursivement les elements inclus dans la boite boxdata pour l'octree_id donne, de centre cx, cy, cz.

Definition at line 260 of file Octree_Int.cpp.

◆ search_octree_floor()

template<typename _SIZE_>
Octree_Int_32_64< _SIZE_ >::int_t Octree_Int_32_64< _SIZE_ >::search_octree_floor ( int x_pos,
int y_pos,
int z_pos ) const
protected

renvoie l'octree_id de l'octree_floor contenant le sommet (x,y,z) (peut renvoyer l'octree EMPTY)

Definition at line 469 of file Octree_Int.cpp.

Member Data Documentation

◆ coord_max_

template<typename _SIZE_>
const int Octree_Int_32_64< _SIZE_ >::coord_max_
static

Definition at line 48 of file Octree_Int.h.

◆ floor_elements_

template<typename _SIZE_>
ArrOfInt_t Octree_Int_32_64< _SIZE_ >::floor_elements_
protected

Definition at line 88 of file Octree_Int.h.

◆ nb_elements_

template<typename _SIZE_>
int_t Octree_Int_32_64< _SIZE_ >::nb_elements_
protected

Definition at line 75 of file Octree_Int.h.

◆ octree_structure_

template<typename _SIZE_>
IntTab_t Octree_Int_32_64< _SIZE_ >::octree_structure_
protected

Definition at line 82 of file Octree_Int.h.

◆ root_octree_half_width_

template<typename _SIZE_>
const int Octree_Int_32_64< _SIZE_ >::root_octree_half_width_
static

Definition at line 50 of file Octree_Int.h.

◆ root_octree_id_

template<typename _SIZE_>
int_t Octree_Int_32_64< _SIZE_ >::root_octree_id_
protected

Definition at line 73 of file Octree_Int.h.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/v1.9.8/src/Kernel/Geometrie/Octree_Int.h
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/v1.9.8/src/Kernel/Geometrie/Octree_Int.cpp