VTK
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 =========================================================================*/
43 #ifndef vtkEllipticalButtonSource_h
44 #define vtkEllipticalButtonSource_h
45 
46 #include "vtkFiltersSourcesModule.h" // For export macro
47 #include "vtkButtonSource.h"
48 
49 class vtkCellArray;
50 class vtkFloatArray;
51 class vtkPoints;
52 
53 class VTKFILTERSSOURCES_EXPORT vtkEllipticalButtonSource : public vtkButtonSource
54 {
55 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
63 
65 
68  vtkSetClampMacro(Width,double,0.0,VTK_DOUBLE_MAX);
69  vtkGetMacro(Width,double);
71 
73 
76  vtkSetClampMacro(Height,double,0.0,VTK_DOUBLE_MAX);
77  vtkGetMacro(Height,double);
79 
81 
84  vtkSetClampMacro(Depth,double,0.0,VTK_DOUBLE_MAX);
85  vtkGetMacro(Depth,double);
87 
89 
92  vtkSetClampMacro(CircumferentialResolution,int,4,VTK_INT_MAX);
93  vtkGetMacro(CircumferentialResolution,int);
95 
97 
101  vtkSetClampMacro(TextureResolution,int,1,VTK_INT_MAX);
102  vtkGetMacro(TextureResolution,int);
104 
106 
110  vtkSetClampMacro(ShoulderResolution,int,1,VTK_INT_MAX);
111  vtkGetMacro(ShoulderResolution,int);
113 
115 
124  vtkSetClampMacro(RadialRatio,double,1.0,VTK_DOUBLE_MAX);
125  vtkGetMacro(RadialRatio,double);
127 
129 
134  vtkSetMacro(OutputPointsPrecision,int);
135  vtkGetMacro(OutputPointsPrecision,int);
137 
138 protected:
141 
143 
144  double Width;
145  double Height;
146  double Depth;
151  double RadialRatio;
152 
153 private:
154  //internal variable related to axes of ellipsoid
155  double A;
156  double A2;
157  double B;
158  double B2;
159  double C;
160  double C2;
161 
162  double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
163  void InterpolateCurve(int inTextureRegion, vtkPoints *newPts, int numPts,
164  vtkFloatArray *normals, vtkFloatArray *tcoords,
165  int res, int c1StartPoint,int c1Incr,
166  int c2StartPoint,int s2Incr, int startPoint,int incr);
167  void CreatePolygons(vtkCellArray *newPolys, int num, int res, int startIdx);
168  void IntersectEllipseWithLine(double a2, double b2, double dX, double dY,
169  double& xe, double& ye);
170 
172  void operator=(const vtkEllipticalButtonSource&) = delete;
173 };
174 
175 #endif
176 
177 
abstract class for creating various button types
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:159
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
static vtkPolyDataAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:39
create a ellipsoidal-shaped button
object to represent cell connectivity
Definition: vtkCellArray.h:50
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 3D points
Definition: vtkPoints.h:39