VTK  9.3.1
vtkGenericClip.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
52 #ifndef vtkGenericClip_h
53 #define vtkGenericClip_h
54 
55 #include "vtkFiltersGenericModule.h" // For export macro
57 
58 VTK_ABI_NAMESPACE_BEGIN
60 
61 class vtkPointData;
62 class vtkCellData;
64 
65 class VTKFILTERSGENERIC_EXPORT vtkGenericClip : public vtkUnstructuredGridAlgorithm
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
75  static vtkGenericClip* New();
76 
78 
83  vtkSetMacro(Value, double);
84  vtkGetMacro(Value, double);
86 
88 
96  vtkSetMacro(InsideOut, vtkTypeBool);
97  vtkGetMacro(InsideOut, vtkTypeBool);
98  vtkBooleanMacro(InsideOut, vtkTypeBool);
100 
102 
107  virtual void SetClipFunction(vtkImplicitFunction*);
108  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
110 
112 
118  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
119  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
120  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
122 
124 
128  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
129  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
130  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
132 
134 
140  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
141  vtkGetMacro(MergeTolerance, double);
143 
145 
148  vtkUnstructuredGrid* GetClippedOutput();
149  virtual int GetNumberOfOutputs();
151 
153 
157  void SetLocator(vtkIncrementalPointLocator* locator);
158  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
160 
165  void CreateDefaultLocator();
166 
170  vtkMTimeType GetMTime() override;
171 
173 
177  vtkGetStringMacro(InputScalarsSelection);
178  void SelectInputScalars(const char* fieldName) { this->SetInputScalarsSelection(fieldName); }
180 
181 protected:
182  vtkGenericClip(vtkImplicitFunction* cf = nullptr);
183  ~vtkGenericClip() override;
184 
186  int FillInputPortInformation(int, vtkInformation*) override;
187 
189 
192  double Value;
194 
197 
199  vtkSetStringMacro(InputScalarsSelection);
200 
201  // Used internal by vtkGenericAdaptorCell::Clip()
205 
206 private:
207  vtkGenericClip(const vtkGenericClip&) = delete;
208  void operator=(const vtkGenericClip&) = delete;
209 };
210 
211 VTK_ABI_NAMESPACE_END
212 #endif
abstract interface for implicit functions
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
represent and manipulate point attribute data
Definition: vtkPointData.h:29
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
clip any dataset with an implicit function or scalar data
vtkIncrementalPointLocator * Locator
represent and manipulate cell attribute data
Definition: vtkCellData.h:30
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SelectInputScalars(const char *fieldName)
If you want to clip by an arbitrary array, then set its name here.
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPointData * SecondaryPD
char * InputScalarsSelection
a simple class to control print indentation
Definition: vtkIndent.h:28
dataset represents arbitrary combinations of all possible cell types
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkCellData * SecondaryCD
vtkTypeBool GenerateClipScalars
Superclass for algorithms that produce only unstructured grid as output.
vtkPointData * InternalPD
vtkTypeBool GenerateClippedOutput
vtkImplicitFunction * ClipFunction
Store zero or more vtkInformation instances.
vtkTypeBool InsideOut