Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkEllipticalButtonSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkEllipticalButtonSource.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00039 #ifndef __vtkEllipticalButtonSource_h
00040 #define __vtkEllipticalButtonSource_h
00041 
00042 #include "vtkButtonSource.h"
00043 
00044 class vtkCellArray;
00045 class vtkFloatArray;
00046 class vtkPoints;
00047 
00048 class VTK_GRAPHICS_EXPORT vtkEllipticalButtonSource : public vtkButtonSource 
00049 {
00050 public:
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052   vtkTypeRevisionMacro(vtkEllipticalButtonSource,vtkButtonSource);
00053 
00055   static vtkEllipticalButtonSource *New();
00056 
00058 
00059   vtkSetClampMacro(Width,double,0.0,VTK_DOUBLE_MAX);
00060   vtkGetMacro(Width,double);
00062 
00064 
00065   vtkSetClampMacro(Height,double,0.0,VTK_DOUBLE_MAX);
00066   vtkGetMacro(Height,double);
00068 
00070 
00071   vtkSetClampMacro(Depth,double,0.0,VTK_DOUBLE_MAX);
00072   vtkGetMacro(Depth,double);
00074 
00076 
00078   vtkSetClampMacro(CircumferentialResolution,int,4,VTK_LARGE_INTEGER);
00079   vtkGetMacro(CircumferentialResolution,int);
00081 
00083 
00085   vtkSetClampMacro(TextureResolution,int,1,VTK_LARGE_INTEGER);
00086   vtkGetMacro(TextureResolution,int);
00088 
00090 
00092   vtkSetClampMacro(ShoulderResolution,int,1,VTK_LARGE_INTEGER);
00093   vtkGetMacro(ShoulderResolution,int);
00095 
00097 
00104   vtkSetClampMacro(RadialRatio,double,1.0,VTK_DOUBLE_MAX);
00105   vtkGetMacro(RadialRatio,double);
00107 
00108 protected:
00109   vtkEllipticalButtonSource();
00110   ~vtkEllipticalButtonSource() {}
00111 
00112   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00113 
00114   double Width;
00115   double Height;
00116   double Depth;
00117   int   CircumferentialResolution;
00118   int   TextureResolution;
00119   int   ShoulderResolution;
00120   double RadialRatio;
00121 
00122 private:
00123   vtkEllipticalButtonSource(const vtkEllipticalButtonSource&);  // Not implemented.
00124   void operator=(const vtkEllipticalButtonSource&);  // Not implemented.
00125 
00126   //internal variable related to axes of ellipsoid
00127   double A;
00128   double A2;
00129   double B;
00130   double B2;
00131   double C;
00132   double C2;
00133   
00134   double ComputeDepth(int inTextureRegion, double x, double y, double n[3]);
00135   void InterpolateCurve(int inTextureRegion, vtkPoints *newPts, int numPts,
00136                         vtkFloatArray *normals, vtkFloatArray *tcoords, 
00137                         int res, int c1StartPoint,int c1Incr,
00138                         int c2StartPoint,int s2Incr, int startPoint,int incr);
00139   void CreatePolygons(vtkCellArray *newPolys, int num, int res, int startIdx);
00140   void IntersectEllipseWithLine(double a2, double b2, double dX, double dY, 
00141                                 double& xe, double& ye);
00142   
00143     
00144 };
00145 
00146 #endif
00147 
00148 

Generated on Mon Jan 21 23:07:24 2008 for VTK by  doxygen 1.4.3-20050530