Added RaycastMesh function and example test case

This commit is contained in:
Joel Davis
2017-01-02 21:56:25 -08:00
parent 037da8879a
commit d5d391faaf
7 changed files with 712 additions and 51 deletions

View File

@@ -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)