From 6861329ab94aaca07a3a06bc6aa469829ea89b7d Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 5 Mar 2018 10:34:41 +0000 Subject: [PATCH] Rename for_each_voxel to for_each_cell. --- src/gamelib/collider.cpp | 2 +- src/gamelib/grid_raytrace.cpp | 2 +- src/gamelib/grid_raytrace.hpp | 2 +- test/unit/grid_raytrace.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gamelib/collider.cpp b/src/gamelib/collider.cpp index e58b1de..7491461 100644 --- a/src/gamelib/collider.cpp +++ b/src/gamelib/collider.cpp @@ -93,7 +93,7 @@ namespace curry { return true; }; - for_each_voxel_under_segment( + for_each_cell_under_segment( parFrom + pix_side_offset, parTo + pix_side_offset, parObjectSize, diff --git a/src/gamelib/grid_raytrace.cpp b/src/gamelib/grid_raytrace.cpp index a5b472a..0fbee0e 100644 --- a/src/gamelib/grid_raytrace.cpp +++ b/src/gamelib/grid_raytrace.cpp @@ -93,7 +93,7 @@ namespace curry { //see: //http://stackoverflow.com/questions/24679963/precise-subpixel-line-drawing-algorithm-rasterization-algorithm - void for_each_voxel_under_segment ( + void for_each_cell_under_segment ( const vec2f& parFrom, const vec2f& parTo, vec2us parObjSize, diff --git a/src/gamelib/grid_raytrace.hpp b/src/gamelib/grid_raytrace.hpp index 92809b1..c264efa 100644 --- a/src/gamelib/grid_raytrace.hpp +++ b/src/gamelib/grid_raytrace.hpp @@ -30,7 +30,7 @@ namespace curry { float segment_intersection (const vec2f& parA, const vec2f& parDirA, const vec2f& parB, const vec2f& parDirB); #endif - void for_each_voxel_under_segment ( + void for_each_cell_under_segment ( const vec2f& parFrom, const vec2f& parTo, vec2us parObjSize, diff --git a/test/unit/grid_raytrace.cpp b/test/unit/grid_raytrace.cpp index 438a738..cae8b5c 100644 --- a/test/unit/grid_raytrace.cpp +++ b/test/unit/grid_raytrace.cpp @@ -25,7 +25,7 @@ #include TEST_CASE ("Check that 2D raytracing works", "[raytracing][geometry]") { - using curry::for_each_voxel_under_segment; + using curry::for_each_cell_under_segment; using curry::vec2us; using curry::vec2f; @@ -49,7 +49,7 @@ TEST_CASE ("Check that 2D raytracing works", "[raytracing][geometry]") { { std::vector diagonal; - for_each_voxel_under_segment ( + for_each_cell_under_segment ( vec2f(0.0f, 0.0f), //from vec2f(639.0f, 639.0f), //to vec2us(1, 1), //objsize