summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-01-05 19:33:05 +0100
committerraysan5 <[email protected]>2017-01-05 19:33:05 +0100
commit658c2806690ace34a0dae6b6ed12d0ea52d2d6e4 (patch)
treee726d130c81f429e70d1c36b91aef5454658efb9 /src/raylib.h
parent0369bb4c8cfe8988634a09d56c307b73be281452 (diff)
downloadraylib-658c2806690ace34a0dae6b6ed12d0ea52d2d6e4.tar.gz
raylib-658c2806690ace34a0dae6b6ed12d0ea52d2d6e4.zip
Lattest PR review
Function names, code formatting...
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 7252ba4e..fa4f44e6 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -97,9 +97,6 @@
#define DEG2RAD (PI/180.0f)
#define RAD2DEG (180.0f/PI)
-// A small number
-#define EPSILON 0.000001
-
// raylib Config Flags
#define FLAG_FULLSCREEN_MODE 1
#define FLAG_RESIZABLE_WINDOW 2
@@ -496,10 +493,10 @@ 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
+ 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;
// Wave type, defines audio wave data
@@ -920,13 +917,9 @@ RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphere
RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius,
Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point
RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and 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 );
+RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh
+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)
//------------------------------------------------------------------------------------
// Shaders System Functions (Module: rlgl)