Rendering/vtkInteractorObserver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00058 #ifndef __vtkInteractorObserver_h
00059 #define __vtkInteractorObserver_h
00060
00061 #include "vtkObject.h"
00062
00063 class vtkRenderWindowInteractor;
00064 class vtkRenderer;
00065 class vtkCallbackCommand;
00066
00067 class VTK_RENDERING_EXPORT vtkInteractorObserver : public vtkObject
00068 {
00069 public:
00070 vtkTypeRevisionMacro(vtkInteractorObserver,vtkObject);
00071 void PrintSelf(ostream& os, vtkIndent indent);
00072
00074
00080 virtual void SetEnabled(int) = 0;
00081 int GetEnabled() {return this->Enabled;}
00082 void EnabledOn() {this->SetEnabled(1);}
00083 void EnabledOff() {this->SetEnabled(0);}
00084 void On() {this->SetEnabled(1);}
00085 void Off() {this->SetEnabled(0);}
00087
00089
00094 virtual void SetInteractor(vtkRenderWindowInteractor* iren);
00095 vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
00097
00099
00107 vtkSetClampMacro(Priority,float,0.0f,1.0f);
00108 vtkGetMacro(Priority,float);
00110
00112
00116 vtkSetMacro(KeyPressActivation,int);
00117 vtkGetMacro(KeyPressActivation,int);
00118 vtkBooleanMacro(KeyPressActivation,int);
00120
00122
00128 vtkSetMacro(KeyPressActivationValue,char);
00129 vtkGetMacro(KeyPressActivationValue,char);
00131
00133
00138 virtual void SetCurrentRenderer(vtkRenderer*);
00139 vtkGetObjectMacro(CurrentRenderer,vtkRenderer);
00141
00142
00143 virtual void OnChar();
00144
00145 protected:
00146 vtkInteractorObserver();
00147 ~vtkInteractorObserver();
00148
00150
00153 virtual void StartInteraction();
00154 virtual void EndInteraction();
00156
00158
00160 static void ProcessEvents(vtkObject* object,
00161 unsigned long event,
00162 void* clientdata,
00163 void* calldata);
00165
00167
00168 void ComputeDisplayToWorld(double x, double y, double z,
00169 double worldPt[4]);
00170 void ComputeDisplayToWorld(double x, double y, double z,
00171 float worldPt[4]);
00172 void ComputeWorldToDisplay(double x, double y, double z,
00173 double displayPt[3]);
00174 void ComputeWorldToDisplay(double x, double y, double z,
00175 float displayPt[3]);
00177
00178
00179 int Enabled;
00180
00181
00182 vtkCallbackCommand* EventCallbackCommand;
00183 vtkCallbackCommand* KeyPressCallbackCommand;
00184
00185
00186 float Priority;
00187
00188
00189 int KeyPressActivation;
00190 char KeyPressActivationValue;
00191
00192
00193 vtkRenderWindowInteractor *Interactor;
00194
00195
00196 vtkRenderer *CurrentRenderer;
00197
00198 private:
00199 vtkInteractorObserver(const vtkInteractorObserver&);
00200 void operator=(const vtkInteractorObserver&);
00201
00202 };
00203
00204 #endif