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
38
39#include "vtkCell.h" // Needed for VTK_CELL_SIZE
40
41VTK_ABI_NAMESPACE_BEGIN
42
43// Forward declarations
44class vtkFloatArray;
45
46class VTKFILTERSSOURCES_EXPORT vtkCylinderSource : public vtkPolyDataAlgorithm
47{
48public:
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
129protected:
130 vtkCylinderSource(int res = 6);
131 ~vtkCylinderSource() override = default;
132
134
135 int CreateHemisphere(vtkPoints* points, vtkFloatArray* normals, vtkFloatArray* tcooords,
136 vtkCellArray* newPolys, int startIdx = 0);
137
138 double Height;
139 double Radius;
140 double Center[3];
146
147private:
148 vtkCylinderSource(const vtkCylinderSource&) = delete;
149 void operator=(const vtkCylinderSource&) = delete;
150};
151
152VTK_ABI_NAMESPACE_END
153#endif
object to represent cell connectivity
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.
~vtkCylinderSource() override=default
static vtkCylinderSource * New()
vtkCylinderSource(int res=6)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
dynamic, self-adjusting array of float
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.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_CELL_SIZE
Definition vtkCell.h:40
#define VTK_DOUBLE_MAX
Definition vtkType.h:154