VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGenericClip.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 =========================================================================*/ 00063 #ifndef __vtkGenericClip_h 00064 #define __vtkGenericClip_h 00065 00066 #include "vtkFiltersGenericModule.h" // For export macro 00067 #include "vtkUnstructuredGridAlgorithm.h" 00068 00069 class vtkImplicitFunction; 00070 00071 class vtkPointData; 00072 class vtkCellData; 00073 class vtkIncrementalPointLocator; 00074 00075 class VTKFILTERSGENERIC_EXPORT vtkGenericClip : public vtkUnstructuredGridAlgorithm 00076 { 00077 public: 00078 vtkTypeMacro(vtkGenericClip,vtkUnstructuredGridAlgorithm); 00079 void PrintSelf(ostream& os, vtkIndent indent); 00080 00083 static vtkGenericClip *New(); 00084 00086 00089 vtkSetMacro(Value,double); 00090 vtkGetMacro(Value,double); 00092 00094 00099 vtkSetMacro(InsideOut,int); 00100 vtkGetMacro(InsideOut,int); 00101 vtkBooleanMacro(InsideOut,int); 00103 00105 00108 virtual void SetClipFunction(vtkImplicitFunction*); 00109 vtkGetObjectMacro(ClipFunction,vtkImplicitFunction); 00111 00113 00117 vtkSetMacro(GenerateClipScalars,int); 00118 vtkGetMacro(GenerateClipScalars,int); 00119 vtkBooleanMacro(GenerateClipScalars,int); 00121 00123 00125 vtkSetMacro(GenerateClippedOutput,int); 00126 vtkGetMacro(GenerateClippedOutput,int); 00127 vtkBooleanMacro(GenerateClippedOutput,int); 00129 00131 00135 vtkSetClampMacro(MergeTolerance,double,0.0001,0.25); 00136 vtkGetMacro(MergeTolerance,double); 00138 00140 00141 vtkUnstructuredGrid *GetClippedOutput(); 00142 virtual int GetNumberOfOutputs(); 00144 00146 00148 void SetLocator(vtkIncrementalPointLocator *locator); 00149 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00151 00154 void CreateDefaultLocator(); 00155 00157 unsigned long GetMTime(); 00158 00160 00162 vtkGetStringMacro(InputScalarsSelection); 00163 void SelectInputScalars(const char *fieldName) 00164 {this->SetInputScalarsSelection(fieldName);} 00166 00167 protected: 00168 vtkGenericClip(vtkImplicitFunction *cf=NULL); 00169 ~vtkGenericClip(); 00170 00171 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00172 int FillInputPortInformation(int, vtkInformation*); 00173 00174 vtkImplicitFunction *ClipFunction; 00175 00176 vtkIncrementalPointLocator *Locator; 00177 int InsideOut; 00178 double Value; 00179 int GenerateClipScalars; 00180 00181 int GenerateClippedOutput; 00182 double MergeTolerance; 00183 00184 char *InputScalarsSelection; 00185 vtkSetStringMacro(InputScalarsSelection); 00186 00187 // Used internal by vtkGenericAdaptorCell::Clip() 00188 vtkPointData *InternalPD; 00189 vtkPointData *SecondaryPD; 00190 vtkCellData *SecondaryCD; 00191 00192 private: 00193 vtkGenericClip(const vtkGenericClip&); // Not implemented. 00194 void operator=(const vtkGenericClip&); // Not implemented. 00195 }; 00196 00197 #endif