Viskores  1.0
WarpVector.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_WarpVector_h
20 #define viskores_filter_field_transform_WarpVector_h
21 
23 
24 #include <viskores/Deprecated.h>
25 
26 struct VISKORES_DEPRECATED(2.2, "WarpVector.h header no longer supported. Use Warp.h.")
28 {
29 };
30 
32 
33 namespace viskores
34 {
35 namespace filter
36 {
37 namespace field_transform
38 {
39 
40 class VISKORES_DEPRECATED(2.2, "Use more general Warp filter.") WarpVector
42 {
43 public:
44  VISKORES_DEPRECATED(2.2, "Use SetScaleFactor().")
46  {
47  this->SetScaleFactor(scale);
48  this->SetOutputFieldName("warpvector");
49  }
50 
51  VISKORES_DEPRECATED(2.2, "Use SetDirectionField().")
52  VISKORES_CONT void SetVectorField(
53  const std::string& name,
54  viskores::cont::Field::Association association = viskores::cont::Field::Association::Any)
55  {
56  if ((association != viskores::cont::Field::Association::Any) &&
58  {
59  throw viskores::cont::ErrorBadValue("Normal field should always be associated with points.");
60  }
61  this->SetDirectionField(name);
62  }
63 
64  VISKORES_DEPRECATED(2.2, "Use GetDirectionFieldName().")
65  VISKORES_CONT std::string GetVectorFieldName() const { return this->GetDirectionFieldName(); }
66 
67  VISKORES_DEPRECATED(2.2, "Only point association supported.")
68  VISKORES_CONT viskores::cont::Field::Association GetVectorFieldAssociation() const
69  {
70  return this->GetActiveFieldAssociation(1);
71  }
72 };
73 
74 } // namespace field_transform
75 } // namespace filter
76 } // namespace viskores
77 #endif // viskores_filter_field_transform_WarpVector_h
viskores::filter::field_transform::WarpVector
Definition: WarpVector.h:40
Warp.h
viskores::cont::Field::Association::Any
@ Any
Any field regardless of the association.
viskores_deprecated_WarpVector_h_warning
Definition: WarpVector.h:26
viskores_give_WarpVector_h_warning
viskores_deprecated_WarpVector_h_warning viskores_give_WarpVector_h_warning
Definition: WarpVector.h:31
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
VISKORES_DEPRECATED
#define VISKORES_DEPRECATED(...)
Definition: Deprecated.h:156
viskores::filter::field_transform::Warp
Modify points by moving points along scaled direction vectors.
Definition: Warp.h:61
viskores::cont::ErrorBadValue
This class is thrown when a Viskores function or method encounters an invalid value that inhibits pro...
Definition: ErrorBadValue.h:33
viskores::FloatDefault
viskores::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:244
Deprecated.h
viskores::cont::Field::Association::Points
@ Points
A field that applies to points.