VTK  9.7.20260917
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
495
497
501 virtual void ExitCallback();
502 virtual void UserCallback();
503 virtual void StartPickCallback();
504 virtual void EndPickCallback();
506
510 virtual void GetMousePosition(int* x, int* y)
511 {
512 *x = 0;
513 *y = 0;
514 }
515
517
524
529 virtual void Render();
530
532
537 void FlyTo(vtkRenderer* ren, double x, double y, double z);
538 void FlyTo(vtkRenderer* ren, double* x) { this->FlyTo(ren, x[0], x[1], x[2]); }
539 void FlyToImage(vtkRenderer* ren, double x, double y);
540 void FlyToImage(vtkRenderer* ren, double* x) { this->FlyToImage(ren, x[0], x[1]); }
542
544
547 vtkSetClampMacro(NumberOfFlyFrames, int, 1, VTK_INT_MAX);
548 vtkGetMacro(NumberOfFlyFrames, int);
550
552
556 vtkSetMacro(Dolly, double);
557 vtkGetMacro(Dolly, double);
559
561
570 vtkGetVector2Macro(EventPosition, int);
572 vtkGetVector2Macro(LastEventPosition, int);
574 vtkSetVector2Macro(LastEventPosition, int);
576 virtual void SetEventPosition(int x, int y)
577 {
578 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
579 << "," << y << ")");
580 if (this->EventPosition[0] != x || this->EventPosition[1] != y ||
581 this->LastEventPosition[0] != x || this->LastEventPosition[1] != y)
582 {
583 this->LastEventPosition[0] = this->EventPosition[0];
584 this->LastEventPosition[1] = this->EventPosition[1];
585 this->EventPosition[0] = x;
586 this->EventPosition[1] = y;
587 this->Modified();
588 }
589 }
591 virtual void SetEventPosition(int pos[2]) { this->SetEventPosition(pos[0], pos[1]); }
592 virtual void SetEventPositionFlipY(int x, int y)
593 {
594 this->SetEventPosition(x, this->Size[1] - y - 1);
595 }
596 virtual void SetEventPositionFlipY(int pos[2]) { this->SetEventPositionFlipY(pos[0], pos[1]); }
598
599 virtual int* GetEventPositions(int pointerIndex)
600 {
601 if (pointerIndex >= VTKI_MAX_POINTERS)
602 {
603 return nullptr;
604 }
605 return this->EventPositions[pointerIndex];
606 }
607 virtual int* GetLastEventPositions(int pointerIndex)
608 {
609 if (pointerIndex >= VTKI_MAX_POINTERS)
610 {
611 return nullptr;
612 }
613 return this->LastEventPositions[pointerIndex];
614 }
615 virtual void SetEventPosition(int x, int y, int pointerIndex)
616 {
617 if (pointerIndex < 0 || pointerIndex >= VTKI_MAX_POINTERS)
618 {
619 return;
620 }
621 if (pointerIndex == 0)
622 {
623 this->LastEventPosition[0] = this->EventPosition[0];
624 this->LastEventPosition[1] = this->EventPosition[1];
625 this->EventPosition[0] = x;
626 this->EventPosition[1] = y;
627 }
628 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting EventPosition to (" << x
629 << "," << y << ") for pointerIndex number " << pointerIndex);
630 if (this->EventPositions[pointerIndex][0] != x || this->EventPositions[pointerIndex][1] != y ||
631 this->LastEventPositions[pointerIndex][0] != x ||
632 this->LastEventPositions[pointerIndex][1] != y)
633 {
634 this->LastEventPositions[pointerIndex][0] = this->EventPositions[pointerIndex][0];
635 this->LastEventPositions[pointerIndex][1] = this->EventPositions[pointerIndex][1];
636 this->EventPositions[pointerIndex][0] = x;
637 this->EventPositions[pointerIndex][1] = y;
638 this->Modified();
639 }
640 }
641 virtual void SetEventPosition(int pos[2], int pointerIndex)
642 {
643 this->SetEventPosition(pos[0], pos[1], pointerIndex);
644 }
645 virtual void SetEventPositionFlipY(int x, int y, int pointerIndex)
646 {
647 this->SetEventPosition(x, this->Size[1] - y - 1, pointerIndex);
648 }
649 virtual void SetEventPositionFlipY(int pos[2], int pointerIndex)
650 {
651 this->SetEventPositionFlipY(pos[0], pos[1], pointerIndex);
652 }
653
655
662 vtkSetMacro(AltKey, int);
663 vtkGetMacro(AltKey, int);
665
667
672 vtkSetMacro(ControlKey, int);
673 vtkGetMacro(ControlKey, int);
675
677
680 vtkSetMacro(ShiftKey, int);
681 vtkGetMacro(ShiftKey, int);
683
685
708 vtkSetMacro(KeyCode, char);
709 vtkGetMacro(KeyCode, char);
711
713
717 vtkSetMacro(RepeatCount, int);
718 vtkGetMacro(RepeatCount, int);
720
722
742 vtkSetStringMacro(KeySym);
743 vtkGetStringMacro(KeySym);
745
747
750 vtkSetMacro(PointerIndex, int);
751 vtkGetMacro(PointerIndex, int);
753
755
758 void SetRotation(double rotation);
759 vtkGetMacro(Rotation, double);
760 vtkGetMacro(LastRotation, double);
762
764
767 void SetScale(double scale);
768 vtkGetMacro(Scale, double);
769 vtkGetMacro(LastScale, double);
771
773
776 void SetTranslation(double val[2]);
777 vtkGetVector2Macro(Translation, double);
778 vtkGetVector2Macro(LastTranslation, double);
780
782
785 void SetEventInformation(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
786 const char* keysym, int pointerIndex)
787 {
788 this->SetEventPosition(x, y, pointerIndex);
789 this->ControlKey = ctrl;
790 this->ShiftKey = shift;
791 this->KeyCode = keycode;
792 this->RepeatCount = repeatcount;
793 this->PointerIndex = pointerIndex;
794 if (keysym)
795 {
796 this->SetKeySym(keysym);
797 }
798 this->Modified();
799 }
800 void SetEventInformation(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
801 int repeatcount = 0, const char* keysym = nullptr)
802 {
803 this->SetEventInformation(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
804 }
805
806
808
812 void SetEventInformationFlipY(int x, int y, int ctrl, int shift, char keycode, int repeatcount,
813 const char* keysym, int pointerIndex)
814 {
816 x, this->Size[1] - y - 1, ctrl, shift, keycode, repeatcount, keysym, pointerIndex);
817 }
818 void SetEventInformationFlipY(int x, int y, int ctrl = 0, int shift = 0, char keycode = 0,
819 int repeatcount = 0, const char* keysym = nullptr)
820 {
821 this->SetEventInformationFlipY(x, y, ctrl, shift, keycode, repeatcount, keysym, 0);
822 }
823
824
826
829 void SetKeyEventInformation(int ctrl = 0, int shift = 0, char keycode = 0, int repeatcount = 0,
830 const char* keysym = nullptr)
831 {
832 this->ControlKey = ctrl;
833 this->ShiftKey = shift;
834 this->KeyCode = keycode;
835 this->RepeatCount = repeatcount;
836 if (keysym)
837 {
838 this->SetKeySym(keysym);
839 }
840 this->Modified();
841 }
842
843
845
856 vtkSetVector2Macro(Size, int);
857 vtkGetVector2Macro(Size, int);
858 vtkSetVector2Macro(EventSize, int);
859 vtkGetVector2Macro(EventSize, int);
861
867 virtual vtkRenderer* FindPokedRenderer(int, int);
868
877
879
887 vtkSetMacro(UseTDx, bool);
888 vtkGetMacro(UseTDx, bool);
890
892
897 virtual void MouseMoveEvent();
898 virtual void RightButtonPressEvent();
900 virtual void LeftButtonPressEvent();
906 virtual void MouseWheelLeftEvent();
907 virtual void MouseWheelRightEvent();
908 virtual void ExposeEvent();
909 virtual void ConfigureEvent();
910 virtual void EnterEvent();
911 virtual void LeaveEvent();
912 virtual void KeyPressEvent();
913 virtual void KeyReleaseEvent();
914 virtual void CharEvent();
915 virtual void ExitEvent();
918 virtual void FifthButtonPressEvent();
921
923
927 virtual void StartPinchEvent();
928 virtual void PinchEvent();
929 virtual void EndPinchEvent();
930 virtual void StartRotateEvent();
931 virtual void RotateEvent();
932 virtual void EndRotateEvent();
933 virtual void StartPanEvent();
934 virtual void PanEvent();
935 virtual void EndPanEvent();
936 virtual void TapEvent();
937 virtual void LongTapEvent();
938 virtual void SwipeEvent();
940
942
948 vtkSetMacro(RecognizeGestures, bool);
949 vtkGetMacro(RecognizeGestures, bool);
951
953
958 vtkGetMacro(PointersDownCount, int);
960
962
969 void ClearContact(size_t contactID);
970 int GetPointerIndexForContact(size_t contactID);
972 bool IsPointerIndexSet(int i);
973 void ClearPointerIndex(int i);
975
977
995 vtkBooleanMacro(TrackInteractorObserverInstances, bool);
999
1019
1021
1030
1031protected:
1034
1038
1039 // Used as a helper object to pick instances of vtkProp
1042
1043 bool Done; // is the event loop done running
1044
1050
1059
1060 // Event information
1065 double Rotation;
1067 double Scale;
1069 double Translation[2];
1072 char* KeySym;
1076 int Size[2];
1081
1085
1087
1088 // control the fly to
1090 double Dolly;
1091
1100 friend class vtkInteractorObserver;
1101 void GrabFocus(vtkCommand* mouseEvents, vtkCommand* keypressEvents = nullptr)
1102 {
1103 this->Superclass::InternalGrabFocus(mouseEvents, keypressEvents);
1104 }
1106
1111
1112 // Timer related members
1113 friend struct vtkTimerStruct;
1114 vtkTimerIdMap* TimerMap; // An internal, PIMPLd map of timers and associated attributes
1115 unsigned long TimerDuration; // in milliseconds
1117
1123 virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
1124 virtual int InternalDestroyTimer(int platformTimerId);
1127
1128 // Force the interactor to handle the Start() event loop, ignoring any
1129 // overrides. (Overrides are registered by observing StartEvent on the
1130 // interactor.)
1132
1136 virtual void StartEventLoop() {}
1137
1138 bool UseTDx; // 3DConnexion device.
1139
1140 // when recognizing gestures VTK will take multitouch events
1141 // if it receives them and convert them to gestures
1149
1150private:
1152 void operator=(const vtkRenderWindowInteractor&) = delete;
1153
1154 void AddInteractorObserver(vtkInteractorObserver* interactorObserver);
1155 void RemoveInteractorObserver(vtkInteractorObserver* interactorObserver);
1156 // Internal collection of all vtkInteractorObserver instances which use this interactor.
1157 vtkNew<vtkCollection> InteractorObservers;
1158};
1159
1160VTK_ABI_NAMESPACE_END
1161#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:387
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_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)