hx3d
1
2D/3D Simple Game Framework
|
2D orthographic camera w/ Z-buffer. More...
#include <orthographic_camera.hpp>
Public Member Functions | |
OrthographicCamera () | |
Create an orthographic camera with the screen size. | |
OrthographicCamera (const float width, const float height) | |
Create an orthographic camera with a viewport width and height. More... | |
void | setToOrtho (const float width, const float height) |
Set the orthographic size. More... | |
virtual void | update () override |
Update the camera. | |
![]() | |
Camera (const float width, const float height, const float near, const float far) | |
Create a camera with a viewport width and height. More... | |
void | lookAt (glm::vec3 target) |
Look at target. More... | |
void | translate (const glm::vec3 vec) |
Translate the camera. More... | |
void | rotate (const float angle, const glm::vec3 axis) |
Rotate the camera on one/multiple axes. More... | |
void | rotateAround (const glm::vec3 center, const float angle, const glm::vec3 axis) |
Rotate the camera around one point, on one/multiple axes. More... | |
Public Attributes | |
float | zoom |
Camera zoom. | |
![]() | |
glm::vec3 | position |
Camera position. | |
glm::vec3 | direction |
Camera direction. | |
glm::vec3 | up |
Camera up vector. | |
glm::mat4 | projection |
Projection matrix. | |
glm::mat4 | view |
View matrix. | |
float | near |
Near pane. | |
float | far |
Far pane. | |
float | viewportWidth |
Viewport width. | |
float | viewportHeight |
Viewport height. | |
2D orthographic camera w/ Z-buffer.
Definition at line 34 of file orthographic_camera.hpp.
hx3d::graphics::OrthographicCamera::OrthographicCamera | ( | const float | width, |
const float | height | ||
) |
Create an orthographic camera with a viewport width and height.
width | Viewport width |
height | Viewport height |
Definition at line 35 of file orthographic_camera.cpp.
void hx3d::graphics::OrthographicCamera::setToOrtho | ( | const float | width, |
const float | height | ||
) |
Set the orthographic size.
width | Viewport width |
height | Viewport height |
Definition at line 48 of file orthographic_camera.cpp.