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 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:132
vtkEllipticalButtonSource::New
static vtkEllipticalButtonSource * New()
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:49
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkEllipticalButtonSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkgl::n
GLclampd n
Definition: vtkgl.h:14370
vtkEllipticalButtonSource::~vtkEllipticalButtonSource
~vtkEllipticalButtonSource()
Definition: vtkEllipticalButtonSource.h:123
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkEllipticalButtonSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkFiltersSourcesModule.h
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
VTKFILTERSSOURCES_EXPORT
#define VTKFILTERSSOURCES_EXPORT
Definition: vtkFiltersSourcesModule.h:15
vtkButtonSource.h
vtkEllipticalButtonSource
create a ellipsoidal-shaped button
Definition: vtkEllipticalButtonSource.h:53
vtkgl::num
GLuint GLuint num
Definition: vtkgl.h:16907
vtkgl::res
GLuint res
Definition: vtkgl.h:16902
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkEllipticalButtonSource::RadialRatio
double RadialRatio
Definition: vtkEllipticalButtonSource.h:134
vtkEllipticalButtonSource::vtkEllipticalButtonSource
vtkEllipticalButtonSource()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkEllipticalButtonSource::ShoulderResolution
int ShoulderResolution
Definition: vtkEllipticalButtonSource.h:132
vtkEllipticalButtonSource::Width
double Width
Definition: vtkEllipticalButtonSource.h:127
vtkEllipticalButtonSource::TextureResolution
int TextureResolution
Definition: vtkEllipticalButtonSource.h:131
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkEllipticalButtonSource::CircumferentialResolution
int CircumferentialResolution
Definition: vtkEllipticalButtonSource.h:130
vtkEllipticalButtonSource::Height
double Height
Definition: vtkEllipticalButtonSource.h:128
vtkEllipticalButtonSource::Depth
double Depth
Definition: vtkEllipticalButtonSource.h:129
vtkButtonSource
abstract class for creating various button types
Definition: vtkButtonSource.h:53
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:142
vtkEllipticalButtonSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkEllipticalButtonSource.h:133