VTK  9.1.0
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
28class vtkDoubleArray;
32
33class VTKFILTERSSOURCES_EXPORT vtkRandomHyperTreeGridSource : public vtkHyperTreeGridAlgorithm
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
45 vtkGetVector3Macro(Dimensions, unsigned int);
46 vtkSetVector3Macro(Dimensions, unsigned int);
53 vtkGetVector6Macro(OutputBounds, double);
54 vtkSetVector6Macro(OutputBounds, double);
55
62 vtkGetMacro(Seed, vtkTypeUInt32);
63 vtkSetMacro(Seed, vtkTypeUInt32);
71 vtkGetMacro(MaxDepth, vtkIdType);
72 vtkSetClampMacro(MaxDepth, vtkIdType, 1, VTK_ID_MAX);
80 vtkGetMacro(SplitFraction, double);
81 vtkSetClampMacro(SplitFraction, double, 0., 1.);
84protected:
87
89 vtkInformation* req, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
90
92 vtkInformation* req, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
93
94 // We just do the work in RequestData.
95 int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) final { return 1; }
96
98
100
102
103 unsigned int Dimensions[3];
104 double OutputBounds[6];
105 vtkTypeUInt32 Seed;
108
109private:
111 void operator=(const vtkRandomHyperTreeGridSource&) = delete;
112
114 vtkNew<vtkExtentTranslator> ExtentTranslator;
115 vtkDoubleArray* Levels;
116};
117
118#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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Park and Miller Sequence of pseudo random numbers.
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)
@ info
Definition: vtkX3D.h:382
@ level
Definition: vtkX3D.h:401
@ port
Definition: vtkX3D.h:453
int vtkIdType
Definition: vtkType.h:332
#define VTK_ID_MAX
Definition: vtkType.h:336