VTK-m  2.0
ClipWithImplicitFunction.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_filter_contour_ClipWithImplicitFunction_h
11 #define vtk_m_filter_contour_ClipWithImplicitFunction_h
12 
13 #include <vtkm/ImplicitFunction.h>
14 
16 #include <vtkm/filter/contour/vtkm_filter_contour_export.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace contour
23 {
29 class VTKM_FILTER_CONTOUR_EXPORT ClipWithImplicitFunction : public vtkm::filter::FilterField
30 {
31 public:
32  void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
33 
34  void SetOffset(vtkm::Float64 offset) { this->Offset = offset; }
35  vtkm::Float64 GetOffset() const { return this->Offset; }
36 
37  void SetInvertClip(bool invert) { this->Invert = invert; }
38 
39  const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
40 
41 private:
42  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
43 
46  bool Invert = false;
47 };
48 } // namespace contour
49 } // namespace filter
50 } // namespace vtkm
51 
52 #endif // vtk_m_filter_contour_ClipWithImplicitFunction_h
vtkm::ImplicitFunctionGeneral
Implicit function that can switch among known implicit function types.
Definition: ImplicitFunction.h:749
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::contour::ClipWithImplicitFunction::Function
vtkm::ImplicitFunctionGeneral Function
Definition: ClipWithImplicitFunction.h:44
vtkm::filter::contour::ClipWithImplicitFunction::GetOffset
vtkm::Float64 GetOffset() const
Definition: ClipWithImplicitFunction.h:35
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::contour::ClipWithImplicitFunction
Clip a dataset using an implicit function.
Definition: ClipWithImplicitFunction.h:29
FilterField.h
vtkm::filter::contour::ClipWithImplicitFunction::GetImplicitFunction
const vtkm::ImplicitFunctionGeneral & GetImplicitFunction() const
Definition: ClipWithImplicitFunction.h:39
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::contour::ClipWithImplicitFunction::SetImplicitFunction
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral &func)
Definition: ClipWithImplicitFunction.h:32
vtkm::filter::contour::ClipWithImplicitFunction::SetOffset
void SetOffset(vtkm::Float64 offset)
Definition: ClipWithImplicitFunction.h:34
ImplicitFunction.h
vtkm::filter::contour::ClipWithImplicitFunction::SetInvertClip
void SetInvertClip(bool invert)
Definition: ClipWithImplicitFunction.h:37
vtkm::Float64
double Float64
Definition: Types.h:155
Offset
vtkm::Float32 Offset
Definition: Wireframer.h:391