Collision functions...
This commit is contained in:
parent
495639f8b3
commit
c6e1b398a9
128
raylib.ads
128
raylib.ads
@ -748,6 +748,8 @@ package Raylib is
|
|||||||
Direction : Vector_3D := (0.0, 0.0, 0.0);
|
Direction : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
end record with Convention => C_Pass_By_Copy;
|
end record with Convention => C_Pass_By_Copy;
|
||||||
|
|
||||||
|
No_Ray : Ray;
|
||||||
|
|
||||||
type Ray_Collision is record
|
type Ray_Collision is record
|
||||||
Hit : Logical := False;
|
Hit : Logical := False;
|
||||||
Distance : Float := 0.0;
|
Distance : Float := 0.0;
|
||||||
@ -755,11 +757,15 @@ package Raylib is
|
|||||||
Normal : Vector_3D := (0.0, 0.0, 0.0);
|
Normal : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
end record with Convention => C_Pass_By_Copy;
|
end record with Convention => C_Pass_By_Copy;
|
||||||
|
|
||||||
|
No_Ray_Collision : Ray_Collision;
|
||||||
|
|
||||||
type Bounding_Box is record
|
type Bounding_Box is record
|
||||||
Min : Vector_3D := (0.0, 0.0, 0.0);
|
Min : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
Max : Vector_3D := (0.0, 0.0, 0.0);
|
Max : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
end record with Convention => C_Pass_By_Copy;
|
end record with Convention => C_Pass_By_Copy;
|
||||||
|
|
||||||
|
No_Bounding_Box : Bounding_Box;
|
||||||
|
|
||||||
type Wave is record
|
type Wave is record
|
||||||
Frame_Count : Natural := 0;
|
Frame_Count : Natural := 0;
|
||||||
Sample_Rate : Natural := 0;
|
Sample_Rate : Natural := 0;
|
||||||
@ -3727,45 +3733,79 @@ package Raylib is
|
|||||||
--~Convention => C,
|
--~Convention => C,
|
||||||
--~External_Name => "";
|
--~External_Name => "";
|
||||||
|
|
||||||
--~function bool CheckCollisionSpheres (Vector3 center1, float radius1, Vector3 center2, float radius2) with
|
function Check_Collision_Spheres (
|
||||||
--~Import => True,
|
Center_1 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
--~Convention => C,
|
Radius_1 : Float := 0.0;
|
||||||
--~External_Name => "";
|
Center_2 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
|
Radius_2 : Float := 0.0
|
||||||
|
) return Logical with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "CheckCollisionSpheres";
|
||||||
|
|
||||||
--~function bool CheckCollisionBoxes (BoundingBox box1, BoundingBox box2) with
|
function Check_Collision_Boxes (
|
||||||
--~Import => True,
|
Box_1 : Bounding_Box := No_Bounding_Box;
|
||||||
--~Convention => C,
|
Box_2 : Bounding_Box := No_Bounding_Box
|
||||||
--~External_Name => "";
|
) return Logical with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "CheckCollisionBoxes";
|
||||||
|
|
||||||
--~function bool CheckCollisionBoxSphere (BoundingBox box, Vector3 center, float radius) with
|
function Check_Collision_Box_Sphere (
|
||||||
--~Import => True,
|
Box : Bounding_Box := No_Bounding_Box;
|
||||||
--~Convention => C,
|
Center : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
--~External_Name => "";
|
Radius : Float := 0.0
|
||||||
|
) return Logical with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "CheckCollisionBoxSphere";
|
||||||
|
|
||||||
--~function RayCollision GetRayCollisionSphere (Ray ray, Vector3 center, float radius) with
|
function Get_Ray_Collision_Sphere (
|
||||||
--~Import => True,
|
Hit : Ray := No_Ray;
|
||||||
--~Convention => C,
|
Center : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
--~External_Name => "";
|
Radius : Float := 0.0
|
||||||
|
) return Ray_Collision with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "GetRayCollisionSphere";
|
||||||
|
|
||||||
--~function RayCollision GetRayCollisionBox (Ray ray, BoundingBox box) with
|
function Get_Ray_Collision_Box (
|
||||||
--~Import => True,
|
Hit : Ray := No_Ray;
|
||||||
--~Convention => C,
|
Box : Bounding_Box := No_Bounding_Box
|
||||||
--~External_Name => "";
|
) return Ray_Collision with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "GetRayCollisionBox";
|
||||||
|
|
||||||
--~function RayCollision GetRayCollisionMesh (Ray ray, Mesh mesh, Matrix transform) with
|
function Get_Ray_Collision_Mesh (
|
||||||
--~Import => True,
|
Hit : Ray := No_Ray;
|
||||||
--~Convention => C,
|
Data : Mesh := No_Mesh;
|
||||||
--~External_Name => "";
|
Transform : Matrix_4D := Id_Matrix
|
||||||
|
) return Ray_Collision with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "GetRayCollisionMesh";
|
||||||
|
|
||||||
--~function RayCollision GetRayCollisionTriangle (Ray ray, Vector3 p1, Vector3 p2, Vector3 p3) with
|
function Get_Ray_Collision_Triangle (
|
||||||
--~Import => True,
|
Hit : Ray := No_Ray;
|
||||||
--~Convention => C,
|
Point_1 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
--~External_Name => "";
|
Point_2 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
|
Point_3 : Vector_3D := (0.0, 0.0, 0.0)
|
||||||
|
) return Ray_Collision with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "GetRayCollisionTriangle";
|
||||||
|
|
||||||
--~function RayCollision GetRayCollisionQuad (Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4) with
|
function Get_Ray_Collision_Quad (
|
||||||
--~Import => True,
|
Hit : Ray := No_Ray;
|
||||||
--~Convention => C,
|
Point_1 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
--~External_Name => "";
|
Point_2 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
|
Point_3 : Vector_3D := (0.0, 0.0, 0.0);
|
||||||
|
Point_4 : Vector_3D := (0.0, 0.0, 0.0)
|
||||||
|
) return Ray_Collision with
|
||||||
|
Import => True,
|
||||||
|
Convention => C,
|
||||||
|
External_Name => "GetRayCollisionQuad";
|
||||||
|
|
||||||
--~typedef void (*AudioCallback) (void *bufferData, unsigned int frames) with
|
--~typedef void (*AudioCallback) (void *bufferData, unsigned int frames) with
|
||||||
--~Import => True,
|
--~Import => True,
|
||||||
@ -3782,20 +3822,20 @@ package Raylib is
|
|||||||
Convention => C,
|
Convention => C,
|
||||||
External_Name => "CloseAudioDevice";
|
External_Name => "CloseAudioDevice";
|
||||||
|
|
||||||
--~function bool IsAudioDeviceReady (void) with
|
function Is_Audio_Device_Ready return Logical with
|
||||||
--~Import => True,
|
Import => True,
|
||||||
--~Convention => C,
|
Convention => C,
|
||||||
--~External_Name => "";
|
External_Name => "IsAudioDeviceReady";
|
||||||
|
|
||||||
--~procedure SetMasterVolume (float volume) with
|
procedure Set_Master_Volume (Volume : Float := 1.0) with
|
||||||
--~Import => True,
|
Import => True,
|
||||||
--~Convention => C,
|
Convention => C,
|
||||||
--~External_Name => "";
|
External_Name => "SetMasterVolume";
|
||||||
|
|
||||||
--~function float GetMasterVolume (void) with
|
function Get_Master_Volume return Float with
|
||||||
--~Import => True,
|
Import => True,
|
||||||
--~Convention => C,
|
Convention => C,
|
||||||
--~External_Name => "";
|
External_Name => "GetMasterVolume";
|
||||||
|
|
||||||
--~function Wave LoadWave (const char *fileName) with
|
--~function Wave LoadWave (const char *fileName) with
|
||||||
--~Import => True,
|
--~Import => True,
|
||||||
|
Loading…
Reference in New Issue
Block a user