Home | History | Annotate | Download | only in collision
      1 %module(directors="1") Collision
      2 
      3 %feature("director") btBroadphaseAabbCallback;
      4 %feature("director") btBroadphaseRayCallback;
      5 %feature("director") btConvexTriangleCallback;
      6 %feature("director") btGhostPairCallback;
      7 %feature("director") btInternalTriangleIndexCallback;
      8 %feature("director") btNodeOverlapCallback;
      9 %feature("director") btOverlapCallback;
     10 %feature("director") btOverlapFilterCallback;
     11 %feature("director") btOverlappingPairCallback;
     12 %feature("director") btTriangleCallback;
     13 %feature("director") btTriangleConvexcastCallback;
     14 %feature("director") btTriangleRaycastCallback;
     15 // FIXME reuse btDispatcher and fix ptr/array typemap/pool
     16 
     17 %include "arrays_java.i"
     18 
     19 %import "../linearmath/linearmath.i"
     20 
     21 %include "../common/gdxCommon.i"
     22 
     23 %include "../../swig-src/linearmath/classes.i"
     24 
     25 %ignore btManifoldPoint::getLifeTime;
     26 %ignore btManifoldPoint::getAppliedImpulse;
     27 %ignore btVoronoiSimplexSolver::setEqualVertexThreshold;
     28 %ignore btVoronoiSimplexSolver::getEqualVertexThreshold;
     29 
     30 %typemap(javaimports) SWIGTYPE	%{
     31 import com.badlogic.gdx.physics.bullet.BulletBase;
     32 import com.badlogic.gdx.physics.bullet.linearmath.*;
     33 import com.badlogic.gdx.math.Vector3;
     34 import com.badlogic.gdx.math.Quaternion;
     35 import com.badlogic.gdx.math.Matrix3;
     36 import com.badlogic.gdx.math.Matrix4;
     37 %}
     38 %pragma(java) jniclassimports=%{
     39 import com.badlogic.gdx.physics.bullet.BulletBase;
     40 import com.badlogic.gdx.physics.bullet.linearmath.*;
     41 import com.badlogic.gdx.math.Vector3;
     42 import com.badlogic.gdx.math.Quaternion;
     43 import com.badlogic.gdx.math.Matrix3;
     44 import com.badlogic.gdx.math.Matrix4;
     45 import com.badlogic.gdx.utils.Pool;
     46 %}
     47 %pragma(java) moduleimports=%{
     48 import com.badlogic.gdx.physics.bullet.BulletBase;
     49 import com.badlogic.gdx.physics.bullet.linearmath.*;
     50 import com.badlogic.gdx.math.Vector3;
     51 import com.badlogic.gdx.math.Quaternion;
     52 import com.badlogic.gdx.math.Matrix3;
     53 import com.badlogic.gdx.math.Matrix4;
     54 %}
     55 
     56 // Required because bullet uses a macro for this
     57 typedef btVoronoiSimplexSolver btSimplexSolverInterface;
     58 
     59 %{
     60 #include <BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h>
     61 %}
     62 %include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
     63 
     64 %include "./btCollisionShape.i"
     65 
     66 CREATE_POOLED_OBJECT(btBroadphaseProxy, com/badlogic/gdx/physics/bullet/collision/btBroadphaseProxy);
     67 CREATE_POOLED_OBJECT(btBroadphasePair, com/badlogic/gdx/physics/bullet/collision/btBroadphasePair);
     68 %{
     69 #include <BulletCollision/BroadphaseCollision/btBroadphaseProxy.h>
     70 %}
     71 %include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
     72 
     73 %{
     74 #include <BulletCollision/BroadphaseCollision/btBroadphaseInterface.h>
     75 %}
     76 %include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
     77 
     78 %{
     79 #include <BulletCollision/BroadphaseCollision/btQuantizedBvh.h>
     80 %}
     81 %include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
     82 
     83 %{
     84 #include <BulletCollision/BroadphaseCollision/btSimpleBroadphase.h>
     85 %}
     86 %include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
     87 
     88 %ignore btMultiSapBroadphase::btMultiSapProxy::m_bridgeProxies;
     89 %{
     90 #include <BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h>
     91 void btMultiSapBroadphase::quicksort(btBroadphasePairArray& a, int lo, int hi)
     92 {
     93 }
     94 %}
     95 %include "BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h"
     96 
     97 %{
     98 #include <BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h>
     99 %}
    100 %include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
    101 
    102 %{
    103 #include <BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h>
    104 %}
    105 %include "BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h"
    106 
    107 %include "./btAxisSweep3.i"
    108 
    109 %{
    110 #include <BulletCollision/BroadphaseCollision/btDispatcher.h>
    111 %}
    112 %include "BulletCollision/BroadphaseCollision/btDispatcher.h"
    113 
    114 %{
    115 #include <BulletCollision/BroadphaseCollision/btOverlappingPairCache.h>
    116 %}
    117 %include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
    118 
    119 %{
    120 #include <BulletCollision/CollisionShapes/btCollisionShape.h>
    121 %}
    122 %include "BulletCollision/CollisionShapes/btCollisionShape.h"
    123 
    124 %{
    125 #include <BulletCollision/CollisionShapes/btConvexShape.h>
    126 %}
    127 %include "BulletCollision/CollisionShapes/btConvexShape.h"
    128 
    129 %{
    130 #include <BulletCollision/CollisionShapes/btConvexInternalShape.h>
    131 %}
    132 %include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
    133 
    134 %{
    135 #include <BulletCollision/CollisionShapes/btPolyhedralConvexShape.h>
    136 %}
    137 %include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
    138 
    139 %{
    140 #include <BulletCollision/CollisionShapes/btConcaveShape.h>
    141 %}
    142 %include "BulletCollision/CollisionShapes/btConcaveShape.h"
    143 
    144 %{
    145 #include <BulletCollision/CollisionShapes/btTriangleCallback.h>
    146 %}
    147 %include "BulletCollision/CollisionShapes/btTriangleCallback.h"
    148 
    149 %{
    150 #include <BulletCollision/CollisionShapes/btTriangleInfoMap.h>
    151 %}
    152 %include "BulletCollision/CollisionShapes/btTriangleInfoMap.h"
    153 
    154 %{
    155 #include <BulletCollision/CollisionShapes/btStaticPlaneShape.h>
    156 %}
    157 %include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
    158 
    159 %include "./btHeightfieldTerrainShape.i"
    160 
    161 %{
    162 #include <BulletCollision/CollisionShapes/btTriangleMeshShape.h>
    163 %}
    164 %include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
    165 
    166 %include "./btBvhTriangleMeshShape.i"
    167 
    168 %{
    169 #include <BulletCollision/CollisionShapes/btBoxShape.h>
    170 %}
    171 %include "BulletCollision/CollisionShapes/btBoxShape.h"
    172 
    173 %{
    174 #include <BulletCollision/CollisionShapes/btCapsuleShape.h>
    175 %}
    176 %include "BulletCollision/CollisionShapes/btCapsuleShape.h"
    177 
    178 %{
    179 #include <BulletCollision/CollisionShapes/btBox2dShape.h>
    180 %}
    181 %include "BulletCollision/CollisionShapes/btBox2dShape.h"
    182 
    183 %{
    184 #include <BulletCollision/CollisionShapes/btCollisionMargin.h>
    185 %}
    186 %include "BulletCollision/CollisionShapes/btCollisionMargin.h"
    187 
    188 %{
    189 #include <BulletCollision/CollisionShapes/btTriangleShape.h>
    190 %}
    191 %include "BulletCollision/CollisionShapes/btTriangleShape.h"
    192 
    193 %{
    194 #include <BulletCollision/CollisionShapes/btSphereShape.h>
    195 %}
    196 %include "BulletCollision/CollisionShapes/btSphereShape.h"
    197 
    198 %{
    199 #include <BulletCollision/CollisionShapes/btStridingMeshInterface.h>
    200 %}
    201 %include "BulletCollision/CollisionShapes/btStridingMeshInterface.h"
    202 
    203 %{
    204 #include <BulletCollision/CollisionShapes/btMinkowskiSumShape.h>
    205 %}
    206 %include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h"
    207 
    208 %{
    209 #include <BulletCollision/CollisionShapes/btConvexPolyhedron.h>
    210 %}
    211 %include "BulletCollision/CollisionShapes/btConvexPolyhedron.h"
    212 
    213 %{
    214 #include <BulletCollision/CollisionShapes/btOptimizedBvh.h>
    215 %}
    216 %include "BulletCollision/CollisionShapes/btOptimizedBvh.h"
    217 
    218 %{
    219 #include <BulletCollision/CollisionShapes/btTriangleBuffer.h>
    220 %}
    221 %include "BulletCollision/CollisionShapes/btTriangleBuffer.h"
    222 
    223 %include "./btTriangleIndexVertexArray.i"
    224 
    225 %{
    226 #include <BulletCollision/CollisionShapes/btMaterial.h>
    227 %}
    228 %include "BulletCollision/CollisionShapes/btMaterial.h"
    229 
    230 %{
    231 #include <BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h>
    232 %}
    233 %include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
    234 
    235 %{
    236 #include <BulletCollision/CollisionShapes/btShapeHull.h>
    237 %}
    238 %include "BulletCollision/CollisionShapes/btShapeHull.h"
    239 
    240 %include "./btConvexHullShape.i"
    241 
    242 %{
    243 #include <BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h>
    244 %}
    245 %include "BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h"
    246 
    247 %{
    248 #include <BulletCollision/CollisionShapes/btCylinderShape.h>
    249 %}
    250 %include "BulletCollision/CollisionShapes/btCylinderShape.h"
    251 
    252 %{
    253 #include <BulletCollision/CollisionShapes/btTriangleMesh.h>
    254 %}
    255 %include "BulletCollision/CollisionShapes/btTriangleMesh.h"
    256 
    257 %{
    258 #include <BulletCollision/CollisionShapes/btConeShape.h>
    259 %}
    260 %include "BulletCollision/CollisionShapes/btConeShape.h"
    261 
    262 %{
    263 #include <BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h>
    264 %}
    265 %include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h"
    266 
    267 %{
    268 #include <BulletCollision/CollisionShapes/btEmptyShape.h>
    269 %}
    270 %include "BulletCollision/CollisionShapes/btEmptyShape.h"
    271 
    272 %{
    273 #include <BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h>
    274 %}
    275 %include "BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h"
    276 
    277 %{
    278 #include <BulletCollision/CollisionShapes/btTetrahedronShape.h>
    279 %}
    280 %include "BulletCollision/CollisionShapes/btTetrahedronShape.h"
    281 
    282 %{
    283 #include <BulletCollision/CollisionShapes/btUniformScalingShape.h>
    284 %}
    285 %include "BulletCollision/CollisionShapes/btUniformScalingShape.h"
    286 
    287 %{
    288 #include <BulletCollision/CollisionShapes/btConvexPointCloudShape.h>
    289 %}
    290 %include "BulletCollision/CollisionShapes/btConvexPointCloudShape.h"
    291 
    292 %{
    293 #include <BulletCollision/CollisionShapes/btConvex2dShape.h>
    294 %}
    295 %include "BulletCollision/CollisionShapes/btConvex2dShape.h"
    296 
    297 %include "./btCollisionObject.i"
    298 %include "./btDbvt.i"
    299 %include "./btCompoundShape.i"
    300 
    301 %template(btCollisionObjectArray) btAlignedObjectArray<btCollisionObject *>;
    302 %template(btCollisionObjectConstArray) btAlignedObjectArray<const btCollisionObject*>;
    303 
    304 %include "./btCollisionObjectWrapper.i"
    305 
    306 %{
    307 #include <BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h>
    308 %}
    309 %include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
    310 
    311 %{
    312 #include <BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h>
    313 %}
    314 %include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
    315 
    316 %{
    317 #include <BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h>
    318 %}
    319 %include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h"
    320 
    321 %{
    322 #include <BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h>
    323 %}
    324 %include "BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h"
    325 
    326 %{
    327 #include <BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h>
    328 %}
    329 %include "BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h"
    330 
    331 %{
    332 #include <BulletCollision/CollisionDispatch/btCollisionConfiguration.h>
    333 %}
    334 %include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h"
    335 
    336 %{
    337 #include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
    338 %}
    339 %include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
    340 
    341 %{
    342 #include <BulletCollision/CollisionDispatch/btManifoldResult.h>
    343 %}
    344 %include "BulletCollision/CollisionDispatch/btManifoldResult.h"
    345 
    346 %{
    347 #include <BulletCollision/CollisionDispatch/btHashedSimplePairCache.h>
    348 %}
    349 %include "BulletCollision/CollisionDispatch/btHashedSimplePairCache.h"
    350 
    351 %{
    352 #include <BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h>
    353 %}
    354 %include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h"
    355 
    356 %{
    357 #include <BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h>
    358 %}
    359 %include "BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h"
    360 
    361 %{
    362 #include <BulletCollision/CollisionDispatch/btCollisionCreateFunc.h>
    363 %}
    364 %include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
    365 
    366 %{
    367 #include <BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h>
    368 %}
    369 %include "BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h"
    370 
    371 %{
    372 #include <BulletCollision/CollisionDispatch/btUnionFind.h>
    373 %}
    374 %include "BulletCollision/CollisionDispatch/btUnionFind.h"
    375 
    376 %{
    377 #include <BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h>
    378 %}
    379 %include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h"
    380 
    381 %{
    382 #include <BulletCollision/CollisionDispatch/btSimulationIslandManager.h>
    383 %}
    384 %include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h"
    385 
    386 %{
    387 #include <BulletCollision/CollisionDispatch/btGhostObject.h>
    388 %}
    389 %include "BulletCollision/CollisionDispatch/btGhostObject.h"
    390 
    391 %include "./btCollisionWorld.i"
    392 
    393 %{
    394 #include <gdx/collision/ClosestNotMeConvexResultCallback.h>
    395 %}
    396 %include "gdx/collision/ClosestNotMeConvexResultCallback.h"
    397 
    398 %{
    399 #include <gdx/collision/ClosestNotMeRayResultCallback.h>
    400 %}
    401 %include "gdx/collision/ClosestNotMeRayResultCallback.h"
    402 
    403 %{
    404 #include <BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h>
    405 %}
    406 %include "BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h"
    407 
    408 %{
    409 #include <BulletCollision/CollisionDispatch/btBoxBoxDetector.h>
    410 %}
    411 %include "BulletCollision/CollisionDispatch/btBoxBoxDetector.h"
    412 
    413 %{
    414 #include <BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h>
    415 %}
    416 %include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h"
    417 
    418 %{
    419 #include <BulletCollision/CollisionDispatch/btCollisionDispatcher.h>
    420 %}
    421 %include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
    422 
    423 %{
    424 #include <BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h>
    425 %}
    426 %include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h"
    427 
    428 %{
    429 #include <BulletCollision/CollisionDispatch/SphereTriangleDetector.h>
    430 %}
    431 %include "BulletCollision/CollisionDispatch/SphereTriangleDetector.h"
    432 
    433 %{
    434 #include <BulletCollision/CollisionDispatch/btInternalEdgeUtility.h>
    435 %}
    436 %include "BulletCollision/CollisionDispatch/btInternalEdgeUtility.h"
    437 
    438 %{
    439 #include <BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h>
    440 %}
    441 %include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
    442 
    443 %{
    444 #include <BulletCollision/NarrowPhaseCollision/btConvexCast.h>
    445 %}
    446 %include "BulletCollision/NarrowPhaseCollision/btConvexCast.h"
    447 
    448 %{
    449 #include <BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h>
    450 %}
    451 %include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
    452 
    453 %{
    454 #include <BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h>
    455 %}
    456 %include "BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h"
    457 
    458 %{
    459 #include <BulletCollision/NarrowPhaseCollision/btPersistentManifold.h>
    460 %}
    461 %include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
    462 
    463 %template(btPersistentManifoldArray) btAlignedObjectArray<btPersistentManifold*>;
    464 
    465 %{
    466 #include <BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h>
    467 %}
    468 %include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
    469 
    470 %{
    471 #include <BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h>
    472 %}
    473 %include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
    474 
    475 %{
    476 #include <BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h>
    477 %}
    478 %include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h"
    479 
    480 %{
    481 #include <BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h>
    482 %}
    483 %include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h"
    484 
    485 %include "./btManifoldPoint.i"
    486 
    487 %{
    488 #include <BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h>
    489 %}
    490 %include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h"
    491 
    492 %{
    493 #include <BulletCollision/NarrowPhaseCollision/btRaycastCallback.h>
    494 %}
    495 %include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
    496 
    497 %{
    498 #include <BulletCollision/NarrowPhaseCollision/btGjkEpa2.h>
    499 %}
    500 %include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
    501 
    502 %{
    503 #include <BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h>
    504 %}
    505 %include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
    506 
    507 %{
    508 #include <BulletCollision/NarrowPhaseCollision/btPointCollector.h>
    509 %}
    510 %include "BulletCollision/NarrowPhaseCollision/btPointCollector.h"
    511 
    512 %{
    513 #include <BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h>
    514 %}
    515 %include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
    516 
    517 %{
    518 #include <BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h>
    519 %}
    520 %include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
    521 
    522 %include "./btMultiSphereShape.i"
    523 
    524 %include "./CustomCollisionDispatcher.i"
    525 
    526 %include "./ContactListener.i"
    527 
    528 %include "./ContactCache.i"
    529 
    530 %include "./btBroadphasePairArray.i"
    531 
    532 %include "./gimpact.i"