VTK  9.6.1
vtkEllipticalButtonSource.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
30
31#ifndef vtkEllipticalButtonSource_h
32#define vtkEllipticalButtonSource_h
33
34#include "vtkButtonSource.h"
35#include "vtkFiltersSourcesModule.h" // For export macro
36#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
37
38VTK_ABI_NAMESPACE_BEGIN
39class vtkCellArray;
40class vtkFloatArray;
41class vtkPoints;
42
43class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkEllipticalButtonSource : public vtkButtonSource
44{
45public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53
55
58 vtkSetClampMacro(Width, double, 0.0, VTK_DOUBLE_MAX);
59 vtkGetMacro(Width, double);
61
63
66 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
67 vtkGetMacro(Height, double);
69
71
74 vtkSetClampMacro(Depth, double, 0.0, VTK_DOUBLE_MAX);
75 vtkGetMacro(Depth, double);
77
79
82 vtkSetClampMacro(CircumferentialResolution, int, 4, VTK_INT_MAX);
83 vtkGetMacro(CircumferentialResolution, int);
85
87
91 vtkSetClampMacro(TextureResolution, int, 1, VTK_INT_MAX);
92 vtkGetMacro(TextureResolution, int);
94
96
100 vtkSetClampMacro(ShoulderResolution, int, 1, VTK_INT_MAX);
101 vtkGetMacro(ShoulderResolution, int);
103
105
114 vtkSetClampMacro(RadialRatio, double, 1.0, VTK_DOUBLE_MAX);
115 vtkGetMacro(RadialRatio, double);
117
119
124 vtkSetMacro(OutputPointsPrecision, int);
125 vtkGetMacro(OutputPointsPrecision, int);
127
128protected:
130 ~vtkEllipticalButtonSource() override = default;
131
133
134 double Width;
135 double Height;
136 double Depth;
142
143private:
144 // internal variable related to axes of ellipsoid
145 double A;
146 double A2;
147 double B;
148 double B2;
149 double C;
150 double C2;
151
152 double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
153 void InterpolateCurve(int inTextureRegion, vtkPoints* newPts, int numPts, vtkFloatArray* normals,
154 vtkFloatArray* tcoords, int res, int c1StartPoint, int c1Incr, int c2StartPoint, int s2Incr,
155 int startPoint, int incr);
156 void CreatePolygons(vtkCellArray* newPolys, int num, int res, int startIdx);
157 void IntersectEllipseWithLine(double a2, double b2, double dX, double dY, double& xe, double& ye);
158
160 void operator=(const vtkEllipticalButtonSource&) = delete;
161};
162
163VTK_ABI_NAMESPACE_END
164#endif
object to represent cell connectivity
~vtkEllipticalButtonSource() override=default
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkEllipticalButtonSource * New()
Construct a circular button with depth 10% of its height.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:30
#define VTK_DOUBLE_MAX
Definition vtkType.h:207
#define VTK_INT_MAX
Definition vtkType.h:197
#define VTK_MARSHALAUTO