VTK
vtkSuperquadricSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSuperquadricSource.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=========================================================================*/
57#ifndef vtkSuperquadricSource_h
58#define vtkSuperquadricSource_h
59
60#include "vtkFiltersSourcesModule.h" // For export macro
62
63#define VTK_MAX_SUPERQUADRIC_RESOLUTION 1024
64#define VTK_MIN_SUPERQUADRIC_THICKNESS 1e-4
65#define VTK_MIN_SUPERQUADRIC_ROUNDNESS 1e-24
66
67class VTKFILTERSSOURCES_EXPORT vtkSuperquadricSource : public vtkPolyDataAlgorithm
68{
69public:
76
78 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
79
81
84 vtkSetVector3Macro(Center,double);
85 vtkGetVectorMacro(Center,double,3);
87
89
92 vtkSetVector3Macro(Scale,double);
93 vtkGetVectorMacro(Scale,double,3);
95
97
100 vtkGetMacro(ThetaResolution,int);
103
105
108 vtkGetMacro(PhiResolution,int);
109 void SetPhiResolution(int i);
111
113
118 vtkGetMacro(Thickness,double);
119 vtkSetClampMacro(Thickness,double,VTK_MIN_SUPERQUADRIC_THICKNESS,1.0);
121
123
128 vtkGetMacro(PhiRoundness,double);
129 void SetPhiRoundness(double e);
131
133
138 vtkGetMacro(ThetaRoundness,double);
139 void SetThetaRoundness(double e);
141
143
146 vtkSetMacro(Size,double);
147 vtkGetMacro(Size,double);
149
151
154 vtkSetMacro(AxisOfSymmetry,int);
155 vtkGetMacro(AxisOfSymmetry,int);
156 void SetXAxisOfSymmetry() { this->SetAxisOfSymmetry(0); }
157 void SetYAxisOfSymmetry() { this->SetAxisOfSymmetry(1); }
158 void SetZAxisOfSymmetry() { this->SetAxisOfSymmetry(2); }
160
162
166 vtkBooleanMacro(Toroidal,int);
167 vtkGetMacro(Toroidal,int);
168 vtkSetMacro(Toroidal,int);
170
172
177 vtkSetMacro(OutputPointsPrecision,int);
178 vtkGetMacro(OutputPointsPrecision,int);
180
181protected:
183 ~vtkSuperquadricSource() VTK_OVERRIDE {}
184
187 double Thickness;
188 double Size;
192 double Center[3];
193 double Scale[3];
197
198private:
199 vtkSuperquadricSource(const vtkSuperquadricSource&) VTK_DELETE_FUNCTION;
200 void operator=(const vtkSuperquadricSource&) VTK_DELETE_FUNCTION;
201};
202
203#endif
204
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 superquadric centered at the origin
void SetPhiRoundness(double e)
vtkSuperquadricSource(int res=16)
void SetPhiResolution(int i)
void SetThetaRoundness(double e)
static vtkSuperquadricSource * New()
Create a default superquadric with a radius of 0.5, non-toroidal, spherical, and centered at the orig...
void SetThetaResolution(int i)
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.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_MIN_SUPERQUADRIC_THICKNESS