|
Botcraft 1.21.10
|
#include <Camera.hpp>
Public Member Functions | |
| Camera (glm::vec3 position_=glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 up_=glm::vec3(0.0f, 1.0f, 0.0f), float yaw_=0.0f, float pitch_=0.0f) | |
| const glm::mat4 & | GetViewMatrix () const |
| const glm::vec3 & | GetPosition () const |
| const glm::vec3 & | GetFront () const |
| const std::array< glm::vec4, 6 > & | GetFrustumPlanes () const |
| float | GetYaw () const |
| float | GetPitch () const |
| void | SetPosition (const float x, const float y, const float z) |
| void | SetRotation (const float pitch_, const float yaw_) |
| void | SetProjection (const glm::mat4 &projection) |
| bool | GetHasChangedPosition () const |
| bool | GetHasChangedOrientation () const |
| void | ResetHasChangedPosition () |
| void | ResetHasChangedOrientation () |
| float | GetDistance (const float x_, const float y_, const float z_) const |
Private Member Functions | |
| void | UpdateCameraViewMatrix () |
| void | ComputeFrustumPlanes () |
Private Attributes | |
| glm::vec3 | worldUp |
| glm::vec3 | position |
| glm::vec3 | front |
| float | yaw |
| float | pitch |
| glm::mat4 | projection_matrix |
| glm::mat4 | view_matrix |
| std::array< glm::vec4, 6 > | frustum |
| bool | has_changed_position |
| bool | has_changed_orientation |
Definition at line 14 of file Camera.hpp.
| Botcraft::Renderer::Camera::Camera | ( | glm::vec3 | position_ = glm::vec3(0.0f, 0.0f, 0.0f), |
| glm::vec3 | up_ = glm::vec3(0.0f, 1.0f, 0.0f), |
||
| float | yaw_ = 0.0f, |
||
| float | pitch_ = 0.0f |
||
| ) |
Definition at line 7 of file Camera.cpp.
References pitch, position, UpdateCameraViewMatrix(), worldUp, and yaw.
|
private |
Definition at line 121 of file Camera.cpp.
References frustum, projection_matrix, and view_matrix.
Referenced by SetProjection(), and UpdateCameraViewMatrix().
| float Botcraft::Renderer::Camera::GetDistance | ( | const float | x_, |
| const float | y_, | ||
| const float | z_ | ||
| ) | const |
Definition at line 21 of file Camera.cpp.
References position.
| const glm::vec3 & Botcraft::Renderer::Camera::GetFront | ( | ) | const |
Definition at line 43 of file Camera.cpp.
References front.
| const std::array< glm::vec4, 6 > & Botcraft::Renderer::Camera::GetFrustumPlanes | ( | ) | const |
Definition at line 48 of file Camera.cpp.
References frustum.
| bool Botcraft::Renderer::Camera::GetHasChangedOrientation | ( | ) | const |
Definition at line 90 of file Camera.cpp.
References has_changed_orientation.
| bool Botcraft::Renderer::Camera::GetHasChangedPosition | ( | ) | const |
Definition at line 85 of file Camera.cpp.
References has_changed_position.
| float Botcraft::Renderer::Camera::GetPitch | ( | ) | const |
Definition at line 58 of file Camera.cpp.
References pitch.
| const glm::vec3 & Botcraft::Renderer::Camera::GetPosition | ( | ) | const |
Definition at line 38 of file Camera.cpp.
References position.
| const glm::mat4 & Botcraft::Renderer::Camera::GetViewMatrix | ( | ) | const |
Definition at line 16 of file Camera.cpp.
References view_matrix.
| float Botcraft::Renderer::Camera::GetYaw | ( | ) | const |
Definition at line 53 of file Camera.cpp.
References yaw.
| void Botcraft::Renderer::Camera::ResetHasChangedOrientation | ( | ) |
Definition at line 100 of file Camera.cpp.
References has_changed_orientation.
| void Botcraft::Renderer::Camera::ResetHasChangedPosition | ( | ) |
Definition at line 95 of file Camera.cpp.
References has_changed_position.
| void Botcraft::Renderer::Camera::SetPosition | ( | const float | x, |
| const float | y, | ||
| const float | z | ||
| ) |
Definition at line 30 of file Camera.cpp.
References has_changed_position, position, and UpdateCameraViewMatrix().
| void Botcraft::Renderer::Camera::SetProjection | ( | const glm::mat4 & | projection | ) |
Definition at line 79 of file Camera.cpp.
References ComputeFrustumPlanes(), and projection_matrix.
| void Botcraft::Renderer::Camera::SetRotation | ( | const float | pitch_, |
| const float | yaw_ | ||
| ) |
Definition at line 63 of file Camera.cpp.
References has_changed_orientation, pitch, UpdateCameraViewMatrix(), and yaw.
|
private |
Definition at line 105 of file Camera.cpp.
References ComputeFrustumPlanes(), front, pitch, position, view_matrix, worldUp, and yaw.
Referenced by Camera(), SetPosition(), and SetRotation().
|
private |
Definition at line 54 of file Camera.hpp.
Referenced by GetFront(), and UpdateCameraViewMatrix().
|
private |
Definition at line 65 of file Camera.hpp.
Referenced by ComputeFrustumPlanes(), and GetFrustumPlanes().
|
private |
Definition at line 68 of file Camera.hpp.
Referenced by GetHasChangedOrientation(), ResetHasChangedOrientation(), and SetRotation().
|
private |
Definition at line 67 of file Camera.hpp.
Referenced by GetHasChangedPosition(), ResetHasChangedPosition(), and SetPosition().
|
private |
Definition at line 58 of file Camera.hpp.
Referenced by Camera(), GetPitch(), SetRotation(), and UpdateCameraViewMatrix().
|
private |
Definition at line 53 of file Camera.hpp.
Referenced by Camera(), GetDistance(), GetPosition(), SetPosition(), and UpdateCameraViewMatrix().
|
private |
Definition at line 61 of file Camera.hpp.
Referenced by ComputeFrustumPlanes(), and SetProjection().
|
private |
Definition at line 62 of file Camera.hpp.
Referenced by ComputeFrustumPlanes(), GetViewMatrix(), and UpdateCameraViewMatrix().
|
private |
Definition at line 50 of file Camera.hpp.
Referenced by Camera(), and UpdateCameraViewMatrix().
|
private |
Definition at line 57 of file Camera.hpp.
Referenced by Camera(), GetYaw(), SetRotation(), and UpdateCameraViewMatrix().