VTK  9.5.20250904
vtkConeSource.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 vtkConeSource_h
134#define vtkConeSource_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
143class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkConeSource : public vtkPolyDataAlgorithm
144{
145public:
147 void PrintSelf(ostream& os, vtkIndent indent) override;
148
155
157
161 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
162 vtkGetMacro(Height, double);
164
166
169 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
170 vtkGetMacro(Radius, double);
172
174
177 vtkSetClampMacro(Resolution, int, 0, VTK_CELL_SIZE);
178 vtkGetMacro(Resolution, int);
180
182
187 vtkSetVector3Macro(Center, double);
188 vtkGetVectorMacro(Center, double, 3);
190
192
197 vtkSetVector3Macro(Direction, double);
198 vtkGetVectorMacro(Direction, double, 3);
200
202
209 void SetAngle(double angle);
210 double GetAngle();
212
214
217 vtkSetMacro(Capping, vtkTypeBool);
218 vtkGetMacro(Capping, vtkTypeBool);
219 vtkBooleanMacro(Capping, vtkTypeBool);
221
223
228 vtkSetMacro(OutputPointsPrecision, int);
229 vtkGetMacro(OutputPointsPrecision, int);
231
232protected:
233 vtkConeSource(int res = 6);
234 ~vtkConeSource() override = default;
235
238
239 double Height;
240 double Radius;
243 double Center[3];
244 double Direction[3];
246
247private:
248 vtkConeSource(const vtkConeSource&) = delete;
249 void operator=(const vtkConeSource&) = delete;
250};
251
252VTK_ABI_NAMESPACE_END
253#endif
generate polygonal cone
vtkTypeBool Capping
static vtkConeSource * New()
Construct with default resolution 6, height 1.0, radius 0.5, and capping on.
~vtkConeSource() override=default
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkConeSource(int res=6)
void SetAngle(double angle)
Set the angle of the cone.
double GetAngle()
Set the angle of the cone.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
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:171
#define VTK_MARSHALAUTO