physics.box2d.thin: Update swig binding.

This commit is contained in:
Rod Kay
2023-12-31 21:20:28 +11:00
parent fb92469f04
commit 4c247418c9
9 changed files with 651 additions and 496 deletions

View File

@@ -16,7 +16,7 @@ echo
echo Generating the binding. echo Generating the binding.
echo echo
swig_gnat -gnat -c++ -cpperraswarn box2d_c.i swig4ada -ada -c++ -cpperraswarn box2d_c.i
rm portable_new_line_Token.tmp rm portable_new_line_Token.tmp

View File

@@ -1,16 +1,19 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with c_math_c.Vector_3; with c_math_c.Vector_3;
with interfaces.C; with Interfaces.C;
use Interfaces.C;
with interfaces.C.Pointers;
package box2d_c.b2d_Contact is package box2d_c.b2d_Contact is
-- Item -- Item
-- --
type Item is type Item is
record record
Object_A : access box2d_c.Object; Object_A : access box2d_c.Object;
Object_B : access box2d_c.Object; Object_B : access box2d_c.Object;
@@ -19,25 +22,35 @@ type Item is
-- Items -- Item_Array
-- --
type Items is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_Contact.Item; type Item_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_Contact.Item;
-- Pointer -- Pointer
-- --
type Pointer is access all box2d_c.b2d_Contact.Item; package C_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.b2d_Contact.Item,
element_Array => box2d_c.b2d_Contact.Item_Array,
default_Terminator => (others => <>));
-- Pointers subtype Pointer is C_Pointers.Pointer;
--
type Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_Contact.Pointer; -- Pointer_Array
--
type Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_Contact.Pointer;
-- Pointer_Pointer -- Pointer_Pointer
-- --
type Pointer_Pointer is access all box2d_c.b2d_Contact.Pointer; package C_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.b2d_Contact.Pointer,
element_Array => box2d_c.b2d_Contact.Pointer_Array,
default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
@@ -46,6 +59,10 @@ type Item is
function construct return box2d_c.b2d_Contact.Item; function construct return box2d_c.b2d_Contact.Item;
procedure destruct_0 (Self : in box2d_c.b2d_Contact.Item);
procedure destruct (Self : in box2d_c.b2d_Contact.Item);
@@ -58,7 +75,10 @@ private
pragma Import (C, construct, "Ada_new_b2d_Contact");
pragma Import (CPP, construct, "ada_new_b2d_Contact_b2d_Contact");
pragma Import (CPP, destruct_0, "_ZN11b2d_ContactD1Ev");
pragma Import (CPP, destruct, "_ZN11b2d_ContactD1Ev");

View File

@@ -1,17 +1,20 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with c_math_c; with c_math_c;
with c_math_c.Vector_3; with c_math_c.Vector_3;
with interfaces.C; with Interfaces.C;
use Interfaces.C;
with interfaces.C.Pointers;
package box2d_c.b2d_ray_Collision is package box2d_c.b2d_ray_Collision is
-- Item -- Item
-- --
type Item is type Item is
record record
near_Object : access box2d_c.Object; near_Object : access box2d_c.Object;
hit_Fraction : aliased c_math_c.Real; hit_Fraction : aliased c_math_c.Real;
@@ -21,25 +24,35 @@ type Item is
-- Items -- Item_Array
-- --
type Items is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_ray_Collision.Item; type Item_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_ray_Collision.Item;
-- Pointer -- Pointer
-- --
type Pointer is access all box2d_c.b2d_ray_Collision.Item; package C_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.b2d_ray_Collision.Item,
element_Array => box2d_c.b2d_ray_Collision.Item_Array,
default_Terminator => (others => <>));
-- Pointers subtype Pointer is C_Pointers.Pointer;
--
type Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_ray_Collision.Pointer; -- Pointer_Array
--
type Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2d_ray_Collision.Pointer;
-- Pointer_Pointer -- Pointer_Pointer
-- --
type Pointer_Pointer is access all box2d_c.b2d_ray_Collision.Pointer; package C_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.b2d_ray_Collision.Pointer,
element_Array => box2d_c.b2d_ray_Collision.Pointer_Array,
default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
@@ -48,6 +61,10 @@ type Item is
function construct return box2d_c.b2d_ray_Collision.Item; function construct return box2d_c.b2d_ray_Collision.Item;
procedure destruct_0 (Self : in box2d_c.b2d_ray_Collision.Item);
procedure destruct (Self : in box2d_c.b2d_ray_Collision.Item);
@@ -60,7 +77,10 @@ private
pragma Import (C, construct, "Ada_new_b2d_ray_Collision");
pragma Import (CPP, construct, "ada_new_b2d_ray_Collision_b2d_ray_Collision");
pragma Import (CPP, destruct_0, "_ZN17b2d_ray_CollisionD1Ev");
pragma Import (CPP, destruct, "_ZN17b2d_ray_CollisionD1Ev");

