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
24#ifndef vtkCylinderSource_h
25#define vtkCylinderSource_h
26
27#include "vtkFiltersSourcesModule.h" // For export macro
29
30#include "vtkCell.h" // Needed for VTK_CELL_SIZE
31
32VTK_ABI_NAMESPACE_BEGIN
33
34// Forward declarations
35class vtkFloatArray;
36
37class VTKFILTERSSOURCES_EXPORT vtkCylinderSource : public vtkPolyDataAlgorithm
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
48 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
49 vtkGetMacro(Height, double);
51
53
56 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
57 vtkGetMacro(Radius, double);
59
61
64 vtkSetVector3Macro(Center, double);
65 vtkGetVectorMacro(Center, double, 3);
67
69
72 vtkSetClampMacro(Resolution, int, 3, VTK_CELL_SIZE);
73 vtkGetMacro(Resolution, int);
75
77
80 vtkSetMacro(Capping, vtkTypeBool);
81 vtkGetMacro(Capping, vtkTypeBool);
82 vtkBooleanMacro(Capping, vtkTypeBool);
84
86
92 vtkSetMacro(CapsuleCap, vtkTypeBool);
93 vtkGetMacro(CapsuleCap, vtkTypeBool);
94 vtkBooleanMacro(CapsuleCap, vtkTypeBool);
96
98
105 vtkSetMacro(LatLongTessellation, vtkTypeBool);
106 vtkGetMacro(LatLongTessellation, vtkTypeBool);
107 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
109
111
116 vtkSetMacro(OutputPointsPrecision, int);
117 vtkGetMacro(OutputPointsPrecision, int);
119
120protected:
121 vtkCylinderSource(int res = 6);
122 ~vtkCylinderSource() override = default;
123
125
126 int CreateHemisphere(vtkPoints* points, vtkFloatArray* normals, vtkFloatArray* tcooords,
127 vtkCellArray* newPolys, int startIdx = 0);
128
129 double Height;
130 double Radius;
131 double Center[3];
137
138private:
139 vtkCylinderSource(const vtkCylinderSource&) = delete;
140 void operator=(const vtkCylinderSource&) = delete;
141};
142
143VTK_ABI_NAMESPACE_END
144#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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:29
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_CELL_SIZE
Definition vtkCell.h:31
#define VTK_DOUBLE_MAX
Definition vtkType.h:154