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 =========================================================================*/
32 #ifndef vtkSphereSource_h
33 #define vtkSphereSource_h
34 
35 #include "vtkFiltersSourcesModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 #define VTK_MAX_SPHERE_RESOLUTION 1024
39 
40 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
50  static vtkSphereSource* New();
51 
53 
56  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
57  vtkGetMacro(Radius, double);
59 
61 
64  vtkSetVector3Macro(Center, double);
65  vtkGetVectorMacro(Center, double, 3);
67 
69 
73  vtkSetClampMacro(ThetaResolution, int, 3, VTK_MAX_SPHERE_RESOLUTION);
74  vtkGetMacro(ThetaResolution, int);
76 
78 
82  vtkSetClampMacro(PhiResolution, int, 3, VTK_MAX_SPHERE_RESOLUTION);
83  vtkGetMacro(PhiResolution, int);
85 
87 
90  vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
91  vtkGetMacro(StartTheta, double);
93 
95 
98  vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
99  vtkGetMacro(EndTheta, double);
101 
103 
107  vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
108  vtkGetMacro(StartPhi, double);
110 
112 
115  vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
116  vtkGetMacro(EndPhi, double);
118 
120 
128  vtkSetMacro(LatLongTessellation, vtkTypeBool);
129  vtkGetMacro(LatLongTessellation, vtkTypeBool);
130  vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
132 
134 
139  vtkSetMacro(OutputPointsPrecision, int);
140  vtkGetMacro(OutputPointsPrecision, int);
142 
143 protected:
144  vtkSphereSource(int res = 8);
145  ~vtkSphereSource() override {}
146 
149 
150  double Radius;
151  double Center[3];
154  double StartTheta;
155  double EndTheta;
156  double StartPhi;
157  double EndPhi;
160 
161 private:
162  vtkSphereSource(const vtkSphereSource&) = delete;
163  void operator=(const vtkSphereSource&) = delete;
164 };
165 
166 #endif
VTK_MAX_SPHERE_RESOLUTION
#define VTK_MAX_SPHERE_RESOLUTION
Definition: vtkSphereSource.h:38
vtkSphereSource::EndTheta
double EndTheta
Definition: vtkSphereSource.h:155
vtkSphereSource::PhiResolution
int PhiResolution
Definition: vtkSphereSource.h:153
vtkSphereSource::~vtkSphereSource
~vtkSphereSource() override
Definition: vtkSphereSource.h:145
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSphereSource::StartTheta
double StartTheta
Definition: vtkSphereSource.h:154
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSphereSource::Radius
double Radius
Definition: vtkSphereSource.h:150
vtkSphereSource::LatLongTessellation
vtkTypeBool LatLongTessellation
Definition: vtkSphereSource.h:158
vtkPolyDataAlgorithm.h
vtkSphereSource::StartPhi
double StartPhi
Definition: vtkSphereSource.h:156
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:40
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSphereSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkSphereSource.h:159
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:64
vtkSphereSource::ThetaResolution
int ThetaResolution
Definition: vtkSphereSource.h:152
vtkSphereSource::EndPhi
double EndPhi
Definition: vtkSphereSource.h:157
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41