VTK  9.1.0
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
54
55#include "vtkSphereSource.h" // For VTK_MAX_SPHERE_RESOLUTION
56
57class VTKFILTERSSOURCES_EXPORT vtkCapsuleSource : public vtkPolyDataAlgorithm
58{
59public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
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_INT_MAX);
99 vtkGetMacro(ThetaResolution, int);
101
103
106 vtkSetClampMacro(PhiResolution, int, 8, VTK_INT_MAX);
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
133protected:
134 vtkCapsuleSource(int res = 8);
135 ~vtkCapsuleSource() override = default;
136
139
140 double Radius;
141 double Center[3];
148
149private:
150 vtkCapsuleSource(const vtkCapsuleSource&) = delete;
151 void operator=(const vtkCapsuleSource&) = delete;
152};
153
154#endif
Generate a capsule centered at the origin.
vtkCapsuleSource(int res=8)
static vtkCapsuleSource * New()
Construct a capsule with radius 0.5 and resolution 8 in both the Phi and Theta directions and a cylin...
~vtkCapsuleSource() override=default
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
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
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155