#include <TrackballCamManip.h>
Inheritance diagram for nvui::TrackballCamManip:
Public Methods | |
NVSG_API | TrackballCamManip (void) |
Default constructor. More... | |
virtual NVSG_API | ~TrackballCamManip (void) |
Default destructor. More... | |
virtual NVSG_API void | apply () |
Apply the states to the camera. More... | |
virtual NVSG_API void | setViewportSize (size_t x, size_t y) |
Set Viewport size. More... | |
bool | isDolly (void) |
Signals if manipulator is in dolly mode. More... | |
bool | isPan (void) |
Signals if manipulator is in pan mode. More... | |
bool | isRotate (void) |
Signals if manipulator is in rotate mode. More... | |
Protected Methods | |
virtual NVSG_API void | rotate (void) |
Do camera rotation. More... | |
virtual NVSG_API void | pan (void) |
Do camera panning. More... | |
virtual NVSG_API void | dolly (void) |
Do the camera dolly. More... | |
Protected Attributes | |
nvutil::Trackball | m_trackball |
Trackball object that does all the calculations. More... | |
Static Protected Attributes | |
NVSG_API const UINT | DOLLY1 |
Button configuration for dolly. More... | |
NVSG_API const UINT | DOLLY2 |
Button configuration for dolly. More... | |
NVSG_API const UINT | PAN1 |
Button configuration for pan. More... | |
NVSG_API const UINT | PAN2 |
Button configuration for pan. More... | |
NVSG_API const UINT | ROTATE1 |
Button configuration for pan. More... |
This manipulator is a special CameraManipulator that interpretes mouse movement as trackball input. Think of a big sphere centered inside of the viewport where you can lay your hand on and rotate it. The manipulator also allows you to dolly and move the objects of the scene.
|
Default constructor.
|
|
Default destructor.
|
|
Apply the states to the camera. Recalculate the camera regarding the manipulator states. Implements nvui::CameraManipulator. |
|
Set Viewport size. Adapt resize of the render area and update the size of the trackball. Call this method whenever the viewport size changes or if you create / initialize the manipulator.
Reimplemented from nvui::CameraManipulator. |
|
Signals if manipulator is in dolly mode. This method compares the current button state with the configured button states of this object. e.g. DOLLY1, DOLLY2
|
|
Signals if manipulator is in pan mode. This method compares the current button state with the configured button states of this object. e.g. PAN1, PAN2
|
|
Signals if manipulator is in rotate mode. This method compares the current button state with the configured button states of this object. e.g. ROTATE1
|
|
Do camera rotation. Trackball movement of the camera. You can simply replace it with your own way to handle this. |
|
Do camera panning. Move the camera in the camera plane. (left, right up, down) You can simply replace it with your own way to handle this. |
|
Do the camera dolly. Dolly in and out. You can simply replace it with your own way to handle this. |
|
Button configuration for dolly.
|
|
Button configuration for dolly.
|
|
Button configuration for pan.
|
|
Button configuration for pan.
|
|
Button configuration for pan.
|
|
Trackball object that does all the calculations.
|