Viskores  1.0
PointElevation.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_field_transform_PointElevation_h
20 #define viskores_filter_field_transform_PointElevation_h
21 
22 #include <viskores/filter/Filter.h>
24 
25 namespace viskores
26 {
27 namespace filter
28 {
29 namespace field_transform
30 {
43 class VISKORES_FILTER_FIELD_TRANSFORM_EXPORT PointElevation : public viskores::filter::Filter
44 {
45 public:
47 
53  VISKORES_CONT void SetLowPoint(const viskores::Vec3f_64& point) { this->LowPoint = point; }
56  {
57  this->SetLowPoint({ x, y, z });
58  }
59 
65  VISKORES_CONT void SetHighPoint(const viskores::Vec3f_64& point) { this->HighPoint = point; }
68  {
69  this->SetHighPoint({ x, y, z });
70  }
71 
78  {
79  this->RangeLow = low;
80  this->RangeHigh = high;
81  }
82 
83 private:
84  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
85 
86  viskores::Vec3f_64 LowPoint = { 0.0, 0.0, 0.0 };
87  viskores::Vec3f_64 HighPoint = { 0.0, 0.0, 1.0 };
88  viskores::Float64 RangeLow = 0.0, RangeHigh = 1.0;
89 };
90 } // namespace field_transform
91 } // namespace filter
92 } // namespace viskores
93 
94 #endif // viskores_filter_field_transform_PointElevation_h
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::field_transform::PointElevation::SetHighPoint
void SetHighPoint(const viskores::Vec3f_64 &point)
Specify the coordinate of the high point.
Definition: PointElevation.h:65
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::field_transform::PointElevation::SetRange
void SetRange(viskores::Float64 low, viskores::Float64 high)
Specify the range of values to output.
Definition: PointElevation.h:77
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::field_transform::PointElevation::SetHighPoint
void SetHighPoint(viskores::Float64 x, viskores::Float64 y, viskores::Float64 z)
Specify the coordinate of the high point.
Definition: PointElevation.h:67
viskores::filter::field_transform::PointElevation
Generate a scalar field along a specified direction.
Definition: PointElevation.h:43
viskores::filter::field_transform::PointElevation::SetLowPoint
void SetLowPoint(const viskores::Vec3f_64 &point)
Specify the coordinate of the low point.
Definition: PointElevation.h:53
viskores::filter::field_transform::PointElevation::SetLowPoint
void SetLowPoint(viskores::Float64 x, viskores::Float64 y, viskores::Float64 z)
Specify the coordinate of the low point.
Definition: PointElevation.h:55
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
viskores_filter_field_transform_export.h
viskores::Vec< viskores::Float64, 3 >
Filter.h