VTK  9.3.0
vtkCylinderSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
33 #ifndef vtkCylinderSource_h
34 #define vtkCylinderSource_h
35 
36 #include "vtkFiltersSourcesModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 
39 #include "vtkCell.h" // Needed for VTK_CELL_SIZE
40 
41 VTK_ABI_NAMESPACE_BEGIN
42 
43 // Forward declarations
44 class vtkFloatArray;
45 
46 class VTKFILTERSSOURCES_EXPORT vtkCylinderSource : public vtkPolyDataAlgorithm
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
57  vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
58  vtkGetMacro(Height, double);
60 
62 
65  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
66  vtkGetMacro(Radius, double);
68 
70 
73  vtkSetVector3Macro(Center, double);
74  vtkGetVectorMacro(Center, double, 3);
76 
78 
81  vtkSetClampMacro(Resolution, int, 3, VTK_CELL_SIZE);
82  vtkGetMacro(Resolution, int);
84 
86 
89  vtkSetMacro(Capping, vtkTypeBool);
90  vtkGetMacro(Capping, vtkTypeBool);
91  vtkBooleanMacro(Capping, vtkTypeBool);
93 
95 
101  vtkSetMacro(CapsuleCap, vtkTypeBool);
102  vtkGetMacro(CapsuleCap, vtkTypeBool);
103  vtkBooleanMacro(CapsuleCap, vtkTypeBool);
105 
107 
114  vtkSetMacro(LatLongTessellation, vtkTypeBool);
115  vtkGetMacro(LatLongTessellation, vtkTypeBool);
116  vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
118 
120 
125  vtkSetMacro(OutputPointsPrecision, int);
126  vtkGetMacro(OutputPointsPrecision, int);
128 
129 protected:
130  vtkCylinderSource(int res = 6);
131  ~vtkCylinderSource() override = default;
132 
134 
136  vtkCellArray* newPolys, int startIdx = 0);
137 
138  double Height;
139  double Radius;
140  double Center[3];
146 
147 private:
148  vtkCylinderSource(const vtkCylinderSource&) = delete;
149  void operator=(const vtkCylinderSource&) = delete;
150 };
151 
152 VTK_ABI_NAMESPACE_END
153 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:185
generate a polygonal cylinder centered at the origin
vtkTypeBool LatLongTessellation
int CreateHemisphere(vtkPoints *points, vtkFloatArray *normals, vtkFloatArray *tcooords, vtkCellArray *newPolys, int startIdx=0)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCylinderSource * New()
~vtkCylinderSource() override=default
vtkCylinderSource(int res=6)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:40
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:38
Superclass for algorithms that produce only polydata as output.
@ points
Definition: vtkX3D.h:446
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_CELL_SIZE
Definition: vtkCell.h:40
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154