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 
30 #include "vtkFiltersSourcesModule.h" // For export macro
32 
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
45  int GetMaximumLevel();
46 
51  void SetMaximumLevel(int levels);
52 
54 
56  void SetMinimumLevel(int level);
57  int GetMinimumLevel();
59 
60 
61  //========== Mandelbrot parameters ==========
62 
64 
67  void SetProjectionAxes(int x, int y, int z);
68  void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);}
69  vtkGetVector3Macro(ProjectionAxes, int);
71 
73 
75  vtkSetVector4Macro(OriginCX, double);
76  vtkGetVector4Macro(OriginCX, double);
78 
80 
83  vtkSetVector4Macro(SizeCX, double);
84  vtkGetVector4Macro(SizeCX, double);
86 
88 
89  vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 255);
90  vtkGetMacro(MaximumNumberOfIterations, unsigned char);
92 
94 
95  vtkSetClampMacro(Dimension, int, 2, 3);
96  vtkGetMacro(Dimension, int);
98 
100 
103  vtkSetMacro(SpanThreshold, double);
104  vtkGetMacro(SpanThreshold, double);
106 
107 protected:
110 
111  int RequestInformation (vtkInformation * vtkNotUsed(request),
112  vtkInformationVector ** vtkNotUsed( inputVector ),
113  vtkInformationVector *outputVector);
114 
117 
118  void Subdivide(vtkHyperOctreeCursor *cursor,
119  int level, vtkHyperOctree *output,
120  double* origin, double* size,
121  float* cornerVals);
122 
126 
127  int ProjectionAxes[3];
128 
130 
131  // Complex constant/initial-value at origin.
132  double OriginCX[4];
133 
134  // A temporary vector that is computed as needed.
135  // It is used to return a vector.
136  double SizeCX[4];
137 
138  float EvaluateWorldPoint(double p[3]);
139  float EvaluateSet(double p[4]);
140 
141  double Origin[3];
142  double Size[3];
143 
145 
146 private:
147  vtkHyperOctreeFractalSource(const vtkHyperOctreeFractalSource&); // Not implemented.
148  void operator=(const vtkHyperOctreeFractalSource&); // Not implemented.
149 };
150 
151 #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)
A dataset structured as a tree where each node has exactly 2^n children.
Create an octree from a fractal. hyperoctree.
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSSOURCES_EXPORT
Objects that can traverse hyperoctree nodes.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()