|
Avara3D 0.2.0
C++ API reference
|
Applies free-flight keyboard and pointer controls to a point-of-view Node. More...
#include <a3d/extension/camera/FlyCameraController.h>
Classes | |
| struct | Config |
| Free-flight sensitivity, speed, and control bindings. More... | |
| struct | Controls |
| Key bindings used for free-flight translation and speed control. More... | |
Public Member Functions | |
| FlyCameraController () | |
| Creates a FlyCameraController with the default configuration. More... | |
| FlyCameraController (const Config &config) | |
Creates a FlyCameraController with config. More... | |
| const Config & | config () const |
| Returns the current controller configuration. More... | |
| void | config (const Config &config) |
| Replaces the controller configuration. More... | |
| bool | update (Node &pov, DesktopInputContext &input, double deltaTime) |
Updates pov from the current input state. More... | |
Applies free-flight keyboard and pointer controls to a point-of-view Node.
Pointer motion changes pitch and yaw while configured keys translate the Node along its local axes expressed in parent coordinates. update() modifies the supplied Node directly and returns whether its transform changed.
Definition at line 29 of file FlyCameraController.h.
| a3d::ext::FlyCameraController::FlyCameraController | ( | ) |
Creates a FlyCameraController with the default configuration.
|
explicit |
Creates a FlyCameraController with config.
| const Config & a3d::ext::FlyCameraController::config | ( | ) | const |
Returns the current controller configuration.
| void a3d::ext::FlyCameraController::config | ( | const Config & | config | ) |
Replaces the controller configuration.
| bool a3d::ext::FlyCameraController::update | ( | Node & | pov, |
| DesktopInputContext & | input, | ||
| double | deltaTime | ||
| ) |
Updates pov from the current input state.
Pointer displacement changes pitch and yaw and clears roll when look input is applied. Translation uses the configured movement keys and deltaTime.
| pov | Node whose transform is controlled. |
| input | Current desktop-style input state. |
| deltaTime | Elapsed time represented by this update, in seconds. |