VTK  9.3.0
vtkRandomHyperTreeGridSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
11#ifndef vtkRandomHyperTreeGridSource_h
12#define vtkRandomHyperTreeGridSource_h
13
14#include "vtkFiltersSourcesModule.h" // For export macro
16
17#include <vtkNew.h> // For vtkNew
18
19VTK_ABI_NAMESPACE_BEGIN
20class vtkDoubleArray;
24
25class VTKFILTERSSOURCES_EXPORT vtkRandomHyperTreeGridSource : public vtkHyperTreeGridAlgorithm
26{
27public:
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
37 vtkGetVector3Macro(Dimensions, unsigned int);
38 vtkSetVector3Macro(Dimensions, unsigned int);
45 vtkGetVector6Macro(OutputBounds, double);
46 vtkSetVector6Macro(OutputBounds, double);
47
54 vtkGetMacro(Seed, vtkTypeUInt32);
55 vtkSetMacro(Seed, vtkTypeUInt32);
63 vtkGetMacro(MaxDepth, vtkIdType);
64 vtkSetClampMacro(MaxDepth, vtkIdType, 1, VTK_ID_MAX);
72 vtkGetMacro(SplitFraction, double);
73 vtkSetClampMacro(SplitFraction, double, 0., 1.);
76protected:
79
81 vtkInformation* req, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
82
84 vtkInformation* req, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
85
86 // We just do the work in RequestData.
87 int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) final { return 1; }
88
89 int FillOutputPortInformation(int port, vtkInformation* info) override;
90
92
94
95 unsigned int Dimensions[3];
96 double OutputBounds[6];
97 vtkTypeUInt32 Seed;
100
101private:
103 void operator=(const vtkRandomHyperTreeGridSource&) = delete;
104
106 vtkNew<vtkExtentTranslator> ExtentTranslator;
107 vtkDoubleArray* Levels;
108};
109
110VTK_ABI_NAMESPACE_END
111#endif // vtkRandomHyperTreeGridSource_h
general representation of visualization data
dynamic, self-adjusting array of double
Generates a structured extent from unstructured.
Superclass for algorithms that produce a hyper tree grid as output.
Objects for traversal a HyperTreeGrid.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Park and Miller Sequence of pseudo random numbers.
Allocate and hold a VTK object.
Definition vtkNew.h:51
Builds a randomized but reproducible vtkHyperTreeGrid.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkRandomHyperTreeGridSource * New()
void SubdivideLeaves(vtkHyperTreeGridNonOrientedCursor *cursor, vtkIdType treeId)
int FillOutputPortInformation(int port, vtkInformation *info) override
Define default input and output port types.
int RequestData(vtkInformation *req, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
This is called by the superclass.
~vtkRandomHyperTreeGridSource() override
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) final
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
int RequestInformation(vtkInformation *req, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
bool ShouldRefine(vtkIdType level)
int vtkIdType
Definition vtkType.h:315
#define VTK_ID_MAX
Definition vtkType.h:319