VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkProp3DButtonRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProp3DButtonRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
42 #ifndef __vtkProp3DButtonRepresentation_h
43 #define __vtkProp3DButtonRepresentation_h
44 
45 #include "vtkInteractionWidgetsModule.h" // For export macro
47 
48 class vtkPropPicker;
49 class vtkProp3D;
50 class vtkProp3DFollower;
51 class vtkPropArray; //PIMPLd
52 
53 class VTKINTERACTIONWIDGETS_EXPORT vtkProp3DButtonRepresentation : public vtkButtonRepresentation
54 {
55 public:
57  static vtkProp3DButtonRepresentation *New();
58 
60 
62  void PrintSelf(ostream& os, vtkIndent indent);
64 
66 
68  void SetButtonProp(int i, vtkProp3D *prop);
69  vtkProp3D *GetButtonProp(int i);
71 
73 
75  vtkSetMacro(FollowCamera,int);
76  vtkGetMacro(FollowCamera,int);
77  vtkBooleanMacro(FollowCamera,int);
79 
81  virtual void SetState(int state);
82 
84 
86  virtual int ComputeInteractionState(int X, int Y, int modify=0);
87  virtual void BuildRepresentation();
89 
92  virtual void PlaceWidget(double bounds[6]);
93 
95 
96  virtual void ShallowCopy(vtkProp *prop);
97  virtual double *GetBounds();
98  virtual void GetActors(vtkPropCollection *pc);
99  virtual void ReleaseGraphicsResources(vtkWindow*);
100  virtual int RenderOpaqueGeometry(vtkViewport*);
101  virtual int RenderVolumetricGeometry(vtkViewport*);
102  virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
103  virtual int HasTranslucentPolygonalGeometry();
105 
106 protected:
109 
110  // The current vtkProp3D used to represent the button
111  vtkProp3D *CurrentProp;
112 
113  // Follow the camera if requested
114  vtkProp3DFollower *Follower;
116 
117  // Keep track of the props associated with the N
118  // states of the button. This is a PIMPLd stl map.
119  vtkPropArray *PropArray;
120 
121  // For picking the button
122  vtkPropPicker *Picker;
123 
124  // Register internal Pickers within PickingManager
125  virtual void RegisterPickers();
126 
127 private:
129  void operator=(const vtkProp3DButtonRepresentation&); //Not implemented
130 };
131 
132 #endif
virtual void SetState(int state)
virtual int ComputeInteractionState(int X, int Y, int modify=0)
virtual void ShallowCopy(vtkProp *prop)
defines a representation for a vtkButtonWidget
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
void PrintSelf(ostream &os, vtkIndent indent)
virtual int HasTranslucentPolygonalGeometry()
virtual void RegisterPickers()
abstract class defines the representation for a vtkButtonWidget
virtual void GetActors(vtkPropCollection *)
virtual int RenderVolumetricGeometry(vtkViewport *vtkNotUsed(viewport))
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
virtual void PlaceWidget(double *vtkNotUsed(bounds[6]))
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))