|
Engine²
Open-source game engine written in C++.
|
Classes | |
| class | ICameraBehavior |
| Base interface for camera behaviors. More... | |
| class | DefaultBehavior |
| Default camera behavior with WASD movement and mouse look. More... | |
| class | DontMoveBehavior |
| Camera behavior that does not move the camera. More... | |
Functions | |
| glm::quat | ComputeLookAtQuaternion (const glm::vec3 &eye, const glm::vec3 &target, const glm::vec3 &up) |
| Compute a quaternion that represents a "look at" rotation. | |
| glm::quat | RotateQuaternion (const glm::quat ¤t, float pitch, float yaw) |
| Apply pitch and yaw rotation to a quaternion. | |
| glm::vec3 | GetRightVector (const glm::quat &rotation) |
| Get the right vector from a quaternion rotation. | |
| glm::vec3 | GetUpVector (const glm::quat &rotation) |
| Get the up vector from a quaternion rotation. | |
| glm::vec3 | GetForwardVector (const glm::quat &rotation) |
| Get the forward vector from a quaternion rotation. | |
|
inline |
Compute a quaternion that represents a "look at" rotation.
| eye | The position of the camera. |
| target | The point the camera is looking at. |
| up | The up vector. |
|
inline |
Get the forward vector from a quaternion rotation.
| rotation | The rotation quaternion. |
|
inline |
Get the right vector from a quaternion rotation.
| rotation | The rotation quaternion. |
|
inline |
Get the up vector from a quaternion rotation.
| rotation | The rotation quaternion. |
|
inline |
Apply pitch and yaw rotation to a quaternion.
| current | The current rotation quaternion. |
| pitch | The pitch angle in radians (rotation around right axis). |
| yaw | The yaw angle in radians (rotation around up axis). |