VtkRenderWindowInteractor for rendering is happening on the window the mouse, keyboard, event event. This class provides platform-independent mechanisms for interacting with the render window, including picking and frame rate control. When vtkRenderWindowInteractor (in fact is he a subclass) observed in the platform of a certain event occurs, he through InvokeEvent () method to convert the incident to VTK events. This class acts as a platform specific base class to control the passing of mouse/keyboard/time messages, notifying VTKInteractorObserver and its subclasses. All observer objects, VTKInteractorObservers, registered with the interactor receive the event, and then all respond to it.
In fact, vtkRenderWindowInteractor works like this: This class will take in vtkRenderWindow associated with it (through vtkRenderWindowInteractor SetRenderWindow () method to join the render window) on the event, then vtkRenderWindowInteractor classes depending on the equipment and the operating system to instantiate an object, for example, Unix is vtkXRenderWindowInteractor, The Windows is vtkWin32RenderWindowInteractor. When vtkRenderWindowInteractor: : Start () method is invoked, the function of interception of the event is activated. Finally, the interception by the event will be sent to vtkRenderWindowInteractor: : InteractorStyle this instance for processing. InteractorStyle vtkRenderWindowInteractor is a protected data members in a class is vtkInteractorObserver types of pointer, and vtkInteractorObserver role is monitoring events on interaction, in this way, the interception by vtkRenderWindowInteractor messages have the end-result. If want to increase the new way of interaction in VTK, should start with vtkInteractorStyle derive a subclass, such as: vtkInteractorStyleTrackball, vtkInteractorStyleUser, vtkInteractorStyleJoystickActor, vtkInteractorStyleJoystickCamera, vtkInteractorStyleUser, etc. The interaction allows the user to customize the manner.
Application process: (1) a vtkRenderWindow object rWin (2) a iRen vtkRenderWindowInteractor object (3) a widget vtkWidget object
Is: iRen – & gt; setRenderWindow(rWin);
Widgets – & gt; setInteractor(iRen);
Iren takes care of the event conversion (you must specify which window’s event is converted), and then registers an observer widget with the Iren interactivator widget->; SetInteracotr (IREN), which is responsible for observing events that occur on the render window that IREN intercepts and performing relevant system custom actions when the event occurs.
In fact, vtkRenderWindowInteractor works like this: This class will take in vtkRenderWindow associated with it (through vtkRenderWindowInteractor SetRenderWindow () method to join the render window) on the event, then vtkRenderWindowInteractor classes depending on the equipment and the operating system to instantiate an object, for example, Unix is vtkXRenderWindowInteractor, The Windows is vtkWin32RenderWindowInteractor. When vtkRenderWindowInteractor: : Start () method is invoked, the function of interception of the event is activated. Finally, the interception by the event will be sent to vtkRenderWindowInteractor: : InteractorStyle this instance for processing. InteractorStyle vtkRenderWindowInteractor is a protected data members in a class is vtkInteractorObserver types of pointer, and vtkInteractorObserver role is monitoring events on interaction, in this way, the interception by vtkRenderWindowInteractor messages have the end-result. If want to increase the new way of interaction in VTK, should start with vtkInteractorStyle derive a subclass, such as: vtkInteractorStyleTrackball, vtkInteractorStyleUser, vtkInteractorStyleJoystickActor, vtkInteractorStyleJoystickCamera, vtkInteractorStyleUser, etc. The interaction allows the user to customize the manner.
Application process: (1) a vtkRenderWindow object rWin (2) a iRen vtkRenderWindowInteractor object (3) a widget vtkWidget object
Is: iRen – & gt; setRenderWindow(rWin);
Widgets – & gt; setInteractor(iRen);
Iren takes care of the event conversion (you must specify which window’s event is converted), and then registers an observer widget with the Iren interactivator widget->; SetInteracotr (IREN), which is responsible for observing events that occur on the render window that IREN intercepts and performing relevant system custom actions when the event occurs.
Read More:
- [PCL + QT + vs] no override found for ‘vtkrenderwindow’ error resolution
- PCL: error encountered in verride found for ‘vtkrenderwindow’ visualization.
- Using qvtk renderwindoninteractor to load VTK widget
- JS opens a new tab( window.open Application)
- Examples of VTK image reading and display
- Using vtk8.1 in qcreator
- VTK notes — texture mapping
- Solution to Apple Wireless Mouse, keyboard or touchpad can not be recognized by MAC
- VTK: VTK error problem set
- Android monitor EditText text input EditText monitor events and input events
- How to increase the effect of onchange event after adding readonly attribute to input tag and display time of laydate plug-in
- Beginners of OpenGL (1): preparation
- ** exception error: undefined function appmon:start/0
- Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://xxx.cn’) does n
- ERROR 0210: Stuck Key 36
- Android solution to the conflict of calling ontouch and onclick at the same time
- Implementation of screen cleaning in Python idle
- Using code to create control objects, set the event listening method does not execute
- Destructor abnormal stuck bug
- Synergy Protocol error from Server && dual system shared mouse and keyboard solution