VTK
dox/Filters/Sources/vtkButtonSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkButtonSource.h
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 =========================================================================*/
00043 #ifndef __vtkButtonSource_h
00044 #define __vtkButtonSource_h
00045 
00046 #include "vtkFiltersSourcesModule.h" // For export macro
00047 #include "vtkPolyDataAlgorithm.h"
00048 
00049 #define VTK_TEXTURE_STYLE_FIT_IMAGE    0
00050 #define VTK_TEXTURE_STYLE_PROPORTIONAL 1
00051 
00052 class VTKFILTERSSOURCES_EXPORT vtkButtonSource : public vtkPolyDataAlgorithm
00053 {
00054 public:
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056   vtkTypeMacro(vtkButtonSource,vtkPolyDataAlgorithm);
00057 
00059 
00060   vtkSetVector3Macro(Center,double);
00061   vtkGetVectorMacro(Center,double,3);
00063 
00065 
00068   vtkSetClampMacro(TextureStyle,int,VTK_TEXTURE_STYLE_FIT_IMAGE,
00069                                     VTK_TEXTURE_STYLE_PROPORTIONAL);
00070   vtkGetMacro(TextureStyle,int);
00071   void SetTextureStyleToFitImage()
00072     {this->SetTextureStyle(VTK_TEXTURE_STYLE_FIT_IMAGE);}
00073   void SetTextureStyleToProportional()
00074     {this->SetTextureStyle(VTK_TEXTURE_STYLE_PROPORTIONAL);}
00076 
00078 
00080   vtkSetVector2Macro(TextureDimensions,int);
00081   vtkGetVector2Macro(TextureDimensions,int);
00083 
00085 
00086   vtkSetVector2Macro(ShoulderTextureCoordinate,double);
00087   vtkGetVector2Macro(ShoulderTextureCoordinate,double);
00089 
00091 
00095   vtkSetMacro(TwoSided,int);
00096   vtkGetMacro(TwoSided,int);
00097   vtkBooleanMacro(TwoSided,int);
00099 
00100 protected:
00101   vtkButtonSource();
00102   ~vtkButtonSource() {}
00103 
00104   double Center[3];
00105   double ShoulderTextureCoordinate[2];
00106   int    TextureStyle;
00107   int    TextureDimensions[2];
00108   int    TwoSided;
00109 
00110 private:
00111   vtkButtonSource(const vtkButtonSource&);  // Not implemented.
00112   void operator=(const vtkButtonSource&);  // Not implemented.
00113 
00114 };
00115 
00116 #endif
00117 
00118