00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00049 #ifndef __vtkTexturedButtonRepresentation_h
00050 #define __vtkTexturedButtonRepresentation_h
00051
00052 #include "vtkButtonRepresentation.h"
00053
00054 class vtkCellPicker;
00055 class vtkActor;
00056 class vtkProperty;
00057 class vtkImageData;
00058 class vtkTextureArray;
00059 class vtkPolyData;
00060 class vtkPolyDataMapper;
00061 class vtkAlgorithmOutput;
00062 class vtkTexture;
00063 class vtkFollower;
00064
00065 class VTK_WIDGETS_EXPORT vtkTexturedButtonRepresentation : public vtkButtonRepresentation
00066 {
00067 public:
00069 static vtkTexturedButtonRepresentation *New();
00070
00072
00073 vtkTypeMacro(vtkTexturedButtonRepresentation,vtkButtonRepresentation);
00074 void PrintSelf(ostream& os, vtkIndent indent);
00076
00078
00079 void SetButtonGeometry(vtkPolyData *pd);
00080 void SetButtonGeometryConnection(vtkAlgorithmOutput* algOutput);
00081 vtkPolyData *GetButtonGeometry();
00083
00085
00087 vtkSetMacro(FollowCamera,int);
00088 vtkGetMacro(FollowCamera,int);
00089 vtkBooleanMacro(FollowCamera,int);
00091
00093
00095 virtual void SetProperty(vtkProperty *p);
00096 vtkGetObjectMacro(Property,vtkProperty);
00098
00100
00101 virtual void SetHoveringProperty(vtkProperty *p);
00102 vtkGetObjectMacro(HoveringProperty,vtkProperty);
00104
00106
00107 virtual void SetSelectingProperty(vtkProperty *p);
00108 vtkGetObjectMacro(SelectingProperty,vtkProperty);
00110
00112
00114 void SetButtonTexture(int i, vtkImageData *image);
00115 vtkImageData *GetButtonTexture(int i);
00117
00124 virtual void PlaceWidget(double scale, double point[3], double normal[3]);
00125
00127
00129 virtual int ComputeInteractionState(int X, int Y, int modify=0);
00130 virtual void PlaceWidget(double bounds[6]);
00131 virtual void BuildRepresentation();
00132 virtual void Highlight(int state);
00134
00136
00137 virtual void ShallowCopy(vtkProp *prop);
00138 virtual double *GetBounds();
00139 virtual void GetActors(vtkPropCollection *pc);
00140 virtual void ReleaseGraphicsResources(vtkWindow*);
00141 virtual int RenderOpaqueGeometry(vtkViewport*);
00142 virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
00143 virtual int HasTranslucentPolygonalGeometry();
00145
00146 protected:
00147 vtkTexturedButtonRepresentation();
00148 ~vtkTexturedButtonRepresentation();
00149
00150
00151 vtkActor *Actor;
00152 vtkFollower *Follower;
00153 vtkPolyDataMapper *Mapper;
00154 vtkTexture *Texture;
00155
00156
00157 int FollowCamera;
00158
00159
00160 vtkProperty *Property;
00161 vtkProperty *HoveringProperty;
00162 vtkProperty *SelectingProperty;
00163 void CreateDefaultProperties();
00164
00165
00166
00167 vtkTextureArray *TextureArray;
00168
00169
00170 vtkCellPicker *Picker;
00171
00172 private:
00173 vtkTexturedButtonRepresentation(const vtkTexturedButtonRepresentation&);
00174 void operator=(const vtkTexturedButtonRepresentation&);
00175 };
00176
00177 #endif