View File

@@ -1,7 +1,8 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with box2d_c.Pointers; with box2d_c.Pointers;
with box2d_c.b2d_Contact; with box2d_c.b2d_Contact;
with box2d_c.b2d_point_Collision;
with box2d_c.b2d_ray_Collision; with box2d_c.b2d_ray_Collision;
with box2d_c.joint_Cursor; with box2d_c.joint_Cursor;
with c_math_c; with c_math_c;
@@ -12,6 +13,9 @@ with c_math_c.Vector_2;
with c_math_c.Vector_3; with c_math_c.Vector_3;
with interfaces.c; with interfaces.c;
with swig; with swig;
with Interfaces.C;
use Interfaces.C;
@@ -251,6 +255,9 @@ By : in interfaces.c.c_float);
From : in c_math_c.Vector_3.Pointer; From : in c_math_c.Vector_3.Pointer;
To : in c_math_c.Vector_3.Pointer) return box2d_c.b2d_ray_Collision.Item; To : in c_math_c.Vector_3.Pointer) return box2d_c.b2d_ray_Collision.Item;
function b2d_Space_cast_Point (Self : in box2d_c.Pointers.Space_Pointer;
Point : in c_math_c.Vector_3.Pointer) return box2d_c.b2d_point_Collision.Item;
function b2d_space_contact_Count (Self : in box2d_c.Pointers.Space_Pointer) return interfaces.c.int; function b2d_space_contact_Count (Self : in box2d_c.Pointers.Space_Pointer) return interfaces.c.int;
function b2d_space_Contact (Self : in box2d_c.Pointers.Space_Pointer; function b2d_space_Contact (Self : in box2d_c.Pointers.Space_Pointer;
@@ -344,6 +351,7 @@ private
pragma Import (C, b2d_Space_Gravity_is, "Ada_b2d_Space_Gravity_is"); pragma Import (C, b2d_Space_Gravity_is, "Ada_b2d_Space_Gravity_is");
pragma Import (C, b2d_Space_evolve, "Ada_b2d_Space_evolve"); pragma Import (C, b2d_Space_evolve, "Ada_b2d_Space_evolve");
pragma Import (C, b2d_Space_cast_Ray, "Ada_b2d_Space_cast_Ray"); pragma Import (C, b2d_Space_cast_Ray, "Ada_b2d_Space_cast_Ray");
pragma Import (C, b2d_Space_cast_Point, "Ada_b2d_Space_cast_Point");
pragma Import (C, b2d_space_contact_Count, "Ada_b2d_space_contact_Count"); pragma Import (C, b2d_space_contact_Count, "Ada_b2d_space_contact_Count");
pragma Import (C, b2d_space_Contact, "Ada_b2d_space_Contact"); pragma Import (C, b2d_space_Contact, "Ada_b2d_space_Contact");

View File

@@ -1,40 +1,53 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with interfaces.C; with Interfaces.C;
use Interfaces.C;
with interfaces.C.Pointers;
package box2d_c.joint_Cursor is package box2d_c.joint_Cursor is
-- Item -- Item
-- --
type Item is type Item is
record record
Joint : access box2d_c.b2Joint; Joint : access box2d_c.b2Joint;
end record; end record;
-- Items -- Item_Array
-- --
type Items is array (interfaces.C.Size_t range <>) of aliased box2d_c.joint_Cursor.Item; type Item_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.joint_Cursor.Item;
-- Pointer -- Pointer
-- --
type Pointer is access all box2d_c.joint_Cursor.Item; package C_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.joint_Cursor.Item,
element_Array => box2d_c.joint_Cursor.Item_Array,
default_Terminator => (others => <>));
-- Pointers subtype Pointer is C_Pointers.Pointer;
--
type Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.joint_Cursor.Pointer; -- Pointer_Array
--
type Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.joint_Cursor.Pointer;
-- Pointer_Pointer -- Pointer_Pointer
-- --
type Pointer_Pointer is access all box2d_c.joint_Cursor.Pointer; package C_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.joint_Cursor.Pointer,
element_Array => box2d_c.joint_Cursor.Pointer_Array,
default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
@@ -43,6 +56,10 @@ type Item is
function construct return box2d_c.joint_Cursor.Item; function construct return box2d_c.joint_Cursor.Item;
procedure destruct_0 (Self : in box2d_c.joint_Cursor.Item);
procedure destruct (Self : in box2d_c.joint_Cursor.Item);
@@ -55,7 +72,10 @@ private
pragma Import (C, construct, "Ada_new_joint_Cursor");
pragma Import (CPP, construct, "ada_new_joint_Cursor_joint_Cursor");
pragma Import (CPP, destruct_0, "_ZN12joint_CursorD1Ev");
pragma Import (CPP, destruct, "_ZN12joint_CursorD1Ev");

View File

@@ -1,39 +1,77 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with box2d_c.Pointers; with box2d_c.Pointers;
with Interfaces.C;
use Interfaces.C;
with interfaces.C.Pointers;
package box2d_c.pointer_Pointers package box2d_c.pointer_Pointers is
is
-- Shape_Pointer_Pointer -- Shape_Pointer_Pointer
-- --
type Shape_Pointer_Pointer is access all box2d_c.Pointers.Shape_Pointer; package C_Shape_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Pointers.Shape_Pointer,
element_Array => box2d_c.Pointers.Shape_Pointer_Array,
default_Terminator => null);
subtype Shape_Pointer_Pointer is C_Shape_Pointer_Pointers.Pointer;
-- Object_Pointer_Pointer -- Object_Pointer_Pointer
-- --
type Object_Pointer_Pointer is access all box2d_c.Pointers.Object_Pointer; package C_Object_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Pointers.Object_Pointer,
element_Array => box2d_c.Pointers.Object_Pointer_Array,
default_Terminator => null);
subtype Object_Pointer_Pointer is C_Object_Pointer_Pointers.Pointer;
-- Joint_Pointer_Pointer -- Joint_Pointer_Pointer
-- --
type Joint_Pointer_Pointer is access all box2d_c.Pointers.Joint_Pointer; package C_Joint_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Pointers.Joint_Pointer,
element_Array => box2d_c.Pointers.Joint_Pointer_Array,
default_Terminator => null);
subtype Joint_Pointer_Pointer is C_Joint_Pointer_Pointers.Pointer;
-- Space_Pointer_Pointer -- Space_Pointer_Pointer
-- --
type Space_Pointer_Pointer is access all box2d_c.Pointers.Space_Pointer; package C_Space_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Pointers.Space_Pointer,
element_Array => box2d_c.Pointers.Space_Pointer_Array,
default_Terminator => null);
subtype Space_Pointer_Pointer is C_Space_Pointer_Pointers.Pointer;
-- b2Joint_Pointer_Pointer -- b2Joint_Pointer_Pointer
-- --
type b2Joint_Pointer_Pointer is access all box2d_c.Pointers.b2Joint_Pointer; package C_b2Joint_Pointer_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Pointers.b2Joint_Pointer,
element_Array => box2d_c.Pointers.b2Joint_Pointer_Array,
default_Terminator => null);
subtype b2Joint_Pointer_Pointer is C_b2Joint_Pointer_Pointers.Pointer;
end box2d_c.pointer_Pointers; end box2d_c.pointer_Pointers;

