VTK  9.7.20260805
vtkRenderWindowInteractor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
41
42#ifndef vtkRenderWindowInteractor_h
43#define vtkRenderWindowInteractor_h
44
45#include "vtkCommand.h" // for method sig
46#include "vtkNew.h" // For InteractorObservers
47#include "vtkObject.h"
48#include "vtkRenderingCoreModule.h" // For export macro
49#include "vtkSmartPointer.h" // For InteractorStyle
50#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
51
52VTK_ABI_NAMESPACE_BEGIN
53class vtkTimerIdMap;
54
55// Timer flags for win32/X compatibility
56#define VTKI_TIMER_FIRST 0
57#define VTKI_TIMER_UPDATE 1
58
59// maximum pointers active at once
60// for example in multitouch
61#define VTKI_MAX_POINTERS 5
62
65class vtkAssemblyPath;
66class vtkCollection;
69class vtkRenderWindow;
70class vtkRenderer;
74
75class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkRenderWindowInteractor : public vtkObject
76{
77
80
81public:
84 void PrintSelf(ostream& os, vtkIndent indent) override;
85
87
94 virtual void Initialize();
96 {
97 this->Initialized = 0;
98 this->Enabled = 0;
99 this->Initialize();
100 }
101
102
107 void UnRegister(vtkObjectBase* o) override;
108
114 virtual void Start();
115
122 virtual void ProcessEvents() {}
123
127 vtkGetMacro(Done, bool);
128 vtkSetMacro(Done, bool);
129
139 virtual void Enable()
140 {
141 this->Enabled = 1;
142 this->Modified();
143 }
144 virtual void Disable()
145 {
146 this->Enabled = 0;
147 this->Modified();
148 }
149 vtkGetMacro(Enabled, int);
150
152
156 vtkBooleanMacro(EnableRender, bool);
158 vtkSetMacro(EnableRender, bool);
160 vtkGetMacro(EnableRender, bool);
162
164
168 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
170
172
180
189 virtual void UpdateSize(int x, int y);
190
208 virtual int CreateTimer(int timerType); // first group, for backward compatibility
209 virtual int DestroyTimer(); // first group, for backward compatibility
210
215 int CreateRepeatingTimer(unsigned long duration);
216
221 int CreateOneShotTimer(unsigned long duration);
222
227 int IsOneShotTimer(int timerId);
228
232 unsigned long GetTimerDuration(int timerId);
233
237 int ResetTimer(int timerId);
238
243 int DestroyTimer(int timerId);
244
248 virtual int GetVTKTimerId(int platformTimerId);
249
250 // Moved into the public section of the class so that classless timer procs
251 // can access these enum members without being "friends"...
252 enum
253 {
256 };
257
259
268 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
269 vtkGetMacro(TimerDuration, unsigned long);
271
273
285 vtkSetMacro(TimerEventId, int);
286 vtkGetMacro(TimerEventId, int);
287 vtkSetMacro(TimerEventType, int);
288 vtkGetMacro(TimerEventType, int);
289 vtkSetMacro(TimerEventDuration, int);
290 vtkGetMacro(TimerEventDuration, int);
291 vtkSetMacro(TimerEventPlatformId, int);
292 vtkGetMacro(TimerEventPlatformId, int);
294
300 virtual void TerminateApp() { this->Done = true; }
301
303
310
318 vtkGetObjectMacro(InteractorObservers, vtkCollection);
319
321
329
331
338 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
339 vtkGetMacro(DesiredUpdateRate, double);
341
343
348 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
349 vtkGetMacro(StillUpdateRate, double);
351
353
357 vtkGetMacro(Initialized, int);
359
361
368 vtkGetObjectMacro(Picker, vtkAbstractPicker);
370
376
378
388
390
394 virtual void ExitCallback();
395 virtual void UserCallback();
396 virtual void StartPickCallback();
397 virtual void EndPickCallback();
399
403 virtual void GetMousePosition(int* x, int* y)
404 {
405 *x = 0;
406 *y = 0;
407 }
408
410
417
422 virtual void Render();
423
425
430 void FlyTo(vtkRenderer* ren, double x, double y, double z);
431 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
432 void FlyToImage(vtkRenderer* ren, double x, double y);
433 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
435
437
440 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
441 vtkGetMacro(NumberOfFlyFrames, int);
443
445
449 vtkSetMacro(Dolly, double);
450 vtkGetMacro(Dolly, double);
452
454
463 vtkGetVector2Macro(EventPosition, int);
465 vtkGetVector2Macro(LastEventPosition, int);
467 vtkSetVector2Macro(LastEventPosition, int);
469 virtual void SetEventPosition(int x, int y)
470 {
471 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
472 << "," << y << ")");
473 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
474 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
475 {
476 this->LastEventPosition[0] = this->EventPosition[0];
477 this->LastEventPosition[1] = this->EventPosition[1];
478 this->EventPosition[0] = x;
479 this->EventPosition[1] = y;
480 this->Modified();
481 }
482 }
484 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
485 virtual void SetEventPositionFlipY(int x, int y)
486 {
487 this->SetEventPosition(x, this->Size[1] - y - 1);
488 }
489 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
491
492 virtual int* GetEventPositions(int pointerIndex)
493 {
494 if (pointerIndex >= VTKI_MAX_POINTERS)
495 {
496 return nullptr;
497 }
498 return this->EventPositions[pointerIndex];
499 }
500 virtual int* GetLastEventPositions(int pointerIndex)
501 {
502 if (pointerIndex >= VTKI_MAX_POINTERS)
503 {
504 return nullptr;
505 }
506 return this->LastEventPositions[pointerIndex];
507 }
508 virtual void SetEventPosition(int x, int y, int pointerIndex)
509 {
510 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
511 {
512 return;
513 }
514 if (pointerIndex == 0)
515 {
516 this->LastEventPosition[0] = this->EventPosition[0];
517 this->LastEventPosition[1] = this->EventPosition[1];
518 this->EventPosition[0] = x;
519 this->EventPosition[1] = y;
520 }
521 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
522 << "," << y << ") for pointerIndex number " << pointerIndex);
523 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
524 this->LastEventPositions[pointerIndex][0] != x ||
525 this->LastEventPositions[pointerIndex][1] != y)
526 {
527 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
528 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
529 this->EventPositions[pointerIndex][0] = x;
530 this->EventPositions[pointerIndex][1] = y;
531 this->Modified();
532 }
533 }
534 virtual void SetEventPosition(int pos[2], int pointerIndex)
535 {
536 this->SetEventPosition(pos[0], pos[1], pointerIndex);
537 }
538 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
539 {
540 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
541 }
542 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
543 {
544 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
545 }
546
548
555 vtkSetMacro(AltKey, int);
556 vtkGetMacro(AltKey, int);
558
560
565 vtkSetMacro(ControlKey, int);
566 vtkGetMacro(ControlKey, int);
568
570
573 vtkSetMacro(ShiftKey, int);
574 vtkGetMacro(ShiftKey, int);
576
578
601 vtkSetMacro(KeyCode, char);
602 vtkGetMacro(KeyCode, char);
604
606
610 vtkSetMacro(RepeatCount, int);
611 vtkGetMacro(RepeatCount, int);
613
615
635 vtkSetStringMacro(KeySym);
636 vtkGetStringMacro(KeySym);
638
640
643 vtkSetMacro(PointerIndex, int);
644 vtkGetMacro(PointerIndex, int);
646
648
651 void SetRotation(double rotation);
652 vtkGetMacro(Rotation, double);
653 vtkGetMacro(LastRotation, double);
655
657
660 void SetScale(double scale);
661 vtkGetMacro(Scale, double);
662 vtkGetMacro(LastScale, double);
664
666
669 void SetTranslation(double val[2]);
670 vtkGetVector2Macro(Translation, double);
671 vtkGetVector2Macro(LastTranslation, double);
673
675
678 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
679 const char* keysym, int pointerIndex)
680 {
681 this->SetEventPosition(x, y, pointerIndex);
682 this->ControlKey = ctrl;
683 this->ShiftKey = shift;
684 this->KeyCode = keycode;
685 this->RepeatCount = repeatcount;
686 this->PointerIndex = pointerIndex;
687 if (keysym)
688 {
689 this->SetKeySym(keysym);
690 }
691 this->Modified();
692 }
693 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
694 int repeatcount = 0, const char* keysym = nullptr)
695 {
696 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
697 }
698
699
701
705 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
706 const char* keysym, int pointerIndex)
707 {
709 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
710 }
711 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
712 int repeatcount = 0, const char* keysym = nullptr)
713 {
714 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
715 }
716
717
719
722 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
723 const char* keysym = nullptr)
724 {
725 this->ControlKey = ctrl;
726 this->ShiftKey = shift;
727 this->KeyCode = keycode;
728 this->RepeatCount = repeatcount;
729 if (keysym)
730 {
731 this->SetKeySym(keysym);
732 }
733 this->Modified();
734 }
735
736
738
749 vtkSetVector2Macro(Size, int);
750 vtkGetVector2Macro(Size, int);
751 vtkSetVector2Macro(EventSize, int);
752 vtkGetVector2Macro(EventSize, int);
754
760 virtual vtkRenderer* FindPokedRenderer(int, int);
761
770
772
780 vtkSetMacro(UseTDx, bool);
781 vtkGetMacro(UseTDx, bool);
783
785
790 virtual void MouseMoveEvent();
791 virtual void RightButtonPressEvent();
793 virtual void LeftButtonPressEvent();
799 virtual void MouseWheelLeftEvent();
800 virtual void MouseWheelRightEvent();
801 virtual void ExposeEvent();
802 virtual void ConfigureEvent();
803 virtual void EnterEvent();
804 virtual void LeaveEvent();
805 virtual void KeyPressEvent();
806 virtual void KeyReleaseEvent();
807 virtual void CharEvent();
808 virtual void ExitEvent();
811 virtual void FifthButtonPressEvent();
814
816
820 virtual void StartPinchEvent();
821 virtual void PinchEvent();
822 virtual void EndPinchEvent();
823 virtual void StartRotateEvent();
824 virtual void RotateEvent();
825 virtual void EndRotateEvent();
826 virtual void StartPanEvent();
827 virtual void PanEvent();
828 virtual void EndPanEvent();
829 virtual void TapEvent();
830 virtual void LongTapEvent();
831 virtual void SwipeEvent();
833
835
841 vtkSetMacro(RecognizeGestures, bool);
842 vtkGetMacro(RecognizeGestures, bool);
844
846
851 vtkGetMacro(PointersDownCount, int);
853
855
862 void ClearContact(size_t contactID);
863 int GetPointerIndexForContact(size_t contactID);
865 bool IsPointerIndexSet(int i);
866 void ClearPointerIndex(int i);
868
870
888 vtkBooleanMacro(TrackInteractorObserverInstances, bool);
892
912
914
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];
965 char* KeySym;
968 int EventSize[2];
969 int Size[2];
974
978
980
981 // control the fly to
983 double Dolly;
984
993 friend class vtkInteractorObserver;
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
1042
1043private:
1045 void operator=(const vtkRenderWindowInteractor&) = delete;
1046
1047 void AddInteractorObserver(vtkInteractorObserver* interactorObserver);
1048 void RemoveInteractorObserver(vtkInteractorObserver* interactorObserver);
1049 // Internal collection of all vtkInteractorObserver instances which use this interactor.
1050 vtkNew<vtkCollection> InteractorObservers;
1051};
1052
1053VTK_ABI_NAMESPACE_END
1054#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
create and manipulate ordered lists of objects
superclass for callback/observer methods
Definition vtkCommand.h:386
create a window for renderers to draw into
a simple class to control print indentation
Definition vtkIndent.h:29
record and play VTK events passing through a vtkRenderWindowInteractor
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
Allocate and hold a VTK object.
Definition vtkNew.h:59
const char * GetClassName() const
Return the class name as a string.
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.
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.
friend class vtkInteractorObserver
These methods allow the interactor to control which events are processed.
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.
int EventPositions[VTKI_MAX_POINTERS][2]
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 TerminateApp()
This function is called on 'q','e' keypress if exitmethod is not specified and should be overridden b...
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.
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)
When the event loop notifies the interactor that the window size has changed, this method is called t...
virtual vtkPickingManager * CreateDefaultPickingManager()
Create default pickingManager.
virtual void LeaveEvent()
Fire various events.
static bool InteractorManagesTheEventLoop
This flag is useful when you are integrating VTK in a larger system.
virtual vtkInteractorObserver * GetInteractorStyle()
External switching between joystick/trackball/new?
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?
void ClearContact(size_t contactID)
Most multitouch systems use persistent contact/pointer ids to track events/motion during multitouch e...
size_t PointerIndexLookup[VTKI_MAX_POINTERS]
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.
vtkSmartPointer< vtkInteractorObserver > InteractorStyle
void SetTranslation(double val[2])
Set/get the translation for pan/swipe gestures, update LastTranslation.
virtual void SetCurrentGesture(vtkCommand::EventIds eid)
Get the current gesture that was recognized when handling multitouch and VR events.
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()
Process all user-interaction, timer events and return.
virtual void RightButtonReleaseEvent()
Fire various events.
int LastEventPositions[VTKI_MAX_POINTERS][2]
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 vtkCommand::EventIds GetCurrentGesture() const
Get the current gesture that was recognized when handling multitouch and VR events.
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 SetKeySym(const char *)
Set/get the key symbol for the key that was pressed.
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)
int StartingEventPositions[VTKI_MAX_POINTERS][2]
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:64
Hold a reference to a vtkObjectBase instance.
int vtkTypeBool
Definition vtkABI.h:64
#define VTKI_MAX_POINTERS
#define VTK_INT_MAX
Definition vtkType.h:192
#define VTK_FLOAT_MAX
Definition vtkType.h:200
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)