VTK-m  2.2
Shrink.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_geometry_refinement_Shrink_h
12 #define vtk_m_filter_geometry_refinement_Shrink_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace geometry_refinement
22 {
30 {
31 public:
38  {
39  this->ShrinkFactor = vtkm::Min(vtkm::Max(0, factor), 1); // Clamp shrink factor value
40  }
41 
43  VTKM_CONT vtkm::FloatDefault GetShrinkFactor() const { return this->ShrinkFactor; }
44 
45 private:
46  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
47  vtkm::FloatDefault ShrinkFactor = 0.5f;
48 };
49 } // namespace geometry_refinement
50 } // namespace filter
51 } // namespace vtkm
52 
53 #endif // vtk_m_filter_geometry_refinement_Shrink_h
vtkm_filter_geometry_refinement_export.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::geometry_refinement::Shrink::SetShrinkFactor
void SetShrinkFactor(vtkm::FloatDefault factor)
Specify the scale factor to size each cell.
Definition: Shrink.h:37
vtkm::filter::geometry_refinement::Shrink
Shrink cells of an arbitrary dataset by a constant factor.
Definition: Shrink.h:29
VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT
#define VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT
Definition: vtkm_filter_geometry_refinement_export.h:44
vtkm::filter::geometry_refinement::Shrink::GetShrinkFactor
vtkm::FloatDefault GetShrinkFactor() const
Specify the scale factor to size each cell.
Definition: Shrink.h:43
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:236
Filter.h