![]() |
Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
|
#include <Camera.hpp>
Public Member Functions | |
| Transformation & | getTransform () |
| bool const | sideWayActive () |
| void | sideWayActive (bool const value) |
| Camera (Application *app) | |
| mat4 const & | getView () |
| bool const | hasViewChanged () |
| int const | getMouseBorder () |
| void | update (double time, double timeDelta) |
| void | onKeyStateChanged (int key, bool pressed) |
Private Attributes | |
| Transformation | m_transformation |
| Application * | m_app |
| bool | m_hasViewChanged |
| int | m_mouseBorder |
| bool | m_cameraSideWayActive |
Camera is used to handle the scenes camera.
Definition at line 10 of file Camera.hpp.
| Camera | ( | Application * | app | ) |
Constructs a Camera-object.
| app | The global application. |
Definition at line 3 of file Camera.cpp.
|
inline |
Accessor to the mouse-border-size in pixel.
Definition at line 56 of file Camera.hpp.
|
inline |
Wheter the mouse-border is active or not
Accessor to the local transformation.
Definition at line 23 of file Camera.hpp.
|
inline |
|
inline |
Accessor to wheter the view has changed or not.
Definition at line 51 of file Camera.hpp.
| void onKeyStateChanged | ( | int | key, |
| bool | pressed | ||
| ) |
Callback of key-state-changes. Toggles mouse-border-active on SCROLL-key.
| key | The key |
| pressed | Wheter the key was pressed or released. |
Definition at line 49 of file Camera.cpp.
|
inline |
Accessor to wheter the mouse-border is active or not.
Definition at line 28 of file Camera.hpp.
|
inline |
Accessor to wheter the mouse-border is active or not.
| value | Wheter the mouse-border is active or not. |
Definition at line 33 of file Camera.hpp.
| void update | ( | double | time, |
| double | timeDelta | ||
| ) |
Updates the camera-object.
Moves it according to WASD-keys pressed. Moves it according to mouse-border-hovering.
| time | The absolute frame time. |
| timeDelta | The time since the last frame. |
Definition at line 11 of file Camera.cpp.
|
private |
The local transformation of the cammera (inverse matrix is view-matrix)
Definition at line 13 of file Camera.hpp.
|
private |
The size of the mouse-border in pixel
Definition at line 16 of file Camera.hpp.
|
private |
The global application
Definition at line 14 of file Camera.hpp.
|
private |
Wheter the view has changed since the last frame
Definition at line 15 of file Camera.hpp.
|
private |
Definition at line 12 of file Camera.hpp.
1.8.7