VTK
dox/Widgets/vtkProp3DButtonRepresentation.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkProp3DButtonRepresentation.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 =========================================================================*/
00042 #ifndef __vtkProp3DButtonRepresentation_h
00043 #define __vtkProp3DButtonRepresentation_h
00044 
00045 #include "vtkButtonRepresentation.h"
00046 
00047 class vtkPropPicker;
00048 class vtkProp3D;
00049 class vtkProp3DFollower;
00050 class vtkPropArray; //PIMPLd
00051 
00052 class VTK_WIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
00053 {
00054 public:
00056   static vtkProp3DButtonRepresentation *New();
00057 
00059 
00060   vtkTypeMacro(vtkProp3DButtonRepresentation,vtkButtonRepresentation);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00065 
00067   void SetButtonProp(int i, vtkProp3D *prop);
00068   vtkProp3D *GetButtonProp(int i);
00070 
00072 
00074   vtkSetMacro(FollowCamera,int);
00075   vtkGetMacro(FollowCamera,int);
00076   vtkBooleanMacro(FollowCamera,int);
00078 
00080   virtual void SetState(int state);
00081 
00083 
00085   virtual int ComputeInteractionState(int X, int Y, int modify=0);
00086   virtual void BuildRepresentation();
00088 
00091   virtual void PlaceWidget(double bounds[6]);
00092 
00094 
00095   virtual void ShallowCopy(vtkProp *prop);
00096   virtual double *GetBounds();
00097   virtual void GetActors(vtkPropCollection *pc);
00098   virtual void ReleaseGraphicsResources(vtkWindow*);
00099   virtual int RenderOpaqueGeometry(vtkViewport*);
00100   virtual int RenderVolumetricGeometry(vtkViewport*);
00101   virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
00102   virtual int HasTranslucentPolygonalGeometry();
00104 
00105 protected:
00106   vtkProp3DButtonRepresentation();
00107   ~vtkProp3DButtonRepresentation();
00108 
00109   // The current vtkProp3D used to represent the button
00110   vtkProp3D *CurrentProp;
00111 
00112   // Follow the camera if requested
00113   vtkProp3DFollower *Follower;
00114   int FollowCamera;
00115 
00116   // Keep track of the props associated with the N
00117   // states of the button. This is a PIMPLd stl map.
00118   vtkPropArray *PropArray;
00119 
00120   // For picking the button
00121   vtkPropPicker *Picker;
00122 
00123 private:
00124   vtkProp3DButtonRepresentation(const vtkProp3DButtonRepresentation&);  //Not implemented
00125   void operator=(const vtkProp3DButtonRepresentation&);  //Not implemented
00126 };
00127 
00128 #endif