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 =========================================================================*/
27 #ifndef __vtkHyperOctreeFractalSource_h
28 #define __vtkHyperOctreeFractalSource_h
29 
31 
33 
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
44  int GetMaximumLevel();
45 
50  void SetMaximumLevel(int levels);
51 
53 
55  void SetMinimumLevel(int level);
56  int GetMinimumLevel();
58 
59 
60  //========== Mandelbrot parameters ==========
61 
63 
66  void SetProjectionAxes(int x, int y, int z);
67  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
68  vtkGetVector3Macro(ProjectionAxes, int);
70 
72 
74  vtkSetVector4Macro(OriginCX, double);
75  vtkGetVector4Macro(OriginCX, double);
77 
79 
82  vtkSetVector4Macro(SizeCX, double);
83  vtkGetVector4Macro(SizeCX, double);
85 
87 
88  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 255);
89  vtkGetMacro(MaximumNumberOfIterations, unsigned char);
91 
93 
94  vtkSetClampMacro(Dimension, int, 2, 3);
95  vtkGetMacro(Dimension, int);
97 
99 
102  vtkSetMacro(SpanThreshold, double);
103  vtkGetMacro(SpanThreshold, double);
105 
106 protected:
109 
110  int RequestInformation (vtkInformation * vtkNotUsed(request),
111  vtkInformationVector ** vtkNotUsed( inputVector ),
112  vtkInformationVector *outputVector);
113 
116 
117  void Subdivide(vtkHyperOctreeCursor *cursor,
118  int level, vtkHyperOctree *output,
119  double* origin, double* size,
120  float* cornerVals);
121 
125 
126  int ProjectionAxes[3];
127 
129 
130  // Complex constant/initial-value at origin.
131  double OriginCX[4];
132 
133  // A temporary vector that is computed as needed.
134  // It is used to return a vector.
135  double SizeCX[4];
136 
137  float EvaluateWorldPoint(double p[3]);
138  float EvaluateSet(double p[4]);
139 
140  double Origin[3];
141  double Size[3];
142 
144 
145 private:
146  vtkHyperOctreeFractalSource(const vtkHyperOctreeFractalSource&); // Not implemented.
147  void operator=(const vtkHyperOctreeFractalSource&); // Not implemented.
148 };
149 
150 #endif