VTK  9.5.2
vtkSuperquadricSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
44
45#ifndef vtkSuperquadricSource_h
46#define vtkSuperquadricSource_h
47
48#include "vtkFiltersSourcesModule.h" // For export macro
50
51#define VTK_MAX_SUPERQUADRIC_RESOLUTION 1024
52#define VTK_MIN_SUPERQUADRIC_THICKNESS 1e-4
53#define VTK_MIN_SUPERQUADRIC_ROUNDNESS 1e-24
54
55VTK_ABI_NAMESPACE_BEGIN
56class VTKFILTERSSOURCES_EXPORT vtkSuperquadricSource : public vtkPolyDataAlgorithm
57{
58public:
65
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
70
73 vtkSetVector3Macro(Center, double);
74 vtkGetVectorMacro(Center, double, 3);
76
78
81 vtkSetVector3Macro(Scale, double);
82 vtkGetVectorMacro(Scale, double, 3);
84
86
89 vtkGetMacro(ThetaResolution, int);
90 void SetThetaResolution(int i);
92
94
97 vtkGetMacro(PhiResolution, int);
98 void SetPhiResolution(int i);
100
102
107 vtkGetMacro(Thickness, double);
108 vtkSetClampMacro(Thickness, double, VTK_MIN_SUPERQUADRIC_THICKNESS, 1.0);
110
112
117 vtkGetMacro(PhiRoundness, double);
118 void SetPhiRoundness(double e);
120
122
127 vtkGetMacro(ThetaRoundness, double);
128 void SetThetaRoundness(double e);
130
132
135 vtkSetMacro(Size, double);
136 vtkGetMacro(Size, double);
138
140
144 vtkSetMacro(AxisOfSymmetry, int);
145 vtkGetMacro(AxisOfSymmetry, int);
150
152
156 vtkBooleanMacro(Toroidal, vtkTypeBool);
157 vtkGetMacro(Toroidal, vtkTypeBool);
158 vtkSetMacro(Toroidal, vtkTypeBool);
160
162
167 vtkSetMacro(OutputPointsPrecision, int);
168 vtkGetMacro(OutputPointsPrecision, int);
170
171protected:
173 ~vtkSuperquadricSource() override = default;
174
177 double Thickness;
178 double Size;
183 double Center[3];
184 double Scale[3];
188
189private:
191 void operator=(const vtkSuperquadricSource&) = delete;
192};
193
194VTK_ABI_NAMESPACE_END
195#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void SetPhiRoundness(double e)
Set/Get Superquadric north/south roundness.
~vtkSuperquadricSource() override=default
void SetZAxisOfSymmetry()
Set/Get axis of symmetry for superquadric (x axis: 0, y axis: 1, z axis: 2).
virtual void SetAxisOfSymmetry(int)
Set/Get axis of symmetry for superquadric (x axis: 0, y axis: 1, z axis: 2).
vtkSuperquadricSource(int res=16)
void SetPhiResolution(int i)
Set the number of points in the latitude direction.
void SetThetaRoundness(double e)
Set/Get Superquadric east/west roundness.
void SetYAxisOfSymmetry()
Set/Get axis of symmetry for superquadric (x axis: 0, y axis: 1, z axis: 2).
static vtkSuperquadricSource * New()
Create a default superquadric with a radius of 0.5, non-toroidal, spherical, and centered at the orig...
void SetXAxisOfSymmetry()
Set/Get axis of symmetry for superquadric (x axis: 0, y axis: 1, z axis: 2).
void SetThetaResolution(int i)
Set the number of points in the longitude direction.
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.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MIN_SUPERQUADRIC_THICKNESS