21 #ifndef vtkUniformHyperTreeGrid_h
22 #define vtkUniformHyperTreeGrid_h
29 #include "vtkCommonDataModelModule.h"
32 VTK_ABI_NAMESPACE_BEGIN
60 vtkSetVector3Macro(Origin,
double);
61 vtkGetVector3Macro(Origin,
double);
68 void SetGridScale(
double,
double,
double);
69 void SetGridScale(
double*);
70 vtkGetVector3Macro(GridScale,
double);
76 void SetGridScale(
double);
91 void SetXCoordinates(
vtkDataArray* XCoordinates) override;
106 void SetYCoordinates(
vtkDataArray* YCoordinates) override;
121 void SetZCoordinates(
vtkDataArray* ZCoordinates) override;
136 void SetFixedCoordinates(
unsigned int axis,
double value) override;
142 void GetLevelZeroOriginAndSizeFromIndex(
vtkIdType,
double*,
double*) override;
147 void GetLevelZeroOriginFromIndex(vtkIdType,
double*) override;
162 unsigned long GetActualMemorySizeBytes() override;
168 vtkHyperTree* GetTree(vtkIdType,
bool create = false) override;
179 ~vtkUniformHyperTreeGrid() override;
195 bool ComputedXCoordinates;
196 bool ComputedYCoordinates;
197 bool ComputedZCoordinates;
200 unsigned int FindDichotomic(
double value,
unsigned char dim,
double tol)
const
203 if (value < (this->Origin[dim] - tol) ||
204 value > (this->Origin[dim] + tol + this->GridScale[dim] * maxIdx))
209 long idx = std::round((value - this->Origin[dim]) / this->GridScale[dim]);
210 return std::min(
std::max(idx, 0l), static_cast<long>(maxIdx));
215 return this->FindDichotomic(value, 0, tolerance);
219 return this->FindDichotomic(value, 1, tolerance);
223 return this->FindDichotomic(value, 2, tolerance);
229 mutable std::shared_ptr<vtkHyperTreeGridScales>
Scales;
236 VTK_ABI_NAMESPACE_END
void Initialize() override
Restore data object to initial state.
virtual double * GetBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of double
static vtkHyperTreeGrid * New()
a simple class to control print indentation
#define VTK_UNIFORM_HYPER_TREE_GRID
abstract superclass for arrays of numeric data
const unsigned int * GetDimensions() const
Get dimensions of this rectilinear grid dataset.
#define VTK_SIZEHINT(...)
virtual void CopyStructure(vtkDataObject *)
Copy the internal geometric and topological structure of a vtkHyperTreeGrid object.
A data object structured as a tree.
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
general representation of visualization data