From 408d767dcdb7bfbff70cf76e29d796d9d1dfc4c9 Mon Sep 17 00:00:00 2001 From: kj16609 Date: Fri, 16 Feb 2024 19:32:19 -0500 Subject: [PATCH] Cleanup --- src/engine/Camera.cpp | 2 -- src/engine/model/BoundingBox.cpp | 4 ---- tests/src/BoundingBoxTest.cpp | 12 +++--------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/engine/Camera.cpp b/src/engine/Camera.cpp index 863cacc..d81cfdf 100644 --- a/src/engine/Camera.cpp +++ b/src/engine/Camera.cpp @@ -317,8 +317,6 @@ namespace fgl::engine const Plane< CoordinateSpace::Model > bottom_plane { glm::cross( bottom_forward, constants::WORLD_LEFT ), 0.0f }; - std::cout << bottom_plane.direction() << std::endl; - return { near_plane, far_plane, top_plane, bottom_plane, right_plane, left_plane }; } diff --git a/src/engine/model/BoundingBox.cpp b/src/engine/model/BoundingBox.cpp index 7ced5cf..2902016 100644 --- a/src/engine/model/BoundingBox.cpp +++ b/src/engine/model/BoundingBox.cpp @@ -238,10 +238,6 @@ namespace fgl::engine const glm::vec3 midpoint { ( top_left_front + bottom_right_back ) / glm::vec3( 2.0f ) }; const glm::vec3 scale { bottom_right_back - midpoint }; - std::cout << "Generated bounding box from " << points.size() << " points. Output:\n\tMidpoint:" << midpoint.x - << " " << midpoint.y << " " << midpoint.z << "\n\tScale:" << scale.x << " " << scale.y << " " - << scale.z << std::endl; - return { Coordinate< CType >( midpoint ), scale }; } diff --git a/tests/src/BoundingBoxTest.cpp b/tests/src/BoundingBoxTest.cpp index 13174f5..a721a07 100644 --- a/tests/src/BoundingBoxTest.cpp +++ b/tests/src/BoundingBoxTest.cpp @@ -50,7 +50,7 @@ TEST_CASE( "BoundingBox", "[boundingbox]" ) } } - for ( int j = 0; j < 32; ++j ) + BENCHMARK( "Combine bounding box" ) { auto generatePoints = []() { @@ -87,12 +87,6 @@ TEST_CASE( "BoundingBox", "[boundingbox]" ) } } - //Check that the lowest point is the one from the combined box too - REQUIRE( model_box.bottomLeftBack().x == lowest_point.x ); - REQUIRE( model_box.bottomLeftBack().y == lowest_point.y ); - REQUIRE( model_box.bottomLeftBack().z == lowest_point.z ); - REQUIRE( model_box.topRightForward().x == highest_point.x ); - REQUIRE( model_box.topRightForward().y == highest_point.y ); - REQUIRE( model_box.topRightForward().z == highest_point.z ); - } + return model_box; + }; }