VTK  9.0.1
vtkCapsuleSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCapsuleSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8 
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 
17 /*=========================================================================
18 
19  Program: Bender
20  Copyright (c) Kitware Inc.
21 
22  Licensed under the Apache License, Version 2.0 (the "License");
23  you may not use this file except in compliance with the License.
24  You may obtain a copy of the License at
25 
26  http://www.apache.org/licenses/LICENSE-2.0.txt
27 
28  Unless required by applicable law or agreed to in writing, software
29  distributed under the License is distributed on an "AS IS" BASIS,
30  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  See the License for the specific language governing permissions and
32  limitations under the License.
33 
34 =========================================================================*/
35 
49 #ifndef vtkCapsuleSource_h
50 #define vtkCapsuleSource_h
51 
52 #include "vtkFiltersSourcesModule.h" // For export macro
53 #include "vtkPolyDataAlgorithm.h"
54 
55 #include "vtkSphereSource.h" // For VTK_MAX_SPHERE_RESOLUTION
56 
57 class VTKFILTERSSOURCES_EXPORT vtkCapsuleSource : public vtkPolyDataAlgorithm
58 {
59 public:
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
67  static vtkCapsuleSource* New();
68 
70 
73  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
74  vtkGetMacro(Radius, double);
76 
78 
81  vtkSetVector3Macro(Center, double);
82  vtkGetVectorMacro(Center, double, 3);
84 
86 
89  vtkSetClampMacro(CylinderLength, double, 0.0, VTK_DOUBLE_MAX);
90  vtkGetMacro(CylinderLength, double);
92 
94 
98  vtkSetClampMacro(ThetaResolution, int, 8, VTK_MAX_SPHERE_RESOLUTION);
99  vtkGetMacro(ThetaResolution, int);
101 
103 
106  vtkSetClampMacro(PhiResolution, int, 8, VTK_MAX_SPHERE_RESOLUTION);
107  vtkGetMacro(PhiResolution, int);
109 
111 
118  vtkSetMacro(LatLongTessellation, int);
119  vtkGetMacro(LatLongTessellation, int);
120  vtkBooleanMacro(LatLongTessellation, int);
122 
124 
129  vtkSetMacro(OutputPointsPrecision, int);
130  vtkGetMacro(OutputPointsPrecision, int);
132 
133 protected:
134  vtkCapsuleSource(int res = 8);
135  ~vtkCapsuleSource() override {}
136 
139 
140  double Radius;
141  double Center[3];
148 
149 private:
150  vtkCapsuleSource(const vtkCapsuleSource&) = delete;
151  void operator=(const vtkCapsuleSource&) = delete;
152 };
153 
154 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
Store vtkAlgorithm input/output information.
#define VTK_MAX_SPHERE_RESOLUTION
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Generate a capsule centered at the origin.
Store zero or more vtkInformation instances.
~vtkCapsuleSource() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.