23 #ifndef HX3D_GRAPHICS_CAMERAS_CAMERA 24 #define HX3D_GRAPHICS_CAMERAS_CAMERA 26 #include <glm/vec3.hpp> 27 #include <glm/mat2x2.hpp> 28 #include <glm/gtc/matrix_transform.hpp> 30 #include "hx3d/graphics/color.hpp" 51 Camera(
const float width,
const float height,
const float near,
const float far);
58 void lookAt(glm::vec3 target);
73 void rotate(
const float angle,
const glm::vec3 axis);
82 void rotateAround(
const glm::vec3 center,
const float angle,
const glm::vec3 axis);
void rotate(const float angle, const glm::vec3 axis)
Rotate the camera on one/multiple axes.
float viewportHeight
Viewport height.
glm::vec3 up
Camera up vector.
Camera(const float width, const float height, const float near, const float far)
Create a camera with a viewport width and height.
void translate(const glm::vec3 vec)
Translate the camera.
glm::mat4 view
View matrix.
glm::mat4 projection
Projection matrix.
virtual void update()=0
Update the camera.
float viewportWidth
Viewport width.
void lookAt(glm::vec3 target)
Look at target.
glm::vec3 position
Camera position.
void rotateAround(const glm::vec3 center, const float angle, const glm::vec3 axis)
Rotate the camera around one point, on one/multiple axes.
glm::vec3 direction
Camera direction.