17#ifndef vtkHyperTreeGridScales_h
18#define vtkHyperTreeGridScales_h
20#include "vtkABINamespace.h"
25VTK_ABI_NAMESPACE_BEGIN
34 : BranchFactor(branchfactor)
36 , CellScales(scale, scale + 3)
53 return this->CellScales.data() + 3 * level;
62 return this->CellScales[3 * level + 0];
71 return this->CellScales[3 * level + 1];
80 return this->CellScales[3 * level + 2];
86 void GetScale(
unsigned int level,
double scale[3])
const
89 memcpy(scale, this->CellScales.data() + 3 * level, 3 *
sizeof(
double));
106 void Update(
unsigned int level)
const
108 if (level < this->CurrentFailLevel)
112 this->CurrentFailLevel =
level + 1;
113 this->CellScales.resize(3 * this->CurrentFailLevel);
114 auto current = this->CellScales.begin() + 3 * (this->CurrentFailLevel - 1);
116 auto end = this->CellScales.end();
117 for (; current != end; ++current, ++
previous)
119 *current = *
previous / this->BranchFactor;
126 const double BranchFactor;
131 mutable unsigned int CurrentFailLevel;
132 mutable std::vector<double> CellScales;
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
double GetScaleX(unsigned int level) const
JB.
vtkHyperTreeGridScales(double branchfactor, const double scale[3])
JB Construit cette classe a partir du scale de la maille d'origine d'un HyperTree et du subdivision f...
~vtkHyperTreeGridScales()=default
double GetBranchFactor() const
JB Retourne le scale des mailles du niveau demande.
double GetScaleY(unsigned int level) const
JB.
double * GetScale(unsigned int level) const
JB Retourne le scale des mailles du niveau demande.
unsigned int GetCurrentFailLevel() const
JB.
void GetScale(unsigned int level, double scale[3]) const
JB Retourne le scale des mailles du niveau demande.
double GetScaleZ(unsigned int level) const
JB.