Ceetron Desktop Components has built in support for manipulating the camera from input events (typically mouse interaction).
The Camera has an input handler, CameraInputHandler, that handles user input (mouse and keyboard events) and manipulates the camera based on these events. This is used to move the camera around the scene to inspect the model.
Ceetron Desktop Components provides two default Input Handlers:
The built-in navigation schemes are using Pan on left mouse button, Rotate on right mouse button and Zoom/Walk on mouse wheel (or both left and right mousebuttons).
The easiest way to add a custom navigation scheme is to derive from the CameraInputHandler class and override the navigationTypeFromInputState() method. The navigationTypeFromInputState() method should return the wanted navigation type (PAN, ROTATE, WALK, ZOOM) based on the mouse and keyboard input state.
The wheelNavigationType() determines the use of the mouse wheel. Usually WALK or ZOOM.
In more advanced cases the user can also override the mousePressEvent(), mouseMoveEvent(), mouseReleaseEvent() and wheelEvent() methods and create a fully custom user experience.
![]() | Visualization: Create a custom navigation handler to support a custom navigation scheme |