![]() |
AireEngine
A 3D Open-World Game Engine
|
#include <camera.h>
Public Member Functions | |
| Camera (Rigidbody *rigidbody, Config config, glm::vec3 offset=glm::vec3(0, 0, 0)) | |
| Camera ()=default | |
| Default constructor for camera. | |
| void | update (glm::vec3 forward, glm::vec3 up) |
| glm::mat4 | getViewMatrix () const |
| glm::mat4 | getProjectionMatrix () const |
Public Attributes | |
| glm::vec3 | camOffset |
| Offset from rigidbody. | |
| glm::vec3 | position |
| World position of the camera. | |
A class for defining a camera. Maintains it's own orientation and optionally position.
Camera constructor - attatch to rigid body Creates a camera that is attached to a rigidbody. Therefore inheriting it's position.
| rigidbody | rigidbody to attatch camera to |
| offset | offset from the rigidbody position for the camera (defaults to (0,0,0)) |
| config | config used for this game |

| glm::mat4 Camera::getProjectionMatrix | ( | ) | const |
Function to return the Projection matrix

| glm::mat4 Camera::getViewMatrix | ( | ) | const |
Function to return the view matrix

| void Camera::update | ( | glm::vec3 | forward, |
| glm::vec3 | up ) |
Update the state of the camera
| forward | forward facing direction of the camera |
| up | upward facing direction from the camera |
