VTK  9.3.0
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
31#ifndef vtkEllipticalButtonSource_h
32#define vtkEllipticalButtonSource_h
33
34#include "vtkButtonSource.h"
35#include "vtkFiltersSourcesModule.h" // For export macro
36
37VTK_ABI_NAMESPACE_BEGIN
38class vtkCellArray;
39class vtkFloatArray;
40class vtkPoints;
41
42class VTKFILTERSSOURCES_EXPORT vtkEllipticalButtonSource : public vtkButtonSource
43{
44public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
47
52
54
57 vtkSetClampMacro(Width, double, 0.0, VTK_DOUBLE_MAX);
58 vtkGetMacro(Width, double);
60
62
65 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
66 vtkGetMacro(Height, double);
68
70
73 vtkSetClampMacro(Depth, double, 0.0, VTK_DOUBLE_MAX);
74 vtkGetMacro(Depth, double);
76
78
81 vtkSetClampMacro(CircumferentialResolution, int, 4, VTK_INT_MAX);
82 vtkGetMacro(CircumferentialResolution, int);
84
86
90 vtkSetClampMacro(TextureResolution, int, 1, VTK_INT_MAX);
91 vtkGetMacro(TextureResolution, int);
93
95
99 vtkSetClampMacro(ShoulderResolution, int, 1, VTK_INT_MAX);
100 vtkGetMacro(ShoulderResolution, int);
102
104
113 vtkSetClampMacro(RadialRatio, double, 1.0, VTK_DOUBLE_MAX);
114 vtkGetMacro(RadialRatio, double);
116
118
123 vtkSetMacro(OutputPointsPrecision, int);
124 vtkGetMacro(OutputPointsPrecision, int);
126
127protected:
129 ~vtkEllipticalButtonSource() override = default;
130
132
133 double Width;
134 double Height;
135 double Depth;
141
142private:
143 // internal variable related to axes of ellipsoid
144 double A;
145 double A2;
146 double B;
147 double B2;
148 double C;
149 double C2;
150
151 double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
152 void InterpolateCurve(int inTextureRegion, vtkPoints* newPts, int numPts, vtkFloatArray* normals,
153 vtkFloatArray* tcoords, int res, int c1StartPoint, int c1Incr, int c2StartPoint, int s2Incr,
154 int startPoint, int incr);
155 void CreatePolygons(vtkCellArray* newPolys, int num, int res, int startIdx);
156 void IntersectEllipseWithLine(double a2, double b2, double dX, double dY, double& xe, double& ye);
157
159 void operator=(const vtkEllipticalButtonSource&) = delete;
160};
161
162VTK_ABI_NAMESPACE_END
163#endif
abstract class for creating various button types
object to represent cell connectivity
create a ellipsoidal-shaped button
~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:29
#define VTK_DOUBLE_MAX
Definition vtkType.h:154
#define VTK_INT_MAX
Definition vtkType.h:144