VTK
dox/Interaction/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 "vtkInteractionWidgetsModule.h" // For export macro
00046 #include "vtkButtonRepresentation.h"
00047 
00048 class vtkPropPicker;
00049 class vtkProp3D;
00050 class vtkProp3DFollower;
00051 class vtkPropArray; //PIMPLd
00052 
00053 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
00054 {
00055 public:
00057   static vtkProp3DButtonRepresentation *New();
00058 
00060 
00061   vtkTypeMacro(vtkProp3DButtonRepresentation,vtkButtonRepresentation);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00064 
00066 
00068   void SetButtonProp(int i, vtkProp3D *prop);
00069   vtkProp3D *GetButtonProp(int i);
00071 
00073 
00075   vtkSetMacro(FollowCamera,int);
00076   vtkGetMacro(FollowCamera,int);
00077   vtkBooleanMacro(FollowCamera,int);
00079 
00081   virtual void SetState(int state);
00082 
00084 
00086   virtual int ComputeInteractionState(int X, int Y, int modify=0);
00087   virtual void BuildRepresentation();
00089 
00092   virtual void PlaceWidget(double bounds[6]);
00093 
00095 
00096   virtual void ShallowCopy(vtkProp *prop);
00097   virtual double *GetBounds();
00098   virtual void GetActors(vtkPropCollection *pc);
00099   virtual void ReleaseGraphicsResources(vtkWindow*);
00100   virtual int RenderOpaqueGeometry(vtkViewport*);
00101   virtual int RenderVolumetricGeometry(vtkViewport*);
00102   virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
00103   virtual int HasTranslucentPolygonalGeometry();
00105 
00106 protected:
00107   vtkProp3DButtonRepresentation();
00108   ~vtkProp3DButtonRepresentation();
00109 
00110   // The current vtkProp3D used to represent the button
00111   vtkProp3D *CurrentProp;
00112 
00113   // Follow the camera if requested
00114   vtkProp3DFollower *Follower;
00115   int FollowCamera;
00116 
00117   // Keep track of the props associated with the N
00118   // states of the button. This is a PIMPLd stl map.
00119   vtkPropArray *PropArray;
00120 
00121   // For picking the button
00122   vtkPropPicker *Picker;
00123 
00124   // Register internal Pickers within PickingManager
00125   virtual void RegisterPickers();
00126 
00127 private:
00128   vtkProp3DButtonRepresentation(const vtkProp3DButtonRepresentation&);  //Not implemented
00129   void operator=(const vtkProp3DButtonRepresentation&);  //Not implemented
00130 };
00131 
00132 #endif