VTK  9.2.6
vtkEllipticalButtonSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkEllipticalButtonSource.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=========================================================================*/
62#ifndef vtkEllipticalButtonSource_h
63#define vtkEllipticalButtonSource_h
64
65#include "vtkButtonSource.h"
66#include "vtkFiltersSourcesModule.h" // For export macro
67
68class vtkCellArray;
69class vtkFloatArray;
70class vtkPoints;
71
72class VTKFILTERSSOURCES_EXPORT vtkEllipticalButtonSource : public vtkButtonSource
73{
74public:
75 void PrintSelf(ostream& os, vtkIndent indent) override;
77
82
84
87 vtkSetClampMacro(Width, double, 0.0, VTK_DOUBLE_MAX);
88 vtkGetMacro(Width, double);
90
92
95 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
96 vtkGetMacro(Height, double);
98
100
103 vtkSetClampMacro(Depth, double, 0.0, VTK_DOUBLE_MAX);
104 vtkGetMacro(Depth, double);
106
108
111 vtkSetClampMacro(CircumferentialResolution, int, 4, VTK_INT_MAX);
112 vtkGetMacro(CircumferentialResolution, int);
114
116
120 vtkSetClampMacro(TextureResolution, int, 1, VTK_INT_MAX);
121 vtkGetMacro(TextureResolution, int);
123
125
129 vtkSetClampMacro(ShoulderResolution, int, 1, VTK_INT_MAX);
130 vtkGetMacro(ShoulderResolution, int);
132
134
143 vtkSetClampMacro(RadialRatio, double, 1.0, VTK_DOUBLE_MAX);
144 vtkGetMacro(RadialRatio, double);
146
148
153 vtkSetMacro(OutputPointsPrecision, int);
154 vtkGetMacro(OutputPointsPrecision, int);
156
157protected:
159 ~vtkEllipticalButtonSource() override = default;
160
162
163 double Width;
164 double Height;
165 double Depth;
171
172private:
173 // internal variable related to axes of ellipsoid
174 double A;
175 double A2;
176 double B;
177 double B2;
178 double C;
179 double C2;
180
181 double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
182 void InterpolateCurve(int inTextureRegion, vtkPoints* newPts, int numPts, vtkFloatArray* normals,
183 vtkFloatArray* tcoords, int res, int c1StartPoint, int c1Incr, int c2StartPoint, int s2Incr,
184 int startPoint, int incr);
185 void CreatePolygons(vtkCellArray* newPolys, int num, int res, int startIdx);
186 void IntersectEllipseWithLine(double a2, double b2, double dX, double dY, double& xe, double& ye);
187
189 void operator=(const vtkEllipticalButtonSource&) = delete;
190};
191
192#endif
abstract class for creating various button types
object to represent cell connectivity
Definition: vtkCellArray.h:296
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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:149
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155