VTK  9.6.1
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
23
24#ifndef vtkCylinderSource_h
25#define vtkCylinderSource_h
26
27#include "vtkFiltersSourcesModule.h" // For export macro
29#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30
31#include "vtkCell.h" // Needed for VTK_CELL_SIZE
32
33VTK_ABI_NAMESPACE_BEGIN
34
35// Forward declarations
36class vtkFloatArray;
37
38class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkCylinderSource : public vtkPolyDataAlgorithm
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
49 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
50 vtkGetMacro(Height, double);
52
54
57 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
58 vtkGetMacro(Radius, double);
60
62
65 vtkSetVector3Macro(Center, double);
66 vtkGetVectorMacro(Center, double, 3);
68
70
73 vtkSetClampMacro(Resolution, int, 3, VTK_CELL_SIZE);
74 vtkGetMacro(Resolution, int);
76
78
81 vtkSetMacro(Capping, vtkTypeBool);
82 vtkGetMacro(Capping, vtkTypeBool);
83 vtkBooleanMacro(Capping, vtkTypeBool);
85
87
93 vtkSetMacro(CapsuleCap, vtkTypeBool);
94 vtkGetMacro(CapsuleCap, vtkTypeBool);
95 vtkBooleanMacro(CapsuleCap, vtkTypeBool);
97
99
110
112
117 vtkSetMacro(OutputPointsPrecision, int);
118 vtkGetMacro(OutputPointsPrecision, int);
120
121protected:
122 vtkCylinderSource(int res = 6);
123 ~vtkCylinderSource() override = default;
124
126
127 int CreateHemisphere(vtkPoints* points, vtkFloatArray* normals, vtkFloatArray* tcooords,
128 vtkCellArray* newPolys, int startIdx = 0);
129
130 double Height;
131 double Radius;
132 double Center[3];
138
139private:
140 vtkCylinderSource(const vtkCylinderSource&) = delete;
141 void operator=(const vtkCylinderSource&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#endif
object to represent cell connectivity
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:30
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_CELL_SIZE
Definition vtkCell.h:31
#define VTK_DOUBLE_MAX
Definition vtkType.h:207
#define VTK_MARSHALAUTO