chipmunk2d_0.1.0_3fa66f62/src/chipmunk-polyshapes.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package Chipmunk.PolyShapes
  with Preelaborate
is
   pragma Style_Checks ("M2000");
   function Alloc return cpPolyShape;
   --
   pragma Import (C, Alloc, "cpPolyShapeAlloc");

   function Init
     (poly      : cpPolyShape;
      body_p    : cpBody;
      count     : Interfaces.C.int;
      verts     : access C_cpVect_Array;
      transform : cpTransform;
      radius    : cpFloat) return cpPolyShape;
   --
   pragma Import (C, Init, "cpPolyShapeInit");

   function InitRaw
     (poly   : cpPolyShape;
      body_p : cpBody;
      count  : Interfaces.C.int;
      verts  : access C_cpVect_Array;
      radius : cpFloat) return cpPolyShape;
   --
   pragma Import (C, InitRaw, "cpPolyShapeInitRaw");

   function NewPolyShape
     (body_p    : cpBody;
      count     : Interfaces.C.int;
      verts     : access C_cpVect_Array;
      transform : cpTransform;
      radius    : cpFloat) return cpShape;
   --
   pragma Import (C, NewPolyShape, "cpPolyShapeNew");

   function NewRaw
     (body_p : cpBody;
      count  : Interfaces.C.int;
      verts  : access C_cpVect_Array;
      radius : cpFloat) return cpShape;
   --
   pragma Import (C, NewRaw, "cpPolyShapeNewRaw");

   function cpBoxShapeInit
     (poly   : cpPolyShape;
      body_p : cpBody;
      width  : cpFloat;
      height : cpFloat;
      radius : cpFloat) return cpPolyShape;
   --
   pragma Import (C, cpBoxShapeInit, "cpBoxShapeInit");

   function cpBoxShapeInit2
     (poly : cpPolyShape; body_p : cpBody; box : cpBB; radius : cpFloat)
      return cpPolyShape;
   --
   pragma Import (C, cpBoxShapeInit2, "cpBoxShapeInit2");

   function cpBoxShapeNew
     (body_p : cpBody; width : cpFloat; height : cpFloat; radius : cpFloat)
      return cpShape;
   --
   pragma Import (C, cpBoxShapeNew, "cpBoxShapeNew");

   function cpBoxShapeNew2
     (body_p : cpBody; box : cpBB; radius : cpFloat) return cpShape;
   --
   pragma Import (C, cpBoxShapeNew2, "cpBoxShapeNew2");

   function GetCount (shape : cpShape) return Interfaces.C.int;
   --
   pragma Import (C, GetCount, "cpPolyShapeGetCount");

   function GetVert (shape : cpShape; index : Interfaces.C.int) return cpVect;
   --
   pragma Import (C, GetVert, "cpPolyShapeGetVert");

   function GetRadius (shape : cpShape) return cpFloat;
   --
   pragma Import (C, GetRadius, "cpPolyShapeGetRadius");

end Chipmunk.PolyShapes;