VTK  9.2.6
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=========================================================================*/
163#ifndef vtkRenderWindowInteractor_h
164#define vtkRenderWindowInteractor_h
165
166#include "vtkCommand.h" // for method sig
167#include "vtkObject.h"
168#include "vtkRenderingCoreModule.h" // For export macro
169#include "vtkSmartPointer.h" // For InteractorStyle
170
171class vtkTimerIdMap;
172
173// Timer flags for win32/X compatibility
174#define VTKI_TIMER_FIRST 0
175#define VTKI_TIMER_UPDATE 1
176
177// maximum pointers active at once
178// for example in multitouch
179#define VTKI_MAX_POINTERS 5
180
183class vtkAssemblyPath;
186class vtkRenderWindow;
187class vtkRenderer;
191
192class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
193{
194
196
197public:
200 void PrintSelf(ostream& os, vtkIndent indent) override;
201
203
210 virtual void Initialize();
212 {
213 this->Initialized = 0;
214 this->Enabled = 0;
215 this->Initialize();
216 }
218
223 void UnRegister(vtkObjectBase* o) override;
224
230 virtual void Start();
231
237 virtual void ProcessEvents() {}
238
242 vtkGetMacro(Done, bool);
243 vtkSetMacro(Done, bool);
244
254 virtual void Enable()
255 {
256 this->Enabled = 1;
257 this->Modified();
258 }
259 virtual void Disable()
260 {
261 this->Enabled = 0;
262 this->Modified();
263 }
264 vtkGetMacro(Enabled, int);
265
267
271 vtkBooleanMacro(EnableRender, bool);
272 vtkSetMacro(EnableRender, bool);
273 vtkGetMacro(EnableRender, bool);
275
277
281 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
283
285
291 vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
293
301 virtual void UpdateSize(int x, int y);
302
319 virtual int CreateTimer(int timerType); // first group, for backward compatibility
320 virtual int DestroyTimer(); // first group, for backward compatibility
321
326 int CreateRepeatingTimer(unsigned long duration);
327
332 int CreateOneShotTimer(unsigned long duration);
333
338 int IsOneShotTimer(int timerId);
339
343 unsigned long GetTimerDuration(int timerId);
344
348 int ResetTimer(int timerId);
349
354 int DestroyTimer(int timerId);
355
359 virtual int GetVTKTimerId(int platformTimerId);
360
361 // Moved into the public section of the class so that classless timer procs
362 // can access these enum members without being "friends"...
363 enum
364 {
365 OneShotTimer = 1,
366 RepeatingTimer
367 };
368
370
379 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
380 vtkGetMacro(TimerDuration, unsigned long);
382
384
396 vtkSetMacro(TimerEventId, int);
397 vtkGetMacro(TimerEventId, int);
398 vtkSetMacro(TimerEventType, int);
399 vtkGetMacro(TimerEventType, int);
400 vtkSetMacro(TimerEventDuration, int);
401 vtkGetMacro(TimerEventDuration, int);
402 vtkSetMacro(TimerEventPlatformId, int);
403 vtkGetMacro(TimerEventPlatformId, int);
405
411 virtual void TerminateApp(void) { this->Done = true; }
412
414
421
423
427 vtkSetMacro(LightFollowCamera, vtkTypeBool);
428 vtkGetMacro(LightFollowCamera, vtkTypeBool);
429 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
431
433
440 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
441 vtkGetMacro(DesiredUpdateRate, double);
443
445
450 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
451 vtkGetMacro(StillUpdateRate, double);
453
455
459 vtkGetMacro(Initialized, int);
461
463
470 vtkGetObjectMacro(Picker, vtkAbstractPicker);
472
478
480
486 vtkGetObjectMacro(PickingManager, vtkPickingManager);
488
490
494 virtual void ExitCallback();
495 virtual void UserCallback();
496 virtual void StartPickCallback();
497 virtual void EndPickCallback();
499
503 virtual void GetMousePosition(int* x, int* y)
504 {
505 *x = 0;
506 *y = 0;
507 }
508
510
517
522 virtual void Render();
523
525
530 void FlyTo(vtkRenderer* ren, double x, double y, double z);
531 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
532 void FlyToImage(vtkRenderer* ren, double x, double y);
533 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
535
537
540 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
541 vtkGetMacro(NumberOfFlyFrames, int);
543
545
549 vtkSetMacro(Dolly, double);
550 vtkGetMacro(Dolly, double);
552
554
562 vtkGetVector2Macro(EventPosition, int);
563 vtkGetVector2Macro(LastEventPosition, int);
564 vtkSetVector2Macro(LastEventPosition, int);
565 virtual void SetEventPosition(int x, int y)
566 {
567 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
568 << "," << y << ")");
569 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
570 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
571 {
572 this->LastEventPosition[0] = this->EventPosition[0];
573 this->LastEventPosition[1] = this->EventPosition[1];
574 this->EventPosition[0] = x;
575 this->EventPosition[1] = y;
576 this->Modified();
577 }
578 }
579 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
580 virtual void SetEventPositionFlipY(int x, int y)
581 {
582 this->SetEventPosition(x, this->Size[1] - y - 1);
583 }
584 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
586
587 virtual int* GetEventPositions(int pointerIndex)
588 {
589 if (pointerIndex >= VTKI_MAX_POINTERS)
590 {
591 return nullptr;
592 }
593 return this->EventPositions[pointerIndex];
594 }
595 virtual int* GetLastEventPositions(int pointerIndex)
596 {
597 if (pointerIndex >= VTKI_MAX_POINTERS)
598 {
599 return nullptr;
600 }
601 return this->LastEventPositions[pointerIndex];
602 }
603 virtual void SetEventPosition(int x, int y, int pointerIndex)
604 {
605 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
606 {
607 return;
608 }
609 if (pointerIndex == 0)
610 {
611 this->LastEventPosition[0] = this->EventPosition[0];
612 this->LastEventPosition[1] = this->EventPosition[1];
613 this->EventPosition[0] = x;
614 this->EventPosition[1] = y;
615 }
616 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
617 << "," << y << ") for pointerIndex number " << pointerIndex);
618 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
619 this->LastEventPositions[pointerIndex][0] != x ||
620 this->LastEventPositions[pointerIndex][1] != y)
621 {
622 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
623 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
624 this->EventPositions[pointerIndex][0] = x;
625 this->EventPositions[pointerIndex][1] = y;
626 this->Modified();
627 }
628 }
629 virtual void SetEventPosition(int pos[2], int pointerIndex)
630 {
631 this->SetEventPosition(pos[0], pos[1], pointerIndex);
632 }
633 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
634 {
635 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
636 }
637 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
638 {
639 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
640 }
641
643
646 vtkSetMacro(AltKey, int);
647 vtkGetMacro(AltKey, int);
649
651
654 vtkSetMacro(ControlKey, int);
655 vtkGetMacro(ControlKey, int);
657
659
662 vtkSetMacro(ShiftKey, int);
663 vtkGetMacro(ShiftKey, int);
665
667
670 vtkSetMacro(KeyCode, char);
671 vtkGetMacro(KeyCode, char);
673
675
679 vtkSetMacro(RepeatCount, int);
680 vtkGetMacro(RepeatCount, int);
682
684
690 vtkSetStringMacro(KeySym);
691 vtkGetStringMacro(KeySym);
693
695
698 vtkSetMacro(PointerIndex, int);
699 vtkGetMacro(PointerIndex, int);
701
703
706 void SetRotation(double rotation);
707 vtkGetMacro(Rotation, double);
708 vtkGetMacro(LastRotation, double);
710
712
715 void SetScale(double scale);
716 vtkGetMacro(Scale, double);
717 vtkGetMacro(LastScale, double);
719
721
724 void SetTranslation(double val[2]);
725 vtkGetVector2Macro(Translation, double);
726 vtkGetVector2Macro(LastTranslation, double);
728
730
733 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
734 const char* keysym, int pointerIndex)
735 {
736 this->SetEventPosition(x, y, pointerIndex);
737 this->ControlKey = ctrl;
738 this->ShiftKey = shift;
739 this->KeyCode = keycode;
740 this->RepeatCount = repeatcount;
741 this->PointerIndex = pointerIndex;
742 if (keysym)
743 {
744 this->SetKeySym(keysym);
745 }
746 this->Modified();
747 }
748 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
749 int repeatcount = 0, const char* keysym = nullptr)
750 {
751 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
752 }
754
756
760 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
761 const char* keysym, int pointerIndex)
762 {
763 this->SetEventInformation(
764 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
765 }
766 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
767 int repeatcount = 0, const char* keysym = nullptr)
768 {
769 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
770 }
772
774
777 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
778 const char* keysym = nullptr)
779 {
780 this->ControlKey = ctrl;
781 this->ShiftKey = shift;
782 this->KeyCode = keycode;
783 this->RepeatCount = repeatcount;
784 if (keysym)
785 {
786 this->SetKeySym(keysym);
787 }
788 this->Modified();
789 }
791
793
804 vtkSetVector2Macro(Size, int);
805 vtkGetVector2Macro(Size, int);
806 vtkSetVector2Macro(EventSize, int);
807 vtkGetVector2Macro(EventSize, int);
809
815 virtual vtkRenderer* FindPokedRenderer(int, int);
816
825
827
835 vtkSetMacro(UseTDx, bool);
836 vtkGetMacro(UseTDx, bool);
838
840
845 virtual void MouseMoveEvent();
846 virtual void RightButtonPressEvent();
848 virtual void LeftButtonPressEvent();
854 virtual void MouseWheelLeftEvent();
855 virtual void MouseWheelRightEvent();
856 virtual void ExposeEvent();
857 virtual void ConfigureEvent();
858 virtual void EnterEvent();
859 virtual void LeaveEvent();
860 virtual void KeyPressEvent();
861 virtual void KeyReleaseEvent();
862 virtual void CharEvent();
863 virtual void ExitEvent();
866 virtual void FifthButtonPressEvent();
869
871
875 virtual void StartPinchEvent();
876 virtual void PinchEvent();
877 virtual void EndPinchEvent();
878 virtual void StartRotateEvent();
879 virtual void RotateEvent();
880 virtual void EndRotateEvent();
881 virtual void StartPanEvent();
882 virtual void PanEvent();
883 virtual void EndPanEvent();
884 virtual void TapEvent();
885 virtual void LongTapEvent();
886 virtual void SwipeEvent();
888
890
896 vtkSetMacro(RecognizeGestures, bool);
897 vtkGetMacro(RecognizeGestures, bool);
899
901
906 vtkGetMacro(PointersDownCount, int);
908
910
917 void ClearContact(size_t contactID);
918 int GetPointerIndexForContact(size_t contactID);
920 bool IsPointerIndexSet(int i);
921 void ClearPointerIndex(int i);
923
924protected:
927
931
932 // Used as a helper object to pick instances of vtkProp
935
936 bool Done; // is the event loop done running
937
943
947 int Style;
952
953 // Event information
958 double Rotation;
960 double Scale;
961 double LastScale;
962 double Translation[2];
963 double LastTranslation[2];
965 char* KeySym;
966 int EventPosition[2];
967 int LastEventPosition[2];
968 int EventSize[2];
969 int Size[2];
974
975 int EventPositions[VTKI_MAX_POINTERS][2];
976 int LastEventPositions[VTKI_MAX_POINTERS][2];
978
979 size_t PointerIndexLookup[VTKI_MAX_POINTERS];
980
981 // control the fly to
983 double Dolly;
984
994 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
995 {
996 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
997 }
999
1004
1005 // Timer related members
1006 friend struct vtkTimerStruct;
1007 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
1008 unsigned long TimerDuration; // in milliseconds
1010
1016 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
1017 virtual int InternalDestroyTimer(int platformTimerId);
1020
1021 // Force the interactor to handle the Start() event loop, ignoring any
1022 // overrides. (Overrides are registered by observing StartEvent on the
1023 // interactor.)
1025
1029 virtual void StartEventLoop() {}
1030
1031 bool UseTDx; // 3DConnexion device.
1032
1033 // when recognizing gestures VTK will take multitouch events
1034 // if it receives them and convert them to gestures
1037 int PointersDown[VTKI_MAX_POINTERS];
1039 int StartingEventPositions[VTKI_MAX_POINTERS][2];
1041
1042private:
1044 void operator=(const vtkRenderWindowInteractor&) = delete;
1045};
1046
1047#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:395
create a window for renderers to draw into
a simple class to control print indentation
Definition: vtkIndent.h:119
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:74
const char * GetClassName() const
Return the class name as a string.
abstract base class for most VTK objects
Definition: vtkObject.h:82
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 int * GetLastEventPositions(int pointerIndex)
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).
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 vtkRenderer * FindPokedRenderer(int, int)
When an event occurs, we must determine which Renderer the event occurred within, since one RenderWin...
virtual vtkAbstractPropPicker * CreateDefaultPicker()
Create default picker.
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.
virtual void TerminateApp(void)
This function is called on 'q','e' keypress if exitmethod is not specified and should be overridden b...
vtkObserverMediator * GetObserverMediator()
Return the object used to mediate between vtkInteractorObservers contending for resources.
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 vtkPickingManager * CreateDefaultPickingManager()
Create default pickingManager.
virtual void LeaveEvent()
Fire various events.
virtual vtkInteractorObserver * GetInteractorStyle()
External switching between joystick/trackball/new? modes.
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.
~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 void ConfigureEvent()
Fire various events.
virtual void FifthButtonPressEvent()
Fire various events.
virtual int * GetEventPositions(int pointerIndex)
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.
vtkSmartPointer< vtkInteractorObserver > InteractorStyle
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...
static vtkRenderWindowInteractor * New()
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 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.
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:182
@ 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