VTK-m  2.2
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 
16 #include <vtkm/Deprecated.h>
17 
18 struct VTKM_DEPRECATED(2.2, "WarpVector.h header no longer supported. Use Warp.h.")
20 {
21 };
22 
24 
25 namespace vtkm
26 {
27 namespace filter
28 {
29 namespace field_transform
30 {
31 
32 class VTKM_DEPRECATED(2.2, "Use more general Warp filter.") WarpVector
34 {
35 public:
36  VTKM_DEPRECATED(2.2, "Use SetScaleFactor().")
38  {
39  this->SetScaleFactor(scale);
40  this->SetOutputFieldName("warpvector");
41  }
42 
43  VTKM_DEPRECATED(2.2, "Use SetDirectionField().")
44  VTKM_CONT void SetVectorField(
45  const std::string& name,
46  vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any)
47  {
48  if ((association != vtkm::cont::Field::Association::Any) &&
50  {
51  throw vtkm::cont::ErrorBadValue("Normal field should always be associated with points.");
52  }
53  this->SetDirectionField(name);
54  }
55 
56  VTKM_DEPRECATED(2.2, "Use GetDirectionFieldName().")
57  VTKM_CONT std::string GetVectorFieldName() const { return this->GetDirectionFieldName(); }
58 
59  VTKM_DEPRECATED(2.2, "Only point association supported.")
60  VTKM_CONT vtkm::cont::Field::Association GetVectorFieldAssociation() const
61  {
62  return this->GetActiveFieldAssociation(1);
63  }
64 };
65 
66 } // namespace field_transform
67 } // namespace filter
68 } // namespace vtkm
69 #endif // vtk_m_filter_field_transform_WarpVector_h
vtkm_deprecated_WarpVector_h_warning
Definition: WarpVector.h:18
vtkm::filter::field_transform::WarpVector
Definition: WarpVector.h:32
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
Warp.h
vtkm::filter::field_transform::Warp
Modify points by moving points along scaled direction vectors.
Definition: Warp.h:53
vtkm::cont::Field::Association::Any
@ Any
Any field regardless of the association.
vtkm::cont::Field::Association::Points
@ Points
A field that applies to points.
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm_give_WarpVector_h_warning
vtkm_deprecated_WarpVector_h_warning vtkm_give_WarpVector_h_warning
Definition: WarpVector.h:23
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:236
vtkm::cont::ErrorBadValue
This class is thrown when a VTKm function or method encounters an invalid value that inhibits progres...
Definition: ErrorBadValue.h:25
Deprecated.h
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145