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=========================================================================*/
160#ifndef vtkRenderWindowInteractor_h
161#define vtkRenderWindowInteractor_h
162
163#include "vtkCommand.h" // for method sig
164#include "vtkObject.h"
165#include "vtkRenderingCoreModule.h" // For export macro
166#include "vtkSmartPointer.h" // For InteractorStyle
167
168class vtkTimerIdMap;
169
170// Timer flags for win32/X compatibility
171#define VTKI_TIMER_FIRST 0
172#define VTKI_TIMER_UPDATE 1
173
174// maximum pointers active at once
175// for example in multitouch
176#define VTKI_MAX_POINTERS 5
177
180class vtkAssemblyPath;
183class vtkRenderWindow;
184class vtkRenderer;
188
189class VTKRENDERINGCORE_EXPORT vtkRenderWindowInteractor : public vtkObject
190{
191
193
194public:
197 void PrintSelf(ostream& os, vtkIndent indent) override;
198
200
207 virtual void Initialize();
209 {
210 this->Initialized = 0;
211 this->Enabled = 0;
212 this->Initialize();
213 }
215
220 void UnRegister(vtkObjectBase* o) override;
221
227 virtual void Start();
228
234 virtual void ProcessEvents() {}
235
239 vtkGetMacro(Done, bool);
240 vtkSetMacro(Done, bool);
241
251 virtual void Enable()
252 {
253 this->Enabled = 1;
254 this->Modified();
255 }
256 virtual void Disable()
257 {
258 this->Enabled = 0;
259 this->Modified();
260 }
261 vtkGetMacro(Enabled, int);
262
264
268 vtkBooleanMacro(EnableRender, bool);
269 vtkSetMacro(EnableRender, bool);
270 vtkGetMacro(EnableRender, bool);
272
274
278 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
280
282
288 vtkGetObjectMacro(HardwareWindow, vtkHardwareWindow);
290
298 virtual void UpdateSize(int x, int y);
299
316 virtual int CreateTimer(int timerType); // first group, for backward compatibility
317 virtual int DestroyTimer(); // first group, for backward compatibility
318
323 int CreateRepeatingTimer(unsigned long duration);
324
329 int CreateOneShotTimer(unsigned long duration);
330
335 int IsOneShotTimer(int timerId);
336
340 unsigned long GetTimerDuration(int timerId);
341
345 int ResetTimer(int timerId);
346
351 int DestroyTimer(int timerId);
352
356 virtual int GetVTKTimerId(int platformTimerId);
357
358 // Moved into the public section of the class so that classless timer procs
359 // can access these enum members without being "friends"...
360 enum
361 {
362 OneShotTimer = 1,
363 RepeatingTimer
364 };
365
367
376 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
377 vtkGetMacro(TimerDuration, unsigned long);
379
381
393 vtkSetMacro(TimerEventId, int);
394 vtkGetMacro(TimerEventId, int);
395 vtkSetMacro(TimerEventType, int);
396 vtkGetMacro(TimerEventType, int);
397 vtkSetMacro(TimerEventDuration, int);
398 vtkGetMacro(TimerEventDuration, int);
399 vtkSetMacro(TimerEventPlatformId, int);
400 vtkGetMacro(TimerEventPlatformId, int);
402
408 virtual void TerminateApp(void) { this->Done = true; }
409
411
418
420
424 vtkSetMacro(LightFollowCamera, vtkTypeBool);
425 vtkGetMacro(LightFollowCamera, vtkTypeBool);
426 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
428
430
437 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
438 vtkGetMacro(DesiredUpdateRate, double);
440
442
447 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
448 vtkGetMacro(StillUpdateRate, double);
450
452
456 vtkGetMacro(Initialized, int);
458
460
467 vtkGetObjectMacro(Picker, vtkAbstractPicker);
469
475
477
483 vtkGetObjectMacro(PickingManager, vtkPickingManager);
485
487
491 virtual void ExitCallback();
492 virtual void UserCallback();
493 virtual void StartPickCallback();
494 virtual void EndPickCallback();
496
500 virtual void GetMousePosition(int* x, int* y)
501 {
502 *x = 0;
503 *y = 0;
504 }
505
507
514
519 virtual void Render();
520
522
527 void FlyTo(vtkRenderer* ren, double x, double y, double z);
528 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
529 void FlyToImage(vtkRenderer* ren, double x, double y);
530 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
532
534
537 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
538 vtkGetMacro(NumberOfFlyFrames, int);
540
542
546 vtkSetMacro(Dolly, double);
547 vtkGetMacro(Dolly, double);
549
551
559 vtkGetVector2Macro(EventPosition, int);
560 vtkGetVector2Macro(LastEventPosition, int);
561 vtkSetVector2Macro(LastEventPosition, int);
562 virtual void SetEventPosition(int x, int y)
563 {
564 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
565 << "," << y << ")");
566 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
567 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
568 {
569 this->LastEventPosition[0] = this->EventPosition[0];
570 this->LastEventPosition[1] = this->EventPosition[1];
571 this->EventPosition[0] = x;
572 this->EventPosition[1] = y;
573 this->Modified();
574 }
575 }
576 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
577 virtual void SetEventPositionFlipY(int x, int y)
578 {
579 this->SetEventPosition(x, this->Size[1] - y - 1);
580 }
581 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
583
584 virtual int* GetEventPositions(int pointerIndex)
585 {
586 if (pointerIndex >= VTKI_MAX_POINTERS)
587 {
588 return nullptr;
589 }
590 return this->EventPositions[pointerIndex];
591 }
592 virtual int* GetLastEventPositions(int pointerIndex)
593 {
594 if (pointerIndex >= VTKI_MAX_POINTERS)
595 {
596 return nullptr;
597 }
598 return this->LastEventPositions[pointerIndex];
599 }
600 virtual void SetEventPosition(int x, int y, int pointerIndex)
601 {
602 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
603 {
604 return;
605 }
606 if (pointerIndex == 0)
607 {
608 this->LastEventPosition[0] = this->EventPosition[0];
609 this->LastEventPosition[1] = this->EventPosition[1];
610 this->EventPosition[0] = x;
611 this->EventPosition[1] = y;
612 }
613 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
614 << "," << y << ") for pointerIndex number " << pointerIndex);
615 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
616 this->LastEventPositions[pointerIndex][0] != x ||
617 this->LastEventPositions[pointerIndex][1] != y)
618 {
619 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
620 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
621 this->EventPositions[pointerIndex][0] = x;
622 this->EventPositions[pointerIndex][1] = y;
623 this->Modified();
624 }
625 }
626 virtual void SetEventPosition(int pos[2], int pointerIndex)
627 {
628 this->SetEventPosition(pos[0], pos[1], pointerIndex);
629 }
630 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
631 {
632 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
633 }
634 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
635 {
636 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
637 }
638
640
643 vtkSetMacro(AltKey, int);
644 vtkGetMacro(AltKey, int);
646
648
651 vtkSetMacro(ControlKey, int);
652 vtkGetMacro(ControlKey, int);
654
656
659 vtkSetMacro(ShiftKey, int);
660 vtkGetMacro(ShiftKey, int);
662
664
667 vtkSetMacro(KeyCode, char);
668 vtkGetMacro(KeyCode, char);
670
672
676 vtkSetMacro(RepeatCount, int);
677 vtkGetMacro(RepeatCount, int);
679
681
687 vtkSetStringMacro(KeySym);
688 vtkGetStringMacro(KeySym);
690
692
695 vtkSetMacro(PointerIndex, int);
696 vtkGetMacro(PointerIndex, int);
698
700
703 void SetRotation(double rotation);
704 vtkGetMacro(Rotation, double);
705 vtkGetMacro(LastRotation, double);
707
709
712 void SetScale(double scale);
713 vtkGetMacro(Scale, double);
714 vtkGetMacro(LastScale, double);
716
718
721 void SetTranslation(double val[2]);
722 vtkGetVector2Macro(Translation, double);
723 vtkGetVector2Macro(LastTranslation, double);
725
727
730 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
731 const char* keysym, int pointerIndex)
732 {
733 this->SetEventPosition(x, y, pointerIndex);
734 this->ControlKey = ctrl;
735 this->ShiftKey = shift;
736 this->KeyCode = keycode;
737 this->RepeatCount = repeatcount;
738 this->PointerIndex = pointerIndex;
739 if (keysym)
740 {
741 this->SetKeySym(keysym);
742 }
743 this->Modified();
744 }
745 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
746 int repeatcount = 0, const char* keysym = nullptr)
747 {
748 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
749 }
751
753
757 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
758 const char* keysym, int pointerIndex)
759 {
760 this->SetEventInformation(
761 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
762 }
763 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
764 int repeatcount = 0, const char* keysym = nullptr)
765 {
766 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
767 }
769
771
774 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
775 const char* keysym = nullptr)
776 {
777 this->ControlKey = ctrl;
778 this->ShiftKey = shift;
779 this->KeyCode = keycode;
780 this->RepeatCount = repeatcount;
781 if (keysym)
782 {
783 this->SetKeySym(keysym);
784 }
785 this->Modified();
786 }
788
790
801 vtkSetVector2Macro(Size, int);
802 vtkGetVector2Macro(Size, int);
803 vtkSetVector2Macro(EventSize, int);
804 vtkGetVector2Macro(EventSize, int);
806
812 virtual vtkRenderer* FindPokedRenderer(int, int);
813
822
824
832 vtkSetMacro(UseTDx, bool);
833 vtkGetMacro(UseTDx, bool);
835
837
842 virtual void MouseMoveEvent();
843 virtual void RightButtonPressEvent();
845 virtual void LeftButtonPressEvent();
851 virtual void MouseWheelLeftEvent();
852 virtual void MouseWheelRightEvent();
853 virtual void ExposeEvent();
854 virtual void ConfigureEvent();
855 virtual void EnterEvent();
856 virtual void LeaveEvent();
857 virtual void KeyPressEvent();
858 virtual void KeyReleaseEvent();
859 virtual void CharEvent();
860 virtual void ExitEvent();
863 virtual void FifthButtonPressEvent();
866
868
872 virtual void StartPinchEvent();
873 virtual void PinchEvent();
874 virtual void EndPinchEvent();
875 virtual void StartRotateEvent();
876 virtual void RotateEvent();
877 virtual void EndRotateEvent();
878 virtual void StartPanEvent();
879 virtual void PanEvent();
880 virtual void EndPanEvent();
881 virtual void TapEvent();
882 virtual void LongTapEvent();
883 virtual void SwipeEvent();
885
887
893 vtkSetMacro(RecognizeGestures, bool);
894 vtkGetMacro(RecognizeGestures, bool);
896
898
903 vtkGetMacro(PointersDownCount, int);
905
907
914 void ClearContact(size_t contactID);
915 int GetPointerIndexForContact(size_t contactID);
917 bool IsPointerIndexSet(int i);
918 void ClearPointerIndex(int i);
920
921protected:
924
928
929 // Used as a helper object to pick instances of vtkProp
932
933 bool Done; // is the event loop done running
934
940
944 int Style;
949
950 // Event information
955 double Rotation;
957 double Scale;
958 double LastScale;
959 double Translation[2];
960 double LastTranslation[2];
962 char* KeySym;
963 int EventPosition[2];
964 int LastEventPosition[2];
965 int EventSize[2];
966 int Size[2];
971
972 int EventPositions[VTKI_MAX_POINTERS][2];
973 int LastEventPositions[VTKI_MAX_POINTERS][2];
975
976 size_t PointerIndexLookup[VTKI_MAX_POINTERS];
977
978 // control the fly to
980 double Dolly;
981
991 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
992 {
993 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
994 }
996
1001
1002 // Timer related members
1003 friend struct vtkTimerStruct;
1004 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
1005 unsigned long TimerDuration; // in milliseconds
1007
1013 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
1014 virtual int InternalDestroyTimer(int platformTimerId);
1017
1018 // Force the interactor to handle the Start() event loop, ignoring any
1019 // overrides. (Overrides are registered by observing StartEvent on the
1020 // interactor.)
1022
1026 virtual void StartEventLoop() {}
1027
1028 bool UseTDx; // 3DConnexion device.
1029
1030 // when recognizing gestures VTK will take multitouch events
1031 // if it receives them and convert them to gestures
1034 int PointersDown[VTKI_MAX_POINTERS];
1036 int StartingEventPositions[VTKI_MAX_POINTERS][2];
1038
1039private:
1041 void operator=(const vtkRenderWindowInteractor&) = delete;
1042};
1043
1044#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:79
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:179
@ 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