VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGenericCutter.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 =========================================================================*/ 00048 #ifndef __vtkGenericCutter_h 00049 #define __vtkGenericCutter_h 00050 00051 #include "vtkPolyDataAlgorithm.h" 00052 00053 class vtkContourValues; 00054 00055 class vtkImplicitFunction; 00056 class vtkIncrementalPointLocator; 00057 class vtkPointData; 00058 class vtkCellData; 00059 00060 class VTK_GENERIC_FILTERING_EXPORT vtkGenericCutter : public vtkPolyDataAlgorithm 00061 { 00062 public: 00063 vtkTypeMacro(vtkGenericCutter,vtkPolyDataAlgorithm); 00064 void PrintSelf(ostream& os, vtkIndent indent); 00065 00068 static vtkGenericCutter *New(); 00069 00072 void SetValue(int i, double value); 00073 00075 double GetValue(int i); 00076 00079 double *GetValues(); 00080 00084 void GetValues(double *contourValues); 00085 00089 void SetNumberOfContours(int number); 00090 00092 int GetNumberOfContours(); 00093 00096 void GenerateValues(int numContours, double range[2]); 00097 00100 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00101 00104 unsigned long GetMTime(); 00105 00107 00108 virtual void SetCutFunction(vtkImplicitFunction*); 00109 vtkGetObjectMacro(CutFunction,vtkImplicitFunction); 00111 00113 00116 vtkSetMacro(GenerateCutScalars,int); 00117 vtkGetMacro(GenerateCutScalars,int); 00118 vtkBooleanMacro(GenerateCutScalars,int); 00120 00122 00124 void SetLocator(vtkIncrementalPointLocator *locator); 00125 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00127 00130 void CreateDefaultLocator(); 00131 00132 protected: 00133 vtkGenericCutter(vtkImplicitFunction *cf=NULL); 00134 ~vtkGenericCutter(); 00135 00137 00138 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00139 int FillInputPortInformation(int, vtkInformation*); 00141 00142 vtkImplicitFunction *CutFunction; 00143 vtkIncrementalPointLocator *Locator; 00144 vtkContourValues *ContourValues; 00145 int GenerateCutScalars; 00146 00147 // Used internal by vtkGenericAdaptorCell::Contour() 00148 vtkPointData *InternalPD; 00149 vtkPointData *SecondaryPD; 00150 vtkCellData *SecondaryCD; 00151 00152 private: 00153 vtkGenericCutter(const vtkGenericCutter&); // Not implemented. 00154 void operator=(const vtkGenericCutter&); // Not implemented. 00155 }; 00156 00157 #endif 00158 00159