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 =========================================================================*/
25 #ifndef vtkHyperOctreeFractalSource_h
26 #define vtkHyperOctreeFractalSource_h
27 
28 #include "vtkFiltersSourcesModule.h" // For export macro
30 
32 
33 class VTKFILTERSSOURCES_EXPORT vtkHyperOctreeFractalSource : public vtkHyperOctreeAlgorithm
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
38 
40 
45  int GetMaximumLevel();
46 
54  void SetMaximumLevel(int levels);
55 
57 
61  void SetMinimumLevel(int level);
62  int GetMinimumLevel();
64 
65 
66  //========== Mandelbrot parameters ==========
67 
69 
74  void SetProjectionAxes(int x, int y, int z);
75  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
76  vtkGetVector3Macro(ProjectionAxes, int);
78 
80 
84  vtkSetVector4Macro(OriginCX, double);
85  vtkGetVector4Macro(OriginCX, double);
87 
89 
95  vtkSetVector4Macro(SizeCX, double);
96  vtkGetVector4Macro(SizeCX, double);
98 
100 
103  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 255);
104  vtkGetMacro(MaximumNumberOfIterations, unsigned char);
106 
108 
111  vtkSetClampMacro(Dimension, int, 2, 3);
112  vtkGetMacro(Dimension, int);
114 
116 
121  vtkSetMacro(SpanThreshold, double);
122  vtkGetMacro(SpanThreshold, double);
124 
125 protected:
127  ~vtkHyperOctreeFractalSource() VTK_OVERRIDE;
128 
129  int RequestInformation (vtkInformation * vtkNotUsed(request),
130  vtkInformationVector ** vtkNotUsed( inputVector ),
131  vtkInformationVector *outputVector) VTK_OVERRIDE;
132 
134  vtkInformationVector *) VTK_OVERRIDE;
135 
136  void Subdivide(vtkHyperOctreeCursor *cursor,
137  int level, vtkHyperOctree *output,
138  double* origin, double* size,
139  float* cornerVals);
140 
144 
145  int ProjectionAxes[3];
146 
148 
149  // Complex constant/initial-value at origin.
150  double OriginCX[4];
151 
152  // A temporary vector that is computed as needed.
153  // It is used to return a vector.
154  double SizeCX[4];
155 
156  float EvaluateWorldPoint(double p[3]);
157  float EvaluateSet(double p[4]);
158 
159  double Origin[3];
160  double Size[3];
161 
163 
164 private:
165  vtkHyperOctreeFractalSource(const vtkHyperOctreeFractalSource&) VTK_DELETE_FUNCTION;
166  void operator=(const vtkHyperOctreeFractalSource&) VTK_DELETE_FUNCTION;
167 };
168 
169 #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:33
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()