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 =========================================================================*/
42 #ifndef vtkEllipticalButtonSource_h
43 #define vtkEllipticalButtonSource_h
44 
45 #include "vtkFiltersSourcesModule.h" // For export macro
46 #include "vtkButtonSource.h"
47 
48 class vtkCellArray;
49 class vtkFloatArray;
50 class vtkPoints;
51 
53 {
54 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
57 
60 
62 
63  vtkSetClampMacro(Width,double,0.0,VTK_DOUBLE_MAX);
64  vtkGetMacro(Width,double);
66 
68 
69  vtkSetClampMacro(Height,double,0.0,VTK_DOUBLE_MAX);
70  vtkGetMacro(Height,double);
72 
74 
75  vtkSetClampMacro(Depth,double,0.0,VTK_DOUBLE_MAX);
76  vtkGetMacro(Depth,double);
78 
80 
82  vtkSetClampMacro(CircumferentialResolution,int,4,VTK_INT_MAX);
83  vtkGetMacro(CircumferentialResolution,int);
85 
87 
89  vtkSetClampMacro(TextureResolution,int,1,VTK_INT_MAX);
90  vtkGetMacro(TextureResolution,int);
92 
94 
96  vtkSetClampMacro(ShoulderResolution,int,1,VTK_INT_MAX);
97  vtkGetMacro(ShoulderResolution,int);
99 
101 
108  vtkSetClampMacro(RadialRatio,double,1.0,VTK_DOUBLE_MAX);
109  vtkGetMacro(RadialRatio,double);
111 
113 
117  vtkSetMacro(OutputPointsPrecision,int);
118  vtkGetMacro(OutputPointsPrecision,int);
120 
121 protected:
124 
126 
127  double Width;
128  double Height;
129  double Depth;
134  double RadialRatio;
135 
136 private:
137  //internal variable related to axes of ellipsoid
138  double A;
139  double A2;
140  double B;
141  double B2;
142  double C;
143  double C2;
144 
145  double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
146  void InterpolateCurve(int inTextureRegion, vtkPoints *newPts, int numPts,
147  vtkFloatArray *normals, vtkFloatArray *tcoords,
148  int res, int c1StartPoint,int c1Incr,
149  int c2StartPoint,int s2Incr, int startPoint,int incr);
150  void CreatePolygons(vtkCellArray *newPolys, int num, int res, int startIdx);
151  void IntersectEllipseWithLine(double a2, double b2, double dX, double dY,
152  double& xe, double& ye);
153 
154  vtkEllipticalButtonSource(const vtkEllipticalButtonSource&); // Not implemented.
155  void operator=(const vtkEllipticalButtonSource&); // Not implemented.
156 };
157 
158 #endif
159 
160 
abstract class for creating various button types
#define VTK_DOUBLE_MAX
Definition: vtkType.h:142
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_INT_MAX
Definition: vtkType.h:132
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
void PrintSelf(ostream &os, vtkIndent indent)
static vtkPolyDataAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSSOURCES_EXPORT
create a ellipsoidal-shaped button
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38