summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2021-05-31 11:41:56 +0200
committerRay <[email protected]>2021-05-31 11:41:56 +0200
commit1c5de9721a8c9b9543044b461d4a9480c1d25b43 (patch)
tree464dc05f9d13bf9ed56ce76515c1c5f26f1a4ddc /src/raylib.h
parent7bcb2ad4f10c7b8508c706e538994830b012154b (diff)
downloadraylib-1c5de9721a8c9b9543044b461d4a9480c1d25b43.tar.gz
raylib-1c5de9721a8c9b9543044b461d4a9480c1d25b43.zip
WARNING: BREAKING: RENAMED: RayHitInfo to RayCollision #1781
- RENAMED: RayHitInfo to RayCollision - RENAMED/REDESIGNED: Multiple Ray collision functions to be more consistent and return RayCollision data -WIP-
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 63d1bdf6..5f57496c 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -399,12 +399,12 @@ typedef struct Ray {
} Ray;
// RayCollision, ray hit information
-typedef struct RayHitInfo {
+typedef struct RayCollision {
bool hit; // Did the ray hit something?
float distance; // Distance to nearest hit
- Vector3 position; // Position of nearest hit
+ Vector3 point; // Point of nearest hit
Vector3 normal; // Surface normal of hit
-} RayHitInfo;
+} RayCollision;
// BoundingBox
typedef struct BoundingBox {
@@ -1445,13 +1445,12 @@ RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source,
RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Detect collision between two spheres
RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes
RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Detect collision between box and sphere
-RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 center, float radius); // Detect collision between ray and sphere
-RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 center, float radius, Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point
-RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box
-RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
-RLAPI RayHitInfo GetCollisionRayModel(Ray ray, Model model); // Get collision info between ray and model
-RLAPI RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
-RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane)
+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 GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
+RLAPI RayCollision GetRayCollisionModel(Ray ray, Model model); // Get collision info between ray and model
+RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
+RLAPI RayCollision GetRayCollisionGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane)
//------------------------------------------------------------------------------------
// Audio Loading and Playing Functions (Module: audio)