Thanks to visit codestin.com
Credit goes to vtk.org

VTK  9.5.20250921
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
139
140#include "vtkCell.h" // Needed for VTK_CELL_SIZE
141
142VTK_ABI_NAMESPACE_BEGIN
143
144// Forward declarations
145class vtkFloatArray;
146
147class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkCylinderSource : public vtkPolyDataAlgorithm
148{
149public:
152 void PrintSelf(ostream& os, vtkIndent indent) override;
153
155
158 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
159 vtkGetMacro(Height, double);
161
163
166 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
167 vtkGetMacro(Radius, double);
169
171
174 vtkSetVector3Macro(Center, double);
175 vtkGetVectorMacro(Center, double, 3);
177
179
182 vtkSetClampMacro(Resolution, int, 3, VTK_CELL_SIZE);
183 vtkGetMacro(Resolution, int);
185
187
190 vtkSetMacro(Capping, vtkTypeBool);
191 vtkGetMacro(Capping, vtkTypeBool);
192 vtkBooleanMacro(Capping, vtkTypeBool);
194
196
202 vtkSetMacro(CapsuleCap, vtkTypeBool);
203 vtkGetMacro(CapsuleCap, vtkTypeBool);
204 vtkBooleanMacro(CapsuleCap, vtkTypeBool);
206
208
215 vtkSetMacro(LatLongTessellation, vtkTypeBool);
216 vtkGetMacro(LatLongTessellation, vtkTypeBool);
217 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
219
221
226 vtkSetMacro(OutputPointsPrecision, int);
227 vtkGetMacro(OutputPointsPrecision, int);
229
230protected:
231 vtkCylinderSource(int res = 6);
232 ~vtkCylinderSource() override = default;
233
235
236 int CreateHemisphere(vtkPoints* points, vtkFloatArray* normals, vtkFloatArray* tcooords,
237 vtkCellArray* newPolys, int startIdx = 0);
238
239 double Height;
240 double Radius;
241 double Center[3];
247
248private:
249 vtkCylinderSource(const vtkCylinderSource&) = delete;
250 void operator=(const vtkCylinderSource&) = delete;
251};
252
253VTK_ABI_NAMESPACE_END
254#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:172
#define VTK_MARSHALAUTO