VTK  9.4.20241221
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
133#ifndef vtkCylinderSource_h
134#define vtkCylinderSource_h
135
136#include "vtkFiltersSourcesModule.h" // For export macro
137#include "vtkPolyDataAlgorithm.h"
138
139#include "vtkCell.h" // Needed for VTK_CELL_SIZE
140
141VTK_ABI_NAMESPACE_BEGIN
142
143// Forward declarations
144class vtkFloatArray;
145
146class VTKFILTERSSOURCES_EXPORT vtkCylinderSource : public vtkPolyDataAlgorithm
147{
148public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152
154
157 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
158 vtkGetMacro(Height, double);
160
162
165 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
166 vtkGetMacro(Radius, double);
168
170
173 vtkSetVector3Macro(Center, double);
174 vtkGetVectorMacro(Center, double, 3);
176
178
181 vtkSetClampMacro(Resolution, int, 3, VTK_CELL_SIZE);
182 vtkGetMacro(Resolution, int);
184
186
189 vtkSetMacro(Capping, vtkTypeBool);
190 vtkGetMacro(Capping, vtkTypeBool);
191 vtkBooleanMacro(Capping, vtkTypeBool);
193
195
201 vtkSetMacro(CapsuleCap, vtkTypeBool);
202 vtkGetMacro(CapsuleCap, vtkTypeBool);
203 vtkBooleanMacro(CapsuleCap, vtkTypeBool);
205
207
214 vtkSetMacro(LatLongTessellation, vtkTypeBool);
215 vtkGetMacro(LatLongTessellation, vtkTypeBool);
216 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
218
220
225 vtkSetMacro(OutputPointsPrecision, int);
226 vtkGetMacro(OutputPointsPrecision, int);
228
229protected:
230 vtkCylinderSource(int res = 6);
231 ~vtkCylinderSource() override = default;
232
234
235 int CreateHemisphere(vtkPoints* points, vtkFloatArray* normals, vtkFloatArray* tcooords,
236 vtkCellArray* newPolys, int startIdx = 0);
237
238 double Height;
239 double Radius;
240 double Center[3];
246
247private:
248 vtkCylinderSource(const vtkCylinderSource&) = delete;
249 void operator=(const vtkCylinderSource&) = delete;
250};
251
252VTK_ABI_NAMESPACE_END
253#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_CELL_SIZE
Definition vtkCell.h:110
#define VTK_DOUBLE_MAX
Definition vtkType.h:154