Viskores  1.0
Tube.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_geometry_refinement_Tube_h
20 #define viskores_filter_geometry_refinement_Tube_h
21 
22 #include <viskores/filter/Filter.h>
24 
25 namespace viskores
26 {
27 namespace filter
28 {
29 namespace geometry_refinement
30 {
31 
38 class VISKORES_FILTER_GEOMETRY_REFINEMENT_EXPORT Tube : public viskores::filter::Filter
39 {
40 public:
42  VISKORES_CONT void SetRadius(viskores::FloatDefault r) { this->Radius = r; }
43 
48  VISKORES_CONT void SetNumberOfSides(viskores::Id n) { this->NumberOfSides = n; }
49 
52  VISKORES_CONT void SetCapping(bool v) { this->Capping = v; }
53 
54 private:
55  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
56 
58  viskores::Id NumberOfSides = 6;
59  bool Capping = false;
60 };
61 } // namespace geometry_refinement
62 } // namespace filter
63 } // namespace viskores
64 
65 #endif // viskores_filter_geometry_refinement_Tube_h
viskores::filter::geometry_refinement::Tube::SetCapping
void SetCapping(bool v)
The Tube filter can optionally add a cap at the ends of each tube.
Definition: Tube.h:52
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::filter::geometry_refinement::Tube::SetNumberOfSides
void SetNumberOfSides(viskores::Id n)
Specify the number of sides for each tube.
Definition: Tube.h:48
viskores::filter::geometry_refinement::Tube
Generate a tube around each line and polyline.
Definition: Tube.h:38
viskores_filter_geometry_refinement_export.h
viskores::FloatDefault
viskores::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:244
viskores::filter::geometry_refinement::Tube::SetRadius
void SetRadius(viskores::FloatDefault r)
Specify the radius of each tube.
Definition: Tube.h:42
Filter.h