Viskores  1.0
ClipWithField.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 
19 #ifndef viskores_filter_contour_ClipWithField_h
20 #define viskores_filter_contour_ClipWithField_h
21 
22 #include <viskores/filter/Filter.h>
24 
25 namespace viskores
26 {
27 namespace filter
28 {
29 namespace contour
30 {
39 class VISKORES_FILTER_CONTOUR_EXPORT ClipWithField : public viskores::filter::Filter
40 {
41 public:
46  VISKORES_CONT void SetClipValue(viskores::Float64 value) { this->ClipValue = value; }
47 
53  VISKORES_CONT void SetInvertClip(bool invert) { this->Invert = invert; }
54 
56  VISKORES_CONT viskores::Float64 GetClipValue() const { return this->ClipValue; }
57 
59  VISKORES_CONT bool GetInvertClip() const { return this->Invert; }
60 
61 private:
62  viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
63 
64  viskores::Float64 ClipValue = 0;
65  bool Invert = false;
66 };
67 } // namespace contour
68 } // namespace filter
69 } // namespace viskores
70 
71 #endif // viskores_filter_contour_ClipWithField_h
viskores::filter::contour::ClipWithField::SetInvertClip
void SetInvertClip(bool invert)
Specifies if the result for the clip filter should be inverted.
Definition: ClipWithField.h:53
viskores::filter::contour::ClipWithField::GetInvertClip
bool GetInvertClip() const
Specifies if the result for the clip filter should be inverted.
Definition: ClipWithField.h:59
viskores::filter::contour::ClipWithField
Clip a dataset using a field.
Definition: ClipWithField.h:39
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::contour::ClipWithField::SetClipValue
void SetClipValue(viskores::Float64 value)
Specifies the field value for the clip operation.
Definition: ClipWithField.h:46
viskores::filter::contour::ClipWithField::GetClipValue
viskores::Float64 GetClipValue() const
Specifies the field value for the clip operation.
Definition: ClipWithField.h:56
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores_filter_contour_export.h
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
Filter.h