VTK
vtkHyperOctreeFractalSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperOctreeFractalSource.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 =========================================================================*/
28 #ifndef vtkHyperOctreeFractalSource_h
29 #define vtkHyperOctreeFractalSource_h
30 
31 #include "vtkFiltersSourcesModule.h" // For export macro
33 
35 
36 #if !defined(VTK_LEGACY_REMOVE)
37 class VTKFILTERSSOURCES_EXPORT vtkHyperOctreeFractalSource : public vtkHyperOctreeAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
49  int GetMaximumLevel();
50 
58  void SetMaximumLevel(int levels);
59 
61 
65  void SetMinimumLevel(int level);
66  int GetMinimumLevel();
68 
69 
70  //========== Mandelbrot parameters ==========
71 
73 
78  void SetProjectionAxes(int x, int y, int z);
79  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
80  vtkGetVector3Macro(ProjectionAxes, int);
82 
84 
88  vtkSetVector4Macro(OriginCX, double);
89  vtkGetVector4Macro(OriginCX, double);
91 
93 
99  vtkSetVector4Macro(SizeCX, double);
100  vtkGetVector4Macro(SizeCX, double);
102 
104 
107  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 255);
108  vtkGetMacro(MaximumNumberOfIterations, unsigned char);
110 
112 
115  vtkSetClampMacro(Dimension, int, 2, 3);
116  vtkGetMacro(Dimension, int);
118 
120 
125  vtkSetMacro(SpanThreshold, double);
126  vtkGetMacro(SpanThreshold, double);
128 
129 protected:
131  ~vtkHyperOctreeFractalSource() override;
132 
133  int RequestInformation (vtkInformation * vtkNotUsed(request),
134  vtkInformationVector ** vtkNotUsed( inputVector ),
135  vtkInformationVector *outputVector) override;
136 
138  vtkInformationVector *) override;
139 
140  void Subdivide(vtkHyperOctreeCursor *cursor,
141  int level, vtkHyperOctree *output,
142  double* origin, double* size,
143  float* cornerVals);
144 
148 
149  int ProjectionAxes[3];
150 
152 
153  // Complex constant/initial-value at origin.
154  double OriginCX[4];
155 
156  // A temporary vector that is computed as needed.
157  // It is used to return a vector.
158  double SizeCX[4];
159 
160  float EvaluateWorldPoint(double p[3]);
161  float EvaluateSet(double p[4]);
162 
163  double Origin[3];
164  double Size[3];
165 
167 
168 private:
170  void operator=(const vtkHyperOctreeFractalSource&) = delete;
171 };
172 #endif //VTK_LEGACY_REMOVE
173 
174 #endif
abstract interface for implicit functions
Superclass for algorithms that produce only octree as output.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
A dataset structured as a tree where each node has exactly 2^n children.
Create an octree from a fractal.
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Objects that can traverse hyperoctree nodes.
void SetProjectionAxes(int a[3])
Set the projection from the 4D space (4 parameters / 2 imaginary numbers) to the axes of the 3D Volum...
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()