VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkHyperOctreeFractalSource.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00027 #ifndef __vtkHyperOctreeFractalSource_h 00028 #define __vtkHyperOctreeFractalSource_h 00029 00030 #include "vtkFiltersSourcesModule.h" // For export macro 00031 #include "vtkHyperOctreeAlgorithm.h" 00032 00033 class vtkImplicitFunction; 00034 00035 class VTKFILTERSSOURCES_EXPORT vtkHyperOctreeFractalSource : public vtkHyperOctreeAlgorithm 00036 { 00037 public: 00038 vtkTypeMacro(vtkHyperOctreeFractalSource,vtkHyperOctreeAlgorithm); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 00041 static vtkHyperOctreeFractalSource *New(); 00042 00045 int GetMaximumLevel(); 00046 00051 void SetMaximumLevel(int levels); 00052 00054 00056 void SetMinimumLevel(int level); 00057 int GetMinimumLevel(); 00059 00060 00061 //========== Mandelbrot parameters ========== 00062 00064 00067 void SetProjectionAxes(int x, int y, int z); 00068 void SetProjectionAxes(int a[3]) {this->SetProjectionAxes(a[0],a[1],a[2]);} 00069 vtkGetVector3Macro(ProjectionAxes, int); 00071 00073 00075 vtkSetVector4Macro(OriginCX, double); 00076 vtkGetVector4Macro(OriginCX, double); 00078 00080 00083 vtkSetVector4Macro(SizeCX, double); 00084 vtkGetVector4Macro(SizeCX, double); 00086 00088 00089 vtkSetClampMacro(MaximumNumberOfIterations, unsigned short, 1, 255); 00090 vtkGetMacro(MaximumNumberOfIterations, unsigned char); 00092 00094 00095 vtkSetClampMacro(Dimension, int, 2, 3); 00096 vtkGetMacro(Dimension, int); 00098 00100 00103 vtkSetMacro(SpanThreshold, double); 00104 vtkGetMacro(SpanThreshold, double); 00106 00107 protected: 00108 vtkHyperOctreeFractalSource(); 00109 ~vtkHyperOctreeFractalSource(); 00110 00111 int RequestInformation (vtkInformation * vtkNotUsed(request), 00112 vtkInformationVector ** vtkNotUsed( inputVector ), 00113 vtkInformationVector *outputVector); 00114 00115 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00116 vtkInformationVector *); 00117 00118 void Subdivide(vtkHyperOctreeCursor *cursor, 00119 int level, vtkHyperOctree *output, 00120 double* origin, double* size, 00121 float* cornerVals); 00122 00123 int MaximumLevel; 00124 int MinimumLevel; 00125 int Dimension; 00126 00127 int ProjectionAxes[3]; 00128 00129 unsigned char MaximumNumberOfIterations; 00130 00131 // Complex constant/initial-value at origin. 00132 double OriginCX[4]; 00133 00134 // A temporary vector that is computed as needed. 00135 // It is used to return a vector. 00136 double SizeCX[4]; 00137 00138 float EvaluateWorldPoint(double p[3]); 00139 float EvaluateSet(double p[4]); 00140 00141 double Origin[3]; 00142 double Size[3]; 00143 00144 double SpanThreshold; 00145 00146 private: 00147 vtkHyperOctreeFractalSource(const vtkHyperOctreeFractalSource&); // Not implemented. 00148 void operator=(const vtkHyperOctreeFractalSource&); // Not implemented. 00149 }; 00150 00151 #endif