SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
vtkConeFrustum.h
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 vtkConeFrustum_h
11 #define vtkConeFrustum_h
12 
13 #include "smtk/extension/vtk/source/vtkSMTKSourceExtModule.h" // For export macro
14 #include "vtkPolyDataAlgorithm.h"
15 
16 #include "vtkCell.h" // Needed for VTK_CELL_SIZE
17 
40 class VTKSMTKSOURCEEXT_EXPORT vtkConeFrustum : public vtkPolyDataAlgorithm
41 {
42 public:
43  vtkTypeMacro(vtkConeFrustum, vtkPolyDataAlgorithm);
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  vtkConeFrustum(const vtkConeFrustum&) = delete;
47  vtkConeFrustum& operator=(const vtkConeFrustum&) = delete;
48 
51  {
52  SideFace = 0,
55  Axis,
60  NumberOfOutputs
61  };
62 
66  static vtkConeFrustum* New();
67 
69 
75  vtkSetClampMacro(BottomRadius, double, 0.0, VTK_DOUBLE_MAX);
76  vtkGetMacro(BottomRadius, double);
78 
80 
86  vtkSetClampMacro(TopRadius, double, 0.0, VTK_DOUBLE_MAX);
87  vtkGetMacro(TopRadius, double);
89 
91 
95  vtkSetVector3Macro(BottomPoint, double);
96  vtkGetVectorMacro(BottomPoint, double, 3);
98 
100 
104  vtkSetVector3Macro(TopPoint, double);
105  vtkGetVectorMacro(TopPoint, double, 3);
107 
109 
114  vtkSetClampMacro(Resolution, int, 3, VTK_CELL_SIZE);
115  vtkGetMacro(Resolution, int);
117 
119 
124  vtkSetMacro(OutputPointsPrecision, int);
125  vtkGetMacro(OutputPointsPrecision, int);
127 
132  double GetAngle() const;
133 
134 protected:
135  vtkConeFrustum(int res = 16);
136  ~vtkConeFrustum() override;
137 
138  // int RequestInformation(vtkInformation* , vtkInformationVector** , vtkInformationVector* ) override;
139  int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
140 
141  double BottomPoint[3];
142  double BottomRadius{ 0.5 };
143  double TopPoint[3];
144  double TopRadius{ 0.0 };
145  int Resolution;
146  int OutputPointsPrecision{ SINGLE_PRECISION };
147 };
148 
149 #endif
vtkConeFrustum::BottomVertex
@ BottomVertex
A single vertex at the center of the bottom face.
Definition: vtkConeFrustum.h:58
vtkConeFrustum::Axis
@ Axis
Line from the bottom to to the top center-point.
Definition: vtkConeFrustum.h:55
vtkConeFrustum::BottomEdge
@ BottomEdge
Polyline of the bottom endcap feature edge.
Definition: vtkConeFrustum.h:56
vtkConeFrustum::TopFace
@ TopFace
Triangulation of the top endcap.
Definition: vtkConeFrustum.h:54
vtkConeFrustum
Generate a polygonal approximation to a cone frustum.
Definition: vtkConeFrustum.h:40
vtkConeFrustum::OutputPorts
OutputPorts
An enum indexing data present at each output.
Definition: vtkConeFrustum.h:50
vtkConeFrustum::BottomFace
@ BottomFace
Triangulation of the bottom endcap.
Definition: vtkConeFrustum.h:53
vtkConeFrustum::TopEdge
@ TopEdge
Polyline of the top endcap feature edge.
Definition: vtkConeFrustum.h:57
vtkConeFrustum::TopVertex
@ TopVertex
A single vertex at the center of the top face.
Definition: vtkConeFrustum.h:59