VTK-m  2.0
WarpVector.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_WarpVector_h
12 #define vtk_m_filter_field_transform_WarpVector_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 WarpVector : public vtkm::filter::FilterField
32 {
33 public:
34  VTKM_CONT
35  explicit WarpVector(vtkm::FloatDefault scale);
36 
40  VTKM_CONT
42  const std::string& name,
44  {
45  this->VectorFieldName = name;
46  this->VectorFieldAssociation = association;
47  }
48 
49  VTKM_CONT const std::string& GetVectorFieldName() const { return this->VectorFieldName; }
50 
52  {
53  return this->VectorFieldAssociation;
54  }
56 
57 private:
58  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
59 
60  std::string VectorFieldName = "normal";
63 };
64 } // namespace field_transform
65 } // namespace filter
66 } // namespace vtkm
67 #endif // vtk_m_filter_field_transform_WarpVector_h
vtkm::filter::field_transform::WarpVector
Modify points by moving points along a vector multiplied by the scale factor.
Definition: WarpVector.h:31
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::WarpVector::GetVectorFieldAssociation
VTKM_CONT vtkm::cont::Field::Association GetVectorFieldAssociation() const
Definition: WarpVector.h:51
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::field_transform::WarpVector::Scale
vtkm::FloatDefault Scale
Definition: WarpVector.h:62
vtkm::cont::Field::Association::Any
@ Any
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::field_transform::WarpVector::SetVectorField
VTKM_CONT void SetVectorField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Definition: WarpVector.h:41
vtkm::filter::field_transform::WarpVector::GetVectorFieldName
const VTKM_CONT std::string & GetVectorFieldName() const
Definition: WarpVector.h:49
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198