VTK
vtkSphereSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSphereSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
38#ifndef vtkSphereSource_h
39#define vtkSphereSource_h
40
41#include "vtkFiltersSourcesModule.h" // For export macro
43
44#define VTK_MAX_SPHERE_RESOLUTION 1024
45
46class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
47{
48public:
50 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
51
57
59
62 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
63 vtkGetMacro(Radius,double);
65
67
70 vtkSetVector3Macro(Center,double);
71 vtkGetVectorMacro(Center,double,3);
73
75
79 vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
80 vtkGetMacro(ThetaResolution,int);
82
84
88 vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
89 vtkGetMacro(PhiResolution,int);
91
93
96 vtkSetClampMacro(StartTheta,double,0.0,360.0);
97 vtkGetMacro(StartTheta,double);
99
101
104 vtkSetClampMacro(EndTheta,double,0.0,360.0);
105 vtkGetMacro(EndTheta,double);
107
109
113 vtkSetClampMacro(StartPhi,double,0.0,360.0);
114 vtkGetMacro(StartPhi,double);
116
118
121 vtkSetClampMacro(EndPhi,double,0.0,360.0);
122 vtkGetMacro(EndPhi,double);
124
126
134 vtkSetMacro(LatLongTessellation,int);
135 vtkGetMacro(LatLongTessellation,int);
136 vtkBooleanMacro(LatLongTessellation,int);
138
140
145 vtkSetMacro(OutputPointsPrecision,int);
146 vtkGetMacro(OutputPointsPrecision,int);
148
149protected:
150 vtkSphereSource(int res=8);
151 ~vtkSphereSource() VTK_OVERRIDE {}
152
155
156 double Radius;
157 double Center[3];
161 double EndTheta;
162 double StartPhi;
163 double EndPhi;
166
167private:
168 vtkSphereSource(const vtkSphereSource&) VTK_DELETE_FUNCTION;
169 void operator=(const vtkSphereSource&) VTK_DELETE_FUNCTION;
170};
171
172#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
create a polygonal sphere centered at the origin
~vtkSphereSource() override
vtkSphereSource(int res=8)
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.
static vtkSphereSource * New()
Construct sphere with radius=0.5 and default resolution 8 in both Phi and Theta directions.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_MAX_SPHERE_RESOLUTION
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163