24 front.x = std::cos(orientation.y) * std::cos(orientation.x);
25 front.y = std::sin(orientation.x);
26 front.z = std::sin(orientation.y) * std::cos(orientation.x);
29 glm::vec3
up = glm::vec3(0.0f, 1.0f, 0.0f);
33 return glm::lookAt(position, position +
front,
up);
43 float ndcX = 2.0f *
x - 1.0f;
44 float ndcY = 1.0f - 2.0f *
y;
68 for (
int x = -1;
x <= 1;
x += 2) {
69 for (
int y = -1;
y <= 1;
y += 2) {
70 for (
int z = -1;
z <= 1;
z += 2) {
Definition CameraComponent.hpp:10
float fov
Definition CameraComponent.hpp:14
ProjectionType
Definition CameraComponent.hpp:12
float farPlane
Definition CameraComponent.hpp:16
Ray getRayAt(const TransformComponent &transformComponent, float x, float y) const
Definition CameraComponent.hpp:38
ProjectionType projectionType
Definition CameraComponent.hpp:17
float nearPlane
Definition CameraComponent.hpp:16
glm::mat4 getViewMatrix(const TransformComponent &transformComponent) const
Definition CameraComponent.hpp:19
std::vector< glm::vec3 > getFrustumCornersWorldSpace(float localNearPlane, float localFarPlane, const TransformComponent &transformComponent) const
Definition CameraComponent.hpp:61
glm::mat4 getProjectionMatrix(ProjectionType projection, float localNearPlane, float localFarPlane) const
Definition CameraComponent.hpp:81
glm::mat4 getProjectionMatrix() const
Definition CameraComponent.hpp:36
float aspectRatio
Definition CameraComponent.hpp:15