VTK  9.1.0
vtkRenderWindowInteractor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRenderWindowInteractor.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 =========================================================================*/
154 #ifndef vtkRenderWindowInteractor_h
155 #define vtkRenderWindowInteractor_h
156 
157 #include "vtkCommand.h" // for method sig
158 #include "vtkObject.h"
159 #include "vtkRenderingCoreModule.h" // For export macro
160 
161 class vtkTimerIdMap;
162 
163 // Timer flags for win32/X compatibility
164 #define VTKI_TIMER_FIRST 0
165 #define VTKI_TIMER_UPDATE 1
166 
167 // maximum pointers active at once
168 // for example in multitouch
169 #define VTKI_MAX_POINTERS 5
170 
171 class vtkAbstractPicker;
173 class vtkAssemblyPath;
174 class vtkHardwareWindow;
176 class vtkRenderWindow;
177 class vtkRenderer;
178 class vtkObserverMediator;
180 class vtkPickingManager;
181 
182 class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
183 {
184 
186 
187 public:
190  void PrintSelf(ostream& os, vtkIndent indent) override;
191 
193 
200  virtual void Initialize();
202  {
203  this->Initialized = 0;
204  this->Enabled = 0;
205  this->Initialize();
206  }
208 
213  void UnRegister(vtkObjectBase* o) override;
214 
220  virtual void Start();
221 
227  virtual void ProcessEvents() {}
228 
232  vtkGetMacro(Done, bool);
233  vtkSetMacro(Done, bool);
234 
244  virtual void Enable()
245  {
246  this->Enabled = 1;
247  this->Modified();
248  }
249  virtual void Disable()
250  {
251  this->Enabled = 0;
252  this->Modified();
253  }
254  vtkGetMacro(Enabled, int);
255 
257 
261  vtkBooleanMacro(EnableRender, bool);
262  vtkSetMacro(EnableRender, bool);
263  vtkGetMacro(EnableRender, bool);
265 
267 
271  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
273 
275 
281  vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
283 
291  virtual void UpdateSize(int x, int y);
292 
309  virtual int CreateTimer(int timerType); // first group, for backward compatibility
310  virtual int DestroyTimer(); // first group, for backward compatibility
311 
316  int CreateRepeatingTimer(unsigned long duration);
317 
322  int CreateOneShotTimer(unsigned long duration);
323 
328  int IsOneShotTimer(int timerId);
329 
333  unsigned long GetTimerDuration(int timerId);
334 
338  int ResetTimer(int timerId);
339 
344  int DestroyTimer(int timerId);
345 
349  virtual int GetVTKTimerId(int platformTimerId);
350 
351  // Moved into the public section of the class so that classless timer procs
352  // can access these enum members without being "friends"...
353  enum
354  {
355  OneShotTimer = 1,
356  RepeatingTimer
357  };
358 
360 
369  vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
370  vtkGetMacro(TimerDuration, unsigned long);
372 
374 
386  vtkSetMacro(TimerEventId, int);
387  vtkGetMacro(TimerEventId, int);
388  vtkSetMacro(TimerEventType, int);
389  vtkGetMacro(TimerEventType, int);
390  vtkSetMacro(TimerEventDuration, int);
391  vtkGetMacro(TimerEventDuration, int);
392  vtkSetMacro(TimerEventPlatformId, int);
393  vtkGetMacro(TimerEventPlatformId, int);
395 
401  virtual void TerminateApp(void) { this->Done = true; }
402 
404 
409  vtkGetObjectMacro(InteractorStyle, vtkInteractorObserver);
411 
413 
417  vtkSetMacro(LightFollowCamera, vtkTypeBool);
418  vtkGetMacro(LightFollowCamera, vtkTypeBool);
419  vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
421 
423 
430  vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
431  vtkGetMacro(DesiredUpdateRate, double);
433 
435 
440  vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
441  vtkGetMacro(StillUpdateRate, double);
443 
445 
449  vtkGetMacro(Initialized, int);
451 
453 
459  virtual void SetPicker(vtkAbstractPicker*);
460  vtkGetObjectMacro(Picker, vtkAbstractPicker);
462 
468 
470 
476  vtkGetObjectMacro(PickingManager, vtkPickingManager);
478 
480 
484  virtual void ExitCallback();
485  virtual void UserCallback();
486  virtual void StartPickCallback();
487  virtual void EndPickCallback();
489 
493  virtual void GetMousePosition(int* x, int* y)
494  {
495  *x = 0;
496  *y = 0;
497  }
498 
500 
504  void HideCursor();
505  void ShowCursor();
507 
512  virtual void Render();
513 
515 
520  void FlyTo(vtkRenderer* ren, double x, double y, double z);
521  void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
522  void FlyToImage(vtkRenderer* ren, double x, double y);
523  void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
525 
527 
530  vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
531  vtkGetMacro(NumberOfFlyFrames, int);
533 
535 
539  vtkSetMacro(Dolly, double);
540  vtkGetMacro(Dolly, double);
542 
544 
552  vtkGetVector2Macro(EventPosition, int);
553  vtkGetVector2Macro(LastEventPosition, int);
554  vtkSetVector2Macro(LastEventPosition, int);
555  virtual void SetEventPosition(int x, int y)
556  {
557  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
558  << "," << y << ")");
559  if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
560  this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
561  {
562  this->LastEventPosition[0] = this->EventPosition[0];
563  this->LastEventPosition[1] = this->EventPosition[1];
564  this->EventPosition[0] = x;
565  this->EventPosition[1] = y;
566  this->Modified();
567  }
568  }
569  virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
570  virtual void SetEventPositionFlipY(int x, int y)
571  {
572  this->SetEventPosition(x, this->Size[1] - y - 1);
573  }
574  virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
576 
577  virtual int* GetEventPositions(int pointerIndex)
578  {
579  if (pointerIndex >= VTKI_MAX_POINTERS)
580  {
581  return nullptr;
582  }
583  return this->EventPositions[pointerIndex];
584  }
585  virtual int* GetLastEventPositions(int pointerIndex)
586  {
587  if (pointerIndex >= VTKI_MAX_POINTERS)
588  {
589  return nullptr;
590  }
591  return this->LastEventPositions[pointerIndex];
592  }
593  virtual void SetEventPosition(int x, int y, int pointerIndex)
594  {
595  if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
596  {
597  return;
598  }
599  if (pointerIndex == 0)
600  {
601  this->LastEventPosition[0] = this->EventPosition[0];
602  this->LastEventPosition[1] = this->EventPosition[1];
603  this->EventPosition[0] = x;
604  this->EventPosition[1] = y;
605  }
606  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
607  << "," << y << ") for pointerIndex number " << pointerIndex);
608  if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
609  this->LastEventPositions[pointerIndex][0] != x ||
610  this->LastEventPositions[pointerIndex][1] != y)
611  {
612  this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
613  this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
614  this->EventPositions[pointerIndex][0] = x;
615  this->EventPositions[pointerIndex][1] = y;
616  this->Modified();
617  }
618  }
619  virtual void SetEventPosition(int pos[2], int pointerIndex)
620  {
621  this->SetEventPosition(pos[0], pos[1], pointerIndex);
622  }
623  virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
624  {
625  this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
626  }
627  virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
628  {
629  this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
630  }
631 
633 
636  vtkSetMacro(AltKey, int);
637  vtkGetMacro(AltKey, int);
639 
641 
644  vtkSetMacro(ControlKey, int);
645  vtkGetMacro(ControlKey, int);
647 
649 
652  vtkSetMacro(ShiftKey, int);
653  vtkGetMacro(ShiftKey, int);
655 
657 
660  vtkSetMacro(KeyCode, char);
661  vtkGetMacro(KeyCode, char);
663 
665 
669  vtkSetMacro(RepeatCount, int);
670  vtkGetMacro(RepeatCount, int);
672 
674 
680  vtkSetStringMacro(KeySym);
681  vtkGetStringMacro(KeySym);
683 
685 
688  vtkSetMacro(PointerIndex, int);
689  vtkGetMacro(PointerIndex, int);
691 
693 
696  void SetRotation(double rotation);
697  vtkGetMacro(Rotation, double);
698  vtkGetMacro(LastRotation, double);
700 
702 
705  void SetScale(double scale);
706  vtkGetMacro(Scale, double);
707  vtkGetMacro(LastScale, double);
709 
711 
714  void SetTranslation(double val[2]);
715  vtkGetVector2Macro(Translation, double);
716  vtkGetVector2Macro(LastTranslation, double);
718 
720 
723  void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
724  const char* keysym, int pointerIndex)
725  {
726  this->SetEventPosition(x, y, pointerIndex);
727  this->ControlKey = ctrl;
728  this->ShiftKey = shift;
729  this->KeyCode = keycode;
730  this->RepeatCount = repeatcount;
731  this->PointerIndex = pointerIndex;
732  if (keysym)
733  {
734  this->SetKeySym(keysym);
735  }
736  this->Modified();
737  }
738  void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
739  int repeatcount = 0, const char* keysym = nullptr)
740  {
741  this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
742  }
744 
746 
750  void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
751  const char* keysym, int pointerIndex)
752  {
753  this->SetEventInformation(
754  x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
755  }
756  void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
757  int repeatcount = 0, const char* keysym = nullptr)
758  {
759  this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
760  }
762 
764 
767  void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
768  const char* keysym = nullptr)
769  {
770  this->ControlKey = ctrl;
771  this->ShiftKey = shift;
772  this->KeyCode = keycode;
773  this->RepeatCount = repeatcount;
774  if (keysym)
775  {
776  this->SetKeySym(keysym);
777  }
778  this->Modified();
779  }
781 
783 
794  vtkSetVector2Macro(Size, int);
795  vtkGetVector2Macro(Size, int);
796  vtkSetVector2Macro(EventSize, int);
797  vtkGetVector2Macro(EventSize, int);
799 
805  virtual vtkRenderer* FindPokedRenderer(int, int);
806 
815 
817 
825  vtkSetMacro(UseTDx, bool);
826  vtkGetMacro(UseTDx, bool);
828 
830 
835  virtual void MouseMoveEvent();
836  virtual void RightButtonPressEvent();
837  virtual void RightButtonReleaseEvent();
838  virtual void LeftButtonPressEvent();
839  virtual void LeftButtonReleaseEvent();
840  virtual void MiddleButtonPressEvent();
841  virtual void MiddleButtonReleaseEvent();
842  virtual void MouseWheelForwardEvent();
843  virtual void MouseWheelBackwardEvent();
844  virtual void MouseWheelLeftEvent();
845  virtual void MouseWheelRightEvent();
846  virtual void ExposeEvent();
847  virtual void ConfigureEvent();
848  virtual void EnterEvent();
849  virtual void LeaveEvent();
850  virtual void KeyPressEvent();
851  virtual void KeyReleaseEvent();
852  virtual void CharEvent();
853  virtual void ExitEvent();
854  virtual void FourthButtonPressEvent();
855  virtual void FourthButtonReleaseEvent();
856  virtual void FifthButtonPressEvent();
857  virtual void FifthButtonReleaseEvent();
859 
861 
865  virtual void StartPinchEvent();
866  virtual void PinchEvent();
867  virtual void EndPinchEvent();
868  virtual void StartRotateEvent();
869  virtual void RotateEvent();
870  virtual void EndRotateEvent();
871  virtual void StartPanEvent();
872  virtual void PanEvent();
873  virtual void EndPanEvent();
874  virtual void TapEvent();
875  virtual void LongTapEvent();
876  virtual void SwipeEvent();
878 
880 
886  vtkSetMacro(RecognizeGestures, bool);
887  vtkGetMacro(RecognizeGestures, bool);
889 
891 
896  vtkGetMacro(PointersDownCount, int);
898 
900 
907  void ClearContact(size_t contactID);
908  int GetPointerIndexForContact(size_t contactID);
909  int GetPointerIndexForExistingContact(size_t contactID);
910  bool IsPointerIndexSet(int i);
911  void ClearPointerIndex(int i);
913 
914 protected:
917 
921 
922  // Used as a helper object to pick instances of vtkProp
925 
926  bool Done; // is the event loop done running
927 
933 
935  int Enabled;
937  int Style;
942 
943  // Event information
944  int AltKey;
946  int ShiftKey;
947  char KeyCode;
948  double Rotation;
949  double LastRotation;
950  double Scale;
951  double LastScale;
952  double Translation[2];
953  double LastTranslation[2];
955  char* KeySym;
956  int EventPosition[2];
957  int LastEventPosition[2];
958  int EventSize[2];
959  int Size[2];
964 
965  int EventPositions[VTKI_MAX_POINTERS][2];
966  int LastEventPositions[VTKI_MAX_POINTERS][2];
968 
969  size_t PointerIndexLookup[VTKI_MAX_POINTERS];
970 
971  // control the fly to
973  double Dolly;
974 
983  friend class vtkInteractorObserver;
984  void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
985  {
986  this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
987  }
989 
994 
995  // Timer related members
996  friend struct vtkTimerStruct;
997  vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
998  unsigned long TimerDuration; // in milliseconds
1000 
1006  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
1007  virtual int InternalDestroyTimer(int platformTimerId);
1010 
1011  // Force the interactor to handle the Start() event loop, ignoring any
1012  // overrides. (Overrides are registered by observing StartEvent on the
1013  // interactor.)
1015 
1019  virtual void StartEventLoop() {}
1020 
1021  bool UseTDx; // 3DConnexion device.
1022 
1023  // when recognizing gestures VTK will take multitouch events
1024  // if it receives them and convert them to gestures
1027  int PointersDown[VTKI_MAX_POINTERS];
1029  int StartingEventPositions[VTKI_MAX_POINTERS][2];
1031 
1032 private:
1034  void operator=(const vtkRenderWindowInteractor&) = delete;
1035 };
1036 
1037 #endif
define API for picking subclasses
abstract API for pickers that can pick an instance of vtkProp
a list of nodes that form an assembly path
superclass for callback/observer methods
Definition: vtkCommand.h:394
create a window for renderers to draw into
a simple class to control print indentation
Definition: vtkIndent.h:113
record and play VTK events passing through a vtkRenderWindowInteractor
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
abstract base class for most VTK objects
Definition: vtkObjectBase.h:70
const char * GetClassName() const
Return the class name as a string.
abstract base class for most VTK objects
Definition: vtkObject.h:73
void InternalReleaseFocus()
These methods allow a command to exclusively grab all events.
void InternalGrabFocus(vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
These methods allow a command to exclusively grab all events.
virtual void Modified()
Update the modification time for this object.
manage contention for cursors and other resources
Class defines API to manage the picking process.
platform-independent render window interaction including picking and frame rate control.
unsigned long GetTimerDuration(int timerId)
Get the duration (in milliseconds) for the specified timerId.
void HideCursor()
Hide or show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void StartEventLoop()
Run the event loop (does not return until TerminateApp is called).
virtual void FourthButtonReleaseEvent()
Fire various events.
virtual void PinchEvent()
Fire various gesture based events.
virtual void SwipeEvent()
Fire various gesture based events.
virtual void StartRotateEvent()
Fire various gesture based events.
void SetRenderWindow(vtkRenderWindow *aren)
Set/Get the rendering window being controlled by this object.
void SetKeyEventInformation(int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=nullptr)
Set all the keyboard-related event information in one call.
void UnRegister(vtkObjectBase *o) override
This Method detects loops of RenderWindow-Interactor, so objects are freed properly.
virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
virtual void EndPinchEvent()
Fire various gesture based events.
virtual void KeyReleaseEvent()
Fire various events.
virtual void EndPickCallback()
These methods correspond to the Exit, User and Pick callbacks.
virtual void Enable()
Enable/Disable interactions.
virtual int InternalDestroyTimer(int platformTimerId)
Internal methods for creating and destroying timers that must be implemented by subclasses.
int CreateRepeatingTimer(unsigned long duration)
Create a repeating timer, with the specified duration (in milliseconds).
virtual vtkAbstractPropPicker * CreateDefaultPicker()
Create default picker.
vtkObserverMediator * ObserverMediator
Widget mediators are used to resolve contention for cursors and other resources.
virtual void EndRotateEvent()
Fire various gesture based events.
virtual void ExitEvent()
Fire various events.
void FlyToImage(vtkRenderer *ren, double x, double y)
Given a position x, move the current camera's focal point to x.
void SetRotation(double rotation)
Set/get the rotation for the gesture in degrees, update LastRotation.
virtual void ExposeEvent()
Fire various events.
virtual void EndPanEvent()
Fire various gesture based events.
virtual void Render()
Render the scene.
virtual void MouseWheelLeftEvent()
Fire various events.
virtual void MouseWheelForwardEvent()
Fire various events.
virtual void SetEventPosition(int x, int y)
Set/Get information about the current event.
virtual void UserCallback()
These methods correspond to the Exit, User and Pick callbacks.
void SetHardwareWindow(vtkHardwareWindow *aren)
Set/Get the hardware window being controlled by this object.
virtual void LeftButtonReleaseEvent()
Fire various events.
virtual void CharEvent()
Fire various events.
virtual int DestroyTimer()
int IsOneShotTimer(int timerId)
Query whether the specified timerId is a one shot timer.
void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount, const char *keysym, int pointerIndex)
Set all the event information in one call.
vtkObserverMediator * GetObserverMediator()
Return the object used to mediate between vtkInteractorObservers contending for resources.
virtual void TerminateApp(void)
This function is called on 'q','e' keypress if exitmethod is not specified and should be overridden b...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void UpdateSize(int x, int y)
Event loop notification member for window size change.
virtual int * GetEventPositions(int pointerIndex)
virtual void LeaveEvent()
Fire various events.
virtual void FourthButtonPressEvent()
Fire various events.
virtual void MouseWheelRightEvent()
Fire various events.
virtual void EnterEvent()
Fire various events.
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
Internal methods for creating and destroying timers that must be implemented by subclasses.
static vtkRenderWindowInteractor * New()
~vtkRenderWindowInteractor() override
virtual void RightButtonPressEvent()
Fire various events.
virtual void Start()
Start the event loop.
void SetEventInformation(int x, int y, int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=nullptr)
Set all the event information in one call.
void ShowCursor()
Hide or show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual vtkPickingManager * CreateDefaultPickingManager()
Create default pickingManager.
virtual void ConfigureEvent()
Fire various events.
virtual void FifthButtonPressEvent()
Fire various events.
virtual vtkRenderer * FindPokedRenderer(int, int)
When an event occurs, we must determine which Renderer the event occurred within, since one RenderWin...
virtual void StartPanEvent()
Fire various gesture based events.
virtual int CreateTimer(int timerType)
This class provides two groups of methods for manipulating timers.
int ResetTimer(int timerId)
Reset the specified timer.
int GetCurrentTimerId()
Internal methods for creating and destroying timers that must be implemented by subclasses.
virtual void MouseWheelBackwardEvent()
Fire various events.
virtual void SetInteractorStyle(vtkInteractorObserver *)
External switching between joystick/trackball/new? modes.
void ClearContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
void FlyTo(vtkRenderer *ren, double x, double y, double z)
Given a position x, move the current camera's focal point to x.
int CreateOneShotTimer(unsigned long duration)
Create a one shot timer, with the specified duration (in milliseconds).
void ReInitialize()
Prepare for handling events and set the Enabled flag to true.
virtual void ExitCallback()
These methods correspond to the Exit, User and Pick callbacks.
void SetEventInformationFlipY(int x, int y, int ctrl=0, int shift=0, char keycode=0, int repeatcount=0, const char *keysym=nullptr)
Calls SetEventInformation, but flips the Y based on the current Size[1] value (i.e.
int DestroyTimer(int timerId)
Destroy the timer specified by timerId.
void SetTranslation(double val[2])
Set/get the translation for pan/swipe gestures, update LastTranslation.
void FlyToImage(vtkRenderer *ren, double *x)
Given a position x, move the current camera's focal point to x.
virtual void PanEvent()
Fire various gesture based events.
virtual void ProcessEvents()
Run the event loop and return.
virtual void RightButtonReleaseEvent()
Fire various events.
virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount, const char *keysym, int pointerIndex)
Calls SetEventInformation, but flips the Y based on the current Size[1] value (i.e.
virtual void GetMousePosition(int *x, int *y)
Get the current position of the mouse.
virtual void SetEventPositionFlipY(int x, int y)
Set/Get information about the current event.
int GetPointerIndexForContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void FifthButtonReleaseEvent()
Fire various events.
bool IsPointerIndexSet(int i)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void LeftButtonPressEvent()
Fire various events.
void GrabFocus(vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
virtual void MiddleButtonPressEvent()
Fire various events.
virtual int * GetLastEventPositions(int pointerIndex)
virtual void StartPickCallback()
These methods correspond to the Exit, User and Pick callbacks.
int GetPointerIndexForExistingContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void MouseMoveEvent()
Fire various events.
void FlyTo(vtkRenderer *ren, double *x)
Given a position x, move the current camera's focal point to x.
vtkInteractorObserver * InteractorStyle
virtual void StartPinchEvent()
Fire various gesture based events.
virtual void SetEventPosition(int pos[2])
Set/Get information about the current event.
virtual void SetPicker(vtkAbstractPicker *)
Set/Get the object used to perform pick operations.
virtual int GetVTKTimerId(int platformTimerId)
Get the VTK timer ID that corresponds to the supplied platform ID.
void SetScale(double scale)
Set/get the scale for the gesture, updates LastScale.
virtual void Initialize()
Prepare for handling events and set the Enabled flag to true.
virtual void RotateEvent()
Fire various gesture based events.
virtual void TapEvent()
Fire various gesture based events.
virtual void SetEventPositionFlipY(int pos[2])
Set/Get information about the current event.
virtual void SetEventPosition(int x, int y, int pointerIndex)
void ClearPointerIndex(int i)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
virtual void LongTapEvent()
Fire various gesture based events.
virtual void MiddleButtonReleaseEvent()
Fire various events.
virtual void RecognizeGesture(vtkCommand::EventIds)
virtual void SetEventPosition(int pos[2], int pointerIndex)
virtual void SetPickingManager(vtkPickingManager *)
Set the picking manager.
virtual void KeyPressEvent()
Fire various events.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:173
@ scale
Definition: vtkX3D.h:235
@ rotation
Definition: vtkX3D.h:234
int vtkTypeBool
Definition: vtkABI.h:69
#define VTKI_MAX_POINTERS
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163