VTK
vtkRandomHyperTreeGridSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRandomHyperTreeGridSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
20 #ifndef vtkRandomHyperTreeGridSource_h
21 #define vtkRandomHyperTreeGridSource_h
22 
23 #include "vtkFiltersSourcesModule.h" // For export macro
25 
26 #include <vtkNew.h> // For vtkNew
27 
28 class vtkDoubleArray;
30 class vtkHyperTreeCursor;
32 
33 class VTKFILTERSSOURCES_EXPORT vtkRandomHyperTreeGridSource
35 {
36 public:
39  void PrintSelf(ostream &os, vtkIndent indent) override;
40 
46  vtkGetVector3Macro(GridSize, unsigned int)
47  vtkSetVector3Macro(GridSize, unsigned int)
54  vtkGetVector6Macro(OutputBounds, double)
55  vtkSetVector6Macro(OutputBounds, double)
56 
57 
63  vtkGetMacro(Seed, vtkTypeUInt32)
64  vtkSetMacro(Seed, vtkTypeUInt32)
72  vtkGetMacro(MaxDepth, vtkIdType)
73  vtkSetClampMacro(MaxDepth, vtkIdType, 1, VTK_ID_MAX)
81  vtkGetMacro(SplitFraction, double)
82  vtkSetClampMacro(SplitFraction, double, 0., 1.)
85 protected:
87  ~vtkRandomHyperTreeGridSource() override;
88 
89  int RequestInformation(vtkInformation *req,
90  vtkInformationVector **inInfo,
91  vtkInformationVector *outInfo) override;
92 
93  int RequestData(vtkInformation *req,
94  vtkInformationVector **inInfo,
95  vtkInformationVector *outInfo) override;
96 
97  // We just do the work in RequestData.
98  int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) final { return 1; }
99 
101 
102  void SubdivideLeaves(vtkHyperTreeCursor *cursor, vtkIdType treeId);
103 
104  bool ShouldRefine(vtkIdType level);
105 
106  unsigned int GridSize[3];
107  double OutputBounds[6];
108  vtkTypeUInt32 Seed;
111 
112 private:
114  void operator=(const vtkRandomHyperTreeGridSource&) = delete;
115 
117  vtkNew<vtkExtentTranslator> ExtentTranslator;
118  vtkHyperTreeGrid *HTG;
119  vtkDoubleArray *Levels;
120 };
121 
122 #endif // vtkRandomHyperTreeGridSource_h
vtkRandomHyperTreeGridSource::Seed
vtkTypeUInt32 Seed
Definition: vtkRandomHyperTreeGridSource.h:108
vtkMinimalStandardRandomSequence
Park and Miller Sequence of pseudo random numbers.
Definition: vtkMinimalStandardRandomSequence.h:47
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::level
Definition: vtkX3D.h:395
vtkX3D::port
Definition: vtkX3D.h:447
vtkExtentTranslator
Generates a structured extent from unstructured.
Definition: vtkExtentTranslator.h:37
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkNew< vtkMinimalStandardRandomSequence >
vtkRandomHyperTreeGridSource
Builds a randomized but reproducible vtkHyperTreeGrid.
Definition: vtkRandomHyperTreeGridSource.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkNew.h
VTK_ID_MAX
#define VTK_ID_MAX
Definition: vtkType.h:351
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:41
vtkRandomHyperTreeGridSource::SplitFraction
double SplitFraction
Definition: vtkRandomHyperTreeGridSource.h:110
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkRandomHyperTreeGridSource::MaxDepth
vtkIdType MaxDepth
Definition: vtkRandomHyperTreeGridSource.h:109
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:46
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:70