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=========================================================================*/
40#ifndef vtkEllipticalButtonSource_h
41#define vtkEllipticalButtonSource_h
42
43#include "vtkButtonSource.h"
44#include "vtkFiltersSourcesModule.h" // For export macro
45
46class vtkCellArray;
47class vtkFloatArray;
48class vtkPoints;
49
50class VTKFILTERSSOURCES_EXPORT vtkEllipticalButtonSource : public vtkButtonSource
51{
52public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
55
60
62
65 vtkSetClampMacro(Width, double, 0.0, VTK_DOUBLE_MAX);
66 vtkGetMacro(Width, double);
68
70
73 vtkSetClampMacro(Height, double, 0.0, VTK_DOUBLE_MAX);
74 vtkGetMacro(Height, double);
76
78
81 vtkSetClampMacro(Depth, double, 0.0, VTK_DOUBLE_MAX);
82 vtkGetMacro(Depth, double);
84
86
89 vtkSetClampMacro(CircumferentialResolution, int, 4, VTK_INT_MAX);
90 vtkGetMacro(CircumferentialResolution, int);
92
94
98 vtkSetClampMacro(TextureResolution, int, 1, VTK_INT_MAX);
99 vtkGetMacro(TextureResolution, int);
101
103
107 vtkSetClampMacro(ShoulderResolution, int, 1, VTK_INT_MAX);
108 vtkGetMacro(ShoulderResolution, int);
110
112
121 vtkSetClampMacro(RadialRatio, double, 1.0, VTK_DOUBLE_MAX);
122 vtkGetMacro(RadialRatio, double);
124
126
131 vtkSetMacro(OutputPointsPrecision, int);
132 vtkGetMacro(OutputPointsPrecision, int);
134
135protected:
137 ~vtkEllipticalButtonSource() override = default;
138
140
141 double Width;
142 double Height;
143 double Depth;
149
150private:
151 // internal variable related to axes of ellipsoid
152 double A;
153 double A2;
154 double B;
155 double B2;
156 double C;
157 double C2;
158
159 double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
160 void InterpolateCurve(int inTextureRegion, vtkPoints* newPts, int numPts, vtkFloatArray* normals,
161 vtkFloatArray* tcoords, int res, int c1StartPoint, int c1Incr, int c2StartPoint, int s2Incr,
162 int startPoint, int incr);
163 void CreatePolygons(vtkCellArray* newPolys, int num, int res, int startIdx);
164 void IntersectEllipseWithLine(double a2, double b2, double dX, double dY, double& xe, double& ye);
165
167 void operator=(const vtkEllipticalButtonSource&) = delete;
168};
169
170#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:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:34
#define VTK_DOUBLE_MAX
Definition vtkType.h:165
#define VTK_INT_MAX
Definition vtkType.h:155