summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorJoel Davis <[email protected]>2017-01-02 21:56:25 -0800
committerJoel Davis <[email protected]>2017-01-02 21:56:25 -0800
commitd5d391faaf69027b8fecb26f30754c3bff83c311 (patch)
tree5129f65135b521e2825af5cc09b3d7e33a2ce59a /src/raylib.h
parent037da8879a3ae61b09d8388bc2b4a2fe5359256a (diff)
downloadraylib-d5d391faaf69027b8fecb26f30754c3bff83c311.tar.gz
raylib-d5d391faaf69027b8fecb26f30754c3bff83c311.zip
Added RaycastMesh function and example test case
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h
index f291ce85..7252ba4e 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -497,6 +497,7 @@ typedef struct Ray {
// Information returned from a raycast
typedef struct RayHitInfo {
bool hit; // Did the ray hit something?
+ float distance; // Distance to nearest hit
Vector3 hitPosition; // Position of nearest hit
Vector3 hitNormal; // Surface normal of hit
} RayHitInfo;
@@ -924,6 +925,8 @@ RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box);
// Ray Casts
//------------------------------------------------------------------------------------
RLAPI RayHitInfo RaycastGroundPlane( Ray ray, float groundHeight );
+RLAPI RayHitInfo RaycastTriangle( Ray ray, Vector3 a, Vector3 b, Vector3 c );
+RLAPI RayHitInfo RaycastMesh( Ray ray, Mesh *mesh );
//------------------------------------------------------------------------------------
// Shaders System Functions (Module: rlgl)