VTK  9.6.20260621
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
10
11#ifndef vtkRandomHyperTreeGridSource_h
12#define vtkRandomHyperTreeGridSource_h
13
14#include "vtkFiltersSourcesModule.h" // For export macro
16#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
17
18#include <vtkNew.h> // For vtkNew
19
20VTK_ABI_NAMESPACE_BEGIN
21class vtkDoubleArray;
25
26class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkRandomHyperTreeGridSource
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
39 vtkGetVector3Macro(Dimensions, unsigned int);
40 vtkSetVector3Macro(Dimensions, unsigned int);
42
47 vtkGetVector6Macro(OutputBounds, double);
48 vtkSetVector6Macro(OutputBounds, double);
49
56 vtkGetMacro(Seed, vtkTypeUInt32);
57 vtkSetMacro(Seed, vtkTypeUInt32);
59
65 vtkGetMacro(MaxDepth, vtkIdType);
66 vtkSetClampMacro(MaxDepth, vtkIdType, 1, VTK_ID_MAX);
68
74 vtkGetMacro(SplitFraction, double);
75 vtkSetClampMacro(SplitFraction, double, 0., 1.);
77
89 vtkGetMacro(MaskedFraction, double);
90 vtkSetClampMacro(MaskedFraction, double, 0., 1.);
92
93protected:
96
98 vtkInformation* req, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
99
101 vtkInformation* req, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
102
103 // We just do the work in RequestData.
104 int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) final { return 1; }
105
106 int FillOutputPortInformation(int port, vtkInformation* info) override;
107
117
118 unsigned int Dimensions[3];
119 double OutputBounds[6];
120 vtkTypeUInt32 Seed;
123
124private:
126 void operator=(const vtkRandomHyperTreeGridSource&) = delete;
127
130
131 bool ShouldRefine();
132 bool ShouldMask();
133
134 double MaskedFraction = 0;
135};
136
137VTK_ABI_NAMESPACE_END
138#endif // vtkRandomHyperTreeGridSource_h
general representation of visualization data
dynamic, self-adjusting array of double
Generates a structured extent from unstructured.
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:108
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:168
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkRandomHyperTreeGridSource * New()
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.
void SubdivideLeaves(vtkHyperTreeGridNonOrientedCursor *cursor, vtkIdType treeId, vtkDoubleArray *)
Recursively subdivides the leafs of the tree using a pseudo random number generator and the SplitFrac...
~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
int vtkIdType
Definition vtkType.h:363
#define VTK_ID_MAX
Definition vtkType.h:367
#define VTK_MARSHALAUTO