From f81d611f0e298baffad68d83f208e2306fe38739 Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Sat, 24 Sep 2022 21:16:13 -0400 Subject: remove Xe From engine class names --- engine/xe_camera.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/xe_camera.cpp') diff --git a/engine/xe_camera.cpp b/engine/xe_camera.cpp index 2174a24..42b4def 100644 --- a/engine/xe_camera.cpp +++ b/engine/xe_camera.cpp @@ -5,7 +5,7 @@ namespace xe { -void XeCamera::setOrthographicProjection( +void Camera::setOrthographicProjection( float left, float right, float top, float bottom, float near, float far) { projectionMatrix = glm::mat4{1.0f}; projectionMatrix[0][0] = 2.f / (right - left); @@ -16,7 +16,7 @@ void XeCamera::setOrthographicProjection( projectionMatrix[3][2] = -near / (far - near); } -void XeCamera::setPerspectiveProjection(float fovy, float aspect, float near, float far) { +void Camera::setPerspectiveProjection(float fovy, float aspect, float near, float far) { assert(glm::abs(aspect - std::numeric_limits::epsilon()) > 0.0f); const float tanHalfFovy = tan(fovy / 2.f); projectionMatrix = glm::mat4{0.0f}; @@ -27,7 +27,7 @@ void XeCamera::setPerspectiveProjection(float fovy, float aspect, float near, fl projectionMatrix[3][2] = -(far * near) / (far - near); } -void XeCamera::setViewDirection(glm::vec3 position, glm::vec3 direction, glm::vec3 up) { +void Camera::setViewDirection(glm::vec3 position, glm::vec3 direction, glm::vec3 up) { const glm::vec3 w{glm::normalize(direction)}; const glm::vec3 u{glm::normalize(glm::cross(w, up))}; const glm::vec3 v{glm::cross(w, u)}; @@ -47,11 +47,11 @@ void XeCamera::setViewDirection(glm::vec3 position, glm::vec3 direction, glm::ve viewMatrix[3][2] = -glm::dot(w, position); } -void XeCamera::setViewTarget(glm::vec3 position, glm::vec3 target, glm::vec3 up) { +void Camera::setViewTarget(glm::vec3 position, glm::vec3 target, glm::vec3 up) { setViewDirection(position, target - position, up); } -void XeCamera::setViewYXZ(glm::vec3 position, glm::vec3 rotation) { +void Camera::setViewYXZ(glm::vec3 position, glm::vec3 rotation) { const float c3 = glm::cos(rotation.z); const float s3 = glm::sin(rotation.z); const float c2 = glm::cos(rotation.x); -- cgit v1.2.3-freya