VTK  9.3.20240329
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 
139 #include "vtkCell.h" // Needed for VTK_CELL_SIZE
140 
141 VTK_ABI_NAMESPACE_BEGIN
142 class VTKFILTERSSOURCES_EXPORT vtkConeSource : public vtkPolyDataAlgorithm
143 {
144 public:
146  void PrintSelf(ostream& os, vtkIndent indent) override;
147 
153  static vtkConeSource* New();
154 
156 
160  vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
161  vtkGetMacro(Height, double);
163 
165 
168  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
169  vtkGetMacro(Radius, double);
171 
173 
176  vtkSetClampMacro(Resolution, int, 0, VTK_CELL_SIZE);
177  vtkGetMacro(Resolution, int);
179 
181 
186  vtkSetVector3Macro(Center, double);
187  vtkGetVectorMacro(Center, double, 3);
189 
191 
196  vtkSetVector3Macro(Direction, double);
197  vtkGetVectorMacro(Direction, double, 3);
199 
201 
208  void SetAngle(double angle);
209  double GetAngle();
211 
213 
216  vtkSetMacro(Capping, vtkTypeBool);
217  vtkGetMacro(Capping, vtkTypeBool);
218  vtkBooleanMacro(Capping, vtkTypeBool);
220 
222 
227  vtkSetMacro(OutputPointsPrecision, int);
228  vtkGetMacro(OutputPointsPrecision, int);
230 
231 protected:
232  vtkConeSource(int res = 6);
233  ~vtkConeSource() override = default;
234 
237 
238  double Height;
239  double Radius;
242  double Center[3];
243  double Direction[3];
245 
246 private:
247  vtkConeSource(const vtkConeSource&) = delete;
248  void operator=(const vtkConeSource&) = delete;
249 };
250 
251 VTK_ABI_NAMESPACE_END
252 #endif
generate polygonal cone
vtkTypeBool Capping
~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 OutputPointsPrecision
static vtkConeSource * New()
Construct with default resolution 6, height 1.0, radius 0.5, and capping on.
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:154