Viskores  1.0
ClipWithImplicitFunction.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_filter_contour_ClipWithImplicitFunction_h
19 #define viskores_filter_contour_ClipWithImplicitFunction_h
20 
22 
23 #include <viskores/filter/Filter.h>
25 
26 namespace viskores
27 {
28 namespace filter
29 {
30 namespace contour
31 {
38 class VISKORES_FILTER_CONTOUR_EXPORT ClipWithImplicitFunction : public viskores::filter::Filter
39 {
40 public:
46  void SetImplicitFunction(const viskores::ImplicitFunctionGeneral& func) { this->Function = func; }
47 
48  void SetOffset(viskores::Float64 offset) { this->Offset = offset; }
49  viskores::Float64 GetOffset() const { return this->Offset; }
50 
57  void SetInvertClip(bool invert) { this->Invert = invert; }
58 
60  const viskores::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
61 
62 private:
63  viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
64 
67  bool Invert = false;
68 };
69 } // namespace contour
70 } // namespace filter
71 } // namespace viskores
72 
73 #endif // viskores_filter_contour_ClipWithImplicitFunction_h
viskores::filter::contour::ClipWithImplicitFunction::SetInvertClip
void SetInvertClip(bool invert)
Specifies whether the result of the clip filter should be inverted.
Definition: ClipWithImplicitFunction.h:57
viskores::filter::contour::ClipWithImplicitFunction::GetOffset
viskores::Float64 GetOffset() const
Definition: ClipWithImplicitFunction.h:49
viskores::ImplicitFunctionGeneral
Implicit function that can switch among known implicit function types.
Definition: ImplicitFunction.h:985
Offset
viskores::Float32 Offset
Definition: Wireframer.h:410
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::contour::ClipWithImplicitFunction::Function
viskores::ImplicitFunctionGeneral Function
Definition: ClipWithImplicitFunction.h:65
viskores::filter::contour::ClipWithImplicitFunction::GetImplicitFunction
const viskores::ImplicitFunctionGeneral & GetImplicitFunction() const
Specifies the implicit function to be used to perform the clip operation.
Definition: ClipWithImplicitFunction.h:60
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::filter::contour::ClipWithImplicitFunction::SetImplicitFunction
void SetImplicitFunction(const viskores::ImplicitFunctionGeneral &func)
Specifies the implicit function to be used to perform the clip operation.
Definition: ClipWithImplicitFunction.h:46
viskores_filter_contour_export.h
viskores::filter::contour::ClipWithImplicitFunction::SetOffset
void SetOffset(viskores::Float64 offset)
Definition: ClipWithImplicitFunction.h:48
ImplicitFunction.h
viskores::filter::contour::ClipWithImplicitFunction
Clip a dataset using an implicit function.
Definition: ClipWithImplicitFunction.h:38
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
Filter.h