View File

@@ -1,6 +1,9 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with interfaces.C; with Interfaces.C;
use Interfaces.C;
with interfaces.C.Pointers;
@@ -9,52 +12,77 @@ package box2d_c.Pointers is
-- Shape_Pointer -- Shape_Pointer
-- --
type Shape_Pointer is access all box2d_c.Shape; package C_Shape_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Shape,
element_Array => box2d_c.Shape_Array,
default_Terminator => 0);
-- Shape_Pointers subtype Shape_Pointer is C_Shape_Pointers.Pointer;
--
type Shape_Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Shape_Pointer; -- Shape_Pointer_Array
--
type Shape_Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Shape_Pointer;
-- Object_Pointer -- Object_Pointer
-- --
type Object_Pointer is access all box2d_c.Object; package C_Object_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Object,
element_Array => box2d_c.Object_Array,
default_Terminator => 0);
-- Object_Pointers subtype Object_Pointer is C_Object_Pointers.Pointer;
--
type Object_Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Object_Pointer; -- Object_Pointer_Array
--
type Object_Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Object_Pointer;
-- Joint_Pointer -- Joint_Pointer
-- --
type Joint_Pointer is access all box2d_c.Joint; package C_Joint_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Joint,
element_Array => box2d_c.Joint_Array,
default_Terminator => 0);
-- Joint_Pointers subtype Joint_Pointer is C_Joint_Pointers.Pointer;
--
type Joint_Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Joint_Pointer; -- Joint_Pointer_Array
--
type Joint_Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Joint_Pointer;
-- Space_Pointer -- Space_Pointer
-- --
type Space_Pointer is access all box2d_c.Space; package C_Space_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.Space,
element_Array => box2d_c.Space_Array,
default_Terminator => 0);
-- Space_Pointers subtype Space_Pointer is C_Space_Pointers.Pointer;
--
type Space_Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Space_Pointer; -- Space_Pointer_Array
--
type Space_Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.Space_Pointer;
-- b2Joint_Pointer -- b2Joint_Pointer
-- --
type b2Joint_Pointer is access all box2d_c.b2Joint; package C_b2Joint_Pointers is new interfaces.c.Pointers (Index => interfaces.c.size_t,
Element => box2d_c.b2Joint,
element_Array => box2d_c.b2Joint_Array,
default_Terminator => 0);
-- b2Joint_Pointers subtype b2Joint_Pointer is C_b2Joint_Pointers.Pointer;
--
type b2Joint_Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.b2Joint_Pointer; -- b2Joint_Pointer_Array
--
type b2Joint_Pointer_Array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Pointers.b2Joint_Pointer;

