From 0db1ae34cb6d687886a2e50a489c5396000f5cd0 Mon Sep 17 00:00:00 2001 From: matixezor Date: Tue, 28 Dec 2021 19:40:13 +0100 Subject: [PATCH] refactor: rename skybox related parameters --- grafika_projekt/src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grafika_projekt/src/main.cpp b/grafika_projekt/src/main.cpp index f658fa0..db726e0 100644 --- a/grafika_projekt/src/main.cpp +++ b/grafika_projekt/src/main.cpp @@ -39,6 +39,7 @@ std::string skyboxTextures[6] = { }; float skyboxVerticeParameter = 20.0f; +float skyboxBoundary = 19.5f; float skyboxVertices[] = { -skyboxVerticeParameter, skyboxVerticeParameter, -skyboxVerticeParameter, @@ -86,8 +87,8 @@ float skyboxVertices[] = { bool isInBoundaries(glm::vec3 nextPosition) { - float boundary = 19.5f; - return nextPosition.z > -boundary && nextPosition.z < boundary && nextPosition.y > -boundary && nextPosition.y < boundary && nextPosition.x < boundary && nextPosition.x > -boundary; + return nextPosition.z > -skyboxBoundary && nextPosition.z < skyboxBoundary && nextPosition.y > -skyboxBoundary && + nextPosition.y < skyboxBoundary && nextPosition.x < skyboxBoundary && nextPosition.x > -skyboxBoundary; }