diff options
| author | Ray <[email protected]> | 2022-03-30 20:11:22 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-03-30 20:11:22 +0200 |
| commit | 90fc7c0376f39d7b19d632e1d69dec715ec3f2a8 (patch) | |
| tree | e79f82b60d57b3a4a948be5dfa340b03de567060 /src | |
| parent | 5abb87a0d27f3a81252c262dc217b0f8b85de753 (diff) | |
| download | raylib-90fc7c0376f39d7b19d632e1d69dec715ec3f2a8.tar.gz raylib-90fc7c0376f39d7b19d632e1d69dec715ec3f2a8.zip | |
WARNING: BREAKING: REMOVED: `GetRayCollisionModel()` #2405
Diffstat (limited to 'src')
| -rw-r--r-- | src/raylib.h | 1 | ||||
| -rw-r--r-- | src/rmodels.c | 19 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/raylib.h b/src/raylib.h index fca512a6..1add734b 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1466,7 +1466,6 @@ RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box -RLAPI RayCollision GetRayCollisionModel(Ray ray, Model model); // Get collision info between ray and model RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad diff --git a/src/rmodels.c b/src/rmodels.c index cd5d01f2..9f5cfd39 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -3640,25 +3640,6 @@ RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform) return collision; } -// Get collision info between ray and model -RayCollision GetRayCollisionModel(Ray ray, Model model) -{ - RayCollision collision = { 0 }; - - for (int m = 0; m < model.meshCount; m++) - { - RayCollision meshHitInfo = GetRayCollisionMesh(ray, model.meshes[m], model.transform); - - if (meshHitInfo.hit) - { - // Save the closest hit mesh - if ((!collision.hit) || (collision.distance > meshHitInfo.distance)) collision = meshHitInfo; - } - } - - return collision; -} - // Get collision info between ray and triangle // NOTE: The points are expected to be in counter-clockwise winding // NOTE: Based on https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm |
