shape.monkey2 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. Namespace chipmunk
  2. #Import "chipmunk_glue.h"
  3. Extern
  4. '***** File: Chipmunk7/include/chipmunk/cpShape.h *****
  5. Struct cpPointQueryInfo
  6. Field shape:cpShape
  7. Field point:cpVect
  8. Field distance:cpFloat
  9. Field gradient:cpVect
  10. End
  11. Struct cpSegmentQueryInfo
  12. Field shape:cpShape
  13. Field point:cpVect
  14. Field normal:cpVect
  15. Field alpha:cpFloat
  16. End
  17. Struct cpShapeFilter
  18. Field group:cpGroup
  19. Field categories:cpBitmask
  20. Field mask:cpBitmask
  21. End
  22. Const CP_SHAPE_FILTER_ALL:cpShapeFilter
  23. Const CP_SHAPE_FILTER_NONE:cpShapeFilter
  24. Function cpShapeFilterNew:cpShapeFilter( group:cpGroup, categories:cpBitmask, mask:cpBitmask )
  25. Function cpShapeDestroy:Void( shape:cpShape )
  26. Function cpShapeFree:Void( shape:cpShape )
  27. Function cpShapeCacheBB:cpBB( shape:cpShape )
  28. Function cpShapeUpdate:cpBB( shape:cpShape, transform:cpTransform )
  29. Function cpShapePointQuery:cpFloat( shape:cpShape, p:cpVect, out:cpPointQueryInfo Ptr )
  30. Function cpShapeSegmentQuery:cpBool( shape:cpShape, a:cpVect, b:cpVect, radius:cpFloat, info:cpSegmentQueryInfo Ptr )
  31. Function cpShapesCollide:cpContactPointSet( a:cpShape, b:cpShape )
  32. Function cpShapeGetSpace:cpSpace( shape:cpShape )
  33. Function cpShapeGetBody:cpBody( shape:cpShape )
  34. Function cpShapeSetBody:Void( shape:cpShape, body:cpBody )
  35. Function cpShapeGetMass:cpFloat( shape:cpShape )
  36. Function cpShapeSetMass:Void( shape:cpShape, mass:cpFloat )
  37. Function cpShapeGetDensity:cpFloat( shape:cpShape )
  38. Function cpShapeSetDensity:Void( shape:cpShape, density:cpFloat )
  39. Function cpShapeGetMoment:cpFloat( shape:cpShape )
  40. Function cpShapeGetArea:cpFloat( shape:cpShape )
  41. Function cpShapeGetCenterOfGravity:cpVect( shape:cpShape )
  42. Function cpShapeGetBB:cpBB( shape:cpShape )
  43. Function cpShapeGetSensor:cpBool( shape:cpShape )
  44. Function cpShapeSetSensor:Void( shape:cpShape, sensor:cpBool )
  45. Function cpShapeGetElasticity:cpFloat( shape:cpShape )
  46. Function cpShapeSetElasticity:Void( shape:cpShape, elasticity:cpFloat )
  47. Function cpShapeGetFriction:cpFloat( shape:cpShape )
  48. Function cpShapeSetFriction:Void( shape:cpShape, friction:cpFloat )
  49. Function cpShapeGetSurfaceVelocity:cpVect( shape:cpShape )
  50. Function cpShapeSetSurfaceVelocity:Void( shape:cpShape, surfaceVelocity:cpVect )
  51. Function cpShapeGetUserData:cpDataPointer( shape:cpShape )
  52. Function cpShapeSetUserData:Void( shape:cpShape, userData:cpDataPointer )
  53. Function cpShapeGetCollisionType:cpCollisionType( shape:cpShape )
  54. Function cpShapeSetCollisionType:Void( shape:cpShape, collisionType:cpCollisionType )
  55. Function cpShapeGetFilter:cpShapeFilter( shape:cpShape )
  56. Function cpShapeSetFilter:Void( shape:cpShape, filter:cpShapeFilter )
  57. Function cpCircleShapeAlloc:cpCircleShape( )
  58. Function cpCircleShapeInit:cpCircleShape( circle:cpCircleShape, body:cpBody, radius:cpFloat, offset:cpVect )
  59. Function cpCircleShapeNew:cpShape( body:cpBody, radius:cpFloat, offset:cpVect )
  60. Function cpCircleShapeGetOffset:cpVect( shape:cpShape )
  61. Function cpCircleShapeGetRadius:cpFloat( shape:cpShape )
  62. Function cpSegmentShapeAlloc:cpSegmentShape( )
  63. Function cpSegmentShapeInit:cpSegmentShape( seg:cpSegmentShape, body:cpBody, a:cpVect, b:cpVect, radius:cpFloat )
  64. Function cpSegmentShapeNew:cpShape( body:cpBody, a:cpVect, b:cpVect, radius:cpFloat )
  65. Function cpSegmentShapeSetNeighbors:Void( shape:cpShape, prev:cpVect, next_:cpVect )
  66. Function cpSegmentShapeGetA:cpVect( shape:cpShape )
  67. Function cpSegmentShapeGetB:cpVect( shape:cpShape )
  68. Function cpSegmentShapeGetNormal:cpVect( shape:cpShape )
  69. Function cpSegmentShapeGetRadius:cpFloat( shape:cpShape )
  70. '***** File: Chipmunk7/include/chipmunk/cpPolyShape.h *****
  71. Function cpPolyShapeAlloc:cpPolyShape( )
  72. Function cpPolyShapeInit:cpPolyShape( poly:cpPolyShape, body:cpBody, count:Int, verts:cpVect Ptr, transform:cpTransform, radius:cpFloat )
  73. Function cpPolyShapeInitRaw:cpPolyShape( poly:cpPolyShape, body:cpBody, count:Int, verts:cpVect Ptr, radius:cpFloat )
  74. Function cpPolyShapeNew:cpShape( body:cpBody, count:Int, verts:cpVect Ptr, transform:cpTransform, radius:cpFloat )
  75. Function cpPolyShapeNewRaw:cpShape( body:cpBody, count:Int, verts:cpVect Ptr, radius:cpFloat )
  76. Function cpBoxShapeInit:cpPolyShape( poly:cpPolyShape, body:cpBody, width:cpFloat, height:cpFloat, radius:cpFloat )
  77. Function cpBoxShapeInit2:cpPolyShape( poly:cpPolyShape, body:cpBody, box:cpBB, radius:cpFloat )
  78. Function cpBoxShapeNew:cpShape( body:cpBody, width:cpFloat, height:cpFloat, radius:cpFloat )
  79. Function cpBoxShapeNew2:cpShape( body:cpBody, box:cpBB, radius:cpFloat )
  80. Function cpPolyShapeGetCount:Int( shape:cpShape )
  81. Function cpPolyShapeGetVert:cpVect( shape:cpShape, index:Int )
  82. Function cpPolyShapeGetRadius:cpFloat( shape:cpShape )
  83. Class cpShape Extends Void
  84. Property Body:cpBody() Extension="cpShapeGetBody"
  85. Setter( body:cpBody ) Extension="cpShapeSetBody"
  86. Property Mass:cpFloat() Extension="cpShapeGetMass"
  87. Setter( mass:cpFloat ) Extension="cpShapeSetMass"
  88. Property Density:cpFloat() Extension="cpShapeGetDensity"
  89. Setter( density:cpFloat ) Extension="cpShapeSetDensity"
  90. Property Sensor:cpBool() Extension="cpShapeGetSensor"
  91. Setter( sensor:cpBool ) Extension="cpShapeSetSensor"
  92. Property Elasticity:cpFloat() Extension="cpShapeGetElasticity"
  93. Setter( elasticity:cpFloat ) Extension="cpShapeSetElasticity"
  94. Property Friction:cpFloat() Extension="cpShapeGetFriction"
  95. Setter( friction:cpFloat ) Extension="cpShapeSetFriction"
  96. Property SurfaceVelocity:cpVect() Extension="cpShapeGetSurfaceVelocity"
  97. Setter( surfaceVelocity:cpVect ) Extension="cpShapeSetSurfaceVelocity"
  98. Property UserData:cpDataPointer() Extension="cpShapeGetUserData"
  99. Setter( userData:cpDataPointer ) Extension="cpShapeSetUserData"
  100. Property CollisionType:cpCollisionType() Extension="cpShapeGetCollisionType"
  101. Setter( collisionType:cpCollisionType ) Extension="cpShapeSetCollisionType"
  102. Property Moment:cpFloat() Extension="cpShapeGetMoment"
  103. Property Area:cpFloat() Extension="cpShapeGetArea"
  104. Property CenterOfGravity:cpVect() Extension="cpShapeGetCenterOfGravity"
  105. Property CacheBB:cpBB() Extension="cpShapeCacheBB"
  106. Property BB:cpBB() Extension="cpShapeGetBB"
  107. Property Space:cpSpace() Extension="cpShapeGetSpace"
  108. Property CircleRadius:cpFloat() Extension="cpCircleShapeGetRadius"
  109. Property CircleOffset:cpVect() Extension="cpCircleShapeGetOffset"
  110. Property SegmentA:cpVect() Extension="cpSegmentShapeGetA"
  111. Property SegmentB:cpVect() Extension="cpSegmentShapeGetB"
  112. Property PolyShapeRadius:cpFloat() Extension="cpPolyShapeGetRadius"
  113. Property PolyShapeCount:Int() Extension="cpPolyShapeGetCount"
  114. Method GetPolyShapeCount:Int() Extension="cpPolyShapeGetCount"
  115. Method GetPolyShapeVert:cpVect( index:Int ) Extension="cpPolyShapeGetVert"
  116. Method Update:cpBB( transform:cpTransform ) Extension="cpShapeUpdate"
  117. Method PointQuery:cpFloat( p:cpVect, out:cpPointQueryInfo Ptr ) Extension="cpShapePointQuery"
  118. Method SegmentQuery:cpBool( a:cpVect, b:cpVect, radius:cpFloat, info:cpSegmentQueryInfo Ptr ) Extension="cpShapeSegmentQuery"
  119. Method sCollide:cpContactPointSet( a:cpShape, b:cpShape ) Extension="cpShapesCollide"
  120. End
  121. Class cpCircleShape Extends Void
  122. End
  123. Class cpSegmentShape Extends Void
  124. End
  125. Class cpPolyShape Extends Void
  126. End