00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkPVCameraManipulator_h
00026 #define __vtkPVCameraManipulator_h
00027
00028 #include "vtkObject.h"
00029
00030 class vtkRenderer;
00031 class vtkRenderWindowInteractor;
00032 class vtkPVApplication;
00033
00034 class VTK_EXPORT vtkPVCameraManipulator : public vtkObject
00035 {
00036 public:
00037 static vtkPVCameraManipulator *New();
00038 vtkTypeRevisionMacro(vtkPVCameraManipulator, vtkObject);
00039 void PrintSelf(ostream& os, vtkIndent indent);
00040
00042
00044 virtual void StartInteraction();
00045 virtual void EndInteraction();
00047
00048 virtual void OnMouseMove(int x, int y, vtkRenderer *ren,
00049 vtkRenderWindowInteractor *iren);
00050 virtual void OnButtonDown(int x, int y, vtkRenderer *ren,
00051 vtkRenderWindowInteractor *iren);
00052 virtual void OnButtonUp(int x, int y, vtkRenderer *ren,
00053 vtkRenderWindowInteractor *iren);
00054
00056
00058 vtkSetMacro(Button, int);
00059 vtkGetMacro(Button, int);
00060 vtkSetMacro(Shift, int);
00061 vtkGetMacro(Shift, int);
00062 vtkBooleanMacro(Shift, int);
00063 vtkSetMacro(Control, int);
00064 vtkGetMacro(Control, int);
00065 vtkBooleanMacro(Control, int);
00067
00069
00070 vtkSetVector3Macro(Center, float);
00071 vtkGetVector3Macro(Center, float);
00073
00075
00076 void SetApplication(vtkPVApplication*);
00077 vtkGetObjectMacro(Application, vtkPVApplication);
00079
00081
00082 vtkSetStringMacro(ManipulatorName);
00083 vtkGetStringMacro(ManipulatorName);
00085
00086 protected:
00087 vtkPVCameraManipulator();
00088 ~vtkPVCameraManipulator();
00089
00090 void ResetLights();
00091
00092 char* ManipulatorName;
00093
00094 int Button;
00095 int Shift;
00096 int Control;
00097
00098 float Center[3];
00099 float DisplayCenter[2];
00100 void ComputeDisplayCenter(vtkRenderer *ren);
00101
00102 vtkPVApplication *Application;
00103
00104 private:
00105 vtkPVCameraManipulator(const vtkPVCameraManipulator&);
00106 void operator=(const vtkPVCameraManipulator&);
00107 };
00108
00109 #endif