diff options
author | aap <aap@papnet.eu> | 2020-05-06 17:56:38 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-06 17:56:38 +0200 |
commit | f1c1f56b1268b900a01a479f9ad67cd92e63eb52 (patch) | |
tree | f936f78ebcc7b736995b68b4d65a66c26cc790c2 /src/core/Collision.cpp | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.gz re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.bz2 re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.lz re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.xz re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.zst re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.zip |
Diffstat (limited to 'src/core/Collision.cpp')
-rw-r--r-- | src/core/Collision.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp index 61cb14db..48abbd9a 100644 --- a/src/core/Collision.cpp +++ b/src/core/Collision.cpp @@ -130,14 +130,14 @@ CCollision::LoadCollisionScreen(eLevelName level) bool -CCollision::TestSphereSphere(const CColSphere &s1, const CColSphere &s2) +CCollision::TestSphereSphere(const CSphere &s1, const CSphere &s2) { float d = s1.radius + s2.radius; return (s1.center - s2.center).MagnitudeSqr() < d*d; } bool -CCollision::TestSphereBox(const CColSphere &sph, const CColBox &box) +CCollision::TestSphereBox(const CSphere &sph, const CBox &box) { if(sph.center.x + sph.radius < box.min.x) return false; if(sph.center.x - sph.radius > box.max.x) return false; @@ -149,7 +149,7 @@ CCollision::TestSphereBox(const CColSphere &sph, const CColBox &box) } bool -CCollision::TestLineBox(const CColLine &line, const CColBox &box) +CCollision::TestLineBox(const CColLine &line, const CBox &box) { float t, x, y, z; // If either line point is in the box, we have a collision @@ -234,7 +234,7 @@ CCollision::TestLineBox(const CColLine &line, const CColBox &box) } bool -CCollision::TestVerticalLineBox(const CColLine &line, const CColBox &box) +CCollision::TestVerticalLineBox(const CColLine &line, const CBox &box) { if(line.p0.x <= box.min.x) return false; if(line.p0.y <= box.min.y) return false; |