VTK-m  2.0
CrossProduct.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_vector_analysis_CrossProduct_h
12 #define vtk_m_filter_vector_analysis_CrossProduct_h
13 
15 
16 #include <vtkm/filter/vector_analysis/vtkm_filter_vector_analysis_export.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace vector_analysis
23 {
24 
25 class VTKM_FILTER_VECTOR_ANALYSIS_EXPORT CrossProduct : public vtkm::filter::FilterField
26 {
27 public:
28  VTKM_CONT
29  CrossProduct();
30 
34  VTKM_CONT
36  const std::string& name,
38  {
39  this->SetActiveField(name, association);
40  }
41 
42  VTKM_CONT const std::string& GetPrimaryFieldName() const { return this->GetActiveFieldName(); }
44  {
45  return this->GetActiveFieldAssociation();
46  }
48 
52  VTKM_CONT
54  {
55  this->SetUseCoordinateSystemAsField(flag);
56  }
57  VTKM_CONT
59  {
60  return this->GetUseCoordinateSystemAsField();
61  }
63 
67  VTKM_CONT
68  void SetPrimaryCoordinateSystem(vtkm::Id index) { this->SetActiveCoordinateSystem(index); }
69  VTKM_CONT
71  {
72  return this->GetActiveCoordinateSystemIndex();
73  }
75 
79  VTKM_CONT
81  const std::string& name,
83  {
84  this->SetActiveField(1, name, association);
85  }
86 
87  VTKM_CONT const std::string& GetSecondaryFieldName() const { return this->GetActiveFieldName(1); }
89  {
90  return this->GetActiveFieldAssociation(1);
91  }
93 
97  VTKM_CONT
99  {
100  this->SetUseCoordinateSystemAsField(1, flag);
101  }
102  VTKM_CONT
104  {
105  return this->GetUseCoordinateSystemAsField(1);
106  }
108 
112  VTKM_CONT
113  void SetSecondaryCoordinateSystem(vtkm::Id index) { this->SetActiveCoordinateSystem(1, index); }
114  VTKM_CONT
116  {
117  return this->GetActiveCoordinateSystemIndex(1);
118  }
120 
121 private:
122  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
123 };
124 
125 } // namespace vector_analysis
126 } // namespace filter
127 } // namespace vtkm
128 
129 #endif // vtk_m_filter_vector_analysis_CrossProduct_h
vtkm::filter::vector_analysis::CrossProduct
Definition: CrossProduct.h:25
vtkm::filter::vector_analysis::CrossProduct::GetSecondaryCoordinateSystemIndex
VTKM_CONT vtkm::Id GetSecondaryCoordinateSystemIndex() const
Definition: CrossProduct.h:115
vtkm::filter::vector_analysis::CrossProduct::SetPrimaryCoordinateSystem
VTKM_CONT void SetPrimaryCoordinateSystem(vtkm::Id index)
Definition: CrossProduct.h:68
vtkm::filter::vector_analysis::CrossProduct::GetUseCoordinateSystemAsPrimaryField
VTKM_CONT bool GetUseCoordinateSystemAsPrimaryField() const
Definition: CrossProduct.h:58
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::vector_analysis::CrossProduct::GetUseCoordinateSystemAsSecondaryField
VTKM_CONT bool GetUseCoordinateSystemAsSecondaryField() const
Definition: CrossProduct.h:103
vtkm::cont::Field::Association
Association
Definition: cont/Field.h:34
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::vector_analysis::CrossProduct::GetPrimaryFieldName
const VTKM_CONT std::string & GetPrimaryFieldName() const
Definition: CrossProduct.h:42
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::filter::vector_analysis::CrossProduct::GetPrimaryCoordinateSystemIndex
VTKM_CONT vtkm::Id GetPrimaryCoordinateSystemIndex() const
Definition: CrossProduct.h:70
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::vector_analysis::CrossProduct::SetSecondaryField
VTKM_CONT void SetSecondaryField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Definition: CrossProduct.h:80
vtkm::cont::Field::Association::Any
@ Any
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::vector_analysis::CrossProduct::SetPrimaryField
VTKM_CONT void SetPrimaryField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Definition: CrossProduct.h:35
vtkm::filter::vector_analysis::CrossProduct::GetPrimaryFieldAssociation
VTKM_CONT vtkm::cont::Field::Association GetPrimaryFieldAssociation() const
Definition: CrossProduct.h:43
vtkm::filter::vector_analysis::CrossProduct::SetUseCoordinateSystemAsPrimaryField
VTKM_CONT void SetUseCoordinateSystemAsPrimaryField(bool flag)
Definition: CrossProduct.h:53
vtkm::filter::vector_analysis::CrossProduct::GetSecondaryFieldName
const VTKM_CONT std::string & GetSecondaryFieldName() const
Definition: CrossProduct.h:87
vtkm::filter::vector_analysis::CrossProduct::SetSecondaryCoordinateSystem
VTKM_CONT void SetSecondaryCoordinateSystem(vtkm::Id index)
Definition: CrossProduct.h:113
vtkm::filter::vector_analysis::CrossProduct::GetSecondaryFieldAssociation
VTKM_CONT vtkm::cont::Field::Association GetSecondaryFieldAssociation() const
Definition: CrossProduct.h:88
vtkm::filter::vector_analysis::CrossProduct::SetUseCoordinateSystemAsSecondaryField
VTKM_CONT void SetUseCoordinateSystemAsSecondaryField(bool flag)
Definition: CrossProduct.h:98