VTK-m  2.2
SurfaceNormals.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 #ifndef vtk_m_filter_vector_analysis_SurfaceNormal_h
11 #define vtk_m_filter_vector_analysis_SurfaceNormal_h
12 
13 #include <vtkm/filter/Filter.h>
15 
16 namespace vtkm
17 {
18 namespace filter
19 {
20 namespace vector_analysis
21 {
45 {
46 public:
51 
55  void SetGenerateCellNormals(bool value) { this->GenerateCellNormals = value; }
57  bool GetGenerateCellNormals() const { return this->GenerateCellNormals; }
58 
66  void SetNormalizeCellNormals(bool value) { this->NormalizeCellNormals = value; }
68  bool GetNormalizeCellNormals() const { return this->NormalizeCellNormals; }
69 
73  void SetGeneratePointNormals(bool value) { this->GeneratePointNormals = value; }
75  bool GetGeneratePointNormals() const { return this->GeneratePointNormals; }
76 
80  void SetCellNormalsName(const std::string& name) { this->CellNormalsName = name; }
82  const std::string& GetCellNormalsName() const { return this->CellNormalsName; }
83 
87  void SetPointNormalsName(const std::string& name) { this->PointNormalsName = name; }
89  const std::string& GetPointNormalsName() const { return this->PointNormalsName; }
90 
97  void SetAutoOrientNormals(bool v) { this->AutoOrientNormals = v; }
99  bool GetAutoOrientNormals() const { return this->AutoOrientNormals; }
100 
106  void SetFlipNormals(bool v) { this->FlipNormals = v; }
108  bool GetFlipNormals() const { return this->FlipNormals; }
109 
116  void SetConsistency(bool v) { this->Consistency = v; }
118  bool GetConsistency() const { return this->Consistency; }
119 
120 private:
121  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inputDataSet) override;
122 
123  bool GenerateCellNormals = false;
124  bool NormalizeCellNormals = true;
125  bool GeneratePointNormals = true;
126  bool AutoOrientNormals = false;
127  bool FlipNormals = false;
128  bool Consistency = true;
129 
130  std::string CellNormalsName;
131  std::string PointNormalsName;
132 };
133 } // namespace vector_analysis
134 } // namespace filter
135 } // namespace vtkm
136 
137 #endif // vtk_m_filter_vector_analysis_SurfaceNormal_h
vtkm::filter::vector_analysis::SurfaceNormals::GetPointNormalsName
const std::string & GetPointNormalsName() const
Specify the name of the point normals field.
Definition: SurfaceNormals.h:89
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::vector_analysis::SurfaceNormals::SetPointNormalsName
void SetPointNormalsName(const std::string &name)
Specify the name of the point normals field.
Definition: SurfaceNormals.h:87
vtkm::filter::vector_analysis::SurfaceNormals::GetGeneratePointNormals
bool GetGeneratePointNormals() const
Specify whether the point normals should be generated.
Definition: SurfaceNormals.h:75
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::vector_analysis::SurfaceNormals::CellNormalsName
std::string CellNormalsName
Definition: SurfaceNormals.h:130
vtkm::filter::vector_analysis::SurfaceNormals::SetConsistency
void SetConsistency(bool v)
Specify whtehr polygon winding should be made consistent with normal orientation.
Definition: SurfaceNormals.h:116
vtkm::filter::vector_analysis::SurfaceNormals::GetGenerateCellNormals
bool GetGenerateCellNormals() const
Specify whether cell normals should be generated.
Definition: SurfaceNormals.h:57
VTKM_FILTER_VECTOR_ANALYSIS_EXPORT
#define VTKM_FILTER_VECTOR_ANALYSIS_EXPORT
Definition: vtkm_filter_vector_analysis_export.h:44
vtkm::filter::vector_analysis::SurfaceNormals::GetFlipNormals
bool GetFlipNormals() const
Specify the direction to point normals when SetAutoOrientNormals() is true.
Definition: SurfaceNormals.h:108
vtkm_filter_vector_analysis_export.h
vtkm::filter::vector_analysis::SurfaceNormals::SetNormalizeCellNormals
void SetNormalizeCellNormals(bool value)
Specify whether the cell normals should be normalized.
Definition: SurfaceNormals.h:66
vtkm::filter::vector_analysis::SurfaceNormals::SetGeneratePointNormals
void SetGeneratePointNormals(bool value)
Specify whether the point normals should be generated.
Definition: SurfaceNormals.h:73
vtkm::filter::vector_analysis::SurfaceNormals
Computes normals for polygonal mesh.
Definition: SurfaceNormals.h:44
vtkm::filter::vector_analysis::SurfaceNormals::PointNormalsName
std::string PointNormalsName
Definition: SurfaceNormals.h:131
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::vector_analysis::SurfaceNormals::SetGenerateCellNormals
void SetGenerateCellNormals(bool value)
Specify whether cell normals should be generated.
Definition: SurfaceNormals.h:55
vtkm::filter::vector_analysis::SurfaceNormals::GetNormalizeCellNormals
bool GetNormalizeCellNormals() const
Specify whether the cell normals should be normalized.
Definition: SurfaceNormals.h:68
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::vector_analysis::SurfaceNormals::GetCellNormalsName
const std::string & GetCellNormalsName() const
Specify the name of the cell normals field.
Definition: SurfaceNormals.h:82
vtkm::filter::vector_analysis::SurfaceNormals::SetFlipNormals
void SetFlipNormals(bool v)
Specify the direction to point normals when SetAutoOrientNormals() is true.
Definition: SurfaceNormals.h:106
vtkm::filter::vector_analysis::SurfaceNormals::GetConsistency
bool GetConsistency() const
Specify whtehr polygon winding should be made consistent with normal orientation.
Definition: SurfaceNormals.h:118
vtkm::filter::vector_analysis::SurfaceNormals::SetCellNormalsName
void SetCellNormalsName(const std::string &name)
Specify the name of the cell normals field.
Definition: SurfaceNormals.h:80
vtkm::filter::vector_analysis::SurfaceNormals::SetAutoOrientNormals
void SetAutoOrientNormals(bool v)
Specify whether to orient the normals outwards from the surface.
Definition: SurfaceNormals.h:97
vtkm::filter::vector_analysis::SurfaceNormals::GetAutoOrientNormals
bool GetAutoOrientNormals() const
Specify whether to orient the normals outwards from the surface.
Definition: SurfaceNormals.h:99
Filter.h