vtkInteractorObserver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00047 #ifndef __vtkInteractorObserver_h
00048 #define __vtkInteractorObserver_h
00049
00050 #include "vtkObject.h"
00051
00052 class vtkRenderWindowInteractor;
00053 class vtkRenderer;
00054 class vtkCallbackCommand;
00055
00056 class VTK_RENDERING_EXPORT vtkInteractorObserver : public vtkObject
00057 {
00058 public:
00059 vtkTypeRevisionMacro(vtkInteractorObserver,vtkObject);
00060 void PrintSelf(ostream& os, vtkIndent indent);
00061
00063
00069 virtual void SetEnabled(int) = 0;
00070 int GetEnabled() {return this->Enabled;}
00071 void EnabledOn() {this->SetEnabled(1);}
00072 void EnabledOff() {this->SetEnabled(0);}
00073 void On() {this->SetEnabled(1);}
00074 void Off() {this->SetEnabled(0);}
00076
00078
00083 virtual void SetInteractor(vtkRenderWindowInteractor* iren);
00084 vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
00086
00088
00096 vtkSetClampMacro(Priority,float,0.0f,1.0f);
00097 vtkGetMacro(Priority,float);
00099
00101
00105 vtkSetMacro(KeyPressActivation,int);
00106 vtkGetMacro(KeyPressActivation,int);
00107 vtkBooleanMacro(KeyPressActivation,int);
00109
00111
00117 vtkSetMacro(KeyPressActivationValue,char);
00118 vtkGetMacro(KeyPressActivationValue,char);
00120
00122
00127 virtual void SetCurrentRenderer(vtkRenderer*);
00128 vtkGetObjectMacro(CurrentRenderer,vtkRenderer);
00130
00131
00132 virtual void OnChar();
00133
00134 protected:
00135 vtkInteractorObserver();
00136 ~vtkInteractorObserver();
00137
00139
00142 virtual void StartInteraction();
00143 virtual void EndInteraction();
00145
00147
00149 static void ProcessEvents(vtkObject* object,
00150 unsigned long event,
00151 void* clientdata,
00152 void* calldata);
00154
00156
00157 void ComputeDisplayToWorld(double x, double y, double z,
00158 double worldPt[4]);
00159 void ComputeDisplayToWorld(double x, double y, double z,
00160 float worldPt[4]);
00161 void ComputeWorldToDisplay(double x, double y, double z,
00162 double displayPt[3]);
00163 void ComputeWorldToDisplay(double x, double y, double z,
00164 float displayPt[3]);
00166
00167
00168 int Enabled;
00169
00170
00171 vtkCallbackCommand* EventCallbackCommand;
00172 vtkCallbackCommand* KeyPressCallbackCommand;
00173
00174
00175 float Priority;
00176
00177
00178 int KeyPressActivation;
00179 char KeyPressActivationValue;
00180
00181
00182 vtkRenderWindowInteractor *Interactor;
00183
00184
00185 vtkRenderer *CurrentRenderer;
00186
00187 private:
00188 vtkInteractorObserver(const vtkInteractorObserver&);
00189 void operator=(const vtkInteractorObserver&);
00190
00191 };
00192
00193 #endif