View File

@@ -1,38 +1,40 @@
-- This file is generated by SWIG. Please do *not* modify by hand. -- This file is generated by SWIG. Please do not modify by hand.
-- --
with swig; with swig;
with interfaces.C; with Interfaces.C;
use Interfaces.C;
package box2d_c is package box2d_c is
-- Shape -- Shape
-- --
subtype Shape is swig.opaque_structure; subtype Shape is swig.opaque_structure;
type Shape_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Shape; type Shape_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Shape;
-- Object -- Object
-- --
subtype Object is swig.opaque_structure; subtype Object is swig.opaque_structure;
type Object_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Object; type Object_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Object;
-- Joint -- Joint
-- --
subtype Joint is swig.opaque_structure; subtype Joint is swig.opaque_structure;
type Joint_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Joint; type Joint_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Joint;
-- Space -- Space
-- --
subtype Space is swig.opaque_structure; subtype Space is swig.opaque_structure;
type Space_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Space; type Space_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.Space;
-- b2Joint -- b2Joint
-- --
subtype b2Joint is swig.opaque_structure; subtype b2Joint is swig.opaque_structure;
type b2Joint_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2Joint; type b2Joint_array is array (interfaces.C.Size_t range <>) of aliased box2d_c.b2Joint;

File diff suppressed because it is too large Load Diff