Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
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
00059 #ifndef __vtkInteractorObserver_h
00060 #define __vtkInteractorObserver_h
00061
00062 #include "vtkObject.h"
00063
00064 class vtkRenderWindowInteractor;
00065 class vtkRenderer;
00066 class vtkCallbackCommand;
00067
00068 class VTK_RENDERING_EXPORT vtkInteractorObserver : public vtkObject
00069 {
00070 public:
00071 vtkTypeRevisionMacro(vtkInteractorObserver,vtkObject);
00072 void PrintSelf(ostream& os, vtkIndent indent);
00073
00075
00081 virtual void SetEnabled(int) = 0;
00082 int GetEnabled() {return this->Enabled;}
00083 void EnabledOn() {this->SetEnabled(1);}
00084 void EnabledOff() {this->SetEnabled(0);}
00085 void On() {this->SetEnabled(1);}
00086 void Off() {this->SetEnabled(0);}
00088
00090
00095 virtual void SetInteractor(vtkRenderWindowInteractor* iren);
00096 vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
00098
00100
00108 vtkSetClampMacro(Priority,float,0.0f,1.0f);
00109 vtkGetMacro(Priority,float);
00111
00113
00117 vtkSetMacro(KeyPressActivation,int);
00118 vtkGetMacro(KeyPressActivation,int);
00119 vtkBooleanMacro(KeyPressActivation,int);
00121
00123
00129 vtkSetMacro(KeyPressActivationValue,char);
00130 vtkGetMacro(KeyPressActivationValue,char);
00132
00134
00139 virtual void SetCurrentRenderer(vtkRenderer*);
00140 vtkGetObjectMacro(CurrentRenderer,vtkRenderer);
00142
00143
00144 virtual void OnChar();
00145
00146 protected:
00147 vtkInteractorObserver();
00148 ~vtkInteractorObserver();
00149
00151
00154 virtual void StartInteraction();
00155 virtual void EndInteraction();
00157
00159
00161 static void ProcessEvents(vtkObject* object,
00162 unsigned long event,
00163 void* clientdata,
00164 void* calldata);
00166
00168
00169 void ComputeDisplayToWorld(double x, double y, double z,
00170 double worldPt[4]);
00171 void ComputeDisplayToWorld(double x, double y, double z,
00172 float worldPt[4]);
00173 void ComputeWorldToDisplay(double x, double y, double z,
00174 double displayPt[3]);
00175 void ComputeWorldToDisplay(double x, double y, double z,
00176 float displayPt[3]);
00178
00179
00180 int Enabled;
00181
00182
00183 vtkCallbackCommand* EventCallbackCommand;
00184 vtkCallbackCommand* KeyPressCallbackCommand;
00185
00186
00187 float Priority;
00188
00189
00190 int KeyPressActivation;
00191 char KeyPressActivationValue;
00192
00193
00194 vtkRenderWindowInteractor *Interactor;
00195
00196
00197 vtkRenderer *CurrentRenderer;
00198
00199 private:
00200 vtkInteractorObserver(const vtkInteractorObserver&);
00201 void operator=(const vtkInteractorObserver&);
00202
00203 };
00204
00205 #endif