VTK  9.6.20260605
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
150
151#ifndef vtkRenderWindowInteractor_h
152#define vtkRenderWindowInteractor_h
153
154#include "vtkCommand.h" // for method sig
155#include "vtkNew.h" // For InteractorObservers
156#include "vtkObject.h"
157#include "vtkRenderingCoreModule.h" // For export macro
158#include "vtkSmartPointer.h" // For InteractorStyle
159#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
160
161VTK_ABI_NAMESPACE_BEGIN
162class vtkTimerIdMap;
163
164// Timer flags for win32/X compatibility
165#define VTKI_TIMER_FIRST 0
166#define VTKI_TIMER_UPDATE 1
167
168// maximum pointers active at once
169// for example in multitouch
170#define VTKI_MAX_POINTERS 5
171
174class vtkAssemblyPath;
175class vtkCollection;
178class vtkRenderWindow;
179class vtkRenderer;
183
184class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkRenderWindowInteractor : public vtkObject
185{
186
189
190public:
193 void PrintSelf(ostream& os, vtkIndent indent) override;
194
196
203 virtual void Initialize();
205 {
206 this->Initialized = 0;
207 this->Enabled = 0;
208 this->Initialize();
209 }
210
211
216 void UnRegister(vtkObjectBase* o) override;
217
223 virtual void Start();
224
231 virtual void ProcessEvents() {}
232
236 vtkGetMacro(Done, bool);
237 vtkSetMacro(Done, bool);
238
248 virtual void Enable()
249 {
250 this->Enabled = 1;
251 this->Modified();
252 }
253 virtual void Disable()
254 {
255 this->Enabled = 0;
256 this->Modified();
257 }
258 vtkGetMacro(Enabled, int);
259
261
265 vtkBooleanMacro(EnableRender, bool);
267 vtkSetMacro(EnableRender, bool);
269 vtkGetMacro(EnableRender, bool);
271
273
277 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
279
281
289
298 virtual void UpdateSize(int x, int y);
299
317 virtual int CreateTimer(int timerType); // first group, for backward compatibility
318 virtual int DestroyTimer(); // first group, for backward compatibility
319
324 int CreateRepeatingTimer(unsigned long duration);
325
330 int CreateOneShotTimer(unsigned long duration);
331
336 int IsOneShotTimer(int timerId);
337
341 unsigned long GetTimerDuration(int timerId);
342
346 int ResetTimer(int timerId);
347
352 int DestroyTimer(int timerId);
353
357 virtual int GetVTKTimerId(int platformTimerId);
358
359 // Moved into the public section of the class so that classless timer procs
360 // can access these enum members without being "friends"...
361 enum
362 {
365 };
366
368
377 vtkSetClampMacro(TimerDuration, unsigned long, 1, 100000);
378 vtkGetMacro(TimerDuration, unsigned long);
380
382
394 vtkSetMacro(TimerEventId, int);
395 vtkGetMacro(TimerEventId, int);
396 vtkSetMacro(TimerEventType, int);
397 vtkGetMacro(TimerEventType, int);
398 vtkSetMacro(TimerEventDuration, int);
399 vtkGetMacro(TimerEventDuration, int);
400 vtkSetMacro(TimerEventPlatformId, int);
401 vtkGetMacro(TimerEventPlatformId, int);
403
409 virtual void TerminateApp() { this->Done = true; }
410
412
419
427 vtkGetObjectMacro(InteractorObservers, vtkCollection);
428
430
438
440
447 vtkSetClampMacro(DesiredUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
448 vtkGetMacro(DesiredUpdateRate, double);
450
452
457 vtkSetClampMacro(StillUpdateRate, double, 0.0001, VTK_FLOAT_MAX);
458 vtkGetMacro(StillUpdateRate, double);
460
462
466 vtkGetMacro(Initialized, int);
468
470
477 vtkGetObjectMacro(Picker, vtkAbstractPicker);
479
485
487
497
499
503 virtual void ExitCallback();
504 virtual void UserCallback();
505 virtual void StartPickCallback();
506 virtual void EndPickCallback();
508
512 virtual void GetMousePosition(int* x, int* y)
513 {
514 *x = 0;
515 *y = 0;
516 }
517
519
526
531 virtual void Render();
532
534
539 void FlyTo(vtkRenderer* ren, double x, double y, double z);
540 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
541 void FlyToImage(vtkRenderer* ren, double x, double y);
542 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
544
546
549 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
550 vtkGetMacro(NumberOfFlyFrames, int);
552
554
558 vtkSetMacro(Dolly, double);
559 vtkGetMacro(Dolly, double);
561
563
572 vtkGetVector2Macro(EventPosition, int);
574 vtkGetVector2Macro(LastEventPosition, int);
576 vtkSetVector2Macro(LastEventPosition, int);
578 virtual void SetEventPosition(int x, int y)
579 {
580 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
581 << "," << y << ")");
582 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
583 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
584 {
585 this->LastEventPosition[0] = this->EventPosition[0];
586 this->LastEventPosition[1] = this->EventPosition[1];
587 this->EventPosition[0] = x;
588 this->EventPosition[1] = y;
589 this->Modified();
590 }
591 }
593 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
594 virtual void SetEventPositionFlipY(int x, int y)
595 {
596 this->SetEventPosition(x, this->Size[1] - y - 1);
597 }
598 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
600
601 virtual int* GetEventPositions(int pointerIndex)
602 {
603 if (pointerIndex >= VTKI_MAX_POINTERS)
604 {
605 return nullptr;
606 }
607 return this->EventPositions[pointerIndex];
608 }
609 virtual int* GetLastEventPositions(int pointerIndex)
610 {
611 if (pointerIndex >= VTKI_MAX_POINTERS)
612 {
613 return nullptr;
614 }
615 return this->LastEventPositions[pointerIndex];
616 }
617 virtual void SetEventPosition(int x, int y, int pointerIndex)
618 {
619 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
620 {
621 return;
622 }
623 if (pointerIndex == 0)
624 {
625 this->LastEventPosition[0] = this->EventPosition[0];
626 this->LastEventPosition[1] = this->EventPosition[1];
627 this->EventPosition[0] = x;
628 this->EventPosition[1] = y;
629 }
630 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
631 << "," << y << ") for pointerIndex number " << pointerIndex);
632 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
633 this->LastEventPositions[pointerIndex][0] != x ||
634 this->LastEventPositions[pointerIndex][1] != y)
635 {
636 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
637 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
638 this->EventPositions[pointerIndex][0] = x;
639 this->EventPositions[pointerIndex][1] = y;
640 this->Modified();
641 }
642 }
643 virtual void SetEventPosition(int pos[2], int pointerIndex)
644 {
645 this->SetEventPosition(pos[0], pos[1], pointerIndex);
646 }
647 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
648 {
649 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
650 }
651 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
652 {
653 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
654 }
655
657
664 vtkSetMacro(AltKey, int);
665 vtkGetMacro(AltKey, int);
667
669
674 vtkSetMacro(ControlKey, int);
675 vtkGetMacro(ControlKey, int);
677
679
682 vtkSetMacro(ShiftKey, int);
683 vtkGetMacro(ShiftKey, int);
685
687
710 vtkSetMacro(KeyCode, char);
711 vtkGetMacro(KeyCode, char);
713
715
719 vtkSetMacro(RepeatCount, int);
720 vtkGetMacro(RepeatCount, int);
722
724
744 vtkSetStringMacro(KeySym);
745 vtkGetStringMacro(KeySym);
747
749
752 vtkSetMacro(PointerIndex, int);
753 vtkGetMacro(PointerIndex, int);
755
757
760 void SetRotation(double rotation);
761 vtkGetMacro(Rotation, double);
762 vtkGetMacro(LastRotation, double);
764
766
769 void SetScale(double scale);
770 vtkGetMacro(Scale, double);
771 vtkGetMacro(LastScale, double);
773
775
778 void SetTranslation(double val[2]);
779 vtkGetVector2Macro(Translation, double);
780 vtkGetVector2Macro(LastTranslation, double);
782
784
787 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
788 const char* keysym, int pointerIndex)
789 {
790 this->SetEventPosition(x, y, pointerIndex);
791 this->ControlKey = ctrl;
792 this->ShiftKey = shift;
793 this->KeyCode = keycode;
794 this->RepeatCount = repeatcount;
795 this->PointerIndex = pointerIndex;
796 if (keysym)
797 {
798 this->SetKeySym(keysym);
799 }
800 this->Modified();
801 }
802 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
803 int repeatcount = 0, const char* keysym = nullptr)
804 {
805 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
806 }
807
808
810
814 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
815 const char* keysym, int pointerIndex)
816 {
818 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
819 }
820 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
821 int repeatcount = 0, const char* keysym = nullptr)
822 {
823 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
824 }
825
826
828
831 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
832 const char* keysym = nullptr)
833 {
834 this->ControlKey = ctrl;
835 this->ShiftKey = shift;
836 this->KeyCode = keycode;
837 this->RepeatCount = repeatcount;
838 if (keysym)
839 {
840 this->SetKeySym(keysym);
841 }
842 this->Modified();
843 }
844
845
847
858 vtkSetVector2Macro(Size, int);
859 vtkGetVector2Macro(Size, int);
860 vtkSetVector2Macro(EventSize, int);
861 vtkGetVector2Macro(EventSize, int);
863
869 virtual vtkRenderer* FindPokedRenderer(int, int);
870
879
881
889 vtkSetMacro(UseTDx, bool);
890 vtkGetMacro(UseTDx, bool);
892
894
899 virtual void MouseMoveEvent();
900 virtual void RightButtonPressEvent();
902 virtual void LeftButtonPressEvent();
908 virtual void MouseWheelLeftEvent();
909 virtual void MouseWheelRightEvent();
910 virtual void ExposeEvent();
911 virtual void ConfigureEvent();
912 virtual void EnterEvent();
913 virtual void LeaveEvent();
914 virtual void KeyPressEvent();
915 virtual void KeyReleaseEvent();
916 virtual void CharEvent();
917 virtual void ExitEvent();
920 virtual void FifthButtonPressEvent();
923
925
929 virtual void StartPinchEvent();
930 virtual void PinchEvent();
931 virtual void EndPinchEvent();
932 virtual void StartRotateEvent();
933 virtual void RotateEvent();
934 virtual void EndRotateEvent();
935 virtual void StartPanEvent();
936 virtual void PanEvent();
937 virtual void EndPanEvent();
938 virtual void TapEvent();
939 virtual void LongTapEvent();
940 virtual void SwipeEvent();
942
944
950 vtkSetMacro(RecognizeGestures, bool);
951 vtkGetMacro(RecognizeGestures, bool);
953
955
960 vtkGetMacro(PointersDownCount, int);
962
964
971 void ClearContact(size_t contactID);
972 int GetPointerIndexForContact(size_t contactID);
974 bool IsPointerIndexSet(int i);
975 void ClearPointerIndex(int i);
977
979
997 vtkBooleanMacro(TrackInteractorObserverInstances, bool);
1001
1021
1023
1032
1033protected:
1036
1040
1041 // Used as a helper object to pick instances of vtkProp
1044
1045 bool Done; // is the event loop done running
1046
1052
1061
1062 // Event information
1067 double Rotation;
1069 double Scale;
1071 double Translation[2];
1074 char* KeySym;
1078 int Size[2];
1083
1087
1089
1090 // control the fly to
1092 double Dolly;
1093
1102 friend class vtkInteractorObserver;
1103 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
1104 {
1105 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
1106 }
1108
1113
1114 // Timer related members
1115 friend struct vtkTimerStruct;
1116 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
1117 unsigned long TimerDuration; // in milliseconds
1119
1125 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
1126 virtual int InternalDestroyTimer(int platformTimerId);
1129
1130 // Force the interactor to handle the Start() event loop, ignoring any
1131 // overrides. (Overrides are registered by observing StartEvent on the
1132 // interactor.)
1134
1138 virtual void StartEventLoop() {}
1139
1140 bool UseTDx; // 3DConnexion device.
1141
1142 // when recognizing gestures VTK will take multitouch events
1143 // if it receives them and convert them to gestures
1151
1152private:
1154 void operator=(const vtkRenderWindowInteractor&) = delete;
1155
1156 void AddInteractorObserver(vtkInteractorObserver* interactorObserver);
1157 void RemoveInteractorObserver(vtkInteractorObserver* interactorObserver);
1158 // Internal collection of all vtkInteractorObserver instances which use this interactor.
1159 vtkNew<vtkCollection> InteractorObservers;
1160};
1161
1162VTK_ABI_NAMESPACE_END
1163#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:385
create a window for renderers to draw into
a simple class to control print indentation
Definition vtkIndent.h:108
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:168
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
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)