VTK  9.3.20240419
vtkCapsuleSource.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
3 // SPDX-License-Identifier: BSD-3-Clause AND Apache-2.0
20 #ifndef vtkCapsuleSource_h
21 #define vtkCapsuleSource_h
22 
23 #include "vtkDeprecation.h" // For deprecation macros
24 #include "vtkFiltersSourcesModule.h" // For export macro
25 #include "vtkPolyDataAlgorithm.h"
26 
27 #include "vtkSphereSource.h" // For VTK_MAX_SPHERE_RESOLUTION
28 
29 VTK_ABI_NAMESPACE_BEGIN
31  "Use vtkCylinderSource with SetCapping(true) and SetCapsuleCap(true) instead of "
32  "vtkCapsuleSource.") VTKFILTERSSOURCES_EXPORT vtkCapsuleSource : public vtkPolyDataAlgorithm
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
42  static vtkCapsuleSource* New();
43 
45 
48  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
49  vtkGetMacro(Radius, double);
51 
53 
56  vtkSetVector3Macro(Center, double);
57  vtkGetVectorMacro(Center, double, 3);
59 
61 
64  vtkSetClampMacro(CylinderLength, double, 0.0, VTK_DOUBLE_MAX);
65  vtkGetMacro(CylinderLength, double);
67 
69 
73  vtkSetClampMacro(ThetaResolution, int, 8, VTK_INT_MAX);
74  vtkGetMacro(ThetaResolution, int);
76 
78 
81  vtkSetClampMacro(PhiResolution, int, 8, VTK_INT_MAX);
82  vtkGetMacro(PhiResolution, int);
84 
86 
93  vtkSetMacro(LatLongTessellation, int);
94  vtkGetMacro(LatLongTessellation, int);
95  vtkBooleanMacro(LatLongTessellation, int);
97 
99 
104  vtkSetMacro(OutputPointsPrecision, int);
105  vtkGetMacro(OutputPointsPrecision, int);
107 
108 protected:
109  vtkCapsuleSource(int res = 8);
110  ~vtkCapsuleSource() override = default;
111 
114 
115  double Radius;
116  double Center[3];
123 
124 private:
125  vtkCapsuleSource(const vtkCapsuleSource&) = delete;
126  void operator=(const vtkCapsuleSource&) = delete;
127 };
128 
129 VTK_ABI_NAMESPACE_END
130 #endif
Generate a capsule centered at the origin.
vtkCapsuleSource(int res=8)
~vtkCapsuleSource() override=default
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkCapsuleSource * New()
Construct a capsule with radius 0.5 and resolution 8 in both the Phi and Theta directions and a cylin...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
generate a polygonal cylinder centered at the origin
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.
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
#define VTK_INT_MAX
Definition: vtkType.h:144