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 class VTKFILTERSSOURCES_EXPORT vtkHyperOctreeFractalSource : public vtkHyperOctreeAlgorithm
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
43 
48  int GetMaximumLevel();
49 
57  void SetMaximumLevel(int levels);
58 
60 
64  void SetMinimumLevel(int level);
65  int GetMinimumLevel();
67 
68 
69  //========== Mandelbrot parameters ==========
70 
72 
77  void SetProjectionAxes(int x, int y, int z);
78  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
79  vtkGetVector3Macro(ProjectionAxes, int);
81 
83 
87  vtkSetVector4Macro(OriginCX, double);
88  vtkGetVector4Macro(OriginCX, double);
90 
92 
98  vtkSetVector4Macro(SizeCX, double);
99  vtkGetVector4Macro(SizeCX, double);
101 
103 
106  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 255);
107  vtkGetMacro(MaximumNumberOfIterations, unsigned char);
109 
111 
114  vtkSetClampMacro(Dimension, int, 2, 3);
115  vtkGetMacro(Dimension, int);
117 
119 
124  vtkSetMacro(SpanThreshold, double);
125  vtkGetMacro(SpanThreshold, double);
127 
128 protected:
130  ~vtkHyperOctreeFractalSource() VTK_OVERRIDE;
131 
132  int RequestInformation (vtkInformation * vtkNotUsed(request),
133  vtkInformationVector ** vtkNotUsed( inputVector ),
134  vtkInformationVector *outputVector) VTK_OVERRIDE;
135 
136  int RequestData(vtkInformation *, vtkInformationVector **,
137  vtkInformationVector *) VTK_OVERRIDE;
138 
139  void Subdivide(vtkHyperOctreeCursor *cursor,
140  int level, vtkHyperOctree *output,
141  double* origin, double* size,
142  float* cornerVals);
143 
144  int MaximumLevel;
145  int MinimumLevel;
146  int Dimension;
147 
148  int ProjectionAxes[3];
149 
150  unsigned char MaximumNumberOfIterations;
151 
152  // Complex constant/initial-value at origin.
153  double OriginCX[4];
154 
155  // A temporary vector that is computed as needed.
156  // It is used to return a vector.
157  double SizeCX[4];
158 
159  float EvaluateWorldPoint(double p[3]);
160  float EvaluateSet(double p[4]);
161 
162  double Origin[3];
163  double Size[3];
164 
165  double SpanThreshold;
166 
167 private:
168  vtkHyperOctreeFractalSource(const vtkHyperOctreeFractalSource&) VTK_DELETE_FUNCTION;
169  void operator=(const vtkHyperOctreeFractalSource&) VTK_DELETE_FUNCTION;
170 };
171 
172 #endif
vtkHyperOctreeAlgorithm.h
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkHyperOctreeCursor
Objects that can traverse hyperoctree nodes.
Definition: vtkHyperOctreeCursor.h:51
vtkHyperOctreeFractalSource::SetProjectionAxes
void SetProjectionAxes(int a[3])
Definition: vtkHyperOctreeFractalSource.h:78
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:58
vtkHyperOctreeAlgorithm
Superclass for algorithms that produce only octree as output.
Definition: vtkHyperOctreeAlgorithm.h:41
vtkX3D::level
Definition: vtkX3D.h:395
vtkHyperOctreeFractalSource
Create an octree from a fractal. hyperoctree.
Definition: vtkHyperOctreeFractalSource.h:36
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkHyperOctreeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::size
Definition: vtkX3D.h:253
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperOctree
A dataset structured as a tree where each node has exactly 2^n children.
Definition: vtkHyperOctree.h:143