VTK-m  2.0
WarpScalar.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 
11 #ifndef vtk_m_filter_field_transform_WarpScalar_h
12 #define vtk_m_filter_field_transform_WarpScalar_h
13 
15 #include <vtkm/filter/field_transform/vtkm_filter_field_transform_export.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace field_transform
22 {
31 class VTKM_FILTER_FIELD_TRANSFORM_EXPORT WarpScalar : public vtkm::filter::FilterField
32 {
33 public:
34  VTKM_CONT
35  explicit WarpScalar(vtkm::FloatDefault scaleAmount);
36 
40  VTKM_CONT
42  const std::string& name,
44  {
45  this->NormalFieldName = name;
46  this->NormalFieldAssociation = association;
47  }
48 
49  VTKM_CONT const std::string& GetNormalFieldName() const { return this->NormalFieldName; }
50 
52  {
53  return this->NormalFieldAssociation;
54  }
56 
60  VTKM_CONT
62  const std::string& name,
64  {
65  this->ScalarFactorFieldName = name;
66  this->ScalarFactorFieldAssociation = association;
67  }
68 
69  VTKM_CONT const std::string& GetScalarFactorFieldName() const
70  {
71  return this->ScalarFactorFieldName;
72  }
73 
75  {
76  return this->ScalarFactorFieldAssociation;
77  }
79 
80 private:
81  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
82 
83  std::string NormalFieldName = "normal";
85  std::string ScalarFactorFieldName = "scalarfactor";
88 };
89 } // namespace field_transform
90 } // namespace filter
91 } // namespace vtkm
92 #endif // vtk_m_filter_field_transform_WarpScalar_h
vtkm::filter::field_transform::WarpScalar::GetScalarFactorFieldName
const VTKM_CONT std::string & GetScalarFactorFieldName() const
Definition: WarpScalar.h:69
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::Field::Association
Association
Definition: cont/Field.h:34
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::field_transform::WarpScalar::GetScalarFactorFieldAssociation
VTKM_CONT vtkm::cont::Field::Association GetScalarFactorFieldAssociation() const
Definition: WarpScalar.h:74
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::field_transform::WarpScalar::SetScalarFactorField
VTKM_CONT void SetScalarFactorField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Definition: WarpScalar.h:61
vtkm::filter::field_transform::WarpScalar
Modify points by moving points along point normals by the scalar amount times the scalar factor.
Definition: WarpScalar.h:31
vtkm::cont::Field::Association::Any
@ Any
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::field_transform::WarpScalar::GetNormalFieldName
const VTKM_CONT std::string & GetNormalFieldName() const
Definition: WarpScalar.h:49
vtkm::filter::field_transform::WarpScalar::ScaleAmount
vtkm::FloatDefault ScaleAmount
Definition: WarpScalar.h:87
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198
vtkm::filter::field_transform::WarpScalar::GetNormalFieldAssociation
VTKM_CONT vtkm::cont::Field::Association GetNormalFieldAssociation() const
Definition: WarpScalar.h:51
vtkm::filter::field_transform::WarpScalar::SetNormalField
VTKM_CONT void SetNormalField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Definition: WarpScalar.h:41