Radium Engine
1.5.20
|
The Radium Engine provides some classes that allow to extend the way one might interact with a camera in an application.
The class Ra::Gui::CameraManipulator
defines the general interface for camera manipulator. All manipulators have common properties that allow to switch from one manipulator to one other without disturbing the visual and interactive behavior of the application.
In order to extend the set of Ra::Gui::CameraManipulator
available in Radium or to develop a dedicated Ra::Gui::CameraManipulator
for a Ra::Gui::Viewer
-based application, programmers are intended to do the following, demonstrated by the class FlightCameraManipulator
.
Ra::Gui::CameraManipulator
and, in order to receive interaction events, from Ra::Gui::KeyMappingManageable
. Note that a CameraManipulator is a Q_OBJECT
Ra::Gui::CameraManipulator
and will copy the base class before initializing the current manipulator. Ra::Gui::KeyMappingManageable
part of the class. This implies defining the method void FlightCameraManipulator::configureKeyMapping_impl()
according to the semantic imposed by Ra::Gui::KeyMappingManageable
. It is recommended that, when implementing this keymapping initialisation callback, a default configuration is defined and saved to the xml keymapping configuration file if this later does not already contains a configuration. This will allow the users to edit and customize the proposed keymapping configuration. Ra::Gui::CameraManipulator
The example application CustomCameraManipulator
Demonstrate how to extend an existing manipulator and specialize its behavior for a given context. In the following code, the Ra::Gui::TrackballCameraManipulator
class is used to define a simple pan and zoom manipulator, simply by ignoring rotation events:
Using a Ra::Gui::CameraManipulator
in a Ra::Gui::Viewer
-based application is quite straightforward.
If one wants to set a first camera manipulator to a viewer
If one wants to change the manipulator while keeping the actual visual state