From 209863fa9771a381515e23dcc63cbad9e6b578bd Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Wed, 6 Sep 2023 15:50:45 +0100 Subject: [PATCH] Add binding for Bullet Physics Engine Change-Id: I02b05116c620646fc5e3e17a1d74d78bcf86ab57 --- build/tizen/dali-physics-3d/CMakeLists.txt | 2 + .../bullet/btActionInterface_wrap.cpp | 60 + .../bullet/btActionInterface_wrap.h | 51 + .../bullet/btAlignedObjectArray_wrap.cpp | 376 +++ .../bullet/btAlignedObjectArray_wrap.h | 103 + .../dali-physics-3d/bullet/btAxisSweep3_wrap.cpp | 173 ++ .../dali-physics-3d/bullet/btAxisSweep3_wrap.h | 45 + .../bullet/btBox2dBox2dCollisionAlgorithm_wrap.cpp | 37 + .../bullet/btBox2dBox2dCollisionAlgorithm_wrap.h | 26 + .../dali-physics-3d/bullet/btBox2dShape_wrap.cpp | 72 + .../dali-physics-3d/bullet/btBox2dShape_wrap.h | 32 + .../bullet/btBoxBoxCollisionAlgorithm_wrap.cpp | 37 + .../bullet/btBoxBoxCollisionAlgorithm_wrap.h | 26 + .../bullet/btBoxBoxDetector_wrap.cpp | 43 + .../dali-physics-3d/bullet/btBoxBoxDetector_wrap.h | 27 + .../dali-physics-3d/bullet/btBoxCollision_wrap.cpp | 247 ++ .../dali-physics-3d/bullet/btBoxCollision_wrap.h | 62 + .../dali-physics-3d/bullet/btBoxShape_wrap.cpp | 52 + .../dali-physics-3d/bullet/btBoxShape_wrap.h | 28 + .../bullet/btBroadphaseInterface_wrap.cpp | 200 ++ .../bullet/btBroadphaseInterface_wrap.h | 79 + .../bullet/btBroadphaseProxy_wrap.cpp | 180 ++ .../bullet/btBroadphaseProxy_wrap.h | 55 + .../bullet/btBvhTriangleMeshShape_wrap.cpp | 124 + .../bullet/btBvhTriangleMeshShape_wrap.h | 38 + .../dali-physics-3d/bullet/btCapsuleShape_wrap.cpp | 54 + .../dali-physics-3d/bullet/btCapsuleShape_wrap.h | 31 + .../bullet/btCharacterControllerInterface_wrap.cpp | 88 + .../bullet/btCharacterControllerInterface_wrap.h | 33 + .../bullet/btCollisionAlgorithm_wrap.cpp | 84 + .../bullet/btCollisionAlgorithm_wrap.h | 34 + .../bullet/btCollisionConfiguration_wrap.cpp | 40 + .../bullet/btCollisionConfiguration_wrap.h | 26 + .../bullet/btCollisionCreateFunc_wrap.cpp | 47 + .../bullet/btCollisionCreateFunc_wrap.h | 27 + .../bullet/btCollisionDispatcherMt_wrap.cpp | 23 + .../bullet/btCollisionDispatcherMt_wrap.h | 23 + .../bullet/btCollisionDispatcher_wrap.cpp | 77 + .../bullet/btCollisionDispatcher_wrap.h | 32 + .../bullet/btCollisionObjectWrapper_wrap.cpp | 75 + .../bullet/btCollisionObjectWrapper_wrap.h | 33 + .../bullet/btCollisionObject_wrap.cpp | 405 +++ .../bullet/btCollisionObject_wrap.h | 97 + .../bullet/btCollisionShape_wrap.cpp | 189 ++ .../dali-physics-3d/bullet/btCollisionShape_wrap.h | 51 + .../bullet/btCollisionWorld_wrap.cpp | 882 ++++++ .../dali-physics-3d/bullet/btCollisionWorld_wrap.h | 245 ++ .../bullet/btCompoundCollisionAlgorithm_wrap.cpp | 43 + .../bullet/btCompoundCollisionAlgorithm_wrap.h | 28 + .../btCompoundCompoundCollisionAlgorithm_wrap.cpp | 37 + .../btCompoundCompoundCollisionAlgorithm_wrap.h | 27 + .../bullet/btCompoundFromGimpact_wrap.cpp | 22 + .../bullet/btCompoundFromGimpact_wrap.h | 23 + .../bullet/btCompoundShape_wrap.cpp | 154 + .../dali-physics-3d/bullet/btCompoundShape_wrap.h | 48 + .../dali-physics-3d/bullet/btConcaveShape_wrap.cpp | 26 + .../dali-physics-3d/bullet/btConcaveShape_wrap.h | 23 + .../dali-physics-3d/bullet/btConeShape_wrap.cpp | 64 + .../dali-physics-3d/bullet/btConeShape_wrap.h | 33 + .../bullet/btConeTwistConstraint_wrap.cpp | 261 ++ .../bullet/btConeTwistConstraint_wrap.h | 65 + .../bullet/btConstraintSolver_wrap.cpp | 58 + .../bullet/btConstraintSolver_wrap.h | 28 + .../bullet/btContactConstraint_wrap.cpp | 29 + .../bullet/btContactConstraint_wrap.h | 24 + .../bullet/btContactSolverInfo_wrap.cpp | 300 ++ .../bullet/btContactSolverInfo_wrap.h | 78 + .../bullet/btContinuousConvexCollision_wrap.cpp | 32 + .../bullet/btContinuousConvexCollision_wrap.h | 24 + .../bullet/btConvex2dConvex2dAlgorithm_wrap.cpp | 91 + .../bullet/btConvex2dConvex2dAlgorithm_wrap.h | 35 + .../bullet/btConvex2dShape_wrap.cpp | 27 + .../dali-physics-3d/bullet/btConvex2dShape_wrap.h | 24 + .../dali-physics-3d/bullet/btConvexCast_wrap.cpp | 133 + .../dali-physics-3d/bullet/btConvexCast_wrap.h | 44 + .../btConvexConcaveCollisionAlgorithm_wrap.cpp | 100 + .../btConvexConcaveCollisionAlgorithm_wrap.h | 39 + .../bullet/btConvexConvexAlgorithm_wrap.cpp | 76 + .../bullet/btConvexConvexAlgorithm_wrap.h | 33 + .../bullet/btConvexHullShape_wrap.cpp | 67 + .../bullet/btConvexHullShape_wrap.h | 31 + .../bullet/btConvexInternalShape_wrap.cpp | 60 + .../bullet/btConvexInternalShape_wrap.h | 30 + .../bullet/btConvexPenetrationDepthSolver_wrap.cpp | 44 + .../bullet/btConvexPenetrationDepthSolver_wrap.h | 24 + .../btConvexPlaneCollisionAlgorithm_wrap.cpp | 65 + .../bullet/btConvexPlaneCollisionAlgorithm_wrap.h | 30 + .../bullet/btConvexPointCloudShape_wrap.cpp | 67 + .../bullet/btConvexPointCloudShape_wrap.h | 29 + .../bullet/btConvexPolyhedron_wrap.cpp | 143 + .../bullet/btConvexPolyhedron_wrap.h | 46 + .../dali-physics-3d/bullet/btConvexShape_wrap.cpp | 110 + .../dali-physics-3d/bullet/btConvexShape_wrap.h | 33 + .../bullet/btConvexTriangleMeshShape_wrap.cpp | 41 + .../bullet/btConvexTriangleMeshShape_wrap.h | 25 + .../bullet/btCpuFeatureUtility_wrap.cpp | 23 + .../bullet/btCpuFeatureUtility_wrap.h | 23 + .../bullet/btCylinderShape_wrap.cpp | 74 + .../dali-physics-3d/bullet/btCylinderShape_wrap.h | 34 + .../bullet/btDantzigSolver_wrap.cpp | 22 + .../dali-physics-3d/bullet/btDantzigSolver_wrap.h | 23 + .../bullet/btDbvtBroadphase_wrap.cpp | 269 ++ .../dali-physics-3d/bullet/btDbvtBroadphase_wrap.h | 72 + .../dali-physics-3d/bullet/btDbvt_wrap.cpp | 702 +++++ .../dali-physics-3d/bullet/btDbvt_wrap.h | 155 + .../btDefaultCollisionConfiguration_wrap.cpp | 125 + .../bullet/btDefaultCollisionConfiguration_wrap.h | 42 + .../bullet/btDefaultMotionState_wrap.cpp | 76 + .../bullet/btDefaultMotionState_wrap.h | 33 + .../bullet/btDefaultSoftBodySolver_wrap.cpp | 29 + .../bullet/btDefaultSoftBodySolver_wrap.h | 24 + .../bullet/btDeformableBodySolver_wrap.cpp | 22 + .../bullet/btDeformableBodySolver_wrap.h | 23 + .../bullet/btDeformableGravityForce_wrap.cpp | 24 + .../bullet/btDeformableGravityForce_wrap.h | 23 + .../bullet/btDeformableLagrangianForce_wrap.cpp | 22 + .../bullet/btDeformableLagrangianForce_wrap.h | 23 + .../btDeformableMultiBodyConstraintSolver_wrap.cpp | 27 + .../btDeformableMultiBodyConstraintSolver_wrap.h | 24 + .../btDeformableMultiBodyDynamicsWorld_wrap.cpp | 43 + .../btDeformableMultiBodyDynamicsWorld_wrap.h | 26 + .../bullet/btDeformableNeoHookeanForce_wrap.cpp | 23 + .../bullet/btDeformableNeoHookeanForce_wrap.h | 23 + .../btDiscreteCollisionDetectorInterface_wrap.cpp | 136 + .../btDiscreteCollisionDetectorInterface_wrap.h | 45 + .../bullet/btDiscreteDynamicsWorldMt_wrap.cpp | 39 + .../bullet/btDiscreteDynamicsWorldMt_wrap.h | 26 + .../bullet/btDiscreteDynamicsWorld_wrap.cpp | 108 + .../bullet/btDiscreteDynamicsWorld_wrap.h | 38 + .../dali-physics-3d/bullet/btDispatcher_wrap.cpp | 234 ++ .../dali-physics-3d/bullet/btDispatcher_wrap.h | 63 + .../bullet/btDynamicsWorld_wrap.cpp | 133 + .../dali-physics-3d/bullet/btDynamicsWorld_wrap.h | 43 + .../bullet/btEmptyCollisionAlgorithm_wrap.cpp | 28 + .../bullet/btEmptyCollisionAlgorithm_wrap.h | 25 + .../dali-physics-3d/bullet/btEmptyShape_wrap.cpp | 22 + .../dali-physics-3d/bullet/btEmptyShape_wrap.h | 23 + .../bullet/btFixedConstraint_wrap.cpp | 26 + .../bullet/btFixedConstraint_wrap.h | 23 + .../dali-physics-3d/bullet/btGImpactBvh_wrap.cpp | 409 +++ .../dali-physics-3d/bullet/btGImpactBvh_wrap.h | 104 + .../bullet/btGImpactCollisionAlgorithm_wrap.cpp | 107 + .../bullet/btGImpactCollisionAlgorithm_wrap.h | 39 + .../bullet/btGImpactQuantizedBvh_wrap.cpp | 308 ++ .../bullet/btGImpactQuantizedBvh_wrap.h | 78 + .../dali-physics-3d/bullet/btGImpactShape_wrap.cpp | 475 +++ .../dali-physics-3d/bullet/btGImpactShape_wrap.h | 106 + .../bullet/btGearConstraint_wrap.cpp | 59 + .../dali-physics-3d/bullet/btGearConstraint_wrap.h | 29 + .../bullet/btGeneric6DofConstraint_wrap.cpp | 662 ++++ .../bullet/btGeneric6DofConstraint_wrap.h | 136 + .../bullet/btGeneric6DofSpring2Constraint_wrap.cpp | 857 +++++ .../bullet/btGeneric6DofSpring2Constraint_wrap.h | 167 + .../bullet/btGeneric6DofSpringConstraint_wrap.cpp | 93 + .../bullet/btGeneric6DofSpringConstraint_wrap.h | 34 + .../dali-physics-3d/bullet/btGeometryUtil_wrap.cpp | 57 + .../dali-physics-3d/bullet/btGeometryUtil_wrap.h | 29 + .../dali-physics-3d/bullet/btGhostObject_wrap.cpp | 91 + .../dali-physics-3d/bullet/btGhostObject_wrap.h | 36 + .../bullet/btGjkConvexCast_wrap.cpp | 24 + .../dali-physics-3d/bullet/btGjkConvexCast_wrap.h | 23 + .../bullet/btGjkEpaPenetrationDepthSolver_wrap.cpp | 22 + .../bullet/btGjkEpaPenetrationDepthSolver_wrap.h | 23 + .../bullet/btGjkPairDetector_wrap.cpp | 127 + .../bullet/btGjkPairDetector_wrap.h | 42 + .../bullet/btHeightfieldTerrainShape_wrap.cpp | 83 + .../bullet/btHeightfieldTerrainShape_wrap.h | 33 + .../bullet/btHinge2Constraint_wrap.cpp | 68 + .../bullet/btHinge2Constraint_wrap.h | 31 + .../bullet/btHingeConstraint_wrap.cpp | 353 +++ .../bullet/btHingeConstraint_wrap.h | 75 + .../dali-physics-3d/bullet/btIDebugDraw_wrap.cpp | 255 ++ .../dali-physics-3d/bullet/btIDebugDraw_wrap.h | 172 + .../bullet/btKinematicCharacterController_wrap.cpp | 189 ++ .../bullet/btKinematicCharacterController_wrap.h | 50 + .../dali-physics-3d/bullet/btLemkeSolver_wrap.cpp | 65 + .../dali-physics-3d/bullet/btLemkeSolver_wrap.h | 31 + .../bullet/btMLCPSolverInterface_wrap.cpp | 31 + .../bullet/btMLCPSolverInterface_wrap.h | 24 + .../dali-physics-3d/bullet/btMLCPSolver_wrap.cpp | 37 + .../dali-physics-3d/bullet/btMLCPSolver_wrap.h | 26 + .../bullet/btManifoldPoint_wrap.cpp | 340 ++ .../dali-physics-3d/bullet/btManifoldPoint_wrap.h | 86 + .../bullet/btManifoldResult_wrap.cpp | 113 + .../dali-physics-3d/bullet/btManifoldResult_wrap.h | 40 + .../btMinkowskiPenetrationDepthSolver_wrap.cpp | 22 + .../btMinkowskiPenetrationDepthSolver_wrap.h | 23 + .../bullet/btMinkowskiSumShape_wrap.cpp | 55 + .../bullet/btMinkowskiSumShape_wrap.h | 29 + .../dali-physics-3d/bullet/btMotionState_wrap.cpp | 65 + .../dali-physics-3d/bullet/btMotionState_wrap.h | 51 + .../bullet/btMultiBodyConstraintSolver_wrap.cpp | 42 + .../bullet/btMultiBodyConstraintSolver_wrap.h | 25 + .../bullet/btMultiBodyConstraint_wrap.cpp | 125 + .../bullet/btMultiBodyConstraint_wrap.h | 43 + .../bullet/btMultiBodyDynamicsWorld_wrap.cpp | 131 + .../bullet/btMultiBodyDynamicsWorld_wrap.h | 42 + .../bullet/btMultiBodyFixedConstraint_wrap.cpp | 87 + .../bullet/btMultiBodyFixedConstraint_wrap.h | 32 + .../btMultiBodyJointLimitConstraint_wrap.cpp | 23 + .../bullet/btMultiBodyJointLimitConstraint_wrap.h | 23 + .../bullet/btMultiBodyJointMotor_wrap.cpp | 51 + .../bullet/btMultiBodyJointMotor_wrap.h | 28 + .../bullet/btMultiBodyLinkCollider_wrap.cpp | 47 + .../bullet/btMultiBodyLinkCollider_wrap.h | 28 + .../bullet/btMultiBodyLink_wrap.cpp | 374 +++ .../dali-physics-3d/bullet/btMultiBodyLink_wrap.h | 92 + .../bullet/btMultiBodyPoint2Point_wrap.cpp | 48 + .../bullet/btMultiBodyPoint2Point_wrap.h | 26 + .../bullet/btMultiBodySliderConstraint_wrap.cpp | 102 + .../bullet/btMultiBodySliderConstraint_wrap.h | 34 + .../bullet/btMultiBodySolverConstraint_wrap.cpp | 370 +++ .../bullet/btMultiBodySolverConstraint_wrap.h | 86 + .../dali-physics-3d/bullet/btMultiBody_wrap.cpp | 743 +++++ .../dali-physics-3d/bullet/btMultiBody_wrap.h | 145 + .../bullet/btMultiSphereShape_wrap.cpp | 51 + .../bullet/btMultiSphereShape_wrap.h | 27 + .../btMultimaterialTriangleMeshShape_wrap.cpp | 41 + .../bullet/btMultimaterialTriangleMeshShape_wrap.h | 25 + .../bullet/btNNCGConstraintSolver_wrap.cpp | 32 + .../bullet/btNNCGConstraintSolver_wrap.h | 25 + .../dali-physics-3d/bullet/btOptimizedBvh_wrap.cpp | 68 + .../dali-physics-3d/bullet/btOptimizedBvh_wrap.h | 29 + .../bullet/btOverlappingPairCache_wrap.cpp | 171 + .../bullet/btOverlappingPairCache_wrap.h | 71 + .../bullet/btOverlappingPairCallback_wrap.cpp | 42 + .../bullet/btOverlappingPairCallback_wrap.h | 26 + .../bullet/btPersistentManifold_wrap.cpp | 186 ++ .../bullet/btPersistentManifold_wrap.h | 54 + .../bullet/btPoint2PointConstraint_wrap.cpp | 134 + .../bullet/btPoint2PointConstraint_wrap.h | 44 + .../bullet/btPointCollector_wrap.cpp | 63 + .../dali-physics-3d/bullet/btPointCollector_wrap.h | 31 + .../bullet/btPolarDecomposition_wrap.cpp | 45 + .../bullet/btPolarDecomposition_wrap.h | 26 + .../bullet/btPolyhedralConvexShape_wrap.cpp | 102 + .../bullet/btPolyhedralConvexShape_wrap.h | 35 + .../bullet/btPoolAllocator_wrap.cpp | 68 + .../dali-physics-3d/bullet/btPoolAllocator_wrap.h | 32 + .../dali-physics-3d/bullet/btQuantizedBvh_wrap.cpp | 283 ++ .../dali-physics-3d/bullet/btQuantizedBvh_wrap.h | 72 + .../bullet/btRaycastVehicle_wrap.cpp | 279 ++ .../dali-physics-3d/bullet/btRaycastVehicle_wrap.h | 71 + .../dali-physics-3d/bullet/btRigidBody_wrap.cpp | 631 ++++ .../dali-physics-3d/bullet/btRigidBody_wrap.h | 132 + .../bullet/btScaledBvhTriangleMeshShape_wrap.cpp | 30 + .../bullet/btScaledBvhTriangleMeshShape_wrap.h | 24 + .../btSequentialImpulseConstraintSolverMt_wrap.cpp | 22 + .../btSequentialImpulseConstraintSolverMt_wrap.h | 23 + .../btSequentialImpulseConstraintSolver_wrap.cpp | 44 + .../btSequentialImpulseConstraintSolver_wrap.h | 27 + .../dali-physics-3d/bullet/btSerializer_wrap.cpp | 321 ++ .../dali-physics-3d/bullet/btSerializer_wrap.h | 138 + .../dali-physics-3d/bullet/btShapeHull_wrap.cpp | 57 + .../dali-physics-3d/bullet/btShapeHull_wrap.h | 30 + .../bullet/btSimulationIslandManager_wrap.cpp | 93 + .../bullet/btSimulationIslandManager_wrap.h | 36 + .../bullet/btSliderConstraint_wrap.cpp | 439 +++ .../bullet/btSliderConstraint_wrap.h | 102 + .../btSoftBodyConcaveCollisionAlgorithm_wrap.cpp | 43 + .../btSoftBodyConcaveCollisionAlgorithm_wrap.h | 28 + .../bullet/btSoftBodyHelpers_wrap.cpp | 131 + .../bullet/btSoftBodyHelpers_wrap.h | 47 + ...oftBodyRigidBodyCollisionConfiguration_wrap.cpp | 28 + ...tSoftBodyRigidBodyCollisionConfiguration_wrap.h | 24 + .../bullet/btSoftBodySolvers_wrap.cpp | 108 + .../bullet/btSoftBodySolvers_wrap.h | 40 + .../dali-physics-3d/bullet/btSoftBody_wrap.cpp | 3269 ++++++++++++++++++++ .../dali-physics-3d/bullet/btSoftBody_wrap.h | 663 ++++ .../bullet/btSoftRigidCollisionAlgorithm_wrap.cpp | 30 + .../bullet/btSoftRigidCollisionAlgorithm_wrap.h | 25 + .../bullet/btSoftRigidDynamicsWorld_wrap.cpp | 70 + .../bullet/btSoftRigidDynamicsWorld_wrap.h | 31 + .../bullet/btSoftSoftCollisionAlgorithm_wrap.cpp | 37 + .../bullet/btSoftSoftCollisionAlgorithm_wrap.h | 26 + .../dali-physics-3d/bullet/btSparseSdf3_wrap.cpp | 57 + .../dali-physics-3d/bullet/btSparseSdf3_wrap.h | 30 + .../bullet/btSphereBoxCollisionAlgorithm_wrap.cpp | 61 + .../bullet/btSphereBoxCollisionAlgorithm_wrap.h | 27 + .../dali-physics-3d/bullet/btSphereShape_wrap.cpp | 32 + .../dali-physics-3d/bullet/btSphereShape_wrap.h | 25 + .../btSphereSphereCollisionAlgorithm_wrap.cpp | 35 + .../bullet/btSphereSphereCollisionAlgorithm_wrap.h | 26 + .../btSphereTriangleCollisionAlgorithm_wrap.cpp | 36 + .../btSphereTriangleCollisionAlgorithm_wrap.h | 26 + .../bullet/btStaticPlaneShape_wrap.cpp | 34 + .../bullet/btStaticPlaneShape_wrap.h | 25 + .../bullet/btStridingMeshInterface_wrap.cpp | 131 + .../bullet/btStridingMeshInterface_wrap.h | 39 + .../bullet/btTetrahedronShape_wrap.cpp | 72 + .../bullet/btTetrahedronShape_wrap.h | 30 + .../dali-physics-3d/bullet/btThreads_wrap.cpp | 62 + .../dali-physics-3d/bullet/btThreads_wrap.h | 32 + .../bullet/btTransformUtil_wrap.cpp | 118 + .../dali-physics-3d/bullet/btTransformUtil_wrap.h | 33 + .../bullet/btTriangleBuffer_wrap.cpp | 99 + .../dali-physics-3d/bullet/btTriangleBuffer_wrap.h | 39 + .../bullet/btTriangleCallback_wrap.cpp | 64 + .../bullet/btTriangleCallback_wrap.h | 65 + .../bullet/btTriangleIndexVertexArray_wrap.cpp | 132 + .../bullet/btTriangleIndexVertexArray_wrap.h | 45 + .../btTriangleIndexVertexMaterialArray_wrap.cpp | 149 + .../btTriangleIndexVertexMaterialArray_wrap.h | 46 + .../bullet/btTriangleInfoMap_wrap.cpp | 154 + .../bullet/btTriangleInfoMap_wrap.h | 50 + .../bullet/btTriangleMeshShape_wrap.cpp | 54 + .../bullet/btTriangleMeshShape_wrap.h | 28 + .../dali-physics-3d/bullet/btTriangleMesh_wrap.cpp | 76 + .../dali-physics-3d/bullet/btTriangleMesh_wrap.h | 32 + .../bullet/btTriangleShapeEx_wrap.cpp | 200 ++ .../bullet/btTriangleShapeEx_wrap.h | 57 + .../bullet/btTriangleShape_wrap.cpp | 58 + .../dali-physics-3d/bullet/btTriangleShape_wrap.h | 28 + .../bullet/btTypedConstraint_wrap.cpp | 528 ++++ .../bullet/btTypedConstraint_wrap.h | 123 + .../bullet/btUniformScalingShape_wrap.cpp | 33 + .../bullet/btUniformScalingShape_wrap.h | 25 + .../dali-physics-3d/bullet/btUnionFind_wrap.cpp | 108 + .../dali-physics-3d/bullet/btUnionFind_wrap.h | 41 + .../bullet/btUniversalConstraint_wrap.cpp | 70 + .../bullet/btUniversalConstraint_wrap.h | 31 + .../bullet/btVehicleRaycaster_wrap.cpp | 81 + .../bullet/btVehicleRaycaster_wrap.h | 33 + .../bullet/btVoronoiSimplexSolver_wrap.cpp | 429 +++ .../bullet/btVoronoiSimplexSolver_wrap.h | 97 + .../dali-physics-3d/bullet/btWheelInfo_wrap.cpp | 526 ++++ .../dali-physics-3d/bullet/btWheelInfo_wrap.h | 121 + .../dali-physics-3d/bullet/bulletc.h | 172 + .../dali-physics-3d/bullet/collections.cpp | 81 + .../dali-physics-3d/bullet/collections.h | 34 + .../dali-physics-3d/bullet/conversion.h | 420 +++ dali-csharp-binder/dali-physics-3d/bullet/main.h | 1196 +++++++ dali-csharp-binder/file.list | 164 + 333 files changed, 35419 insertions(+) create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/bulletc.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/collections.cpp create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/collections.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/conversion.h create mode 100644 dali-csharp-binder/dali-physics-3d/bullet/main.h diff --git a/build/tizen/dali-physics-3d/CMakeLists.txt b/build/tizen/dali-physics-3d/CMakeLists.txt index 49bb48c..8997514 100644 --- a/build/tizen/dali-physics-3d/CMakeLists.txt +++ b/build/tizen/dali-physics-3d/CMakeLists.txt @@ -2,6 +2,8 @@ SET(PHYSICS_3D_TARGET dali2-csharp-binder-physics-3d) SET( PHYSICS_3D_SOURCES ${dali_csharp_binder_physics_3d_src_files}) +ADD_COMPILE_OPTIONS( -Wno-unused-variable -Wno-reorder -Wno-sign-compare ) + ADD_LIBRARY( ${PHYSICS_3D_TARGET} SHARED ${PHYSICS_3D_SOURCES} ) TARGET_LINK_LIBRARIES( ${PHYSICS_3D_TARGET} PUBLIC diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.cpp new file mode 100644 index 0000000..b9a6c69 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.cpp @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btActionInterface_wrap.h" + +btActionInterfaceWrapper::btActionInterfaceWrapper(p_btActionInterface_debugDraw debugDrawCallback, + p_btActionInterface_updateAction updateActionCallback) +{ + _debugDrawCallback = debugDrawCallback; + _updateActionCallback = updateActionCallback; +} + +void btActionInterfaceWrapper::debugDraw(btIDebugDraw* debugDrawer) +{ + _debugDrawCallback(debugDrawer); +} + +void btActionInterfaceWrapper::updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep) +{ + _updateActionCallback(collisionWorld, deltaTimeStep); +} + + +btActionInterfaceWrapper* btActionInterfaceWrapper_new(p_btActionInterface_debugDraw debugDrawCallback, + p_btActionInterface_updateAction updateActionCallback) +{ + return new btActionInterfaceWrapper(debugDrawCallback, updateActionCallback); +} + + +void btActionInterface_debugDraw(btActionInterface* obj, btIDebugDraw* debugDrawer) +{ + obj->debugDraw(debugDrawer); +} + +void btActionInterface_updateAction(btActionInterface* obj, btCollisionWorld* collisionWorld, + btScalar deltaTimeStep) +{ + obj->updateAction(collisionWorld, deltaTimeStep); +} + +void btActionInterface_delete(btActionInterface* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.h new file mode 100644 index 0000000..a562f96 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btActionInterface_wrap.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef _BT_ACTION_INTERFACE_H +#define p_btActionInterface_debugDraw void* +#define p_btActionInterface_updateAction void* +#define btActionInterfaceWrapper void +#else +typedef void (*p_btActionInterface_debugDraw)(btIDebugDraw* debugDrawer); +typedef void (*p_btActionInterface_updateAction)(btCollisionWorld* collisionWorld, + btScalar deltaTimeStep); + +class btActionInterfaceWrapper : public btActionInterface +{ +private: + p_btActionInterface_debugDraw _debugDrawCallback; + p_btActionInterface_updateAction _updateActionCallback; + +public: + btActionInterfaceWrapper(p_btActionInterface_debugDraw debugDrawCallback, p_btActionInterface_updateAction updateActionCallback); + + virtual void debugDraw(btIDebugDraw* debugDrawer); + virtual void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btActionInterfaceWrapper* btActionInterfaceWrapper_new(p_btActionInterface_debugDraw debugDrawCallback, + p_btActionInterface_updateAction updateActionCallback); + + EXPORT void btActionInterface_debugDraw(btActionInterface* obj, btIDebugDraw* debugDrawer); + EXPORT void btActionInterface_updateAction(btActionInterface* obj, btCollisionWorld* collisionWorld, btScalar deltaTimeStep); + EXPORT void btActionInterface_delete(btActionInterface* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.cpp new file mode 100644 index 0000000..01825c4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.cpp @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include + +#include "btAlignedObjectArray_wrap.h" + +btBroadphasePair* btAlignedObjectArray_btBroadphasePair_at(btAlignedObjectArray_btBroadphasePair* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btBroadphasePair_push_back(btAlignedObjectArray_btBroadphasePair* obj, btBroadphasePair* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btBroadphasePair_resizeNoInitialize(btAlignedObjectArray_btBroadphasePair* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btBroadphasePair_size(btAlignedObjectArray_btBroadphasePair* obj) +{ + return obj->size(); +} + + +btCollisionObject* btAlignedObjectArray_btCollisionObjectPtr_at(btAlignedObjectArray_btCollisionObjectPtr* obj, int n) +{ + return obj->at(n); +} + +int btAlignedObjectArray_btCollisionObjectPtr_findLinearSearch2(btAlignedObjectArray_btCollisionObjectPtr* obj, btCollisionObject* key) +{ + return obj->findLinearSearch2(key); +} + +void btAlignedObjectArray_btCollisionObjectPtr_push_back(btAlignedObjectArray_btCollisionObjectPtr* obj, btCollisionObject* val) +{ + obj->push_back(val); +} + +void btAlignedObjectArray_btCollisionObjectPtr_resizeNoInitialize(btAlignedObjectArray_btCollisionObjectPtr* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btCollisionObjectPtr_size(btAlignedObjectArray_btCollisionObjectPtr* obj) +{ + return obj->size(); +} + + +btSoftBody* btAlignedObjectArray_btSoftBodyPtr_at(btAlignedObjectArray_btSoftBodyPtr* obj, int n) +{ + return obj->at(n); +} + +void btAlignedObjectArray_btSoftBodyPtr_push_back(btAlignedObjectArray_btSoftBodyPtr* obj, btSoftBody* val) +{ + obj->push_back(val); +} + +void btAlignedObjectArray_btSoftBodyPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBodyPtr* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBodyPtr_size(btAlignedObjectArray_btSoftBodyPtr* obj) +{ + return obj->size(); +} + + +btIndexedMesh* btAlignedObjectArray_btIndexedMesh_at(btAlignedObjectArray_btIndexedMesh* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btIndexedMesh_push_back(btAlignedObjectArray_btIndexedMesh* obj, btIndexedMesh* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btIndexedMesh_resizeNoInitialize(btAlignedObjectArray_btIndexedMesh* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btIndexedMesh_size(btAlignedObjectArray_btIndexedMesh* obj) +{ + return obj->size(); +} + + +EXPORT btAlignedObjectArray_btPersistentManifoldPtr* btAlignedObjectArray_btPersistentManifoldPtr_new() +{ + return new btAlignedObjectArray_btPersistentManifoldPtr(); +} + +btPersistentManifold* btAlignedObjectArray_btPersistentManifoldPtr_at(btAlignedObjectArray_btPersistentManifoldPtr* obj, int n) +{ + return obj->at(n); +} + +void btAlignedObjectArray_btPersistentManifoldPtr_push_back(btAlignedObjectArray_btPersistentManifoldPtr* obj, btPersistentManifold* val) +{ + obj->push_back(val); +} + +void btAlignedObjectArray_btPersistentManifoldPtr_resizeNoInitialize(btAlignedObjectArray_btPersistentManifoldPtr* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btPersistentManifoldPtr_size(btAlignedObjectArray_btPersistentManifoldPtr* obj) +{ + return obj->size(); +} + +void btAlignedObjectArray_btPersistentManifoldPtr_delete(btAlignedObjectArray_btPersistentManifoldPtr* obj) +{ + delete obj; +} + + +btSoftBody::Anchor* btAlignedObjectArray_btSoftBody_Anchor_at(btAlignedObjectArray_btSoftBody_Anchor* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_Anchor_push_back(btAlignedObjectArray_btSoftBody_Anchor* obj, btSoftBody::Anchor* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_Anchor_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Anchor* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_Anchor_size(btAlignedObjectArray_btSoftBody_Anchor* obj) +{ + return obj->size(); +} + + +btSoftBody::Cluster* btAlignedObjectArray_btSoftBody_ClusterPtr_at(btAlignedObjectArray_btSoftBody_ClusterPtr* obj, int n) +{ + return obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_ClusterPtr_push_back(btAlignedObjectArray_btSoftBody_ClusterPtr* obj, btSoftBody::Cluster* val) +{ + obj->push_back(val); +} + +void btAlignedObjectArray_btSoftBody_ClusterPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBody_ClusterPtr* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_ClusterPtr_size(btAlignedObjectArray_btSoftBody_ClusterPtr* obj) +{ + return obj->size(); +} + + +btSoftBody::Face* btAlignedObjectArray_btSoftBody_Face_at(btAlignedObjectArray_btSoftBody_Face* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_Face_push_back(btAlignedObjectArray_btSoftBody_Face* obj, btSoftBody::Face* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_Face_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Face* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_Face_size(btAlignedObjectArray_btSoftBody_Face* obj) +{ + return obj->size(); +} + + +btSoftBody::Joint* btAlignedObjectArray_btSoftBody_JointPtr_at(btSoftBody::tJointArray* obj, int n) +{ + return obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_JointPtr_push_back(btAlignedObjectArray_btSoftBody_JointPtr* obj, btSoftBody::Joint* val) +{ + obj->push_back(val); +} + +void btAlignedObjectArray_btSoftBody_JointPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBody_JointPtr* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_JointPtr_size(btAlignedObjectArray_btSoftBody_JointPtr* obj) +{ + return obj->size(); +} + + +btSoftBody::Link* btAlignedObjectArray_btSoftBody_Link_at(btAlignedObjectArray_btSoftBody_Link* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_Link_push_back(btAlignedObjectArray_btSoftBody_Link* obj, btSoftBody::Link* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_Link_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Link* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +void btAlignedObjectArray_btSoftBody_Link_set(btAlignedObjectArray_btSoftBody_Link* obj, btSoftBody::Link* val, int index) +{ + obj->at(index) = *val; +} + +int btAlignedObjectArray_btSoftBody_Link_size(btAlignedObjectArray_btSoftBody_Link* obj) +{ + return obj->size(); +} + + +btSoftBody::Material* btAlignedObjectArray_btSoftBody_MaterialPtr_at(btAlignedObjectArray_btSoftBody_MaterialPtr* obj, int n) +{ + return obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_MaterialPtr_push_back(btAlignedObjectArray_btSoftBody_MaterialPtr* obj, btSoftBody::Material* val) +{ + obj->push_back(val); +} + +void btAlignedObjectArray_btSoftBody_MaterialPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBody_MaterialPtr* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_MaterialPtr_size(btAlignedObjectArray_btSoftBody_MaterialPtr* obj) +{ + return obj->size(); +} + + +btSoftBody::Node* btAlignedObjectArray_btSoftBody_Node_at(btAlignedObjectArray_btSoftBody_Node* obj, int n) +{ + return &obj->at(n); +} + +int btAlignedObjectArray_btSoftBody_Node_index_of(btAlignedObjectArray_btSoftBody_Node* obj, btSoftBody::Node* val) +{ + if (val < &obj->at(0) || val > &obj->at(obj->size() - 1)) { + return -1; + } + return static_cast(val - &obj->at(0)); +} + +void btAlignedObjectArray_btSoftBody_Node_push_back(btAlignedObjectArray_btSoftBody_Node* obj, btSoftBody::Node* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_Node_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Node* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_Node_size(btAlignedObjectArray_btSoftBody_Node* obj) +{ + return obj->size(); +} + + +btSoftBody::Note* btAlignedObjectArray_btSoftBody_Note_at(btAlignedObjectArray_btSoftBody_Note* obj, int n) +{ + return &obj->at(n); +} + +int btAlignedObjectArray_btSoftBody_Note_index_of(btAlignedObjectArray_btSoftBody_Note* obj, btSoftBody::Note* val) +{ + if (val < &obj->at(0) || val > &obj->at(obj->size() - 1)) { + return -1; + } + return static_cast(val - &obj->at(0)); +} + +void btAlignedObjectArray_btSoftBody_Note_push_back(btAlignedObjectArray_btSoftBody_Note* obj, btSoftBody::Note* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_Note_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Note* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_Note_size(btAlignedObjectArray_btSoftBody_Note* obj) +{ + return obj->size(); +} + + +btSoftBody::Tetra* btAlignedObjectArray_btSoftBody_Tetra_at(btAlignedObjectArray_btSoftBody_Tetra* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_Tetra_push_back(btAlignedObjectArray_btSoftBody_Tetra* obj, btSoftBody::Tetra* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_Tetra_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Tetra* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_Tetra_size(btAlignedObjectArray_btSoftBody_Tetra* obj) +{ + return obj->size(); +} + + +btSoftBody::TetraScratch* btAlignedObjectArray_btSoftBody_TetraScratch_at(btAlignedObjectArray_btSoftBody_TetraScratch* obj, int n) +{ + return &obj->at(n); +} + +void btAlignedObjectArray_btSoftBody_TetraScratch_push_back(btAlignedObjectArray_btSoftBody_TetraScratch* obj, btSoftBody::TetraScratch* val) +{ + obj->push_back(*val); +} + +void btAlignedObjectArray_btSoftBody_TetraScratch_resize(btAlignedObjectArray_btSoftBody_TetraScratch* obj, int newSize) +{ + return obj->resize(newSize); +} + +void btAlignedObjectArray_btSoftBody_TetraScratch_resizeNoInitialize(btAlignedObjectArray_btSoftBody_TetraScratch* obj, int newSize) +{ + return obj->resizeNoInitialize(newSize); +} + +int btAlignedObjectArray_btSoftBody_TetraScratch_size(btAlignedObjectArray_btSoftBody_TetraScratch* obj) +{ + return obj->size(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.h new file mode 100644 index 0000000..7b215dd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btAlignedObjectArray_wrap.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBroadphasePair* btAlignedObjectArray_btBroadphasePair_at(btAlignedObjectArray_btBroadphasePair* obj, int n); + EXPORT void btAlignedObjectArray_btBroadphasePair_push_back(btAlignedObjectArray_btBroadphasePair* obj, btBroadphasePair* val); + EXPORT void btAlignedObjectArray_btBroadphasePair_resizeNoInitialize(btAlignedObjectArray_btBroadphasePair* obj, int newSize); + EXPORT int btAlignedObjectArray_btBroadphasePair_size(btAlignedObjectArray_btBroadphasePair* obj); + + EXPORT btCollisionObject* btAlignedObjectArray_btCollisionObjectPtr_at(btAlignedObjectArray_btCollisionObjectPtr* obj, int n); + EXPORT int btAlignedObjectArray_btCollisionObjectPtr_findLinearSearch2(btAlignedObjectArray_btCollisionObjectPtr* obj, btCollisionObject* key); + EXPORT void btAlignedObjectArray_btCollisionObjectPtr_push_back(btAlignedObjectArray_btCollisionObjectPtr* obj, btCollisionObject* val); + EXPORT void btAlignedObjectArray_btCollisionObjectPtr_resizeNoInitialize(btAlignedObjectArray_btCollisionObjectPtr* obj, int newSize); + EXPORT int btAlignedObjectArray_btCollisionObjectPtr_size(btAlignedObjectArray_btCollisionObjectPtr* obj); + + EXPORT btIndexedMesh* btAlignedObjectArray_btIndexedMesh_at(btAlignedObjectArray_btIndexedMesh* obj, int n); + EXPORT void btAlignedObjectArray_btIndexedMesh_push_back(btAlignedObjectArray_btIndexedMesh* obj, btIndexedMesh* val); + EXPORT void btAlignedObjectArray_btIndexedMesh_resizeNoInitialize(btAlignedObjectArray_btIndexedMesh* obj, int newSize); + EXPORT int btAlignedObjectArray_btIndexedMesh_size(btAlignedObjectArray_btIndexedMesh* obj); + + EXPORT btAlignedObjectArray_btPersistentManifoldPtr* btAlignedObjectArray_btPersistentManifoldPtr_new(); + EXPORT btPersistentManifold* btAlignedObjectArray_btPersistentManifoldPtr_at(btAlignedObjectArray_btPersistentManifoldPtr* obj, int n); + EXPORT void btAlignedObjectArray_btPersistentManifoldPtr_push_back(btAlignedObjectArray_btPersistentManifoldPtr* obj, btPersistentManifold* val); + EXPORT void btAlignedObjectArray_btPersistentManifoldPtr_resizeNoInitialize(btAlignedObjectArray_btPersistentManifoldPtr* obj, int newSize); + EXPORT int btAlignedObjectArray_btPersistentManifoldPtr_size(btAlignedObjectArray_btPersistentManifoldPtr* obj); + EXPORT void btAlignedObjectArray_btPersistentManifoldPtr_delete(btAlignedObjectArray_btPersistentManifoldPtr* obj); + + EXPORT btSoftBody* btAlignedObjectArray_btSoftBodyPtr_at(btAlignedObjectArray_btSoftBodyPtr* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBodyPtr_push_back(btAlignedObjectArray_btSoftBodyPtr* obj, btSoftBody* val); + EXPORT void btAlignedObjectArray_btSoftBodyPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBodyPtr* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBodyPtr_size(btAlignedObjectArray_btSoftBodyPtr* obj); + + EXPORT btSoftBody_Anchor* btAlignedObjectArray_btSoftBody_Anchor_at(btAlignedObjectArray_btSoftBody_Anchor* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_Anchor_push_back(btAlignedObjectArray_btSoftBody_Anchor* obj, btSoftBody_Anchor* val); + EXPORT void btAlignedObjectArray_btSoftBody_Anchor_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Anchor* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_Anchor_size(btAlignedObjectArray_btSoftBody_Anchor* obj); + + EXPORT btSoftBody_Cluster* btAlignedObjectArray_btSoftBody_ClusterPtr_at(btAlignedObjectArray_btSoftBody_ClusterPtr* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_ClusterPtr_push_back(btAlignedObjectArray_btSoftBody_ClusterPtr* obj, btSoftBody_Cluster* val); + EXPORT void btAlignedObjectArray_btSoftBody_ClusterPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBody_ClusterPtr* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_ClusterPtr_size(btAlignedObjectArray_btSoftBody_ClusterPtr* obj); + + EXPORT btSoftBody_Face* btAlignedObjectArray_btSoftBody_Face_at(btAlignedObjectArray_btSoftBody_Face* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_Face_push_back(btAlignedObjectArray_btSoftBody_Face* obj, btSoftBody_Face* val); + EXPORT void btAlignedObjectArray_btSoftBody_Face_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Face* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_Face_size(btAlignedObjectArray_btSoftBody_Face* obj); + + EXPORT btSoftBody_Joint* btAlignedObjectArray_btSoftBody_JointPtr_at(btAlignedObjectArray_btSoftBody_JointPtr* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_JointPtr_push_back(btAlignedObjectArray_btSoftBody_JointPtr* obj, btSoftBody_Joint* val); + EXPORT void btAlignedObjectArray_btSoftBody_JointPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBody_JointPtr* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_JointPtr_size(btAlignedObjectArray_btSoftBody_JointPtr* obj); + + EXPORT btSoftBody_Link* btAlignedObjectArray_btSoftBody_Link_at(btAlignedObjectArray_btSoftBody_Link* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_Link_push_back(btAlignedObjectArray_btSoftBody_Link* obj, btSoftBody_Link* val); + EXPORT void btAlignedObjectArray_btSoftBody_Link_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Link* obj, int newSize); + EXPORT void btAlignedObjectArray_btSoftBody_Link_set(btAlignedObjectArray_btSoftBody_Link* obj, btSoftBody_Link* val, int index); + EXPORT int btAlignedObjectArray_btSoftBody_Link_size(btAlignedObjectArray_btSoftBody_Link* obj); + + EXPORT btSoftBody_Material* btAlignedObjectArray_btSoftBody_MaterialPtr_at(btAlignedObjectArray_btSoftBody_MaterialPtr* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_MaterialPtr_push_back(btAlignedObjectArray_btSoftBody_MaterialPtr* obj, btSoftBody_Material* val); + EXPORT void btAlignedObjectArray_btSoftBody_MaterialPtr_resizeNoInitialize(btAlignedObjectArray_btSoftBody_MaterialPtr* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_MaterialPtr_size(btAlignedObjectArray_btSoftBody_MaterialPtr* obj); + + EXPORT btSoftBody_Node* btAlignedObjectArray_btSoftBody_Node_at(btAlignedObjectArray_btSoftBody_Node* obj, int n); + EXPORT int btAlignedObjectArray_btSoftBody_Node_index_of(btAlignedObjectArray_btSoftBody_Node* obj, btSoftBody_Node* val); + EXPORT void btAlignedObjectArray_btSoftBody_Node_push_back(btAlignedObjectArray_btSoftBody_Node* obj, btSoftBody_Node* val); + EXPORT void btAlignedObjectArray_btSoftBody_Node_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Node* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_Node_size(btAlignedObjectArray_btSoftBody_Node* obj); + + EXPORT btSoftBody_Note* btAlignedObjectArray_btSoftBody_Note_at(btAlignedObjectArray_btSoftBody_Note* obj, int n); + EXPORT int btAlignedObjectArray_btSoftBody_Note_index_of(btAlignedObjectArray_btSoftBody_Note* obj, btSoftBody_Note* val); + EXPORT void btAlignedObjectArray_btSoftBody_Note_push_back(btAlignedObjectArray_btSoftBody_Note* obj, btSoftBody_Note* val); + EXPORT void btAlignedObjectArray_btSoftBody_Note_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Note* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_Note_size(btAlignedObjectArray_btSoftBody_Note* obj); + + EXPORT btSoftBody_Tetra* btAlignedObjectArray_btSoftBody_Tetra_at(btAlignedObjectArray_btSoftBody_Tetra* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_Tetra_push_back(btAlignedObjectArray_btSoftBody_Tetra* obj, btSoftBody_Tetra* val); + EXPORT void btAlignedObjectArray_btSoftBody_Tetra_resizeNoInitialize(btAlignedObjectArray_btSoftBody_Tetra* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_Tetra_size(btAlignedObjectArray_btSoftBody_Tetra* obj); + + EXPORT btSoftBody_TetraScratch* btAlignedObjectArray_btSoftBody_TetraScratch_at(btAlignedObjectArray_btSoftBody_TetraScratch* obj, int n); + EXPORT void btAlignedObjectArray_btSoftBody_TetraScratch_push_back(btAlignedObjectArray_btSoftBody_TetraScratch* obj, btSoftBody_TetraScratch* val); + EXPORT void btAlignedObjectArray_btSoftBody_TetraScratch_resize(btAlignedObjectArray_btSoftBody_TetraScratch* obj, int newSize); + EXPORT void btAlignedObjectArray_btSoftBody_TetraScratch_resizeNoInitialize(btAlignedObjectArray_btSoftBody_TetraScratch* obj, int newSize); + EXPORT int btAlignedObjectArray_btSoftBody_TetraScratch_size(btAlignedObjectArray_btSoftBody_TetraScratch* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.cpp new file mode 100644 index 0000000..7e26819 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.cpp @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btAxisSweep3_wrap.h" + +btAxisSweep3* btAxisSweep3_new(const btVector3* worldAabbMin, const btVector3* worldAabbMax, + unsigned short maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) +{ + BTVECTOR3_IN(worldAabbMin); + BTVECTOR3_IN(worldAabbMax); + return new btAxisSweep3(BTVECTOR3_USE(worldAabbMin), BTVECTOR3_USE(worldAabbMax), + maxHandles, pairCache, disableRaycastAccelerator); +} + +unsigned short btAxisSweep3_addHandle(btAxisSweep3* obj, const btVector3* aabbMin, + const btVector3* aabbMax, void* pOwner, int collisionFilterGroup, int collisionFilterMask, + btDispatcher* dispatcher) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + return obj->addHandle(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), pOwner, + collisionFilterGroup, collisionFilterMask, dispatcher); +} + +btAxisSweep3Internal_unsigned_short_Handle* btAxisSweep3_getHandle(btAxisSweep3* obj, + unsigned short index) +{ + return obj->getHandle(index); +} + +unsigned short btAxisSweep3_getNumHandles(btAxisSweep3* obj) +{ + return obj->getNumHandles(); +} + +const btOverlappingPairCallback* btAxisSweep3_getOverlappingPairUserCallback(btAxisSweep3* obj) +{ + return obj->getOverlappingPairUserCallback(); +} + +void btAxisSweep3_quantize(btAxisSweep3* obj, unsigned short* out, const btVector3* point, + int isMax) +{ + BTVECTOR3_IN(point); + obj->quantize(out, BTVECTOR3_USE(point), isMax); +} + +void btAxisSweep3_removeHandle(btAxisSweep3* obj, unsigned short handle, btDispatcher* dispatcher) +{ + obj->removeHandle(handle, dispatcher); +} + +void btAxisSweep3_setOverlappingPairUserCallback(btAxisSweep3* obj, btOverlappingPairCallback* pairCallback) +{ + obj->setOverlappingPairUserCallback(pairCallback); +} + +bool btAxisSweep3_testAabbOverlap(btAxisSweep3* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + return obj->testAabbOverlap(proxy0, proxy1); +} + +void btAxisSweep3_unQuantize(btAxisSweep3* obj, btBroadphaseProxy* proxy, btVector3* aabbMin, + btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->unQuantize(proxy, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +void btAxisSweep3_updateHandle(btAxisSweep3* obj, unsigned short handle, const btVector3* aabbMin, + const btVector3* aabbMax, btDispatcher* dispatcher) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->updateHandle(handle, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), dispatcher); +} + + +bt32BitAxisSweep3* bt32BitAxisSweep3_new(const btVector3* worldAabbMin, const btVector3* worldAabbMax, + unsigned int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) +{ + BTVECTOR3_IN(worldAabbMin); + BTVECTOR3_IN(worldAabbMax); + return new bt32BitAxisSweep3(BTVECTOR3_USE(worldAabbMin), BTVECTOR3_USE(worldAabbMax), + maxHandles, pairCache, disableRaycastAccelerator); +} + +unsigned int bt32BitAxisSweep3_addHandle(bt32BitAxisSweep3* obj, const btVector3* aabbMin, + const btVector3* aabbMax, void* pOwner, int collisionFilterGroup, int collisionFilterMask, + btDispatcher* dispatcher) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + return obj->addHandle(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), pOwner, + collisionFilterGroup, collisionFilterMask, dispatcher); +} + +btAxisSweep3Internal_unsigned_int_Handle* bt32BitAxisSweep3_getHandle(bt32BitAxisSweep3* obj, + unsigned int index) +{ + return obj->getHandle(index); +} + +unsigned int bt32BitAxisSweep3_getNumHandles(bt32BitAxisSweep3* obj) +{ + return obj->getNumHandles(); +} + +const btOverlappingPairCallback* bt32BitAxisSweep3_getOverlappingPairUserCallback( + bt32BitAxisSweep3* obj) +{ + return obj->getOverlappingPairUserCallback(); +} + +void bt32BitAxisSweep3_quantize(bt32BitAxisSweep3* obj, unsigned int* out, const btVector3* point, + int isMax) +{ + BTVECTOR3_IN(point); + obj->quantize(out, BTVECTOR3_USE(point), isMax); +} + +void bt32BitAxisSweep3_removeHandle(bt32BitAxisSweep3* obj, unsigned int handle, + btDispatcher* dispatcher) +{ + obj->removeHandle(handle, dispatcher); +} + +void bt32BitAxisSweep3_setOverlappingPairUserCallback(bt32BitAxisSweep3* obj, btOverlappingPairCallback* pairCallback) +{ + obj->setOverlappingPairUserCallback(pairCallback); +} + +bool bt32BitAxisSweep3_testAabbOverlap(bt32BitAxisSweep3* obj, btBroadphaseProxy* proxy0, + btBroadphaseProxy* proxy1) +{ + return obj->testAabbOverlap(proxy0, proxy1); +} + +void bt32BitAxisSweep3_unQuantize(bt32BitAxisSweep3* obj, btBroadphaseProxy* proxy, + btVector3* aabbMin, btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->unQuantize(proxy, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +void bt32BitAxisSweep3_updateHandle(bt32BitAxisSweep3* obj, unsigned int handle, + const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* dispatcher) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->updateHandle(handle, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), dispatcher); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.h new file mode 100644 index 0000000..3ef6a77 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btAxisSweep3_wrap.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btAxisSweep3* btAxisSweep3_new(const btVector3* worldAabbMin, const btVector3* worldAabbMax, unsigned short maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator); + EXPORT unsigned short btAxisSweep3_addHandle(btAxisSweep3* obj, const btVector3* aabbMin, const btVector3* aabbMax, void* pOwner, int collisionFilterGroup, int collisionFilterMask, btDispatcher* dispatcher); + EXPORT btAxisSweep3Internal_unsigned_short_Handle* btAxisSweep3_getHandle(btAxisSweep3* obj, unsigned short index); + EXPORT unsigned short btAxisSweep3_getNumHandles(btAxisSweep3* obj); + EXPORT const btOverlappingPairCallback* btAxisSweep3_getOverlappingPairUserCallback(btAxisSweep3* obj); + EXPORT void btAxisSweep3_quantize(btAxisSweep3* obj, unsigned short* out, const btVector3* point, int isMax); + EXPORT void btAxisSweep3_removeHandle(btAxisSweep3* obj, unsigned short handle, btDispatcher* dispatcher); + EXPORT void btAxisSweep3_setOverlappingPairUserCallback(btAxisSweep3* obj, btOverlappingPairCallback* pairCallback); + EXPORT bool btAxisSweep3_testAabbOverlap(btAxisSweep3* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + EXPORT void btAxisSweep3_unQuantize(btAxisSweep3* obj, btBroadphaseProxy* proxy, btVector3* aabbMin, btVector3* aabbMax); + EXPORT void btAxisSweep3_updateHandle(btAxisSweep3* obj, unsigned short handle, const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* dispatcher); + + EXPORT bt32BitAxisSweep3* bt32BitAxisSweep3_new(const btVector3* worldAabbMin, const btVector3* worldAabbMax, unsigned int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator); + EXPORT unsigned int bt32BitAxisSweep3_addHandle(bt32BitAxisSweep3* obj, const btVector3* aabbMin, const btVector3* aabbMax, void* pOwner, int collisionFilterGroup, int collisionFilterMask, btDispatcher* dispatchery); + EXPORT btAxisSweep3Internal_unsigned_int_Handle* bt32BitAxisSweep3_getHandle(bt32BitAxisSweep3* obj, unsigned int index); + EXPORT unsigned int bt32BitAxisSweep3_getNumHandles(bt32BitAxisSweep3* obj); + EXPORT const btOverlappingPairCallback* bt32BitAxisSweep3_getOverlappingPairUserCallback(bt32BitAxisSweep3* obj); + EXPORT void bt32BitAxisSweep3_quantize(bt32BitAxisSweep3* obj, unsigned int* out, const btVector3* point, int isMax); + EXPORT void bt32BitAxisSweep3_removeHandle(bt32BitAxisSweep3* obj, unsigned int handle, btDispatcher* dispatcher); + EXPORT void bt32BitAxisSweep3_setOverlappingPairUserCallback(bt32BitAxisSweep3* obj, btOverlappingPairCallback* pairCallback); + EXPORT bool bt32BitAxisSweep3_testAabbOverlap(bt32BitAxisSweep3* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + EXPORT void bt32BitAxisSweep3_unQuantize(bt32BitAxisSweep3* obj, btBroadphaseProxy* proxy, btVector3* aabbMin, btVector3* aabbMax); + EXPORT void bt32BitAxisSweep3_updateHandle(bt32BitAxisSweep3* obj, unsigned int handle, const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* dispatcher); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..de3fab1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btBox2dBox2dCollisionAlgorithm_wrap.h" + +btBox2dBox2dCollisionAlgorithm_CreateFunc* btBox2dBox2dCollisionAlgorithm_CreateFunc_new() +{ + return new btBox2dBox2dCollisionAlgorithm::CreateFunc(); +} + + +btBox2dBox2dCollisionAlgorithm* btBox2dBox2dCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci) +{ + return new btBox2dBox2dCollisionAlgorithm(*ci); +} + +btBox2dBox2dCollisionAlgorithm* btBox2dBox2dCollisionAlgorithm_new2(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap) +{ + return new btBox2dBox2dCollisionAlgorithm(mf, *ci, body0Wrap, body1Wrap); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..16f05d2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBox2dBox2dCollisionAlgorithm_CreateFunc* btBox2dBox2dCollisionAlgorithm_CreateFunc_new(); + + EXPORT btBox2dBox2dCollisionAlgorithm* btBox2dBox2dCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci); + EXPORT btBox2dBox2dCollisionAlgorithm* btBox2dBox2dCollisionAlgorithm_new2(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.cpp new file mode 100644 index 0000000..9bd0b08 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btBox2dShape_wrap.h" + +btBox2dShape* btBox2dShape_new(const btVector3* boxHalfExtents) +{ + BTVECTOR3_IN(boxHalfExtents); + return new btBox2dShape(BTVECTOR3_USE(boxHalfExtents)); +} + +btBox2dShape* btBox2dShape_new2(btScalar boxHalfExtent) +{ + return new btBox2dShape(btVector3(boxHalfExtent, boxHalfExtent, boxHalfExtent)); +} + +btBox2dShape* btBox2dShape_new3(btScalar boxHalfExtentX, btScalar boxHalfExtentY, btScalar boxHalfExtentZ) +{ + return new btBox2dShape(btVector3(boxHalfExtentX, boxHalfExtentY, boxHalfExtentZ)); +} + +void btBox2dShape_getCentroid(btBox2dShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getCentroid()); +} + +void btBox2dShape_getHalfExtentsWithMargin(btBox2dShape* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getHalfExtentsWithMargin(); + BTVECTOR3_SET(value, temp); +} + +void btBox2dShape_getHalfExtentsWithoutMargin(btBox2dShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getHalfExtentsWithoutMargin()); +} + +const btVector3* btBox2dShape_getNormals(btBox2dShape* obj) +{ + return obj->getNormals(); +} + +void btBox2dShape_getPlaneEquation(btBox2dShape* obj, btVector4* plane, int i) +{ + BTVECTOR4_DEF(plane); + obj->getPlaneEquation(BTVECTOR4_USE(plane), i); + BTVECTOR4_DEF_OUT(plane); +} + +int btBox2dShape_getVertexCount(btBox2dShape* obj) +{ + return obj->getVertexCount(); +} + +const btVector3* btBox2dShape_getVertices(btBox2dShape* obj) +{ + return obj->getVertices(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.h new file mode 100644 index 0000000..31522e0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBox2dShape_wrap.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBox2dShape* btBox2dShape_new(const btVector3* boxHalfExtents); + EXPORT btBox2dShape* btBox2dShape_new2(btScalar boxHalfExtent); + EXPORT btBox2dShape* btBox2dShape_new3(btScalar boxHalfExtentX, btScalar boxHalfExtentY, btScalar boxHalfExtentZ); + EXPORT void btBox2dShape_getCentroid(btBox2dShape* obj, btVector3* value); + EXPORT void btBox2dShape_getHalfExtentsWithMargin(btBox2dShape* obj, btVector3* value); + EXPORT void btBox2dShape_getHalfExtentsWithoutMargin(btBox2dShape* obj, btVector3* value); + EXPORT const btVector3* btBox2dShape_getNormals(btBox2dShape* obj); + EXPORT void btBox2dShape_getPlaneEquation(btBox2dShape* obj, btVector4* plane, int i); + EXPORT int btBox2dShape_getVertexCount(btBox2dShape* obj); + EXPORT const btVector3* btBox2dShape_getVertices(btBox2dShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..636153f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btBoxBoxCollisionAlgorithm_wrap.h" + +btBoxBoxCollisionAlgorithm_CreateFunc* btBoxBoxCollisionAlgorithm_CreateFunc_new() +{ + return new btBoxBoxCollisionAlgorithm::CreateFunc(); +} + + +btBoxBoxCollisionAlgorithm* btBoxBoxCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci) +{ + return new btBoxBoxCollisionAlgorithm(*ci); +} + +btBoxBoxCollisionAlgorithm* btBoxBoxCollisionAlgorithm_new2(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap) +{ + return new btBoxBoxCollisionAlgorithm(mf, *ci, body0Wrap, body1Wrap); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..7519e06 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBoxBoxCollisionAlgorithm_CreateFunc* btBoxBoxCollisionAlgorithm_CreateFunc_new(); + + EXPORT btBoxBoxCollisionAlgorithm* btBoxBoxCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci); + EXPORT btBoxBoxCollisionAlgorithm* btBoxBoxCollisionAlgorithm_new2(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.cpp new file mode 100644 index 0000000..0b5574f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btBoxBoxDetector_wrap.h" + +btBoxBoxDetector* btBoxBoxDetector_new(const btBoxShape* box1, const btBoxShape* box2) +{ + return new btBoxBoxDetector(box1, box2); +} + +const btBoxShape* btBoxBoxDetector_getBox1(btBoxBoxDetector* obj) +{ + return obj->m_box1; +} + +const btBoxShape* btBoxBoxDetector_getBox2(btBoxBoxDetector* obj) +{ + return obj->m_box2; +} + +void btBoxBoxDetector_setBox1(btBoxBoxDetector* obj, const btBoxShape* value) +{ + obj->m_box1 = value; +} + +void btBoxBoxDetector_setBox2(btBoxBoxDetector* obj, const btBoxShape* value) +{ + obj->m_box2 = value; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.h new file mode 100644 index 0000000..c6494e8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxBoxDetector_wrap.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBoxBoxDetector* btBoxBoxDetector_new(const btBoxShape* box1, const btBoxShape* box2); + EXPORT const btBoxShape* btBoxBoxDetector_getBox1(btBoxBoxDetector* obj); + EXPORT const btBoxShape* btBoxBoxDetector_getBox2(btBoxBoxDetector* obj); + EXPORT void btBoxBoxDetector_setBox1(btBoxBoxDetector* obj, const btBoxShape* value); + EXPORT void btBoxBoxDetector_setBox2(btBoxBoxDetector* obj, const btBoxShape* value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.cpp new file mode 100644 index 0000000..c55d4ba --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.cpp @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btBoxCollision_wrap.h" + +BT_BOX_BOX_TRANSFORM_CACHE* BT_BOX_BOX_TRANSFORM_CACHE_new() +{ + return new BT_BOX_BOX_TRANSFORM_CACHE(); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_calc_absolute_matrix(BT_BOX_BOX_TRANSFORM_CACHE* obj) +{ + obj->calc_absolute_matrix(); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_calc_from_full_invert(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btTransform* trans0, const btTransform* trans1) +{ + BTTRANSFORM_IN(trans0); + BTTRANSFORM_IN(trans1); + obj->calc_from_full_invert(BTTRANSFORM_USE(trans0), BTTRANSFORM_USE(trans1)); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_calc_from_homogenic(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btTransform* trans0, const btTransform* trans1) +{ + BTTRANSFORM_IN(trans0); + BTTRANSFORM_IN(trans1); + obj->calc_from_homogenic(BTTRANSFORM_USE(trans0), BTTRANSFORM_USE(trans1)); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_getAR(BT_BOX_BOX_TRANSFORM_CACHE* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_AR); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_getR1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_R1to0); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_getT1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_T1to0); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_setAR(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_AR, (btScalar*)value); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_setR1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_R1to0, (btScalar*)value); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_setT1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_T1to0, value); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_transform(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btVector3* point, btVector3* value) +{ + BTVECTOR3_DEF(value); + BTVECTOR3_IN(point); + *value = obj->transform(BTVECTOR3_USE(point)); + BTVECTOR3_DEF_OUT(value); +} + +void BT_BOX_BOX_TRANSFORM_CACHE_delete(BT_BOX_BOX_TRANSFORM_CACHE* obj) +{ + delete obj; +} + + +btAABB* btAABB_new() +{ + return new btAABB(); +} + +btAABB* btAABB_new2(const btVector3* V1, const btVector3* V2, const btVector3* V3) +{ + BTVECTOR3_IN(V1); + BTVECTOR3_IN(V2); + BTVECTOR3_IN(V3); + return new btAABB(BTVECTOR3_USE(V1), BTVECTOR3_USE(V2), BTVECTOR3_USE(V3)); +} + +btAABB* btAABB_new3(const btVector3* V1, const btVector3* V2, const btVector3* V3, + btScalar margin) +{ + BTVECTOR3_IN(V1); + BTVECTOR3_IN(V2); + BTVECTOR3_IN(V3); + return new btAABB(BTVECTOR3_USE(V1), BTVECTOR3_USE(V2), BTVECTOR3_USE(V3), margin); +} + +btAABB* btAABB_new4(const btAABB* other) +{ + return new btAABB(*other); +} + +btAABB* btAABB_new5(const btAABB* other, btScalar margin) +{ + return new btAABB(*other, margin); +} + +void btAABB_appy_transform(btAABB* obj, const btTransform* trans) +{ + BTTRANSFORM_IN(trans); + obj->appy_transform(BTTRANSFORM_USE(trans)); +} + +void btAABB_appy_transform_trans_cache(btAABB* obj, const BT_BOX_BOX_TRANSFORM_CACHE* trans) +{ + obj->appy_transform_trans_cache(*trans); +} + +bool btAABB_collide_plane(btAABB* obj, const btVector4* plane) +{ + BTVECTOR4_IN(plane); + return obj->collide_plane(BTVECTOR4_USE(plane)); +} + +bool btAABB_collide_ray(btAABB* obj, const btVector3* vorigin, const btVector3* vdir) +{ + BTVECTOR3_IN(vorigin); + BTVECTOR3_IN(vdir); + return obj->collide_ray(BTVECTOR3_USE(vorigin), BTVECTOR3_USE(vdir)); +} + +bool btAABB_collide_triangle_exact(btAABB* obj, const btVector3* p1, const btVector3* p2, + const btVector3* p3, const btVector4* triangle_plane) +{ + BTVECTOR3_IN(p1); + BTVECTOR3_IN(p2); + BTVECTOR3_IN(p3); + BTVECTOR4_IN(triangle_plane); + return obj->collide_triangle_exact(BTVECTOR3_USE(p1), BTVECTOR3_USE(p2), BTVECTOR3_USE(p3), + BTVECTOR4_USE(triangle_plane)); +} + +void btAABB_copy_with_margin(btAABB* obj, const btAABB* other, btScalar margin) +{ + obj->copy_with_margin(*other, margin); +} + +void btAABB_find_intersection(btAABB* obj, const btAABB* other, btAABB* intersection) +{ + obj->find_intersection(*other, *intersection); +} + +void btAABB_get_center_extend(btAABB* obj, btVector3* center, btVector3* extend) +{ + BTVECTOR3_DEF(center); + BTVECTOR3_DEF(extend); + obj->get_center_extend(BTVECTOR3_USE(center), BTVECTOR3_USE(extend)); + BTVECTOR3_DEF_OUT(center); + BTVECTOR3_DEF_OUT(extend); +} + +void btAABB_getMax(btAABB* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_max); +} + +void btAABB_getMin(btAABB* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_min); +} + +bool btAABB_has_collision(btAABB* obj, const btAABB* other) +{ + return obj->has_collision(*other); +} + +void btAABB_increment_margin(btAABB* obj, btScalar margin) +{ + obj->increment_margin(margin); +} + +void btAABB_invalidate(btAABB* obj) +{ + obj->invalidate(); +} + +void btAABB_merge(btAABB* obj, const btAABB* box) +{ + obj->merge(*box); +} + +bool btAABB_overlapping_trans_cache(btAABB* obj, const btAABB* box, const BT_BOX_BOX_TRANSFORM_CACHE* transcache, + bool fulltest) +{ + return obj->overlapping_trans_cache(*box, *transcache, fulltest); +} + +bool btAABB_overlapping_trans_conservative(btAABB* obj, const btAABB* box, btTransform* trans1_to_0) +{ + BTTRANSFORM_IN(trans1_to_0); + return obj->overlapping_trans_conservative(*box, BTTRANSFORM_USE(trans1_to_0)); +} + +bool btAABB_overlapping_trans_conservative2(btAABB* obj, const btAABB* box, const BT_BOX_BOX_TRANSFORM_CACHE* trans1_to_0) +{ + return obj->overlapping_trans_conservative2(*box, *trans1_to_0); +} + +eBT_PLANE_INTERSECTION_TYPE btAABB_plane_classify(btAABB* obj, const btVector4* plane) +{ + BTVECTOR4_IN(plane); + return obj->plane_classify(BTVECTOR4_USE(plane)); +} + +void btAABB_projection_interval(btAABB* obj, const btVector3* direction, btScalar* vmin, + btScalar* vmax) +{ + BTVECTOR3_IN(direction); + obj->projection_interval(BTVECTOR3_USE(direction), *vmin, *vmax); +} + +void btAABB_setMax(btAABB* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_max, value); +} + +void btAABB_setMin(btAABB* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_min, value); +} + +void btAABB_delete(btAABB* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.h new file mode 100644 index 0000000..ed188e1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxCollision_wrap.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT BT_BOX_BOX_TRANSFORM_CACHE* BT_BOX_BOX_TRANSFORM_CACHE_new(); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_calc_absolute_matrix(BT_BOX_BOX_TRANSFORM_CACHE* obj); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_calc_from_full_invert(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btTransform* trans0, const btTransform* trans1); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_calc_from_homogenic(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btTransform* trans0, const btTransform* trans1); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_getAR(BT_BOX_BOX_TRANSFORM_CACHE* obj, btMatrix3x3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_getR1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, btMatrix3x3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_getT1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, btVector3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_setAR(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btMatrix3x3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_setR1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btMatrix3x3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_setT1to0(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btVector3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_transform(BT_BOX_BOX_TRANSFORM_CACHE* obj, const btVector3* point, btVector3* value); + EXPORT void BT_BOX_BOX_TRANSFORM_CACHE_delete(BT_BOX_BOX_TRANSFORM_CACHE* obj); + + EXPORT btAABB* btAABB_new(); + EXPORT btAABB* btAABB_new2(const btVector3* V1, const btVector3* V2, const btVector3* V3); + EXPORT btAABB* btAABB_new3(const btVector3* V1, const btVector3* V2, const btVector3* V3, btScalar margin); + EXPORT btAABB* btAABB_new4(const btAABB* other); + EXPORT btAABB* btAABB_new5(const btAABB* other, btScalar margin); + EXPORT void btAABB_appy_transform(btAABB* obj, const btTransform* trans); + EXPORT void btAABB_appy_transform_trans_cache(btAABB* obj, const BT_BOX_BOX_TRANSFORM_CACHE* trans); + EXPORT bool btAABB_collide_plane(btAABB* obj, const btVector4* plane); + EXPORT bool btAABB_collide_ray(btAABB* obj, const btVector3* vorigin, const btVector3* vdir); + EXPORT bool btAABB_collide_triangle_exact(btAABB* obj, const btVector3* p1, const btVector3* p2, const btVector3* p3, const btVector4* triangle_plane); + EXPORT void btAABB_copy_with_margin(btAABB* obj, const btAABB* other, btScalar margin); + EXPORT void btAABB_find_intersection(btAABB* obj, const btAABB* other, btAABB* intersection); + EXPORT void btAABB_get_center_extend(btAABB* obj, btVector3* center, btVector3* extend); + EXPORT void btAABB_getMax(btAABB* obj, btVector3* value); + EXPORT void btAABB_getMin(btAABB* obj, btVector3* value); + EXPORT bool btAABB_has_collision(btAABB* obj, const btAABB* other); + EXPORT void btAABB_increment_margin(btAABB* obj, btScalar margin); + EXPORT void btAABB_invalidate(btAABB* obj); + EXPORT void btAABB_merge(btAABB* obj, const btAABB* box); + EXPORT bool btAABB_overlapping_trans_cache(btAABB* obj, const btAABB* box, const BT_BOX_BOX_TRANSFORM_CACHE* transcache, bool fulltest); + EXPORT bool btAABB_overlapping_trans_conservative(btAABB* obj, const btAABB* box, btTransform* trans1_to_0); + EXPORT bool btAABB_overlapping_trans_conservative2(btAABB* obj, const btAABB* box, const BT_BOX_BOX_TRANSFORM_CACHE* trans1_to_0); + EXPORT eBT_PLANE_INTERSECTION_TYPE btAABB_plane_classify(btAABB* obj, const btVector4* plane); + EXPORT void btAABB_projection_interval(btAABB* obj, const btVector3* direction, btScalar* vmin, btScalar* vmax); + EXPORT void btAABB_setMax(btAABB* obj, const btVector3* value); + EXPORT void btAABB_setMin(btAABB* obj, const btVector3* value); + EXPORT void btAABB_delete(btAABB* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.cpp new file mode 100644 index 0000000..5e1ae41 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.cpp @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btBoxShape_wrap.h" + +btBoxShape* btBoxShape_new(const btVector3* boxHalfExtents) +{ + BTVECTOR3_IN(boxHalfExtents); + return new btBoxShape(BTVECTOR3_USE(boxHalfExtents)); +} + +btBoxShape* btBoxShape_new2(btScalar boxHalfExtent) +{ + return new btBoxShape(btVector3(boxHalfExtent, boxHalfExtent, boxHalfExtent)); +} + +btBoxShape* btBoxShape_new3(btScalar boxHalfExtentX, btScalar boxHalfExtentY, btScalar boxHalfExtentZ) +{ + return new btBoxShape(btVector3(boxHalfExtentX, boxHalfExtentY, boxHalfExtentZ)); +} + +void btBoxShape_getHalfExtentsWithMargin(btBoxShape* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getHalfExtentsWithMargin(); + BTVECTOR3_SET(value, temp); +} + +void btBoxShape_getHalfExtentsWithoutMargin(btBoxShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getHalfExtentsWithoutMargin()); +} + +void btBoxShape_getPlaneEquation(btBoxShape* obj, btVector4* plane, int i) +{ + BTVECTOR4_DEF(plane); + obj->getPlaneEquation(BTVECTOR4_USE(plane), i); + BTVECTOR4_DEF_OUT(plane); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.h new file mode 100644 index 0000000..5feb4b4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBoxShape_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBoxShape* btBoxShape_new(const btVector3* boxHalfExtents); + EXPORT btBoxShape* btBoxShape_new2(btScalar boxHalfExtent); + EXPORT btBoxShape* btBoxShape_new3(btScalar boxHalfExtentX, btScalar boxHalfExtentY, btScalar boxHalfExtentZ); + EXPORT void btBoxShape_getHalfExtentsWithMargin(btBoxShape* obj, btVector3* value); + EXPORT void btBoxShape_getHalfExtentsWithoutMargin(btBoxShape* obj, btVector3* value); + EXPORT void btBoxShape_getPlaneEquation(btBoxShape* obj, btVector4* plane, int i); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.cpp new file mode 100644 index 0000000..19abea1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.cpp @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btBroadphaseInterface_wrap.h" + +btBroadphaseAabbCallbackWrapper::btBroadphaseAabbCallbackWrapper(p_btBroadphaseAabbCallback_process processCallback) +{ + _processCallback = processCallback; +} + +bool btBroadphaseAabbCallbackWrapper::process(const btBroadphaseProxy* proxy) +{ + return _processCallback(proxy); +} + + +btBroadphaseRayCallbackWrapper::btBroadphaseRayCallbackWrapper(p_btBroadphaseAabbCallback_process processCallback) +{ + _processCallback = processCallback; +} + +bool btBroadphaseRayCallbackWrapper::process(const btBroadphaseProxy* proxy) +{ + return _processCallback(proxy); +} + + +btBroadphaseAabbCallbackWrapper* btBroadphaseAabbCallbackWrapper_new(p_btBroadphaseAabbCallback_process processCallback) +{ + return new btBroadphaseAabbCallbackWrapper(processCallback); +} + + +bool btBroadphaseAabbCallback_process(btBroadphaseAabbCallback* obj, const btBroadphaseProxy* proxy) +{ + return obj->process(proxy); +} + +void btBroadphaseAabbCallback_delete(btBroadphaseAabbCallback* obj) +{ + delete obj; +} + + +btBroadphaseRayCallbackWrapper* btBroadphaseRayCallbackWrapper_new(p_btBroadphaseAabbCallback_process processCallback) +{ + return new btBroadphaseRayCallbackWrapper(processCallback); +} + + +btScalar btBroadphaseRayCallback_getLambda_max(btBroadphaseRayCallback* obj) +{ + return obj->m_lambda_max; +} + +void btBroadphaseRayCallback_getRayDirectionInverse(btBroadphaseRayCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayDirectionInverse); +} + +unsigned int* btBroadphaseRayCallback_getSigns(btBroadphaseRayCallback* obj) +{ + return obj->m_signs; +} + +void btBroadphaseRayCallback_setLambda_max(btBroadphaseRayCallback* obj, btScalar value) +{ + obj->m_lambda_max = value; +} + +void btBroadphaseRayCallback_setRayDirectionInverse(btBroadphaseRayCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayDirectionInverse, value); +} + + +void btBroadphaseInterface_aabbTest(btBroadphaseInterface* obj, const btVector3* aabbMin, + const btVector3* aabbMax, btBroadphaseAabbCallback* callback) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->aabbTest(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), *callback); +} + +void btBroadphaseInterface_calculateOverlappingPairs(btBroadphaseInterface* obj, + btDispatcher* dispatcher) +{ + obj->calculateOverlappingPairs(dispatcher); +} + +btBroadphaseProxy* btBroadphaseInterface_createProxy(btBroadphaseInterface* obj, + const btVector3* aabbMin, const btVector3* aabbMax, int shapeType, void* userPtr, + int collisionFilterGroup, int collisionFilterMask, btDispatcher* dispatcher) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + return obj->createProxy(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), shapeType, + userPtr, collisionFilterGroup, collisionFilterMask, dispatcher); +} + +void btBroadphaseInterface_destroyProxy(btBroadphaseInterface* obj, btBroadphaseProxy* proxy, + btDispatcher* dispatcher) +{ + obj->destroyProxy(proxy, dispatcher); +} + +void btBroadphaseInterface_getAabb(btBroadphaseInterface* obj, btBroadphaseProxy* proxy, + btVector3* aabbMin, btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getAabb(proxy, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +void btBroadphaseInterface_getBroadphaseAabb(btBroadphaseInterface* obj, btVector3* aabbMin, + btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getBroadphaseAabb(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +btOverlappingPairCache* btBroadphaseInterface_getOverlappingPairCache(btBroadphaseInterface* obj) +{ + return obj->getOverlappingPairCache(); +} + +void btBroadphaseInterface_printStats(btBroadphaseInterface* obj) +{ + obj->printStats(); +} + +void btBroadphaseInterface_rayTest(btBroadphaseInterface* obj, const btVector3* rayFrom, + const btVector3* rayTo, btBroadphaseRayCallback* rayCallback) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + obj->rayTest(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *rayCallback); +} + +void btBroadphaseInterface_rayTest2(btBroadphaseInterface* obj, const btVector3* rayFrom, + const btVector3* rayTo, btBroadphaseRayCallback* rayCallback, const btVector3* aabbMin) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + BTVECTOR3_IN(aabbMin); + obj->rayTest(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *rayCallback, BTVECTOR3_USE(aabbMin)); +} + +void btBroadphaseInterface_rayTest3(btBroadphaseInterface* obj, const btVector3* rayFrom, + const btVector3* rayTo, btBroadphaseRayCallback* rayCallback, const btVector3* aabbMin, + const btVector3* aabbMax) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->rayTest(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *rayCallback, BTVECTOR3_USE(aabbMin), + BTVECTOR3_USE(aabbMax)); +} + +void btBroadphaseInterface_resetPool(btBroadphaseInterface* obj, btDispatcher* dispatcher) +{ + obj->resetPool(dispatcher); +} + +void btBroadphaseInterface_setAabb(btBroadphaseInterface* obj, btBroadphaseProxy* proxy, + const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* dispatcher) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->setAabb(proxy, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), dispatcher); +} + +void btBroadphaseInterface_delete(btBroadphaseInterface* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.h new file mode 100644 index 0000000..e8ac0a1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseInterface_wrap.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_BROADPHASE_INTERFACE_H +#define p_btBroadphaseAabbCallback_process void* +#define btBroadphaseAabbCallbackWrapper void +#define btBroadphaseRayCallbackWrapper void +#else +typedef bool (*p_btBroadphaseAabbCallback_process)(const btBroadphaseProxy* proxy); + +class btBroadphaseAabbCallbackWrapper : public btBroadphaseAabbCallback +{ +private: + p_btBroadphaseAabbCallback_process _processCallback; + +public: + btBroadphaseAabbCallbackWrapper(p_btBroadphaseAabbCallback_process processCallback); + + virtual bool process(const btBroadphaseProxy* proxy); +}; + +class btBroadphaseRayCallbackWrapper : public btBroadphaseRayCallback +{ +private: + p_btBroadphaseAabbCallback_process _processCallback; + +public: + btBroadphaseRayCallbackWrapper(p_btBroadphaseAabbCallback_process processCallback); + + virtual bool process(const btBroadphaseProxy* proxy); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBroadphaseAabbCallbackWrapper* btBroadphaseAabbCallbackWrapper_new(p_btBroadphaseAabbCallback_process processCallback); + + EXPORT bool btBroadphaseAabbCallback_process(btBroadphaseAabbCallback* obj, const btBroadphaseProxy* proxy); + EXPORT void btBroadphaseAabbCallback_delete(btBroadphaseAabbCallback* obj); + + EXPORT btBroadphaseRayCallbackWrapper* btBroadphaseRayCallbackWrapper_new(p_btBroadphaseAabbCallback_process processCallback); + + EXPORT btScalar btBroadphaseRayCallback_getLambda_max(btBroadphaseRayCallback* obj); + EXPORT void btBroadphaseRayCallback_getRayDirectionInverse(btBroadphaseRayCallback* obj, btVector3* value); + EXPORT unsigned int* btBroadphaseRayCallback_getSigns(btBroadphaseRayCallback* obj); + EXPORT void btBroadphaseRayCallback_setLambda_max(btBroadphaseRayCallback* obj, btScalar value); + EXPORT void btBroadphaseRayCallback_setRayDirectionInverse(btBroadphaseRayCallback* obj, const btVector3* value); + + EXPORT void btBroadphaseInterface_aabbTest(btBroadphaseInterface* obj, const btVector3* aabbMin, const btVector3* aabbMax, btBroadphaseAabbCallback* callback); + EXPORT void btBroadphaseInterface_calculateOverlappingPairs(btBroadphaseInterface* obj, btDispatcher* dispatcher); + EXPORT btBroadphaseProxy* btBroadphaseInterface_createProxy(btBroadphaseInterface* obj, const btVector3* aabbMin, const btVector3* aabbMax, int shapeType, void* userPtr, int collisionFilterGroup, int collisionFilterMask, btDispatcher* dispatcher); + EXPORT void btBroadphaseInterface_destroyProxy(btBroadphaseInterface* obj, btBroadphaseProxy* proxy, btDispatcher* dispatcher); + EXPORT void btBroadphaseInterface_getAabb(btBroadphaseInterface* obj, btBroadphaseProxy* proxy, btVector3* aabbMin, btVector3* aabbMax); + EXPORT void btBroadphaseInterface_getBroadphaseAabb(btBroadphaseInterface* obj, btVector3* aabbMin, btVector3* aabbMax); + EXPORT btOverlappingPairCache* btBroadphaseInterface_getOverlappingPairCache(btBroadphaseInterface* obj); + EXPORT void btBroadphaseInterface_printStats(btBroadphaseInterface* obj); + EXPORT void btBroadphaseInterface_rayTest(btBroadphaseInterface* obj, const btVector3* rayFrom, const btVector3* rayTo, btBroadphaseRayCallback* rayCallback); + EXPORT void btBroadphaseInterface_rayTest2(btBroadphaseInterface* obj, const btVector3* rayFrom, const btVector3* rayTo, btBroadphaseRayCallback* rayCallback, const btVector3* aabbMin); + EXPORT void btBroadphaseInterface_rayTest3(btBroadphaseInterface* obj, const btVector3* rayFrom, const btVector3* rayTo, btBroadphaseRayCallback* rayCallback, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btBroadphaseInterface_resetPool(btBroadphaseInterface* obj, btDispatcher* dispatcher); + EXPORT void btBroadphaseInterface_setAabb(btBroadphaseInterface* obj, btBroadphaseProxy* proxy, const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* dispatcher); + EXPORT void btBroadphaseInterface_delete(btBroadphaseInterface* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.cpp new file mode 100644 index 0000000..e155106 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.cpp @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btBroadphaseProxy_wrap.h" + +void btBroadphaseProxy_getAabbMax(btBroadphaseProxy* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_aabbMax); +} + +void btBroadphaseProxy_getAabbMin(btBroadphaseProxy* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_aabbMin); +} + +void* btBroadphaseProxy_getClientObject(btBroadphaseProxy* obj) +{ + return obj->m_clientObject; +} + +int btBroadphaseProxy_getCollisionFilterGroup(btBroadphaseProxy* obj) +{ + return obj->m_collisionFilterGroup; +} + +int btBroadphaseProxy_getCollisionFilterMask(btBroadphaseProxy* obj) +{ + return obj->m_collisionFilterMask; +} + +int btBroadphaseProxy_getUid(btBroadphaseProxy* obj) +{ + return obj->getUid(); +} + +int btBroadphaseProxy_getUniqueId(btBroadphaseProxy* obj) +{ + return obj->m_uniqueId; +} + +bool btBroadphaseProxy_isCompound(int proxyType) +{ + return btBroadphaseProxy::isCompound(proxyType); +} + +bool btBroadphaseProxy_isConcave(int proxyType) +{ + return btBroadphaseProxy::isConcave(proxyType); +} + +bool btBroadphaseProxy_isConvex(int proxyType) +{ + return btBroadphaseProxy::isConvex(proxyType); +} + +bool btBroadphaseProxy_isConvex2d(int proxyType) +{ + return btBroadphaseProxy::isConvex2d(proxyType); +} + +bool btBroadphaseProxy_isInfinite(int proxyType) +{ + return btBroadphaseProxy::isInfinite(proxyType); +} + +bool btBroadphaseProxy_isNonMoving(int proxyType) +{ + return btBroadphaseProxy::isNonMoving(proxyType); +} + +bool btBroadphaseProxy_isPolyhedral(int proxyType) +{ + return btBroadphaseProxy::isPolyhedral(proxyType); +} + +bool btBroadphaseProxy_isSoftBody(int proxyType) +{ + return btBroadphaseProxy::isSoftBody(proxyType); +} + +void btBroadphaseProxy_setAabbMax(btBroadphaseProxy* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_aabbMax, value); +} + +void btBroadphaseProxy_setAabbMin(btBroadphaseProxy* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_aabbMin, value); +} + +void btBroadphaseProxy_setClientObject(btBroadphaseProxy* obj, void* value) +{ + obj->m_clientObject = value; +} + +void btBroadphaseProxy_setCollisionFilterGroup(btBroadphaseProxy* obj, int value) +{ + obj->m_collisionFilterGroup = value; +} + +void btBroadphaseProxy_setCollisionFilterMask(btBroadphaseProxy* obj, int value) +{ + obj->m_collisionFilterMask = value; +} + +void btBroadphaseProxy_setUniqueId(btBroadphaseProxy* obj, int value) +{ + obj->m_uniqueId = value; +} + +void btBroadphaseProxy_delete(btBroadphaseProxy* obj) +{ + delete obj; +} + + +btBroadphasePair* btBroadphasePair_new() +{ + return new btBroadphasePair(); +} + +btBroadphasePair* btBroadphasePair_new2(const btBroadphasePair* other) +{ + return new btBroadphasePair(*other); +} + +btBroadphasePair* btBroadphasePair_new3(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + return new btBroadphasePair(*proxy0, *proxy1); +} + +btCollisionAlgorithm* btBroadphasePair_getAlgorithm(btBroadphasePair* obj) +{ + return obj->m_algorithm; +} + +btBroadphaseProxy* btBroadphasePair_getPProxy0(btBroadphasePair* obj) +{ + return obj->m_pProxy0; +} + +btBroadphaseProxy* btBroadphasePair_getPProxy1(btBroadphasePair* obj) +{ + return obj->m_pProxy1; +} + +void btBroadphasePair_setAlgorithm(btBroadphasePair* obj, btCollisionAlgorithm* value) +{ + obj->m_algorithm = value; +} + +void btBroadphasePair_setPProxy0(btBroadphasePair* obj, btBroadphaseProxy* value) +{ + obj->m_pProxy0 = value; +} + +void btBroadphasePair_setPProxy1(btBroadphasePair* obj, btBroadphaseProxy* value) +{ + obj->m_pProxy1 = value; +} + +void btBroadphasePair_delete(btBroadphasePair* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.h new file mode 100644 index 0000000..19ad4a9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBroadphaseProxy_wrap.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btBroadphaseProxy_getAabbMax(btBroadphaseProxy* obj, btVector3* value); + EXPORT void btBroadphaseProxy_getAabbMin(btBroadphaseProxy* obj, btVector3* value); + EXPORT void* btBroadphaseProxy_getClientObject(btBroadphaseProxy* obj); + EXPORT int btBroadphaseProxy_getCollisionFilterGroup(btBroadphaseProxy* obj); + EXPORT int btBroadphaseProxy_getCollisionFilterMask(btBroadphaseProxy* obj); + EXPORT int btBroadphaseProxy_getUid(btBroadphaseProxy* obj); + EXPORT int btBroadphaseProxy_getUniqueId(btBroadphaseProxy* obj); + EXPORT bool btBroadphaseProxy_isCompound(int proxyType); + EXPORT bool btBroadphaseProxy_isConcave(int proxyType); + EXPORT bool btBroadphaseProxy_isConvex(int proxyType); + EXPORT bool btBroadphaseProxy_isConvex2d(int proxyType); + EXPORT bool btBroadphaseProxy_isInfinite(int proxyType); + EXPORT bool btBroadphaseProxy_isNonMoving(int proxyType); + EXPORT bool btBroadphaseProxy_isPolyhedral(int proxyType); + EXPORT bool btBroadphaseProxy_isSoftBody(int proxyType); + EXPORT void btBroadphaseProxy_setAabbMax(btBroadphaseProxy* obj, const btVector3* value); + EXPORT void btBroadphaseProxy_setAabbMin(btBroadphaseProxy* obj, const btVector3* value); + EXPORT void btBroadphaseProxy_setClientObject(btBroadphaseProxy* obj, void* value); + EXPORT void btBroadphaseProxy_setCollisionFilterGroup(btBroadphaseProxy* obj, int value); + EXPORT void btBroadphaseProxy_setCollisionFilterMask(btBroadphaseProxy* obj, int value); + EXPORT void btBroadphaseProxy_setUniqueId(btBroadphaseProxy* obj, int value); + EXPORT void btBroadphaseProxy_delete(btBroadphaseProxy* obj); + + EXPORT btBroadphasePair* btBroadphasePair_new(); + EXPORT btBroadphasePair* btBroadphasePair_new2(const btBroadphasePair* other); + EXPORT btBroadphasePair* btBroadphasePair_new3(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + EXPORT btCollisionAlgorithm* btBroadphasePair_getAlgorithm(btBroadphasePair* obj); + EXPORT btBroadphaseProxy* btBroadphasePair_getPProxy0(btBroadphasePair* obj); + EXPORT btBroadphaseProxy* btBroadphasePair_getPProxy1(btBroadphasePair* obj); + EXPORT void btBroadphasePair_setAlgorithm(btBroadphasePair* obj, btCollisionAlgorithm* value); + EXPORT void btBroadphasePair_setPProxy0(btBroadphasePair* obj, btBroadphaseProxy* value); + EXPORT void btBroadphasePair_setPProxy1(btBroadphasePair* obj, btBroadphaseProxy* value); + EXPORT void btBroadphasePair_delete(btBroadphasePair* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.cpp new file mode 100644 index 0000000..7dc5073 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.cpp @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btBvhTriangleMeshShape_wrap.h" + +btBvhTriangleMeshShape* btBvhTriangleMeshShape_new(btStridingMeshInterface* meshInterface, + bool useQuantizedAabbCompression, bool buildBvh) +{ + return new btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, + buildBvh); +} + +btBvhTriangleMeshShape* btBvhTriangleMeshShape_new2(btStridingMeshInterface* meshInterface, + bool useQuantizedAabbCompression, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax, + bool buildBvh) +{ + BTVECTOR3_IN(bvhAabbMin); + BTVECTOR3_IN(bvhAabbMax); + return new btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, + BTVECTOR3_USE(bvhAabbMin), BTVECTOR3_USE(bvhAabbMax), buildBvh); +} + +void btBvhTriangleMeshShape_buildOptimizedBvh(btBvhTriangleMeshShape* obj) +{ + obj->buildOptimizedBvh(); +} + +btOptimizedBvh* btBvhTriangleMeshShape_getOptimizedBvh(btBvhTriangleMeshShape* obj) +{ + return obj->getOptimizedBvh(); +} + +bool btBvhTriangleMeshShape_getOwnsBvh(btBvhTriangleMeshShape* obj) +{ + return obj->getOwnsBvh(); +} + +btTriangleInfoMap* btBvhTriangleMeshShape_getTriangleInfoMap(btBvhTriangleMeshShape* obj) +{ + return obj->getTriangleInfoMap(); +} + +void btBvhTriangleMeshShape_partialRefitTree(btBvhTriangleMeshShape* obj, const btVector3* aabbMin, + const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->partialRefitTree(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btBvhTriangleMeshShape_performConvexcast(btBvhTriangleMeshShape* obj, btTriangleCallback* callback, + const btVector3* boxSource, const btVector3* boxTarget, const btVector3* boxMin, + const btVector3* boxMax) +{ + BTVECTOR3_IN(boxSource); + BTVECTOR3_IN(boxTarget); + BTVECTOR3_IN(boxMin); + BTVECTOR3_IN(boxMax); + obj->performConvexcast(callback, BTVECTOR3_USE(boxSource), BTVECTOR3_USE(boxTarget), + BTVECTOR3_USE(boxMin), BTVECTOR3_USE(boxMax)); +} + +void btBvhTriangleMeshShape_performRaycast(btBvhTriangleMeshShape* obj, btTriangleCallback* callback, + const btVector3* raySource, const btVector3* rayTarget) +{ + BTVECTOR3_IN(raySource); + BTVECTOR3_IN(rayTarget); + obj->performRaycast(callback, BTVECTOR3_USE(raySource), BTVECTOR3_USE(rayTarget)); +} + +void btBvhTriangleMeshShape_refitTree(btBvhTriangleMeshShape* obj, const btVector3* aabbMin, + const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->refitTree(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btBvhTriangleMeshShape_serializeSingleBvh(btBvhTriangleMeshShape* obj, btSerializer* serializer) +{ + obj->serializeSingleBvh(serializer); +} + +void btBvhTriangleMeshShape_serializeSingleTriangleInfoMap(btBvhTriangleMeshShape* obj, + btSerializer* serializer) +{ + obj->serializeSingleTriangleInfoMap(serializer); +} + +void btBvhTriangleMeshShape_setOptimizedBvh(btBvhTriangleMeshShape* obj, btOptimizedBvh* bvh) +{ + obj->setOptimizedBvh(bvh); +} + +void btBvhTriangleMeshShape_setOptimizedBvh2(btBvhTriangleMeshShape* obj, btOptimizedBvh* bvh, + const btVector3* localScaling) +{ + BTVECTOR3_IN(localScaling); + obj->setOptimizedBvh(bvh, BTVECTOR3_USE(localScaling)); +} + +void btBvhTriangleMeshShape_setTriangleInfoMap(btBvhTriangleMeshShape* obj, btTriangleInfoMap* triangleInfoMap) +{ + obj->setTriangleInfoMap(triangleInfoMap); +} + +bool btBvhTriangleMeshShape_usesQuantizedAabbCompression(btBvhTriangleMeshShape* obj) +{ + return obj->usesQuantizedAabbCompression(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.h new file mode 100644 index 0000000..4b653cf --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBvhTriangleMeshShape* btBvhTriangleMeshShape_new(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh); + EXPORT btBvhTriangleMeshShape* btBvhTriangleMeshShape_new2(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax, bool buildBvh); + EXPORT void btBvhTriangleMeshShape_buildOptimizedBvh(btBvhTriangleMeshShape* obj); + EXPORT btOptimizedBvh* btBvhTriangleMeshShape_getOptimizedBvh(btBvhTriangleMeshShape* obj); + EXPORT bool btBvhTriangleMeshShape_getOwnsBvh(btBvhTriangleMeshShape* obj); + EXPORT btTriangleInfoMap* btBvhTriangleMeshShape_getTriangleInfoMap(btBvhTriangleMeshShape* obj); + EXPORT void btBvhTriangleMeshShape_partialRefitTree(btBvhTriangleMeshShape* obj, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btBvhTriangleMeshShape_performConvexcast(btBvhTriangleMeshShape* obj, btTriangleCallback* callback, const btVector3* boxSource, const btVector3* boxTarget, const btVector3* boxMin, const btVector3* boxMax); + EXPORT void btBvhTriangleMeshShape_performRaycast(btBvhTriangleMeshShape* obj, btTriangleCallback* callback, const btVector3* raySource, const btVector3* rayTarget); + EXPORT void btBvhTriangleMeshShape_refitTree(btBvhTriangleMeshShape* obj, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btBvhTriangleMeshShape_serializeSingleBvh(btBvhTriangleMeshShape* obj, btSerializer* serializer); + EXPORT void btBvhTriangleMeshShape_serializeSingleTriangleInfoMap(btBvhTriangleMeshShape* obj, btSerializer* serializer); + EXPORT void btBvhTriangleMeshShape_setOptimizedBvh(btBvhTriangleMeshShape* obj, btOptimizedBvh* bvh); + EXPORT void btBvhTriangleMeshShape_setOptimizedBvh2(btBvhTriangleMeshShape* obj, btOptimizedBvh* bvh, const btVector3* localScaling); + EXPORT void btBvhTriangleMeshShape_setTriangleInfoMap(btBvhTriangleMeshShape* obj, btTriangleInfoMap* triangleInfoMap); + EXPORT bool btBvhTriangleMeshShape_usesQuantizedAabbCompression(btBvhTriangleMeshShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.cpp new file mode 100644 index 0000000..7bee68c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btCapsuleShape_wrap.h" + +btCapsuleShape* btCapsuleShape_new(btScalar radius, btScalar height) +{ + return new btCapsuleShape(radius, height); +} + +void btCapsuleShape_deSerializeFloat(btCapsuleShape* obj, btCapsuleShapeData* dataBuffer) +{ + obj->deSerializeFloat(dataBuffer); +} + +btScalar btCapsuleShape_getHalfHeight(btCapsuleShape* obj) +{ + return obj->getHalfHeight(); +} + +btScalar btCapsuleShape_getRadius(btCapsuleShape* obj) +{ + return obj->getRadius(); +} + +int btCapsuleShape_getUpAxis(btCapsuleShape* obj) +{ + return obj->getUpAxis(); +} + + +btCapsuleShapeX* btCapsuleShapeX_new(btScalar radius, btScalar height) +{ + return new btCapsuleShapeX(radius, height); +} + + +btCapsuleShapeZ* btCapsuleShapeZ_new(btScalar radius, btScalar height) +{ + return new btCapsuleShapeZ(radius, height); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.h new file mode 100644 index 0000000..1c480ed --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCapsuleShape_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCapsuleShape* btCapsuleShape_new(btScalar radius, btScalar height); + EXPORT void btCapsuleShape_deSerializeFloat(btCapsuleShape* obj, btCapsuleShapeData* dataBuffer); + EXPORT btScalar btCapsuleShape_getHalfHeight(btCapsuleShape* obj); + EXPORT btScalar btCapsuleShape_getRadius(btCapsuleShape* obj); + EXPORT int btCapsuleShape_getUpAxis(btCapsuleShape* obj); + + EXPORT btCapsuleShapeX* btCapsuleShapeX_new(btScalar radius, btScalar height); + + EXPORT btCapsuleShapeZ* btCapsuleShapeZ_new(btScalar radius, btScalar height); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.cpp new file mode 100644 index 0000000..4eb6ccd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.cpp @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btCharacterControllerInterface_wrap.h" + +#ifndef BULLETC_DISABLE_IACTION_CLASSES + +#include "conversion.h" + +bool btCharacterControllerInterface_canJump(btCharacterControllerInterface* obj) +{ + return obj->canJump(); +} + +void btCharacterControllerInterface_jump(btCharacterControllerInterface* obj) +{ + obj->jump(); +} + +void btCharacterControllerInterface_jump2(btCharacterControllerInterface* obj, const btVector3* dir) +{ + BTVECTOR3_IN(dir); + obj->jump(BTVECTOR3_USE(dir)); +} + +bool btCharacterControllerInterface_onGround(btCharacterControllerInterface* obj) +{ + return obj->onGround(); +} + +void btCharacterControllerInterface_playerStep(btCharacterControllerInterface* obj, + btCollisionWorld* collisionWorld, btScalar dt) +{ + obj->playerStep(collisionWorld, dt); +} + +void btCharacterControllerInterface_preStep(btCharacterControllerInterface* obj, + btCollisionWorld* collisionWorld) +{ + obj->preStep(collisionWorld); +} + +void btCharacterControllerInterface_reset(btCharacterControllerInterface* obj, btCollisionWorld* collisionWorld) +{ + obj->reset(collisionWorld); +} + +void btCharacterControllerInterface_setUpInterpolate(btCharacterControllerInterface* obj, + bool value) +{ + obj->setUpInterpolate(value); +} + +void btCharacterControllerInterface_setWalkDirection(btCharacterControllerInterface* obj, + const btVector3* walkDirection) +{ + BTVECTOR3_IN(walkDirection); + obj->setWalkDirection(BTVECTOR3_USE(walkDirection)); +} + +void btCharacterControllerInterface_setVelocityForTimeInterval(btCharacterControllerInterface* obj, + const btVector3* velocity, btScalar timeInterval) +{ + BTVECTOR3_IN(velocity); + obj->setVelocityForTimeInterval(BTVECTOR3_USE(velocity), timeInterval); +} + +void btCharacterControllerInterface_warp(btCharacterControllerInterface* obj, const btVector3* origin) +{ + BTVECTOR3_IN(origin); + obj->warp(BTVECTOR3_USE(origin)); +} + +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.h new file mode 100644 index 0000000..83c8c1e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT bool btCharacterControllerInterface_canJump(btCharacterControllerInterface* obj); + EXPORT void btCharacterControllerInterface_jump(btCharacterControllerInterface* obj); + EXPORT void btCharacterControllerInterface_jump2(btCharacterControllerInterface* obj, const btVector3* dir); + EXPORT bool btCharacterControllerInterface_onGround(btCharacterControllerInterface* obj); + EXPORT void btCharacterControllerInterface_playerStep(btCharacterControllerInterface* obj, btCollisionWorld* collisionWorld, btScalar dt); + EXPORT void btCharacterControllerInterface_preStep(btCharacterControllerInterface* obj, btCollisionWorld* collisionWorld); + EXPORT void btCharacterControllerInterface_reset(btCharacterControllerInterface* obj, btCollisionWorld* collisionWorld); + EXPORT void btCharacterControllerInterface_setUpInterpolate(btCharacterControllerInterface* obj, bool value); + EXPORT void btCharacterControllerInterface_setWalkDirection(btCharacterControllerInterface* obj, const btVector3* walkDirection); + EXPORT void btCharacterControllerInterface_setVelocityForTimeInterval(btCharacterControllerInterface* obj, const btVector3* velocity, btScalar timeInterval); + EXPORT void btCharacterControllerInterface_warp(btCharacterControllerInterface* obj, const btVector3* origin); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..80f6460 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.cpp @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include +#include + +#include "btCollisionAlgorithm_wrap.h" + +btCollisionAlgorithmConstructionInfo* btCollisionAlgorithmConstructionInfo_new() +{ + return new btCollisionAlgorithmConstructionInfo(); +} + +btCollisionAlgorithmConstructionInfo* btCollisionAlgorithmConstructionInfo_new2(btDispatcher* dispatcher, + int temp) +{ + return new btCollisionAlgorithmConstructionInfo(dispatcher, temp); +} + +btDispatcher* btCollisionAlgorithmConstructionInfo_getDispatcher1(btCollisionAlgorithmConstructionInfo* obj) +{ + return obj->m_dispatcher1; +} + +btPersistentManifold* btCollisionAlgorithmConstructionInfo_getManifold(btCollisionAlgorithmConstructionInfo* obj) +{ + return obj->m_manifold; +} + +void btCollisionAlgorithmConstructionInfo_setDispatcher1(btCollisionAlgorithmConstructionInfo* obj, + btDispatcher* value) +{ + obj->m_dispatcher1 = value; +} + +void btCollisionAlgorithmConstructionInfo_setManifold(btCollisionAlgorithmConstructionInfo* obj, + btPersistentManifold* value) +{ + obj->m_manifold = value; +} + +void btCollisionAlgorithmConstructionInfo_delete(btCollisionAlgorithmConstructionInfo* obj) +{ + delete obj; +} + + +btScalar btCollisionAlgorithm_calculateTimeOfImpact(btCollisionAlgorithm* obj, btCollisionObject* body0, + btCollisionObject* body1, const btDispatcherInfo* dispatchInfo, btManifoldResult* resultOut) +{ + return obj->calculateTimeOfImpact(body0, body1, *dispatchInfo, resultOut); +} + +void btCollisionAlgorithm_getAllContactManifolds(btCollisionAlgorithm* obj, btAlignedObjectArray_btPersistentManifoldPtr* manifoldArray) +{ + obj->getAllContactManifolds(*manifoldArray); +} + +void btCollisionAlgorithm_processCollision(btCollisionAlgorithm* obj, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap, const btDispatcherInfo* dispatchInfo, + btManifoldResult* resultOut) +{ + obj->processCollision(body0Wrap, body1Wrap, *dispatchInfo, resultOut); +} + +void btCollisionAlgorithm_delete(btCollisionAlgorithm* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..8b74f0c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionAlgorithmConstructionInfo* btCollisionAlgorithmConstructionInfo_new(); + EXPORT btCollisionAlgorithmConstructionInfo* btCollisionAlgorithmConstructionInfo_new2(btDispatcher* dispatcher, int temp); + EXPORT btDispatcher* btCollisionAlgorithmConstructionInfo_getDispatcher1(btCollisionAlgorithmConstructionInfo* obj); + EXPORT btPersistentManifold* btCollisionAlgorithmConstructionInfo_getManifold(btCollisionAlgorithmConstructionInfo* obj); + EXPORT void btCollisionAlgorithmConstructionInfo_setDispatcher1(btCollisionAlgorithmConstructionInfo* obj, btDispatcher* value); + EXPORT void btCollisionAlgorithmConstructionInfo_setManifold(btCollisionAlgorithmConstructionInfo* obj, btPersistentManifold* value); + EXPORT void btCollisionAlgorithmConstructionInfo_delete(btCollisionAlgorithmConstructionInfo* obj); + + EXPORT btScalar btCollisionAlgorithm_calculateTimeOfImpact(btCollisionAlgorithm* obj, btCollisionObject* body0, btCollisionObject* body1, const btDispatcherInfo* dispatchInfo, btManifoldResult* resultOut); + EXPORT void btCollisionAlgorithm_getAllContactManifolds(btCollisionAlgorithm* obj, btAlignedObjectArray_btPersistentManifoldPtr* manifoldArray); + EXPORT void btCollisionAlgorithm_processCollision(btCollisionAlgorithm* obj, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, const btDispatcherInfo* dispatchInfo, btManifoldResult* resultOut); + EXPORT void btCollisionAlgorithm_delete(btCollisionAlgorithm* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.cpp new file mode 100644 index 0000000..d926bb2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btCollisionConfiguration_wrap.h" + +btCollisionAlgorithmCreateFunc* btCollisionConfiguration_getCollisionAlgorithmCreateFunc( + btCollisionConfiguration* obj, int proxyType0, int proxyType1) +{ + return obj->getCollisionAlgorithmCreateFunc(proxyType0, proxyType1); +} + +btPoolAllocator* btCollisionConfiguration_getCollisionAlgorithmPool(btCollisionConfiguration* obj) +{ + return obj->getCollisionAlgorithmPool(); +} + +btPoolAllocator* btCollisionConfiguration_getPersistentManifoldPool(btCollisionConfiguration* obj) +{ + return obj->getPersistentManifoldPool(); +} + +void btCollisionConfiguration_delete(btCollisionConfiguration* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.h new file mode 100644 index 0000000..c6812dc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionConfiguration_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionAlgorithmCreateFunc* btCollisionConfiguration_getCollisionAlgorithmCreateFunc(btCollisionConfiguration* obj, int proxyType0, int proxyType1); + EXPORT btPoolAllocator* btCollisionConfiguration_getCollisionAlgorithmPool(btCollisionConfiguration* obj); + EXPORT btPoolAllocator* btCollisionConfiguration_getPersistentManifoldPool(btCollisionConfiguration* obj); + EXPORT void btCollisionConfiguration_delete(btCollisionConfiguration* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.cpp new file mode 100644 index 0000000..61b620f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btCollisionCreateFunc_wrap.h" + +btCollisionAlgorithmCreateFunc* btCollisionAlgorithmCreateFunc_new() +{ + return new btCollisionAlgorithmCreateFunc(); +} + +btCollisionAlgorithm* btCollisionAlgorithmCreateFunc_CreateCollisionAlgorithm(btCollisionAlgorithmCreateFunc* obj, + btCollisionAlgorithmConstructionInfo* __unnamed0, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap) +{ + return obj->CreateCollisionAlgorithm(*__unnamed0, body0Wrap, body1Wrap); +} + +bool btCollisionAlgorithmCreateFunc_getSwapped(btCollisionAlgorithmCreateFunc* obj) +{ + return obj->m_swapped; +} + +void btCollisionAlgorithmCreateFunc_setSwapped(btCollisionAlgorithmCreateFunc* obj, + bool value) +{ + obj->m_swapped = value; +} + +void btCollisionAlgorithmCreateFunc_delete(btCollisionAlgorithmCreateFunc* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.h new file mode 100644 index 0000000..ffb3389 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionAlgorithmCreateFunc* btCollisionAlgorithmCreateFunc_new(); + EXPORT btCollisionAlgorithm* btCollisionAlgorithmCreateFunc_CreateCollisionAlgorithm(btCollisionAlgorithmCreateFunc* obj, btCollisionAlgorithmConstructionInfo* __unnamed0, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); + EXPORT bool btCollisionAlgorithmCreateFunc_getSwapped(btCollisionAlgorithmCreateFunc* obj); + EXPORT void btCollisionAlgorithmCreateFunc_setSwapped(btCollisionAlgorithmCreateFunc* obj, bool value); + EXPORT void btCollisionAlgorithmCreateFunc_delete(btCollisionAlgorithmCreateFunc* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.cpp new file mode 100644 index 0000000..198b497 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btCollisionDispatcherMt_wrap.h" + +btCollisionDispatcher* btCollisionDispatcherMt_new(btCollisionConfiguration* collisionConfiguration, int grainSize) +{ + return new btCollisionDispatcherMt(collisionConfiguration, grainSize); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.h new file mode 100644 index 0000000..d86aff5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionDispatcher* btCollisionDispatcherMt_new(btCollisionConfiguration* collisionConfiguration, int grainSize); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.cpp new file mode 100644 index 0000000..d6b69d2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btCollisionDispatcher_wrap.h" + +btCollisionDispatcher* btCollisionDispatcher_new(btCollisionConfiguration* collisionConfiguration) +{ + return new btCollisionDispatcher(collisionConfiguration); +} + +void btCollisionDispatcher_defaultNearCallback(btBroadphasePair* collisionPair, btCollisionDispatcher* dispatcher, + const btDispatcherInfo* dispatchInfo) +{ + btCollisionDispatcher::defaultNearCallback(*collisionPair, *dispatcher, *dispatchInfo); +} + +btCollisionConfiguration* btCollisionDispatcher_getCollisionConfiguration(btCollisionDispatcher* obj) +{ + return obj->getCollisionConfiguration(); +} + +int btCollisionDispatcher_getDispatcherFlags(btCollisionDispatcher* obj) +{ + return obj->getDispatcherFlags(); +} + +btNearCallback btCollisionDispatcher_getNearCallback(btCollisionDispatcher* obj) +{ + return obj->getNearCallback(); +} + +void btCollisionDispatcher_registerCollisionCreateFunc(btCollisionDispatcher* obj, + int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc* createFunc) +{ + obj->registerCollisionCreateFunc(proxyType0, proxyType1, createFunc); +} + +void btCollisionDispatcher_registerClosestPointsCreateFunc(btCollisionDispatcher * obj, + int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc * createFunc) +{ + obj->registerCollisionCreateFunc(proxyType0, proxyType1, createFunc); +} + +void btCollisionDispatcher_setCollisionConfiguration(btCollisionDispatcher* obj, + btCollisionConfiguration* config) +{ + obj->setCollisionConfiguration(config); +} + +void btCollisionDispatcher_setDispatcherFlags(btCollisionDispatcher* obj, int flags) +{ + obj->setDispatcherFlags(flags); +} + +void btCollisionDispatcher_setNearCallback(btCollisionDispatcher* obj, btNearCallback nearCallback) +{ + if (nearCallback == 0) + { + obj->setNearCallback(btCollisionDispatcher::defaultNearCallback); + return; + } + obj->setNearCallback(nearCallback); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.h new file mode 100644 index 0000000..106a44c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionDispatcher_wrap.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionDispatcher* btCollisionDispatcher_new(btCollisionConfiguration* collisionConfiguration); + EXPORT void btCollisionDispatcher_defaultNearCallback(btBroadphasePair* collisionPair, btCollisionDispatcher* dispatcher, const btDispatcherInfo* dispatchInfo); + EXPORT btCollisionConfiguration* btCollisionDispatcher_getCollisionConfiguration(btCollisionDispatcher* obj); + EXPORT int btCollisionDispatcher_getDispatcherFlags(btCollisionDispatcher* obj); + EXPORT btNearCallback btCollisionDispatcher_getNearCallback(btCollisionDispatcher* obj); + EXPORT void btCollisionDispatcher_registerCollisionCreateFunc(btCollisionDispatcher* obj, int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc* createFunc); + EXPORT void btCollisionDispatcher_registerClosestPointsCreateFunc(btCollisionDispatcher* obj, int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc* createFunc); + EXPORT void btCollisionDispatcher_setCollisionConfiguration(btCollisionDispatcher* obj, btCollisionConfiguration* config); + EXPORT void btCollisionDispatcher_setDispatcherFlags(btCollisionDispatcher* obj, int flags); + EXPORT void btCollisionDispatcher_setNearCallback(btCollisionDispatcher* obj, btNearCallback nearCallback); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.cpp new file mode 100644 index 0000000..054ea5e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btCollisionObjectWrapper_wrap.h" + +const btCollisionObject* btCollisionObjectWrapper_getCollisionObject(btCollisionObjectWrapper* obj) +{ + return obj->getCollisionObject(); +} + +const btCollisionShape* btCollisionObjectWrapper_getCollisionShape(btCollisionObjectWrapper* obj) +{ + return obj->getCollisionShape(); +} + +int btCollisionObjectWrapper_getIndex(btCollisionObjectWrapper* obj) +{ + return obj->m_index; +} + +const btCollisionObjectWrapper* btCollisionObjectWrapper_getParent(btCollisionObjectWrapper* obj) +{ + return obj->m_parent; +} + +int btCollisionObjectWrapper_getPartId(btCollisionObjectWrapper* obj) +{ + return obj->m_partId; +} + +void btCollisionObjectWrapper_getWorldTransform(btCollisionObjectWrapper* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getWorldTransform()); +} + +void btCollisionObjectWrapper_setCollisionObject(btCollisionObjectWrapper* obj, const btCollisionObject* value) +{ + obj->m_collisionObject = value; +} + +void btCollisionObjectWrapper_setIndex(btCollisionObjectWrapper* obj, int value) +{ + obj->m_index = value; +} + +void btCollisionObjectWrapper_setParent(btCollisionObjectWrapper* obj, const btCollisionObjectWrapper* value) +{ + obj->m_parent = value; +} + +void btCollisionObjectWrapper_setPartId(btCollisionObjectWrapper* obj, int value) +{ + obj->m_partId = value; +} + +void btCollisionObjectWrapper_setShape(btCollisionObjectWrapper* obj, const btCollisionShape* value) +{ + obj->m_shape = value; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.h new file mode 100644 index 0000000..eec2c4b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT const btCollisionObject* btCollisionObjectWrapper_getCollisionObject(btCollisionObjectWrapper* obj); + EXPORT const btCollisionShape* btCollisionObjectWrapper_getCollisionShape(btCollisionObjectWrapper* obj); + EXPORT int btCollisionObjectWrapper_getIndex(btCollisionObjectWrapper* obj); + EXPORT const btCollisionObjectWrapper* btCollisionObjectWrapper_getParent(btCollisionObjectWrapper* obj); + EXPORT int btCollisionObjectWrapper_getPartId(btCollisionObjectWrapper* obj); + EXPORT void btCollisionObjectWrapper_getWorldTransform(btCollisionObjectWrapper* obj, btTransform* value); + EXPORT void btCollisionObjectWrapper_setCollisionObject(btCollisionObjectWrapper* obj, const btCollisionObject* value); + EXPORT void btCollisionObjectWrapper_setIndex(btCollisionObjectWrapper* obj, int value); + EXPORT void btCollisionObjectWrapper_setParent(btCollisionObjectWrapper* obj, const btCollisionObjectWrapper* value); + EXPORT void btCollisionObjectWrapper_setPartId(btCollisionObjectWrapper* obj, int value); + EXPORT void btCollisionObjectWrapper_setShape(btCollisionObjectWrapper* obj, const btCollisionShape* value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.cpp new file mode 100644 index 0000000..43964ad --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.cpp @@ -0,0 +1,405 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "conversion.h" +#include "btCollisionObject_wrap.h" + +btCollisionObject* btCollisionObject_new() +{ + return new btCollisionObject(); +} + +void btCollisionObject_activate(btCollisionObject* obj, bool forceActivation) +{ + obj->activate(forceActivation); +} + +int btCollisionObject_calculateSerializeBufferSize(btCollisionObject* obj) +{ + return obj->calculateSerializeBufferSize(); +} + +bool btCollisionObject_checkCollideWith(btCollisionObject* obj, const btCollisionObject* co) +{ + return obj->checkCollideWith(co); +} + +bool btCollisionObject_checkCollideWithOverride(btCollisionObject* obj, const btCollisionObject* co) +{ + return obj->checkCollideWithOverride(co); +} + +void btCollisionObject_forceActivationState(btCollisionObject* obj, int newState) +{ + obj->forceActivationState(newState); +} + +int btCollisionObject_getActivationState(btCollisionObject* obj) +{ + return obj->getActivationState(); +} + +void btCollisionObject_getAnisotropicFriction(btCollisionObject* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAnisotropicFriction()); +} + +btBroadphaseProxy* btCollisionObject_getBroadphaseHandle(btCollisionObject* obj) +{ + return obj->getBroadphaseHandle(); +} + +btScalar btCollisionObject_getCcdMotionThreshold(btCollisionObject* obj) +{ + return obj->getCcdMotionThreshold(); +} + +btScalar btCollisionObject_getCcdSquareMotionThreshold(btCollisionObject* obj) +{ + return obj->getCcdSquareMotionThreshold(); +} + +btScalar btCollisionObject_getCcdSweptSphereRadius(btCollisionObject* obj) +{ + return obj->getCcdSweptSphereRadius(); +} + +int btCollisionObject_getCollisionFlags(btCollisionObject* obj) +{ + return obj->getCollisionFlags(); +} + +btCollisionShape* btCollisionObject_getCollisionShape(btCollisionObject* obj) +{ + return obj->getCollisionShape(); +} + +int btCollisionObject_getCompanionId(btCollisionObject* obj) +{ + return obj->getCompanionId(); +} + +btScalar btCollisionObject_getContactDamping(btCollisionObject* obj) +{ + return obj->getContactDamping(); +} + +btScalar btCollisionObject_getContactProcessingThreshold(btCollisionObject* obj) +{ + return obj->getContactProcessingThreshold(); +} + +btScalar btCollisionObject_getContactStiffness(btCollisionObject* obj) +{ + return obj->getContactStiffness(); +} + +bool btCollisionObject_getCustomDebugColor(btCollisionObject* obj, btVector3* colorRGB) +{ + return obj->getCustomDebugColor(*colorRGB); +} + +btScalar btCollisionObject_getDeactivationTime(btCollisionObject* obj) +{ + return obj->getDeactivationTime(); +} + +btScalar btCollisionObject_getFriction(btCollisionObject* obj) +{ + return obj->getFriction(); +} + +btScalar btCollisionObject_getHitFraction(btCollisionObject* obj) +{ + return obj->getHitFraction(); +} + +int btCollisionObject_getInternalType(btCollisionObject* obj) +{ + return obj->getInternalType(); +} + +void btCollisionObject_getInterpolationAngularVelocity(btCollisionObject* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getInterpolationAngularVelocity()); +} + +void btCollisionObject_getInterpolationLinearVelocity(btCollisionObject* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getInterpolationLinearVelocity()); +} + +void btCollisionObject_getInterpolationWorldTransform(btCollisionObject* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getInterpolationWorldTransform()); +} + +int btCollisionObject_getIslandTag(btCollisionObject* obj) +{ + return obj->getIslandTag(); +} + +btScalar btCollisionObject_getRestitution(btCollisionObject* obj) +{ + return obj->getRestitution(); +} + +btScalar btCollisionObject_getRollingFriction(btCollisionObject* obj) +{ + return obj->getRollingFriction(); +} + +btScalar btCollisionObject_getSpinningFriction(btCollisionObject* obj) +{ + return obj->getSpinningFriction(); +} + +int btCollisionObject_getWorldArrayIndex(btCollisionObject * obj) +{ + return obj->getWorldArrayIndex(); +} + +int btCollisionObject_getUserIndex(btCollisionObject* obj) +{ + return obj->getUserIndex(); +} + +int btCollisionObject_getUserIndex2(btCollisionObject* obj) +{ + return obj->getUserIndex2(); +} + +void* btCollisionObject_getUserPointer(btCollisionObject* obj) +{ + return obj->getUserPointer(); +} + +void btCollisionObject_getWorldTransform(btCollisionObject* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getWorldTransform()); +} + +bool btCollisionObject_hasAnisotropicFriction(btCollisionObject* obj, int frictionMode) +{ + return obj->hasAnisotropicFriction(frictionMode); +} + +bool btCollisionObject_hasContactResponse(btCollisionObject* obj) +{ + return obj->hasContactResponse(); +} + +void* btCollisionObject_internalGetExtensionPointer(btCollisionObject* obj) +{ + return obj->internalGetExtensionPointer(); +} + +void btCollisionObject_internalSetExtensionPointer(btCollisionObject* obj, void* pointer) +{ + obj->internalSetExtensionPointer(pointer); +} + +bool btCollisionObject_isActive(btCollisionObject* obj) +{ + return obj->isActive(); +} + +bool btCollisionObject_isKinematicObject(btCollisionObject* obj) +{ + return obj->isKinematicObject(); +} + +bool btCollisionObject_isStaticObject(btCollisionObject* obj) +{ + return obj->isStaticObject(); +} + +bool btCollisionObject_isStaticOrKinematicObject(btCollisionObject* obj) +{ + return obj->isStaticOrKinematicObject(); +} + +bool btCollisionObject_mergesSimulationIslands(btCollisionObject* obj) +{ + return obj->mergesSimulationIslands(); +} + +void btCollisionObject_removeCustomDebugColor(btCollisionObject * obj) +{ + obj->removeCustomDebugColor(); +} + +const char* btCollisionObject_serialize(btCollisionObject* obj, void* dataBuffer, + btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btCollisionObject_serializeSingleObject(btCollisionObject* obj, btSerializer* serializer) +{ + obj->serializeSingleObject(serializer); +} + +void btCollisionObject_setActivationState(btCollisionObject* obj, int newState) +{ + obj->setActivationState(newState); +} + +void btCollisionObject_setAnisotropicFriction(btCollisionObject* obj, const btVector3* anisotropicFriction, + int frictionMode) +{ + BTVECTOR3_IN(anisotropicFriction); + obj->setAnisotropicFriction(BTVECTOR3_USE(anisotropicFriction), frictionMode); +} + +void btCollisionObject_setBroadphaseHandle(btCollisionObject* obj, btBroadphaseProxy* handle) +{ + obj->setBroadphaseHandle(handle); +} + +void btCollisionObject_setCcdMotionThreshold(btCollisionObject* obj, btScalar ccdMotionThreshold) +{ + obj->setCcdMotionThreshold(ccdMotionThreshold); +} + +void btCollisionObject_setCcdSweptSphereRadius(btCollisionObject* obj, btScalar radius) +{ + obj->setCcdSweptSphereRadius(radius); +} + +void btCollisionObject_setCollisionFlags(btCollisionObject* obj, int flags) +{ + obj->setCollisionFlags(flags); +} + +void btCollisionObject_setCollisionShape(btCollisionObject* obj, btCollisionShape* collisionShape) +{ + obj->setCollisionShape(collisionShape); +} + +void btCollisionObject_setCompanionId(btCollisionObject* obj, int id) +{ + obj->setCompanionId(id); +} + +void btCollisionObject_setContactProcessingThreshold(btCollisionObject* obj, btScalar contactProcessingThreshold) +{ + obj->setContactProcessingThreshold(contactProcessingThreshold); +} + +void btCollisionObject_setContactStiffnessAndDamping(btCollisionObject* obj, btScalar stiffness, + btScalar damping) +{ + obj->setContactStiffnessAndDamping(stiffness, damping); +} + +void btCollisionObject_setCustomDebugColor(btCollisionObject* obj, const btVector3* colorRGB) +{ + obj->setCustomDebugColor(*colorRGB); +} + +void btCollisionObject_setDeactivationTime(btCollisionObject* obj, btScalar time) +{ + obj->setDeactivationTime(time); +} + +void btCollisionObject_setFriction(btCollisionObject* obj, btScalar frict) +{ + obj->setFriction(frict); +} + +void btCollisionObject_setHitFraction(btCollisionObject* obj, btScalar hitFraction) +{ + obj->setHitFraction(hitFraction); +} + +void btCollisionObject_setIgnoreCollisionCheck(btCollisionObject* obj, const btCollisionObject* co, + bool ignoreCollisionCheck) +{ + obj->setIgnoreCollisionCheck(co, ignoreCollisionCheck); +} + +void btCollisionObject_setInterpolationAngularVelocity(btCollisionObject* obj, const btVector3* angvel) +{ + BTVECTOR3_IN(angvel); + obj->setInterpolationAngularVelocity(BTVECTOR3_USE(angvel)); +} + +void btCollisionObject_setInterpolationLinearVelocity(btCollisionObject* obj, const btVector3* linvel) +{ + BTVECTOR3_IN(linvel); + obj->setInterpolationLinearVelocity(BTVECTOR3_USE(linvel)); +} + +void btCollisionObject_setInterpolationWorldTransform(btCollisionObject* obj, const btTransform* trans) +{ + BTTRANSFORM_IN(trans); + obj->setInterpolationWorldTransform(BTTRANSFORM_USE(trans)); +} + +void btCollisionObject_setIslandTag(btCollisionObject* obj, int tag) +{ + obj->setIslandTag(tag); +} + +void btCollisionObject_setRestitution(btCollisionObject* obj, btScalar rest) +{ + obj->setRestitution(rest); +} + +void btCollisionObject_setRollingFriction(btCollisionObject* obj, btScalar frict) +{ + obj->setRollingFriction(frict); +} + +void btCollisionObject_setSpinningFriction(btCollisionObject* obj, btScalar frict) +{ + obj->setSpinningFriction(frict); +} + +void btCollisionObject_setWorldArrayIndex(btCollisionObject * obj, int ix) +{ + obj->setWorldArrayIndex(ix); +} + +void btCollisionObject_setUserIndex(btCollisionObject* obj, int index) +{ + obj->setUserIndex(index); +} + +void btCollisionObject_setUserIndex2(btCollisionObject* obj, int index) +{ + obj->setUserIndex2(index); +} + +void btCollisionObject_setUserPointer(btCollisionObject* obj, void* userPointer) +{ + obj->setUserPointer(userPointer); +} + +void btCollisionObject_setWorldTransform(btCollisionObject* obj, const btTransform* worldTrans) +{ + BTTRANSFORM_IN(worldTrans); + obj->setWorldTransform(BTTRANSFORM_USE(worldTrans)); +} + +void btCollisionObject_delete(btCollisionObject* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.h new file mode 100644 index 0000000..54d5a66 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionObject_wrap.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionObject* btCollisionObject_new(); + EXPORT void btCollisionObject_activate(btCollisionObject* obj, bool forceActivation); + EXPORT int btCollisionObject_calculateSerializeBufferSize(btCollisionObject* obj); + EXPORT bool btCollisionObject_checkCollideWith(btCollisionObject* obj, const btCollisionObject* co); + EXPORT bool btCollisionObject_checkCollideWithOverride(btCollisionObject* obj, const btCollisionObject* co); + EXPORT void btCollisionObject_forceActivationState(btCollisionObject* obj, int newState); + EXPORT int btCollisionObject_getActivationState(btCollisionObject* obj); + EXPORT void btCollisionObject_getAnisotropicFriction(btCollisionObject* obj, btVector3* value); + EXPORT btBroadphaseProxy* btCollisionObject_getBroadphaseHandle(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getCcdMotionThreshold(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getCcdSquareMotionThreshold(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getCcdSweptSphereRadius(btCollisionObject* obj); + EXPORT int btCollisionObject_getCollisionFlags(btCollisionObject* obj); + EXPORT btCollisionShape* btCollisionObject_getCollisionShape(btCollisionObject* obj); + EXPORT int btCollisionObject_getCompanionId(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getContactDamping(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getContactProcessingThreshold(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getContactStiffness(btCollisionObject* obj); + EXPORT bool btCollisionObject_getCustomDebugColor(btCollisionObject* obj, btVector3* colorRGB); + EXPORT btScalar btCollisionObject_getDeactivationTime(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getFriction(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getHitFraction(btCollisionObject* obj); + EXPORT int btCollisionObject_getInternalType(btCollisionObject* obj); + EXPORT void btCollisionObject_getInterpolationAngularVelocity(btCollisionObject* obj, btVector3* value); + EXPORT void btCollisionObject_getInterpolationLinearVelocity(btCollisionObject* obj, btVector3* value); + EXPORT void btCollisionObject_getInterpolationWorldTransform(btCollisionObject* obj, btTransform* value); + EXPORT int btCollisionObject_getIslandTag(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getRestitution(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getRollingFriction(btCollisionObject* obj); + EXPORT btScalar btCollisionObject_getSpinningFriction(btCollisionObject* obj); + EXPORT int btCollisionObject_getWorldArrayIndex(btCollisionObject* obj); + EXPORT int btCollisionObject_getUserIndex(btCollisionObject* obj); + EXPORT int btCollisionObject_getUserIndex2(btCollisionObject* obj); + EXPORT void* btCollisionObject_getUserPointer(btCollisionObject* obj); + EXPORT void btCollisionObject_getWorldTransform(btCollisionObject* obj, btTransform* value); + EXPORT bool btCollisionObject_hasAnisotropicFriction(btCollisionObject* obj, int frictionMode); + EXPORT bool btCollisionObject_hasContactResponse(btCollisionObject* obj); + EXPORT void* btCollisionObject_internalGetExtensionPointer(btCollisionObject* obj); + EXPORT void btCollisionObject_internalSetExtensionPointer(btCollisionObject* obj, void* pointer); + EXPORT bool btCollisionObject_isActive(btCollisionObject* obj); + EXPORT bool btCollisionObject_isKinematicObject(btCollisionObject* obj); + EXPORT bool btCollisionObject_isStaticObject(btCollisionObject* obj); + EXPORT bool btCollisionObject_isStaticOrKinematicObject(btCollisionObject* obj); + EXPORT bool btCollisionObject_mergesSimulationIslands(btCollisionObject* obj); + EXPORT void btCollisionObject_removeCustomDebugColor(btCollisionObject* obj); + EXPORT const char* btCollisionObject_serialize(btCollisionObject* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btCollisionObject_serializeSingleObject(btCollisionObject* obj, btSerializer* serializer); + EXPORT void btCollisionObject_setActivationState(btCollisionObject* obj, int newState); + EXPORT void btCollisionObject_setAnisotropicFriction(btCollisionObject* obj, const btVector3* anisotropicFriction, int frictionMode); + EXPORT void btCollisionObject_setBroadphaseHandle(btCollisionObject* obj, btBroadphaseProxy* handle); + EXPORT void btCollisionObject_setCcdMotionThreshold(btCollisionObject* obj, btScalar ccdMotionThreshold); + EXPORT void btCollisionObject_setCcdSweptSphereRadius(btCollisionObject* obj, btScalar radius); + EXPORT void btCollisionObject_setCollisionFlags(btCollisionObject* obj, int flags); + EXPORT void btCollisionObject_setCollisionShape(btCollisionObject* obj, btCollisionShape* collisionShape); + EXPORT void btCollisionObject_setCompanionId(btCollisionObject* obj, int id); + EXPORT void btCollisionObject_setContactProcessingThreshold(btCollisionObject* obj, btScalar contactProcessingThreshold); + EXPORT void btCollisionObject_setContactStiffnessAndDamping(btCollisionObject* obj, btScalar stiffness, btScalar damping); + EXPORT void btCollisionObject_setCustomDebugColor(btCollisionObject* obj, const btVector3* colorRGB); + EXPORT void btCollisionObject_setDeactivationTime(btCollisionObject* obj, btScalar time); + EXPORT void btCollisionObject_setFriction(btCollisionObject* obj, btScalar frict); + EXPORT void btCollisionObject_setHitFraction(btCollisionObject* obj, btScalar hitFraction); + EXPORT void btCollisionObject_setIgnoreCollisionCheck(btCollisionObject* obj, const btCollisionObject* co, bool ignoreCollisionCheck); + EXPORT void btCollisionObject_setInterpolationAngularVelocity(btCollisionObject* obj, const btVector3* angvel); + EXPORT void btCollisionObject_setInterpolationLinearVelocity(btCollisionObject* obj, const btVector3* linvel); + EXPORT void btCollisionObject_setInterpolationWorldTransform(btCollisionObject* obj, const btTransform* trans); + EXPORT void btCollisionObject_setIslandTag(btCollisionObject* obj, int tag); + EXPORT void btCollisionObject_setRestitution(btCollisionObject* obj, btScalar rest); + EXPORT void btCollisionObject_setRollingFriction(btCollisionObject* obj, btScalar frict); + EXPORT void btCollisionObject_setSpinningFriction(btCollisionObject* obj, btScalar frict); + EXPORT void btCollisionObject_setWorldArrayIndex(btCollisionObject* obj, int ix); + EXPORT void btCollisionObject_setUserIndex(btCollisionObject* obj, int index); + EXPORT void btCollisionObject_setUserIndex2(btCollisionObject* obj, int index); + EXPORT void btCollisionObject_setUserPointer(btCollisionObject* obj, void* userPointer); + EXPORT void btCollisionObject_setWorldTransform(btCollisionObject* obj, const btTransform* worldTrans); + EXPORT void btCollisionObject_delete(btCollisionObject* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.cpp new file mode 100644 index 0000000..37c4ecc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.cpp @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btCollisionShape_wrap.h" + +void btCollisionShape_calculateLocalInertia(btCollisionShape* obj, btScalar mass, + btVector3* inertia) +{ + BTVECTOR3_DEF(inertia); + obj->calculateLocalInertia(mass, BTVECTOR3_USE(inertia)); + BTVECTOR3_DEF_OUT(inertia); +} + +int btCollisionShape_calculateSerializeBufferSize(btCollisionShape* obj) +{ + return obj->calculateSerializeBufferSize(); +} + +void btCollisionShape_calculateTemporalAabb(btCollisionShape* obj, const btTransform* curTrans, + const btVector3* linvel, const btVector3* angvel, btScalar timeStep, btVector3* temporalAabbMin, + btVector3* temporalAabbMax) +{ + BTTRANSFORM_IN(curTrans); + BTVECTOR3_IN(linvel); + BTVECTOR3_IN(angvel); + BTVECTOR3_DEF(temporalAabbMin); + BTVECTOR3_DEF(temporalAabbMax); + obj->calculateTemporalAabb(BTTRANSFORM_USE(curTrans), BTVECTOR3_USE(linvel), + BTVECTOR3_USE(angvel), timeStep, BTVECTOR3_USE(temporalAabbMin), BTVECTOR3_USE(temporalAabbMax)); + BTVECTOR3_DEF_OUT(temporalAabbMin); + BTVECTOR3_DEF_OUT(temporalAabbMax); +} + +void btCollisionShape_getAabb(btCollisionShape* obj, const btTransform* t, btVector3* aabbMin, + btVector3* aabbMax) +{ + BTTRANSFORM_IN(t); + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getAabb(BTTRANSFORM_USE(t), BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +btScalar btCollisionShape_getAngularMotionDisc(btCollisionShape* obj) +{ + return obj->getAngularMotionDisc(); +} + +void btCollisionShape_getAnisotropicRollingFrictionDirection(btCollisionShape* obj, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getAnisotropicRollingFrictionDirection(); + BTVECTOR3_SET(value, temp); +} + +void btCollisionShape_getBoundingSphere(btCollisionShape* obj, btVector3* center, + btScalar* radius) +{ + BTVECTOR3_DEF(center); + obj->getBoundingSphere(BTVECTOR3_USE(center), *radius); + BTVECTOR3_DEF_OUT(center); +} + +btScalar btCollisionShape_getContactBreakingThreshold(btCollisionShape* obj, btScalar defaultContactThresholdFactor) +{ + return obj->getContactBreakingThreshold(defaultContactThresholdFactor); +} + +void btCollisionShape_getLocalScaling(btCollisionShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLocalScaling()); +} + +btScalar btCollisionShape_getMargin(btCollisionShape* obj) +{ + return obj->getMargin(); +} + +const char* btCollisionShape_getName(btCollisionShape* obj) +{ + return obj->getName(); +} + +int btCollisionShape_getShapeType(btCollisionShape* obj) +{ + return obj->getShapeType(); +} + +int btCollisionShape_getUserIndex(btCollisionShape* obj) +{ + return obj->getUserIndex(); +} + +void* btCollisionShape_getUserPointer(btCollisionShape* obj) +{ + return obj->getUserPointer(); +} + +bool btCollisionShape_isCompound(btCollisionShape* obj) +{ + return obj->isCompound(); +} + +bool btCollisionShape_isConcave(btCollisionShape* obj) +{ + return obj->isConcave(); +} + +bool btCollisionShape_isConvex(btCollisionShape* obj) +{ + return obj->isConvex(); +} + +bool btCollisionShape_isConvex2d(btCollisionShape* obj) +{ + return obj->isConvex2d(); +} + +bool btCollisionShape_isInfinite(btCollisionShape* obj) +{ + return obj->isInfinite(); +} + +bool btCollisionShape_isNonMoving(btCollisionShape* obj) +{ + return obj->isNonMoving(); +} + +bool btCollisionShape_isPolyhedral(btCollisionShape* obj) +{ + return obj->isPolyhedral(); +} + +bool btCollisionShape_isSoftBody(btCollisionShape* obj) +{ + return obj->isSoftBody(); +} + +const char* btCollisionShape_serialize(btCollisionShape* obj, void* dataBuffer, btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btCollisionShape_serializeSingleShape(btCollisionShape* obj, btSerializer* serializer) +{ + obj->serializeSingleShape(serializer); +} + +void btCollisionShape_setLocalScaling(btCollisionShape* obj, const btVector3* scaling) +{ + BTVECTOR3_IN(scaling); + obj->setLocalScaling(BTVECTOR3_USE(scaling)); +} + +void btCollisionShape_setMargin(btCollisionShape* obj, btScalar margin) +{ + obj->setMargin(margin); +} + +void btCollisionShape_setUserIndex(btCollisionShape* obj, int index) +{ + obj->setUserIndex(index); +} + +void btCollisionShape_setUserPointer(btCollisionShape* obj, void* userPtr) +{ + obj->setUserPointer(userPtr); +} + +void btCollisionShape_delete(btCollisionShape* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.h new file mode 100644 index 0000000..fc98005 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionShape_wrap.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btCollisionShape_calculateLocalInertia(btCollisionShape* obj, btScalar mass, btVector3* inertia); + EXPORT int btCollisionShape_calculateSerializeBufferSize(btCollisionShape* obj); + EXPORT void btCollisionShape_calculateTemporalAabb(btCollisionShape* obj, const btTransform* curTrans, const btVector3* linvel, const btVector3* angvel, btScalar timeStep, btVector3* temporalAabbMin, btVector3* temporalAabbMax); + EXPORT void btCollisionShape_getAabb(btCollisionShape* obj, const btTransform* t, btVector3* aabbMin, btVector3* aabbMax); + EXPORT btScalar btCollisionShape_getAngularMotionDisc(btCollisionShape* obj); + EXPORT void btCollisionShape_getAnisotropicRollingFrictionDirection(btCollisionShape* obj, btVector3* value); + EXPORT void btCollisionShape_getBoundingSphere(btCollisionShape* obj, btVector3* center, btScalar* radius); + EXPORT btScalar btCollisionShape_getContactBreakingThreshold(btCollisionShape* obj, btScalar defaultContactThresholdFactor); + EXPORT void btCollisionShape_getLocalScaling(btCollisionShape* obj, btVector3* value); + EXPORT btScalar btCollisionShape_getMargin(btCollisionShape* obj); + EXPORT const char* btCollisionShape_getName(btCollisionShape* obj); + EXPORT int btCollisionShape_getShapeType(btCollisionShape* obj); + EXPORT int btCollisionShape_getUserIndex(btCollisionShape* obj); + EXPORT void* btCollisionShape_getUserPointer(btCollisionShape* obj); + EXPORT bool btCollisionShape_isCompound(btCollisionShape* obj); + EXPORT bool btCollisionShape_isConcave(btCollisionShape* obj); + EXPORT bool btCollisionShape_isConvex(btCollisionShape* obj); + EXPORT bool btCollisionShape_isConvex2d(btCollisionShape* obj); + EXPORT bool btCollisionShape_isInfinite(btCollisionShape* obj); + EXPORT bool btCollisionShape_isNonMoving(btCollisionShape* obj); + EXPORT bool btCollisionShape_isPolyhedral(btCollisionShape* obj); + EXPORT bool btCollisionShape_isSoftBody(btCollisionShape* obj); + EXPORT const char* btCollisionShape_serialize(btCollisionShape* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btCollisionShape_serializeSingleShape(btCollisionShape* obj, btSerializer* serializer); + EXPORT void btCollisionShape_setLocalScaling(btCollisionShape* obj, const btVector3* scaling); + EXPORT void btCollisionShape_setMargin(btCollisionShape* obj, btScalar margin); + EXPORT void btCollisionShape_setUserIndex(btCollisionShape* obj, int index); + EXPORT void btCollisionShape_setUserPointer(btCollisionShape* obj, void* userPtr); + EXPORT void btCollisionShape_delete(btCollisionShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.cpp new file mode 100644 index 0000000..3f8c3c2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.cpp @@ -0,0 +1,882 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include +#include + +#include "conversion.h" +#include "btCollisionWorld_wrap.h" + +btCollisionWorld_ContactResultCallbackWrapper::btCollisionWorld_ContactResultCallbackWrapper( + p_btCollisionWorld_ContactResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ContactResultCallback_needsCollision needsCollisionCallback) +{ + _addSingleResultCallback = addSingleResultCallback; + _needsCollisionCallback = needsCollisionCallback; +} + +btScalar btCollisionWorld_ContactResultCallbackWrapper::addSingleResult(btManifoldPoint& cp, + const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, + int partId1, int index1) +{ + return _addSingleResultCallback(cp, colObj0Wrap, partId0, index0, colObj1Wrap, + partId1, index1); +} + +bool btCollisionWorld_ContactResultCallbackWrapper::needsCollision(btBroadphaseProxy* proxy0) const +{ + return _needsCollisionCallback(proxy0); +} + +bool btCollisionWorld_ContactResultCallbackWrapper::baseNeedsCollision(btBroadphaseProxy* proxy0) const +{ + return btCollisionWorld_ContactResultCallback::needsCollision(proxy0); +} + + +btCollisionWorld_ConvexResultCallbackWrapper::btCollisionWorld_ConvexResultCallbackWrapper( + p_btCollisionWorld_ConvexResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ConvexResultCallback_needsCollision needsCollisionCallback) +{ + _addSingleResultCallback = addSingleResultCallback; + _needsCollisionCallback = needsCollisionCallback; +} + +btScalar btCollisionWorld_ConvexResultCallbackWrapper::addSingleResult(btCollisionWorld_LocalConvexResult& convexResult, + bool normalInWorldSpace) +{ + return _addSingleResultCallback(convexResult, normalInWorldSpace); +} + +bool btCollisionWorld_ConvexResultCallbackWrapper::needsCollision(btBroadphaseProxy* proxy0) const +{ + return _needsCollisionCallback(proxy0); +} + +bool btCollisionWorld_ConvexResultCallbackWrapper::baseNeedsCollision(btBroadphaseProxy* proxy0) const +{ + return btCollisionWorld_ConvexResultCallback::needsCollision(proxy0); +} + + +btCollisionWorld_RayResultCallbackWrapper::btCollisionWorld_RayResultCallbackWrapper( + p_btCollisionWorld_RayResultCallback_addSingleResult addSingleResultCallback, p_btCollisionWorld_RayResultCallback_needsCollision needsCollisionCallback) +{ + _addSingleResultCallback = addSingleResultCallback; + _needsCollisionCallback = needsCollisionCallback; +} + +btScalar btCollisionWorld_RayResultCallbackWrapper::addSingleResult(btCollisionWorld_LocalRayResult& rayResult, + bool normalInWorldSpace) +{ + return _addSingleResultCallback(rayResult, normalInWorldSpace); +} + +bool btCollisionWorld_RayResultCallbackWrapper::needsCollision(btBroadphaseProxy* proxy0) const +{ + return _needsCollisionCallback(proxy0); +} + +bool btCollisionWorld_RayResultCallbackWrapper::baseNeedsCollision(btBroadphaseProxy* proxy0) const +{ + return btCollisionWorld_RayResultCallback::needsCollision(proxy0); +} + + +btCollisionWorld_AllHitsRayResultCallback* btCollisionWorld_AllHitsRayResultCallback_new( + const btVector3* rayFromWorld, const btVector3* rayToWorld) +{ + BTVECTOR3_IN(rayFromWorld); + BTVECTOR3_IN(rayToWorld); + return ALIGNED_NEW(btCollisionWorld::AllHitsRayResultCallback) (BTVECTOR3_USE(rayFromWorld), + BTVECTOR3_USE(rayToWorld)); +} + +btAlignedObjectArray_const_btCollisionObjectPtr* btCollisionWorld_AllHitsRayResultCallback_getCollisionObjects( + btCollisionWorld_AllHitsRayResultCallback* obj) +{ + return &obj->m_collisionObjects; +} + +btAlignedObjectArray_btScalar* btCollisionWorld_AllHitsRayResultCallback_getHitFractions( + btCollisionWorld_AllHitsRayResultCallback* obj) +{ + return &obj->m_hitFractions; +} + +btAlignedObjectArray_btVector3* btCollisionWorld_AllHitsRayResultCallback_getHitNormalWorld( + btCollisionWorld_AllHitsRayResultCallback* obj) +{ + return &obj->m_hitNormalWorld; +} + +btAlignedObjectArray_btVector3* btCollisionWorld_AllHitsRayResultCallback_getHitPointWorld( + btCollisionWorld_AllHitsRayResultCallback* obj) +{ + return &obj->m_hitPointWorld; +} + +void btCollisionWorld_AllHitsRayResultCallback_getRayFromWorld(btCollisionWorld_AllHitsRayResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayFromWorld); +} + +void btCollisionWorld_AllHitsRayResultCallback_getRayToWorld(btCollisionWorld_AllHitsRayResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayToWorld); +} + +void btCollisionWorld_AllHitsRayResultCallback_setRayFromWorld(btCollisionWorld_AllHitsRayResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayFromWorld, value); +} + +void btCollisionWorld_AllHitsRayResultCallback_setRayToWorld(btCollisionWorld_AllHitsRayResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayToWorld, value); +} + + +btCollisionWorld_ClosestConvexResultCallback* btCollisionWorld_ClosestConvexResultCallback_new( + const btVector3* convexFromWorld, const btVector3* convexToWorld) +{ + BTVECTOR3_IN(convexFromWorld); + BTVECTOR3_IN(convexToWorld); + return new btCollisionWorld::ClosestConvexResultCallback(BTVECTOR3_USE(convexFromWorld), + BTVECTOR3_USE(convexToWorld)); +} + +void btCollisionWorld_ClosestConvexResultCallback_getConvexFromWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_convexFromWorld); +} + +void btCollisionWorld_ClosestConvexResultCallback_getConvexToWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_convexToWorld); +} + +const btCollisionObject* btCollisionWorld_ClosestConvexResultCallback_getHitCollisionObject( + btCollisionWorld_ClosestConvexResultCallback* obj) +{ + return obj->m_hitCollisionObject; +} + +void btCollisionWorld_ClosestConvexResultCallback_getHitNormalWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitNormalWorld); +} + +void btCollisionWorld_ClosestConvexResultCallback_getHitPointWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitPointWorld); +} + +void btCollisionWorld_ClosestConvexResultCallback_setConvexFromWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_convexFromWorld, value); +} + +void btCollisionWorld_ClosestConvexResultCallback_setConvexToWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_convexToWorld, value); +} + +void btCollisionWorld_ClosestConvexResultCallback_setHitCollisionObject(btCollisionWorld_ClosestConvexResultCallback* obj, + const btCollisionObject* value) +{ + obj->m_hitCollisionObject = value; +} + +void btCollisionWorld_ClosestConvexResultCallback_setHitNormalWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitNormalWorld, value); +} + +void btCollisionWorld_ClosestConvexResultCallback_setHitPointWorld(btCollisionWorld_ClosestConvexResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitPointWorld, value); +} + + +btCollisionWorld_ClosestRayResultCallback* btCollisionWorld_ClosestRayResultCallback_new( + const btVector3* rayFromWorld, const btVector3* rayToWorld) +{ + BTVECTOR3_IN(rayFromWorld); + BTVECTOR3_IN(rayToWorld); + return new btCollisionWorld::ClosestRayResultCallback(BTVECTOR3_USE(rayFromWorld), + BTVECTOR3_USE(rayToWorld)); +} + +void btCollisionWorld_ClosestRayResultCallback_getHitNormalWorld(btCollisionWorld_ClosestRayResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitNormalWorld); +} + +void btCollisionWorld_ClosestRayResultCallback_getHitPointWorld(btCollisionWorld_ClosestRayResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitPointWorld); +} + +void btCollisionWorld_ClosestRayResultCallback_getRayFromWorld(btCollisionWorld_ClosestRayResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayFromWorld); +} + +void btCollisionWorld_ClosestRayResultCallback_getRayToWorld(btCollisionWorld_ClosestRayResultCallback* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayToWorld); +} + +void btCollisionWorld_ClosestRayResultCallback_setHitNormalWorld(btCollisionWorld_ClosestRayResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitNormalWorld, value); +} + +void btCollisionWorld_ClosestRayResultCallback_setHitPointWorld(btCollisionWorld_ClosestRayResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitPointWorld, value); +} + +void btCollisionWorld_ClosestRayResultCallback_setRayFromWorld(btCollisionWorld_ClosestRayResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayFromWorld, value); +} + +void btCollisionWorld_ClosestRayResultCallback_setRayToWorld(btCollisionWorld_ClosestRayResultCallback* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayToWorld, value); +} + + +btCollisionWorld_ContactResultCallbackWrapper* btCollisionWorld_ContactResultCallbackWrapper_new( + p_btCollisionWorld_ContactResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ContactResultCallback_needsCollision needsCollisionCallback) +{ + return new btCollisionWorld_ContactResultCallbackWrapper(addSingleResultCallback, + needsCollisionCallback); +} + +bool btCollisionWorld_ContactResultCallbackWrapper_needsCollision(btCollisionWorld_ContactResultCallbackWrapper* obj, btBroadphaseProxy* proxy0) +{ + return obj->baseNeedsCollision(proxy0); +} + + +btScalar btCollisionWorld_ContactResultCallback_addSingleResult(btCollisionWorld_ContactResultCallback* obj, + btManifoldPoint* cp, const btCollisionObjectWrapper* colObj0Wrap, int partId0, + int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId1, int index1) +{ + return obj->addSingleResult(*cp, colObj0Wrap, partId0, index0, colObj1Wrap, partId1, + index1); +} + +btScalar btCollisionWorld_ContactResultCallback_getClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj) +{ + return obj->m_closestDistanceThreshold; +} + +int btCollisionWorld_ContactResultCallback_getCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj) +{ + return obj->m_collisionFilterGroup; +} + +int btCollisionWorld_ContactResultCallback_getCollisionFilterMask(btCollisionWorld_ContactResultCallback* obj) +{ + return obj->m_collisionFilterMask; +} + +bool btCollisionWorld_ContactResultCallback_needsCollision(btCollisionWorld_ContactResultCallback* obj, + btBroadphaseProxy* proxy0) +{ + return obj->needsCollision(proxy0); +} + +void btCollisionWorld_ContactResultCallback_setClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj, + btScalar value) +{ + obj->m_closestDistanceThreshold = value; +} + +void btCollisionWorld_ContactResultCallback_setCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj, + int value) +{ + obj->m_collisionFilterGroup = value; +} + +void btCollisionWorld_ContactResultCallback_setCollisionFilterMask(btCollisionWorld_ContactResultCallback* obj, + int value) +{ + obj->m_collisionFilterMask = value; +} + +void btCollisionWorld_ContactResultCallback_delete(btCollisionWorld_ContactResultCallback* obj) +{ + delete obj; +} + + +btCollisionWorld_ConvexResultCallbackWrapper* btCollisionWorld_ConvexResultCallbackWrapper_new( + p_btCollisionWorld_ConvexResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ConvexResultCallback_needsCollision needsCollisionCallback) +{ + return ALIGNED_NEW(btCollisionWorld_ConvexResultCallbackWrapper) (addSingleResultCallback, + needsCollisionCallback); +} + +bool btCollisionWorld_ConvexResultCallbackWrapper_needsCollision(btCollisionWorld_ConvexResultCallbackWrapper* obj, btBroadphaseProxy* proxy0) +{ + return obj->baseNeedsCollision(proxy0); +} + + +btScalar btCollisionWorld_ConvexResultCallback_addSingleResult(btCollisionWorld_ConvexResultCallback* obj, + btCollisionWorld_LocalConvexResult* convexResult, bool normalInWorldSpace) +{ + return obj->addSingleResult(*convexResult, normalInWorldSpace); +} + +btScalar btCollisionWorld_ConvexResultCallback_getClosestHitFraction(btCollisionWorld_ConvexResultCallback* obj) +{ + return obj->m_closestHitFraction; +} + +int btCollisionWorld_ConvexResultCallback_getCollisionFilterGroup(btCollisionWorld_ConvexResultCallback* obj) +{ + return obj->m_collisionFilterGroup; +} + +int btCollisionWorld_ConvexResultCallback_getCollisionFilterMask(btCollisionWorld_ConvexResultCallback* obj) +{ + return obj->m_collisionFilterMask; +} + +bool btCollisionWorld_ConvexResultCallback_hasHit(btCollisionWorld_ConvexResultCallback* obj) +{ + return obj->hasHit(); +} + +bool btCollisionWorld_ConvexResultCallback_needsCollision(btCollisionWorld_ConvexResultCallback* obj, + btBroadphaseProxy* proxy0) +{ + return obj->needsCollision(proxy0); +} + +void btCollisionWorld_ConvexResultCallback_setClosestHitFraction(btCollisionWorld_ConvexResultCallback* obj, + btScalar value) +{ + obj->m_closestHitFraction = value; +} + +void btCollisionWorld_ConvexResultCallback_setCollisionFilterGroup(btCollisionWorld_ConvexResultCallback* obj, + int value) +{ + obj->m_collisionFilterGroup = value; +} + +void btCollisionWorld_ConvexResultCallback_setCollisionFilterMask(btCollisionWorld_ConvexResultCallback* obj, + int value) +{ + obj->m_collisionFilterMask = value; +} + +void btCollisionWorld_ConvexResultCallback_delete(btCollisionWorld_ConvexResultCallback* obj) +{ + ALIGNED_FREE(obj); +} + + +btCollisionWorld_LocalConvexResult* btCollisionWorld_LocalConvexResult_new(const btCollisionObject* hitCollisionObject, + btCollisionWorld_LocalShapeInfo* localShapeInfo, const btVector3* hitNormalLocal, + const btVector3* hitPointLocal, btScalar hitFraction) +{ + BTVECTOR3_IN(hitNormalLocal); + BTVECTOR3_IN(hitPointLocal); + return new btCollisionWorld::LocalConvexResult(hitCollisionObject, localShapeInfo, + BTVECTOR3_USE(hitNormalLocal), BTVECTOR3_USE(hitPointLocal), hitFraction); +} + +const btCollisionObject* btCollisionWorld_LocalConvexResult_getHitCollisionObject( + btCollisionWorld_LocalConvexResult* obj) +{ + return obj->m_hitCollisionObject; +} + +btScalar btCollisionWorld_LocalConvexResult_getHitFraction(btCollisionWorld_LocalConvexResult* obj) +{ + return obj->m_hitFraction; +} + +void btCollisionWorld_LocalConvexResult_getHitNormalLocal(btCollisionWorld_LocalConvexResult* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitNormalLocal); +} + +void btCollisionWorld_LocalConvexResult_getHitPointLocal(btCollisionWorld_LocalConvexResult* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitPointLocal); +} + +btCollisionWorld_LocalShapeInfo* btCollisionWorld_LocalConvexResult_getLocalShapeInfo( + btCollisionWorld_LocalConvexResult* obj) +{ + return obj->m_localShapeInfo; +} + +void btCollisionWorld_LocalConvexResult_setHitCollisionObject(btCollisionWorld_LocalConvexResult* obj, + const btCollisionObject* value) +{ + obj->m_hitCollisionObject = value; +} + +void btCollisionWorld_LocalConvexResult_setHitFraction(btCollisionWorld_LocalConvexResult* obj, + btScalar value) +{ + obj->m_hitFraction = value; +} + +void btCollisionWorld_LocalConvexResult_setHitNormalLocal(btCollisionWorld_LocalConvexResult* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitNormalLocal, value); +} + +void btCollisionWorld_LocalConvexResult_setHitPointLocal(btCollisionWorld_LocalConvexResult* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitPointLocal, value); +} + +void btCollisionWorld_LocalConvexResult_setLocalShapeInfo(btCollisionWorld_LocalConvexResult* obj, + btCollisionWorld_LocalShapeInfo* value) +{ + obj->m_localShapeInfo = value; +} + +void btCollisionWorld_LocalConvexResult_delete(btCollisionWorld_LocalConvexResult* obj) +{ + delete obj; +} + + +btCollisionWorld_LocalRayResult* btCollisionWorld_LocalRayResult_new(const btCollisionObject* collisionObject, + btCollisionWorld_LocalShapeInfo* localShapeInfo, const btVector3* hitNormalLocal, + btScalar hitFraction) +{ + BTVECTOR3_IN(hitNormalLocal); + return new btCollisionWorld::LocalRayResult(collisionObject, localShapeInfo, + BTVECTOR3_USE(hitNormalLocal), hitFraction); +} + +const btCollisionObject* btCollisionWorld_LocalRayResult_getCollisionObject(btCollisionWorld_LocalRayResult* obj) +{ + return obj->m_collisionObject; +} + +btScalar btCollisionWorld_LocalRayResult_getHitFraction(btCollisionWorld_LocalRayResult* obj) +{ + return obj->m_hitFraction; +} + +void btCollisionWorld_LocalRayResult_getHitNormalLocal(btCollisionWorld_LocalRayResult* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitNormalLocal); +} + +btCollisionWorld_LocalShapeInfo* btCollisionWorld_LocalRayResult_getLocalShapeInfo( + btCollisionWorld_LocalRayResult* obj) +{ + return obj->m_localShapeInfo; +} + +void btCollisionWorld_LocalRayResult_setCollisionObject(btCollisionWorld_LocalRayResult* obj, + const btCollisionObject* value) +{ + obj->m_collisionObject = value; +} + +void btCollisionWorld_LocalRayResult_setHitFraction(btCollisionWorld_LocalRayResult* obj, + btScalar value) +{ + obj->m_hitFraction = value; +} + +void btCollisionWorld_LocalRayResult_setHitNormalLocal(btCollisionWorld_LocalRayResult* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitNormalLocal, value); +} + +void btCollisionWorld_LocalRayResult_setLocalShapeInfo(btCollisionWorld_LocalRayResult* obj, + btCollisionWorld_LocalShapeInfo* value) +{ + obj->m_localShapeInfo = value; +} + +void btCollisionWorld_LocalRayResult_delete(btCollisionWorld_LocalRayResult* obj) +{ + delete obj; +} + + +btCollisionWorld_LocalShapeInfo* btCollisionWorld_LocalShapeInfo_new() +{ + return new btCollisionWorld::LocalShapeInfo(); +} + +int btCollisionWorld_LocalShapeInfo_getShapePart(btCollisionWorld_LocalShapeInfo* obj) +{ + return obj->m_shapePart; +} + +int btCollisionWorld_LocalShapeInfo_getTriangleIndex(btCollisionWorld_LocalShapeInfo* obj) +{ + return obj->m_triangleIndex; +} + +void btCollisionWorld_LocalShapeInfo_setShapePart(btCollisionWorld_LocalShapeInfo* obj, + int value) +{ + obj->m_shapePart = value; +} + +void btCollisionWorld_LocalShapeInfo_setTriangleIndex(btCollisionWorld_LocalShapeInfo* obj, + int value) +{ + obj->m_triangleIndex = value; +} + +void btCollisionWorld_LocalShapeInfo_delete(btCollisionWorld_LocalShapeInfo* obj) +{ + delete obj; +} + + +btCollisionWorld_RayResultCallbackWrapper* btCollisionWorld_RayResultCallbackWrapper_new( + p_btCollisionWorld_RayResultCallback_addSingleResult addSingleResultCallback, p_btCollisionWorld_RayResultCallback_needsCollision needsCollisionCallback) +{ + return ALIGNED_NEW(btCollisionWorld_RayResultCallbackWrapper) (addSingleResultCallback, + needsCollisionCallback); +} + +bool btCollisionWorld_RayResultCallbackWrapper_needsCollision(btCollisionWorld_RayResultCallbackWrapper* obj, btBroadphaseProxy* proxy0) +{ + return obj->baseNeedsCollision(proxy0); +} + + +btScalar btCollisionWorld_RayResultCallback_addSingleResult(btCollisionWorld_RayResultCallback* obj, + btCollisionWorld_LocalRayResult* rayResult, bool normalInWorldSpace) +{ + return obj->addSingleResult(*rayResult, normalInWorldSpace); +} + +btScalar btCollisionWorld_RayResultCallback_getClosestHitFraction(btCollisionWorld_RayResultCallback* obj) +{ + return obj->m_closestHitFraction; +} + +int btCollisionWorld_RayResultCallback_getCollisionFilterGroup(btCollisionWorld_RayResultCallback* obj) +{ + return obj->m_collisionFilterGroup; +} + +int btCollisionWorld_RayResultCallback_getCollisionFilterMask(btCollisionWorld_RayResultCallback* obj) +{ + return obj->m_collisionFilterMask; +} + +const btCollisionObject* btCollisionWorld_RayResultCallback_getCollisionObject(btCollisionWorld_RayResultCallback* obj) +{ + return obj->m_collisionObject; +} + +unsigned int btCollisionWorld_RayResultCallback_getFlags(btCollisionWorld_RayResultCallback* obj) +{ + return obj->m_flags; +} + +bool btCollisionWorld_RayResultCallback_hasHit(btCollisionWorld_RayResultCallback* obj) +{ + return obj->hasHit(); +} + +bool btCollisionWorld_RayResultCallback_needsCollision(btCollisionWorld_RayResultCallback* obj, + btBroadphaseProxy* proxy0) +{ + return obj->needsCollision(proxy0); +} + +void btCollisionWorld_RayResultCallback_setClosestHitFraction(btCollisionWorld_RayResultCallback* obj, + btScalar value) +{ + obj->m_closestHitFraction = value; +} + +void btCollisionWorld_RayResultCallback_setCollisionFilterGroup(btCollisionWorld_RayResultCallback* obj, + int value) +{ + obj->m_collisionFilterGroup = value; +} + +void btCollisionWorld_RayResultCallback_setCollisionFilterMask(btCollisionWorld_RayResultCallback* obj, + int value) +{ + obj->m_collisionFilterMask = value; +} + +void btCollisionWorld_RayResultCallback_setCollisionObject(btCollisionWorld_RayResultCallback* obj, + const btCollisionObject* value) +{ + obj->m_collisionObject = value; +} + +void btCollisionWorld_RayResultCallback_setFlags(btCollisionWorld_RayResultCallback* obj, + unsigned int value) +{ + obj->m_flags = value; +} + +void btCollisionWorld_RayResultCallback_delete(btCollisionWorld_RayResultCallback* obj) +{ + ALIGNED_FREE(obj); +} + + +btCollisionWorld* btCollisionWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* broadphasePairCache, + btCollisionConfiguration* collisionConfiguration) +{ + return new btCollisionWorld(dispatcher, broadphasePairCache, collisionConfiguration); +} + +void btCollisionWorld_addCollisionObject(btCollisionWorld* obj, btCollisionObject* collisionObject) +{ + obj->addCollisionObject(collisionObject); +} + +void btCollisionWorld_addCollisionObject2(btCollisionWorld* obj, btCollisionObject* collisionObject, + int collisionFilterGroup) +{ + obj->addCollisionObject(collisionObject, collisionFilterGroup); +} + +void btCollisionWorld_addCollisionObject3(btCollisionWorld* obj, btCollisionObject* collisionObject, + int collisionFilterGroup, int collisionFilterMask) +{ + obj->addCollisionObject(collisionObject, collisionFilterGroup, collisionFilterMask); +} + +void btCollisionWorld_computeOverlappingPairs(btCollisionWorld* obj) +{ + obj->computeOverlappingPairs(); +} + +void btCollisionWorld_contactPairTest(btCollisionWorld* obj, btCollisionObject* colObjA, + btCollisionObject* colObjB, btCollisionWorld_ContactResultCallback* resultCallback) +{ + obj->contactPairTest(colObjA, colObjB, *resultCallback); +} + +void btCollisionWorld_contactTest(btCollisionWorld* obj, btCollisionObject* colObj, + btCollisionWorld_ContactResultCallback* resultCallback) +{ + obj->contactTest(colObj, *resultCallback); +} + +void btCollisionWorld_convexSweepTest(btCollisionWorld* obj, const btConvexShape* castShape, + const btTransform* from, const btTransform* to, btCollisionWorld_ConvexResultCallback* resultCallback, + btScalar allowedCcdPenetration) +{ + BTTRANSFORM_IN(from); + BTTRANSFORM_IN(to); + obj->convexSweepTest(castShape, BTTRANSFORM_USE(from), BTTRANSFORM_USE(to), *resultCallback, + allowedCcdPenetration); +} + +void btCollisionWorld_debugDrawObject(btCollisionWorld* obj, const btTransform* worldTransform, + const btCollisionShape* shape, const btVector3* color) +{ + BTTRANSFORM_IN(worldTransform); + BTVECTOR3_IN(color); + obj->debugDrawObject(BTTRANSFORM_USE(worldTransform), shape, BTVECTOR3_USE(color)); +} + +void btCollisionWorld_debugDrawWorld(btCollisionWorld* obj) +{ + obj->debugDrawWorld(); +} + +btBroadphaseInterface* btCollisionWorld_getBroadphase(btCollisionWorld* obj) +{ + return obj->getBroadphase(); +} + +btAlignedObjectArray_btCollisionObjectPtr* btCollisionWorld_getCollisionObjectArray( + btCollisionWorld* obj) +{ + return &obj->getCollisionObjectArray(); +} + +btIDebugDraw* btCollisionWorld_getDebugDrawer(btCollisionWorld* obj) +{ + return obj->getDebugDrawer(); +} + +btDispatcher* btCollisionWorld_getDispatcher(btCollisionWorld* obj) +{ + return obj->getDispatcher(); +} + +btDispatcherInfo* btCollisionWorld_getDispatchInfo(btCollisionWorld* obj) +{ + return &obj->getDispatchInfo(); +} + +bool btCollisionWorld_getForceUpdateAllAabbs(btCollisionWorld* obj) +{ + return obj->getForceUpdateAllAabbs(); +} + +int btCollisionWorld_getNumCollisionObjects(btCollisionWorld* obj) +{ + return obj->getNumCollisionObjects(); +} + +btOverlappingPairCache* btCollisionWorld_getPairCache(btCollisionWorld* obj) +{ + return obj->getPairCache(); +} + +void btCollisionWorld_objectQuerySingle(const btConvexShape* castShape, const btTransform* rayFromTrans, + const btTransform* rayToTrans, btCollisionObject* collisionObject, const btCollisionShape* collisionShape, + const btTransform* colObjWorldTransform, btCollisionWorld_ConvexResultCallback* resultCallback, + btScalar allowedPenetration) +{ + BTTRANSFORM_IN(rayFromTrans); + BTTRANSFORM_IN(rayToTrans); + BTTRANSFORM_IN(colObjWorldTransform); + btCollisionWorld::objectQuerySingle(castShape, BTTRANSFORM_USE(rayFromTrans), + BTTRANSFORM_USE(rayToTrans), collisionObject, collisionShape, BTTRANSFORM_USE(colObjWorldTransform), + *resultCallback, allowedPenetration); +} + +void btCollisionWorld_objectQuerySingleInternal(const btConvexShape* castShape, const btTransform* convexFromTrans, + const btTransform* convexToTrans, const btCollisionObjectWrapper* colObjWrap, btCollisionWorld_ConvexResultCallback* resultCallback, + btScalar allowedPenetration) +{ + BTTRANSFORM_IN(convexFromTrans); + BTTRANSFORM_IN(convexToTrans); + btCollisionWorld::objectQuerySingleInternal(castShape, BTTRANSFORM_USE(convexFromTrans), + BTTRANSFORM_USE(convexToTrans), colObjWrap, *resultCallback, allowedPenetration); +} + +void btCollisionWorld_performDiscreteCollisionDetection(btCollisionWorld* obj) +{ + obj->performDiscreteCollisionDetection(); +} + +void btCollisionWorld_rayTest(btCollisionWorld* obj, const btVector3* rayFromWorld, + const btVector3* rayToWorld, btCollisionWorld_RayResultCallback* resultCallback) +{ + BTVECTOR3_IN(rayFromWorld); + BTVECTOR3_IN(rayToWorld); + obj->rayTest(BTVECTOR3_USE(rayFromWorld), BTVECTOR3_USE(rayToWorld), *resultCallback); +} + +void btCollisionWorld_rayTestSingle(const btTransform* rayFromTrans, const btTransform* rayToTrans, + btCollisionObject* collisionObject, const btCollisionShape* collisionShape, const btTransform* colObjWorldTransform, + btCollisionWorld_RayResultCallback* resultCallback) +{ + BTTRANSFORM_IN(rayFromTrans); + BTTRANSFORM_IN(rayToTrans); + BTTRANSFORM_IN(colObjWorldTransform); + btCollisionWorld::rayTestSingle(BTTRANSFORM_USE(rayFromTrans), BTTRANSFORM_USE(rayToTrans), + collisionObject, collisionShape, BTTRANSFORM_USE(colObjWorldTransform), *resultCallback); +} + +void btCollisionWorld_rayTestSingleInternal(const btTransform* rayFromTrans, const btTransform* rayToTrans, + const btCollisionObjectWrapper* collisionObjectWrap, btCollisionWorld_RayResultCallback* resultCallback) +{ + BTTRANSFORM_IN(rayFromTrans); + BTTRANSFORM_IN(rayToTrans); + btCollisionWorld::rayTestSingleInternal(BTTRANSFORM_USE(rayFromTrans), BTTRANSFORM_USE(rayToTrans), + collisionObjectWrap, *resultCallback); +} + +void btCollisionWorld_removeCollisionObject(btCollisionWorld* obj, btCollisionObject* collisionObject) +{ + obj->removeCollisionObject(collisionObject); +} + +void btCollisionWorld_serialize(btCollisionWorld* obj, btSerializer* serializer) +{ + obj->serialize(serializer); +} + +void btCollisionWorld_setBroadphase(btCollisionWorld* obj, btBroadphaseInterface* pairCache) +{ + obj->setBroadphase(pairCache); +} + +void btCollisionWorld_setDebugDrawer(btCollisionWorld* obj, btIDebugDraw* debugDrawer) +{ + obj->setDebugDrawer(debugDrawer); +} + +void btCollisionWorld_setForceUpdateAllAabbs(btCollisionWorld* obj, bool forceUpdateAllAabbs) +{ + obj->setForceUpdateAllAabbs(forceUpdateAllAabbs); +} + +void btCollisionWorld_updateAabbs(btCollisionWorld* obj) +{ + obj->updateAabbs(); +} + +void btCollisionWorld_updateSingleAabb(btCollisionWorld* obj, btCollisionObject* colObj) +{ + obj->updateSingleAabb(colObj); +} + +void btCollisionWorld_delete(btCollisionWorld* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.h new file mode 100644 index 0000000..b99ad8a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCollisionWorld_wrap.h @@ -0,0 +1,245 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_COLLISION_WORLD_H +#define p_btCollisionWorld_ContactResultCallback_addSingleResult void* +#define p_btCollisionWorld_ContactResultCallback_needsCollision void* +#define p_btCollisionWorld_ConvexResultCallback_addSingleResult void* +#define p_btCollisionWorld_ConvexResultCallback_needsCollision void* +#define p_btCollisionWorld_RayResultCallback_addSingleResult void* +#define p_btCollisionWorld_RayResultCallback_needsCollision void* +#define btCollisionWorld_ContactResultCallbackWrapper void +#define btCollisionWorld_ConvexResultCallbackWrapper void +#define btCollisionWorld_RayResultCallbackWrapper void +#else +typedef btScalar (*p_btCollisionWorld_ContactResultCallback_addSingleResult)(btManifoldPoint& cp, + const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, + int partId1, int index1); +typedef bool (*p_btCollisionWorld_ContactResultCallback_needsCollision)(btBroadphaseProxy* proxy0); + +class btCollisionWorld_ContactResultCallbackWrapper : public btCollisionWorld_ContactResultCallback +{ +private: + p_btCollisionWorld_ContactResultCallback_addSingleResult _addSingleResultCallback; + p_btCollisionWorld_ContactResultCallback_needsCollision _needsCollisionCallback; + +public: + btCollisionWorld_ContactResultCallbackWrapper(p_btCollisionWorld_ContactResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ContactResultCallback_needsCollision needsCollisionCallback); + + virtual btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap, + int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId1, + int index1); + virtual bool needsCollision(btBroadphaseProxy* proxy0) const; + + virtual bool baseNeedsCollision(btBroadphaseProxy* proxy0) const; +}; + +typedef btScalar (*p_btCollisionWorld_ConvexResultCallback_addSingleResult)(btCollisionWorld_LocalConvexResult& convexResult, + bool normalInWorldSpace); +typedef bool (*p_btCollisionWorld_ConvexResultCallback_needsCollision)(btBroadphaseProxy* proxy0); + +class btCollisionWorld_ConvexResultCallbackWrapper : public btCollisionWorld_ConvexResultCallback +{ +private: + p_btCollisionWorld_ConvexResultCallback_addSingleResult _addSingleResultCallback; + p_btCollisionWorld_ConvexResultCallback_needsCollision _needsCollisionCallback; + +public: + btCollisionWorld_ConvexResultCallbackWrapper(p_btCollisionWorld_ConvexResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ConvexResultCallback_needsCollision needsCollisionCallback); + + virtual btScalar addSingleResult(btCollisionWorld_LocalConvexResult& convexResult, + bool normalInWorldSpace); + virtual bool needsCollision(btBroadphaseProxy* proxy0) const; + + virtual bool baseNeedsCollision(btBroadphaseProxy* proxy0) const; +}; + +typedef btScalar (*p_btCollisionWorld_RayResultCallback_addSingleResult)(btCollisionWorld_LocalRayResult& rayResult, + bool normalInWorldSpace); +typedef bool (*p_btCollisionWorld_RayResultCallback_needsCollision)(btBroadphaseProxy* proxy0); + +class btCollisionWorld_RayResultCallbackWrapper : public btCollisionWorld_RayResultCallback +{ +private: + p_btCollisionWorld_RayResultCallback_addSingleResult _addSingleResultCallback; + p_btCollisionWorld_RayResultCallback_needsCollision _needsCollisionCallback; + +public: + btCollisionWorld_RayResultCallbackWrapper(p_btCollisionWorld_RayResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_RayResultCallback_needsCollision needsCollisionCallback); + + virtual btScalar addSingleResult(btCollisionWorld_LocalRayResult& rayResult, + bool normalInWorldSpace); + virtual bool needsCollision(btBroadphaseProxy* proxy0) const; + + virtual bool baseNeedsCollision(btBroadphaseProxy* proxy0) const; +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCollisionWorld_AllHitsRayResultCallback* btCollisionWorld_AllHitsRayResultCallback_new(const btVector3* rayFromWorld, const btVector3* rayToWorld); + EXPORT btAlignedObjectArray_const_btCollisionObjectPtr* btCollisionWorld_AllHitsRayResultCallback_getCollisionObjects(btCollisionWorld_AllHitsRayResultCallback* obj); + EXPORT btAlignedObjectArray_btScalar* btCollisionWorld_AllHitsRayResultCallback_getHitFractions(btCollisionWorld_AllHitsRayResultCallback* obj); + EXPORT btAlignedObjectArray_btVector3* btCollisionWorld_AllHitsRayResultCallback_getHitNormalWorld(btCollisionWorld_AllHitsRayResultCallback* obj); + EXPORT btAlignedObjectArray_btVector3* btCollisionWorld_AllHitsRayResultCallback_getHitPointWorld(btCollisionWorld_AllHitsRayResultCallback* obj); + EXPORT void btCollisionWorld_AllHitsRayResultCallback_getRayFromWorld(btCollisionWorld_AllHitsRayResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_AllHitsRayResultCallback_getRayToWorld(btCollisionWorld_AllHitsRayResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_AllHitsRayResultCallback_setRayFromWorld(btCollisionWorld_AllHitsRayResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_AllHitsRayResultCallback_setRayToWorld(btCollisionWorld_AllHitsRayResultCallback* obj, const btVector3* value); + + EXPORT btCollisionWorld_ClosestConvexResultCallback* btCollisionWorld_ClosestConvexResultCallback_new(const btVector3* convexFromWorld, const btVector3* convexToWorld); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_getConvexFromWorld(btCollisionWorld_ClosestConvexResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_getConvexToWorld(btCollisionWorld_ClosestConvexResultCallback* obj, btVector3* value); + EXPORT const btCollisionObject* btCollisionWorld_ClosestConvexResultCallback_getHitCollisionObject(btCollisionWorld_ClosestConvexResultCallback* obj); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_getHitNormalWorld(btCollisionWorld_ClosestConvexResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_getHitPointWorld(btCollisionWorld_ClosestConvexResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_setConvexFromWorld(btCollisionWorld_ClosestConvexResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_setConvexToWorld(btCollisionWorld_ClosestConvexResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_setHitCollisionObject(btCollisionWorld_ClosestConvexResultCallback* obj, const btCollisionObject* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_setHitNormalWorld(btCollisionWorld_ClosestConvexResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_ClosestConvexResultCallback_setHitPointWorld(btCollisionWorld_ClosestConvexResultCallback* obj, const btVector3* value); + + EXPORT btCollisionWorld_ClosestRayResultCallback* btCollisionWorld_ClosestRayResultCallback_new(const btVector3* rayFromWorld, const btVector3* rayToWorld); + EXPORT void btCollisionWorld_ClosestRayResultCallback_getHitNormalWorld(btCollisionWorld_ClosestRayResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_getHitPointWorld(btCollisionWorld_ClosestRayResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_getRayFromWorld(btCollisionWorld_ClosestRayResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_getRayToWorld(btCollisionWorld_ClosestRayResultCallback* obj, btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_setHitNormalWorld(btCollisionWorld_ClosestRayResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_setHitPointWorld(btCollisionWorld_ClosestRayResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_setRayFromWorld(btCollisionWorld_ClosestRayResultCallback* obj, const btVector3* value); + EXPORT void btCollisionWorld_ClosestRayResultCallback_setRayToWorld(btCollisionWorld_ClosestRayResultCallback* obj, const btVector3* value); + + EXPORT btCollisionWorld_ContactResultCallbackWrapper* btCollisionWorld_ContactResultCallbackWrapper_new( + p_btCollisionWorld_ContactResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ContactResultCallback_needsCollision needsCollisionCallback); + EXPORT bool btCollisionWorld_ContactResultCallbackWrapper_needsCollision(btCollisionWorld_ContactResultCallbackWrapper* obj, btBroadphaseProxy* proxy0); + + EXPORT btScalar btCollisionWorld_ContactResultCallback_addSingleResult(btCollisionWorld_ContactResultCallback* obj, btManifoldPoint* cp, const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId1, int index1); + EXPORT btScalar btCollisionWorld_ContactResultCallback_getClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj); + EXPORT int btCollisionWorld_ContactResultCallback_getCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj); + EXPORT int btCollisionWorld_ContactResultCallback_getCollisionFilterMask(btCollisionWorld_ContactResultCallback* obj); + EXPORT bool btCollisionWorld_ContactResultCallback_needsCollision(btCollisionWorld_ContactResultCallback* obj, btBroadphaseProxy* proxy0); + EXPORT void btCollisionWorld_ContactResultCallback_setClosestDistanceThreshold(btCollisionWorld_ContactResultCallback* obj, btScalar value); + EXPORT void btCollisionWorld_ContactResultCallback_setCollisionFilterGroup(btCollisionWorld_ContactResultCallback* obj, int value); + EXPORT void btCollisionWorld_ContactResultCallback_setCollisionFilterMask(btCollisionWorld_ContactResultCallback* obj, int value); + EXPORT void btCollisionWorld_ContactResultCallback_delete(btCollisionWorld_ContactResultCallback* obj); + + EXPORT btCollisionWorld_ConvexResultCallbackWrapper* btCollisionWorld_ConvexResultCallbackWrapper_new( + p_btCollisionWorld_ConvexResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_ConvexResultCallback_needsCollision needsCollisionCallback); + EXPORT bool btCollisionWorld_ConvexResultCallbackWrapper_needsCollision(btCollisionWorld_ConvexResultCallbackWrapper* obj, btBroadphaseProxy* proxy0); + + EXPORT btScalar btCollisionWorld_ConvexResultCallback_addSingleResult(btCollisionWorld_ConvexResultCallback* obj, btCollisionWorld_LocalConvexResult* convexResult, bool normalInWorldSpace); + EXPORT btScalar btCollisionWorld_ConvexResultCallback_getClosestHitFraction(btCollisionWorld_ConvexResultCallback* obj); + EXPORT int btCollisionWorld_ConvexResultCallback_getCollisionFilterGroup(btCollisionWorld_ConvexResultCallback* obj); + EXPORT int btCollisionWorld_ConvexResultCallback_getCollisionFilterMask(btCollisionWorld_ConvexResultCallback* obj); + EXPORT bool btCollisionWorld_ConvexResultCallback_hasHit(btCollisionWorld_ConvexResultCallback* obj); + EXPORT bool btCollisionWorld_ConvexResultCallback_needsCollision(btCollisionWorld_ConvexResultCallback* obj, btBroadphaseProxy* proxy0); + EXPORT void btCollisionWorld_ConvexResultCallback_setClosestHitFraction(btCollisionWorld_ConvexResultCallback* obj, btScalar value); + EXPORT void btCollisionWorld_ConvexResultCallback_setCollisionFilterGroup(btCollisionWorld_ConvexResultCallback* obj, int value); + EXPORT void btCollisionWorld_ConvexResultCallback_setCollisionFilterMask(btCollisionWorld_ConvexResultCallback* obj, int value); + EXPORT void btCollisionWorld_ConvexResultCallback_delete(btCollisionWorld_ConvexResultCallback* obj); + + EXPORT btCollisionWorld_LocalConvexResult* btCollisionWorld_LocalConvexResult_new(const btCollisionObject* hitCollisionObject, btCollisionWorld_LocalShapeInfo* localShapeInfo, const btVector3* hitNormalLocal, const btVector3* hitPointLocal, btScalar hitFraction); + EXPORT const btCollisionObject* btCollisionWorld_LocalConvexResult_getHitCollisionObject(btCollisionWorld_LocalConvexResult* obj); + EXPORT btScalar btCollisionWorld_LocalConvexResult_getHitFraction(btCollisionWorld_LocalConvexResult* obj); + EXPORT void btCollisionWorld_LocalConvexResult_getHitNormalLocal(btCollisionWorld_LocalConvexResult* obj, btVector3* value); + EXPORT void btCollisionWorld_LocalConvexResult_getHitPointLocal(btCollisionWorld_LocalConvexResult* obj, btVector3* value); + EXPORT btCollisionWorld_LocalShapeInfo* btCollisionWorld_LocalConvexResult_getLocalShapeInfo(btCollisionWorld_LocalConvexResult* obj); + EXPORT void btCollisionWorld_LocalConvexResult_setHitCollisionObject(btCollisionWorld_LocalConvexResult* obj, const btCollisionObject* value); + EXPORT void btCollisionWorld_LocalConvexResult_setHitFraction(btCollisionWorld_LocalConvexResult* obj, btScalar value); + EXPORT void btCollisionWorld_LocalConvexResult_setHitNormalLocal(btCollisionWorld_LocalConvexResult* obj, const btVector3* value); + EXPORT void btCollisionWorld_LocalConvexResult_setHitPointLocal(btCollisionWorld_LocalConvexResult* obj, const btVector3* value); + EXPORT void btCollisionWorld_LocalConvexResult_setLocalShapeInfo(btCollisionWorld_LocalConvexResult* obj, btCollisionWorld_LocalShapeInfo* value); + EXPORT void btCollisionWorld_LocalConvexResult_delete(btCollisionWorld_LocalConvexResult* obj); + + EXPORT btCollisionWorld_LocalRayResult* btCollisionWorld_LocalRayResult_new(const btCollisionObject* collisionObject, btCollisionWorld_LocalShapeInfo* localShapeInfo, const btVector3* hitNormalLocal, btScalar hitFraction); + EXPORT const btCollisionObject* btCollisionWorld_LocalRayResult_getCollisionObject(btCollisionWorld_LocalRayResult* obj); + EXPORT btScalar btCollisionWorld_LocalRayResult_getHitFraction(btCollisionWorld_LocalRayResult* obj); + EXPORT void btCollisionWorld_LocalRayResult_getHitNormalLocal(btCollisionWorld_LocalRayResult* obj, btVector3* value); + EXPORT btCollisionWorld_LocalShapeInfo* btCollisionWorld_LocalRayResult_getLocalShapeInfo(btCollisionWorld_LocalRayResult* obj); + EXPORT void btCollisionWorld_LocalRayResult_setCollisionObject(btCollisionWorld_LocalRayResult* obj, const btCollisionObject* value); + EXPORT void btCollisionWorld_LocalRayResult_setHitFraction(btCollisionWorld_LocalRayResult* obj, btScalar value); + EXPORT void btCollisionWorld_LocalRayResult_setHitNormalLocal(btCollisionWorld_LocalRayResult* obj, const btVector3* value); + EXPORT void btCollisionWorld_LocalRayResult_setLocalShapeInfo(btCollisionWorld_LocalRayResult* obj, btCollisionWorld_LocalShapeInfo* value); + EXPORT void btCollisionWorld_LocalRayResult_delete(btCollisionWorld_LocalRayResult* obj); + + EXPORT btCollisionWorld_LocalShapeInfo* btCollisionWorld_LocalShapeInfo_new(); + EXPORT int btCollisionWorld_LocalShapeInfo_getShapePart(btCollisionWorld_LocalShapeInfo* obj); + EXPORT int btCollisionWorld_LocalShapeInfo_getTriangleIndex(btCollisionWorld_LocalShapeInfo* obj); + EXPORT void btCollisionWorld_LocalShapeInfo_setShapePart(btCollisionWorld_LocalShapeInfo* obj, int value); + EXPORT void btCollisionWorld_LocalShapeInfo_setTriangleIndex(btCollisionWorld_LocalShapeInfo* obj, int value); + EXPORT void btCollisionWorld_LocalShapeInfo_delete(btCollisionWorld_LocalShapeInfo* obj); + + EXPORT btCollisionWorld_RayResultCallbackWrapper* btCollisionWorld_RayResultCallbackWrapper_new( + p_btCollisionWorld_RayResultCallback_addSingleResult addSingleResultCallback, + p_btCollisionWorld_RayResultCallback_needsCollision needsCollisionCallback); + EXPORT bool btCollisionWorld_RayResultCallbackWrapper_needsCollision(btCollisionWorld_RayResultCallbackWrapper* obj, btBroadphaseProxy* proxy0); + + EXPORT btScalar btCollisionWorld_RayResultCallback_addSingleResult(btCollisionWorld_RayResultCallback* obj, btCollisionWorld_LocalRayResult* rayResult, bool normalInWorldSpace); + EXPORT btScalar btCollisionWorld_RayResultCallback_getClosestHitFraction(btCollisionWorld_RayResultCallback* obj); + EXPORT int btCollisionWorld_RayResultCallback_getCollisionFilterGroup(btCollisionWorld_RayResultCallback* obj); + EXPORT int btCollisionWorld_RayResultCallback_getCollisionFilterMask(btCollisionWorld_RayResultCallback* obj); + EXPORT const btCollisionObject* btCollisionWorld_RayResultCallback_getCollisionObject(btCollisionWorld_RayResultCallback* obj); + EXPORT unsigned int btCollisionWorld_RayResultCallback_getFlags(btCollisionWorld_RayResultCallback* obj); + EXPORT bool btCollisionWorld_RayResultCallback_hasHit(btCollisionWorld_RayResultCallback* obj); + EXPORT bool btCollisionWorld_RayResultCallback_needsCollision(btCollisionWorld_RayResultCallback* obj, btBroadphaseProxy* proxy0); + EXPORT void btCollisionWorld_RayResultCallback_setClosestHitFraction(btCollisionWorld_RayResultCallback* obj, btScalar value); + EXPORT void btCollisionWorld_RayResultCallback_setCollisionFilterGroup(btCollisionWorld_RayResultCallback* obj, int value); + EXPORT void btCollisionWorld_RayResultCallback_setCollisionFilterMask(btCollisionWorld_RayResultCallback* obj, int value); + EXPORT void btCollisionWorld_RayResultCallback_setCollisionObject(btCollisionWorld_RayResultCallback* obj, const btCollisionObject* value); + EXPORT void btCollisionWorld_RayResultCallback_setFlags(btCollisionWorld_RayResultCallback* obj, unsigned int value); + EXPORT void btCollisionWorld_RayResultCallback_delete(btCollisionWorld_RayResultCallback* obj); + + EXPORT btCollisionWorld* btCollisionWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* broadphasePairCache, btCollisionConfiguration* collisionConfiguration); + EXPORT void btCollisionWorld_addCollisionObject(btCollisionWorld* obj, btCollisionObject* collisionObject); + EXPORT void btCollisionWorld_addCollisionObject2(btCollisionWorld* obj, btCollisionObject* collisionObject, int collisionFilterGroup); + EXPORT void btCollisionWorld_addCollisionObject3(btCollisionWorld* obj, btCollisionObject* collisionObject, int collisionFilterGroup, int collisionFilterMask); + EXPORT void btCollisionWorld_computeOverlappingPairs(btCollisionWorld* obj); + EXPORT void btCollisionWorld_contactPairTest(btCollisionWorld* obj, btCollisionObject* colObjA, btCollisionObject* colObjB, btCollisionWorld_ContactResultCallback* resultCallback); + EXPORT void btCollisionWorld_contactTest(btCollisionWorld* obj, btCollisionObject* colObj, btCollisionWorld_ContactResultCallback* resultCallback); + EXPORT void btCollisionWorld_convexSweepTest(btCollisionWorld* obj, const btConvexShape* castShape, const btTransform* from, const btTransform* to, btCollisionWorld_ConvexResultCallback* resultCallback, btScalar allowedCcdPenetration); + EXPORT void btCollisionWorld_debugDrawObject(btCollisionWorld* obj, const btTransform* worldTransform, const btCollisionShape* shape, const btVector3* color); + EXPORT void btCollisionWorld_debugDrawWorld(btCollisionWorld* obj); + EXPORT btBroadphaseInterface* btCollisionWorld_getBroadphase(btCollisionWorld* obj); + EXPORT btAlignedObjectArray_btCollisionObjectPtr* btCollisionWorld_getCollisionObjectArray(btCollisionWorld* obj); + EXPORT btIDebugDraw* btCollisionWorld_getDebugDrawer(btCollisionWorld* obj); + EXPORT btDispatcher* btCollisionWorld_getDispatcher(btCollisionWorld* obj); + EXPORT btDispatcherInfo* btCollisionWorld_getDispatchInfo(btCollisionWorld* obj); + EXPORT bool btCollisionWorld_getForceUpdateAllAabbs(btCollisionWorld* obj); + EXPORT int btCollisionWorld_getNumCollisionObjects(btCollisionWorld* obj); + EXPORT btOverlappingPairCache* btCollisionWorld_getPairCache(btCollisionWorld* obj); + EXPORT void btCollisionWorld_objectQuerySingle(const btConvexShape* castShape, const btTransform* rayFromTrans, const btTransform* rayToTrans, btCollisionObject* collisionObject, const btCollisionShape* collisionShape, const btTransform* colObjWorldTransform, btCollisionWorld_ConvexResultCallback* resultCallback, btScalar allowedPenetration); + EXPORT void btCollisionWorld_objectQuerySingleInternal(const btConvexShape* castShape, const btTransform* convexFromTrans, const btTransform* convexToTrans, const btCollisionObjectWrapper* colObjWrap, btCollisionWorld_ConvexResultCallback* resultCallback, btScalar allowedPenetration); + EXPORT void btCollisionWorld_performDiscreteCollisionDetection(btCollisionWorld* obj); + EXPORT void btCollisionWorld_rayTest(btCollisionWorld* obj, const btVector3* rayFromWorld, const btVector3* rayToWorld, btCollisionWorld_RayResultCallback* resultCallback); + EXPORT void btCollisionWorld_rayTestSingle(const btTransform* rayFromTrans, const btTransform* rayToTrans, btCollisionObject* collisionObject, const btCollisionShape* collisionShape, const btTransform* colObjWorldTransform, btCollisionWorld_RayResultCallback* resultCallback); + EXPORT void btCollisionWorld_rayTestSingleInternal(const btTransform* rayFromTrans, const btTransform* rayToTrans, const btCollisionObjectWrapper* collisionObjectWrap, btCollisionWorld_RayResultCallback* resultCallback); + EXPORT void btCollisionWorld_removeCollisionObject(btCollisionWorld* obj, btCollisionObject* collisionObject); + EXPORT void btCollisionWorld_serialize(btCollisionWorld* obj, btSerializer* serializer); + EXPORT void btCollisionWorld_setBroadphase(btCollisionWorld* obj, btBroadphaseInterface* pairCache); + EXPORT void btCollisionWorld_setDebugDrawer(btCollisionWorld* obj, btIDebugDraw* debugDrawer); + EXPORT void btCollisionWorld_setForceUpdateAllAabbs(btCollisionWorld* obj, bool forceUpdateAllAabbs); + EXPORT void btCollisionWorld_updateAabbs(btCollisionWorld* obj); + EXPORT void btCollisionWorld_updateSingleAabb(btCollisionWorld* obj, btCollisionObject* colObj); + EXPORT void btCollisionWorld_delete(btCollisionWorld* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..36fe31f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btCompoundCollisionAlgorithm_wrap.h" + +btCompoundCollisionAlgorithm_CreateFunc* btCompoundCollisionAlgorithm_CreateFunc_new() +{ + return new btCompoundCollisionAlgorithm::CreateFunc(); +} + + +btCompoundCollisionAlgorithm_SwappedCreateFunc* btCompoundCollisionAlgorithm_SwappedCreateFunc_new() +{ + return new btCompoundCollisionAlgorithm::SwappedCreateFunc(); +} + + +btCompoundCollisionAlgorithm* btCompoundCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + bool isSwapped) +{ + return new btCompoundCollisionAlgorithm(*ci, body0Wrap, body1Wrap, isSwapped); +} + +btCollisionAlgorithm* btCompoundCollisionAlgorithm_getChildAlgorithm(btCompoundCollisionAlgorithm* obj, + int n) +{ + return obj->getChildAlgorithm(n); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..1d722b7 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCompoundCollisionAlgorithm_CreateFunc* btCompoundCollisionAlgorithm_CreateFunc_new(); + + EXPORT btCompoundCollisionAlgorithm_SwappedCreateFunc* btCompoundCollisionAlgorithm_SwappedCreateFunc_new(); + + EXPORT btCompoundCollisionAlgorithm* btCompoundCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped); + EXPORT btCollisionAlgorithm* btCompoundCollisionAlgorithm_getChildAlgorithm(btCompoundCollisionAlgorithm* obj, int n); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..891fa27 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btCompoundCompoundCollisionAlgorithm_wrap.h" + +btCompoundCompoundCollisionAlgorithm_CreateFunc* btCompoundCompoundCollisionAlgorithm_CreateFunc_new() +{ + return new btCompoundCompoundCollisionAlgorithm::CreateFunc(); +} + + +btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc* btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc_new() +{ + return new btCompoundCompoundCollisionAlgorithm::SwappedCreateFunc(); +} + + +btCompoundCompoundCollisionAlgorithm* btCompoundCompoundCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + bool isSwapped) +{ + return new btCompoundCompoundCollisionAlgorithm(*ci, body0Wrap, body1Wrap, isSwapped); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..35c920e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCompoundCompoundCollisionAlgorithm_CreateFunc* btCompoundCompoundCollisionAlgorithm_CreateFunc_new(); + + EXPORT btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc* btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc_new(); + + EXPORT btCompoundCompoundCollisionAlgorithm* btCompoundCompoundCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.cpp new file mode 100644 index 0000000..2ca7498 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btCompoundFromGimpact_wrap.h" + +btCompoundShape* btCompoundFromGImpact_btCreateCompoundFromGimpactShape(const btGImpactMeshShape* gimpactMesh, btScalar depth) +{ + return btCreateCompoundFromGimpactShape(gimpactMesh, depth); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.h new file mode 100644 index 0000000..bec0251 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCompoundShape* btCompoundFromGImpact_btCreateCompoundFromGimpactShape(const btGImpactMeshShape* gimpactMesh, btScalar depth); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.cpp new file mode 100644 index 0000000..9c489c7 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btCompoundShape_wrap.h" + +btScalar btCompoundShapeChild_getChildMargin(btCompoundShapeChild* obj) +{ + return obj->m_childMargin; +} + +btCollisionShape* btCompoundShapeChild_getChildShape(btCompoundShapeChild* obj) +{ + return obj->m_childShape; +} + +int btCompoundShapeChild_getChildShapeType(btCompoundShapeChild* obj) +{ + return obj->m_childShapeType; +} + +btDbvtNode* btCompoundShapeChild_getNode(btCompoundShapeChild* obj) +{ + return obj->m_node; +} + +void btCompoundShapeChild_getTransform(btCompoundShapeChild* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_transform); +} + +void btCompoundShapeChild_setChildMargin(btCompoundShapeChild* obj, btScalar value) +{ + obj->m_childMargin = value; +} + +void btCompoundShapeChild_setChildShape(btCompoundShapeChild* obj, btCollisionShape* value) +{ + obj->m_childShape = value; +} + +void btCompoundShapeChild_setChildShapeType(btCompoundShapeChild* obj, int value) +{ + obj->m_childShapeType = value; +} + +void btCompoundShapeChild_setNode(btCompoundShapeChild* obj, btDbvtNode* value) +{ + obj->m_node = value; +} + +void btCompoundShapeChild_setTransform(btCompoundShapeChild* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_transform, value); +} + +void btCompoundShapeChild_delete(btCompoundShapeChild* obj) +{ + delete obj; +} + + +btCompoundShape* btCompoundShape_new(bool enableDynamicAabbTree, int initialChildCapacity) +{ + return new btCompoundShape(enableDynamicAabbTree, initialChildCapacity); +} + +void btCompoundShape_addChildShape(btCompoundShape* obj, const btTransform* localTransform, + btCollisionShape* shape) +{ + BTTRANSFORM_IN(localTransform); + obj->addChildShape(BTTRANSFORM_USE(localTransform), shape); +} + +void btCompoundShape_calculatePrincipalAxisTransform(btCompoundShape* obj, btScalar* masses, + btTransform* principal, btVector3* inertia) +{ + BTTRANSFORM_IN(principal); + BTVECTOR3_DEF(inertia); + obj->calculatePrincipalAxisTransform(masses, BTTRANSFORM_USE(principal), BTVECTOR3_USE(inertia)); + BTTRANSFORM_DEF_OUT(principal); + BTVECTOR3_DEF_OUT(inertia); +} + +void btCompoundShape_createAabbTreeFromChildren(btCompoundShape* obj) +{ + obj->createAabbTreeFromChildren(); +} + +btCompoundShapeChild* btCompoundShape_getChildList(btCompoundShape* obj) +{ + return obj->getChildList(); +} + +btCollisionShape* btCompoundShape_getChildShape(btCompoundShape* obj, int index) +{ + return obj->getChildShape(index); +} + +void btCompoundShape_getChildTransform(btCompoundShape* obj, int index, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getChildTransform(index)); +} + +btDbvt* btCompoundShape_getDynamicAabbTree(btCompoundShape* obj) +{ + return obj->getDynamicAabbTree(); +} + +int btCompoundShape_getNumChildShapes(btCompoundShape* obj) +{ + return obj->getNumChildShapes(); +} + +int btCompoundShape_getUpdateRevision(btCompoundShape* obj) +{ + return obj->getUpdateRevision(); +} + +void btCompoundShape_recalculateLocalAabb(btCompoundShape* obj) +{ + obj->recalculateLocalAabb(); +} + +void btCompoundShape_removeChildShape(btCompoundShape* obj, btCollisionShape* shape) +{ + obj->removeChildShape(shape); +} + +void btCompoundShape_removeChildShapeByIndex(btCompoundShape* obj, int childShapeindex) +{ + obj->removeChildShapeByIndex(childShapeindex); +} + +void btCompoundShape_updateChildTransform(btCompoundShape* obj, int childIndex, + const btTransform* newChildTransform, bool shouldRecalculateLocalAabb) +{ + BTTRANSFORM_IN(newChildTransform); + obj->updateChildTransform(childIndex, BTTRANSFORM_USE(newChildTransform), shouldRecalculateLocalAabb); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.h new file mode 100644 index 0000000..46461e0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCompoundShape_wrap.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btScalar btCompoundShapeChild_getChildMargin(btCompoundShapeChild* obj); + EXPORT btCollisionShape* btCompoundShapeChild_getChildShape(btCompoundShapeChild* obj); + EXPORT int btCompoundShapeChild_getChildShapeType(btCompoundShapeChild* obj); + EXPORT btDbvtNode* btCompoundShapeChild_getNode(btCompoundShapeChild* obj); + EXPORT void btCompoundShapeChild_getTransform(btCompoundShapeChild* obj, btTransform* value); + EXPORT void btCompoundShapeChild_setChildMargin(btCompoundShapeChild* obj, btScalar value); + EXPORT void btCompoundShapeChild_setChildShape(btCompoundShapeChild* obj, btCollisionShape* value); + EXPORT void btCompoundShapeChild_setChildShapeType(btCompoundShapeChild* obj, int value); + EXPORT void btCompoundShapeChild_setNode(btCompoundShapeChild* obj, btDbvtNode* value); + EXPORT void btCompoundShapeChild_setTransform(btCompoundShapeChild* obj, const btTransform* value); + EXPORT void btCompoundShapeChild_delete(btCompoundShapeChild* obj); + + EXPORT btCompoundShape* btCompoundShape_new(bool enableDynamicAabbTree, int initialChildCapacity); + EXPORT void btCompoundShape_addChildShape(btCompoundShape* obj, const btTransform* localTransform, btCollisionShape* shape); + EXPORT void btCompoundShape_calculatePrincipalAxisTransform(btCompoundShape* obj, btScalar* masses, btTransform* principal, btVector3* inertia); + EXPORT void btCompoundShape_createAabbTreeFromChildren(btCompoundShape* obj); + EXPORT btCompoundShapeChild* btCompoundShape_getChildList(btCompoundShape* obj); + EXPORT btCollisionShape* btCompoundShape_getChildShape(btCompoundShape* obj, int index); + EXPORT void btCompoundShape_getChildTransform(btCompoundShape* obj, int index, btTransform* value); + EXPORT btDbvt* btCompoundShape_getDynamicAabbTree(btCompoundShape* obj); + EXPORT int btCompoundShape_getNumChildShapes(btCompoundShape* obj); + EXPORT int btCompoundShape_getUpdateRevision(btCompoundShape* obj); + EXPORT void btCompoundShape_recalculateLocalAabb(btCompoundShape* obj); + EXPORT void btCompoundShape_removeChildShape(btCompoundShape* obj, btCollisionShape* shape); + EXPORT void btCompoundShape_removeChildShapeByIndex(btCompoundShape* obj, int childShapeindex); + EXPORT void btCompoundShape_updateChildTransform(btCompoundShape* obj, int childIndex, const btTransform* newChildTransform, bool shouldRecalculateLocalAabb); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.cpp new file mode 100644 index 0000000..5db7aaf --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConcaveShape_wrap.h" + +void btConcaveShape_processAllTriangles(btConcaveShape* obj, btTriangleCallback* callback, + const btVector3* aabbMin, const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->processAllTriangles(callback, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.h new file mode 100644 index 0000000..6641f93 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConcaveShape_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btConcaveShape_processAllTriangles(btConcaveShape* obj, btTriangleCallback* callback, const btVector3* aabbMin, const btVector3* aabbMax); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.cpp new file mode 100644 index 0000000..6863af1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btConeShape_wrap.h" + +btConeShape* btConeShape_new(btScalar radius, btScalar height) +{ + return new btConeShape(radius, height); +} + +int btConeShape_getConeUpIndex(btConeShape* obj) +{ + return obj->getConeUpIndex(); +} + +btScalar btConeShape_getHeight(btConeShape* obj) +{ + return obj->getHeight(); +} + +btScalar btConeShape_getRadius(btConeShape* obj) +{ + return obj->getRadius(); +} + +void btConeShape_setConeUpIndex(btConeShape* obj, int upIndex) +{ + obj->setConeUpIndex(upIndex); +} + +void btConeShape_setHeight(btConeShape* obj, btScalar height) +{ + obj->setHeight(height); +} + +void btConeShape_setRadius(btConeShape* obj, btScalar radius) +{ + obj->setRadius(radius); +} + + +btConeShapeX* btConeShapeX_new(btScalar radius, btScalar height) +{ + return new btConeShapeX(radius, height); +} + + +btConeShapeZ* btConeShapeZ_new(btScalar radius, btScalar height) +{ + return new btConeShapeZ(radius, height); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.h new file mode 100644 index 0000000..3bf0b14 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConeShape_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConeShape* btConeShape_new(btScalar radius, btScalar height); + EXPORT int btConeShape_getConeUpIndex(btConeShape* obj); + EXPORT btScalar btConeShape_getHeight(btConeShape* obj); + EXPORT btScalar btConeShape_getRadius(btConeShape* obj); + EXPORT void btConeShape_setConeUpIndex(btConeShape* obj, int upIndex); + EXPORT void btConeShape_setHeight(btConeShape* obj, btScalar height); + EXPORT void btConeShape_setRadius(btConeShape* obj, btScalar radius); + + EXPORT btConeShapeX* btConeShapeX_new(btScalar radius, btScalar height); + + EXPORT btConeShapeZ* btConeShapeZ_new(btScalar radius, btScalar height); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.cpp new file mode 100644 index 0000000..d4db249 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.cpp @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConeTwistConstraint_wrap.h" + +btConeTwistConstraint* btConeTwistConstraint_new(btRigidBody* rbA, btRigidBody* rbB, + const btTransform* rbAFrame, const btTransform* rbBFrame) +{ + BTTRANSFORM_IN(rbAFrame); + BTTRANSFORM_IN(rbBFrame); + return new btConeTwistConstraint(*rbA, *rbB, BTTRANSFORM_USE(rbAFrame), BTTRANSFORM_USE(rbBFrame)); +} + +btConeTwistConstraint* btConeTwistConstraint_new2(btRigidBody* rbA, const btTransform* rbAFrame) +{ + BTTRANSFORM_IN(rbAFrame); + return new btConeTwistConstraint(*rbA, BTTRANSFORM_USE(rbAFrame)); +} + +void btConeTwistConstraint_calcAngleInfo(btConeTwistConstraint* obj) +{ + obj->calcAngleInfo(); +} + +void btConeTwistConstraint_calcAngleInfo2(btConeTwistConstraint* obj, const btTransform* transA, + const btTransform* transB, const btMatrix3x3* invInertiaWorldA, const btMatrix3x3* invInertiaWorldB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTMATRIX3X3_IN(invInertiaWorldA); + BTMATRIX3X3_IN(invInertiaWorldB); + obj->calcAngleInfo2(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), BTMATRIX3X3_USE(invInertiaWorldA), + BTMATRIX3X3_USE(invInertiaWorldB)); +} + +void btConeTwistConstraint_enableMotor(btConeTwistConstraint* obj, bool b) +{ + obj->enableMotor(b); +} + +void btConeTwistConstraint_getAFrame(btConeTwistConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getAFrame()); +} + +bool btConeTwistConstraint_getAngularOnly(btConeTwistConstraint* obj) +{ + return obj->getAngularOnly(); +} + +void btConeTwistConstraint_getBFrame(btConeTwistConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getBFrame()); +} + +btScalar btConeTwistConstraint_getBiasFactor(btConeTwistConstraint* obj) +{ + return obj->getBiasFactor(); +} + +btScalar btConeTwistConstraint_getDamping(btConeTwistConstraint* obj) +{ + return obj->getDamping(); +} + +btScalar btConeTwistConstraint_getFixThresh(btConeTwistConstraint* obj) +{ + return obj->getFixThresh(); +} + +int btConeTwistConstraint_getFlags(btConeTwistConstraint* obj) +{ + return obj->getFlags(); +} + +void btConeTwistConstraint_getFrameOffsetA(btConeTwistConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetA()); +} + +void btConeTwistConstraint_getFrameOffsetB(btConeTwistConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetB()); +} + +void btConeTwistConstraint_getInfo1NonVirtual(btConeTwistConstraint* obj, btTypedConstraint_btConstraintInfo1* info) +{ + obj->getInfo1NonVirtual(info); +} + +void btConeTwistConstraint_getInfo2NonVirtual(btConeTwistConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* transA, const btTransform* transB, const btMatrix3x3* invInertiaWorldA, + const btMatrix3x3* invInertiaWorldB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTMATRIX3X3_IN(invInertiaWorldA); + BTMATRIX3X3_IN(invInertiaWorldB); + obj->getInfo2NonVirtual(info, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTMATRIX3X3_USE(invInertiaWorldA), BTMATRIX3X3_USE(invInertiaWorldB)); +} + +btScalar btConeTwistConstraint_getLimit(btConeTwistConstraint* obj, int limitIndex) +{ + return obj->getLimit(limitIndex); +} + +btScalar btConeTwistConstraint_getLimitSoftness(btConeTwistConstraint* obj) +{ + return obj->getLimitSoftness(); +} + +btScalar btConeTwistConstraint_getMaxMotorImpulse(btConeTwistConstraint* obj) +{ + return obj->getMaxMotorImpulse(); +} + +void btConeTwistConstraint_getMotorTarget(btConeTwistConstraint* obj, btQuaternion* value) +{ + BTQUATERNION_COPY(value, &obj->getMotorTarget()); +} + +void btConeTwistConstraint_GetPointForAngle(btConeTwistConstraint* obj, btScalar fAngleInRadians, + btScalar fLength, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->GetPointForAngle(fAngleInRadians, fLength); + BTVECTOR3_SET(value, temp); +} + +btScalar btConeTwistConstraint_getRelaxationFactor(btConeTwistConstraint* obj) +{ + return obj->getRelaxationFactor(); +} + +int btConeTwistConstraint_getSolveSwingLimit(btConeTwistConstraint* obj) +{ + return obj->getSolveSwingLimit(); +} + +int btConeTwistConstraint_getSolveTwistLimit(btConeTwistConstraint* obj) +{ + return obj->getSolveTwistLimit(); +} + +btScalar btConeTwistConstraint_getSwingSpan1(btConeTwistConstraint* obj) +{ + return obj->getSwingSpan1(); +} + +btScalar btConeTwistConstraint_getSwingSpan2(btConeTwistConstraint* obj) +{ + return obj->getSwingSpan2(); +} + +btScalar btConeTwistConstraint_getTwistAngle(btConeTwistConstraint* obj) +{ + return obj->getTwistAngle(); +} + +btScalar btConeTwistConstraint_getTwistLimitSign(btConeTwistConstraint* obj) +{ + return obj->getTwistLimitSign(); +} + +btScalar btConeTwistConstraint_getTwistSpan(btConeTwistConstraint* obj) +{ + return obj->getTwistSpan(); +} + +bool btConeTwistConstraint_isMaxMotorImpulseNormalized(btConeTwistConstraint* obj) +{ + return obj->isMaxMotorImpulseNormalized(); +} + +bool btConeTwistConstraint_isMotorEnabled(btConeTwistConstraint* obj) +{ + return obj->isMotorEnabled(); +} + +bool btConeTwistConstraint_isPastSwingLimit(btConeTwistConstraint* obj) +{ + return obj->isPastSwingLimit(); +} + +void btConeTwistConstraint_setAngularOnly(btConeTwistConstraint* obj, bool angularOnly) +{ + obj->setAngularOnly(angularOnly); +} + +void btConeTwistConstraint_setDamping(btConeTwistConstraint* obj, btScalar damping) +{ + obj->setDamping(damping); +} + +void btConeTwistConstraint_setFixThresh(btConeTwistConstraint* obj, btScalar fixThresh) +{ + obj->setFixThresh(fixThresh); +} + +void btConeTwistConstraint_setFrames(btConeTwistConstraint* obj, const btTransform* frameA, + const btTransform* frameB) +{ + BTTRANSFORM_IN(frameA); + BTTRANSFORM_IN(frameB); + obj->setFrames(BTTRANSFORM_USE(frameA), BTTRANSFORM_USE(frameB)); +} + +void btConeTwistConstraint_setLimit(btConeTwistConstraint* obj, int limitIndex, btScalar limitValue) +{ + obj->setLimit(limitIndex, limitValue); +} + +void btConeTwistConstraint_setLimit2(btConeTwistConstraint* obj, btScalar _swingSpan1, + btScalar _swingSpan2, btScalar _twistSpan, btScalar _softness, btScalar _biasFactor, + btScalar _relaxationFactor) +{ + obj->setLimit(_swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor, _relaxationFactor); +} + +void btConeTwistConstraint_setMaxMotorImpulse(btConeTwistConstraint* obj, btScalar maxMotorImpulse) +{ + obj->setMaxMotorImpulse(maxMotorImpulse); +} + +void btConeTwistConstraint_setMaxMotorImpulseNormalized(btConeTwistConstraint* obj, + btScalar maxMotorImpulse) +{ + obj->setMaxMotorImpulseNormalized(maxMotorImpulse); +} + +void btConeTwistConstraint_setMotorTarget(btConeTwistConstraint* obj, const btQuaternion* q) +{ + BTQUATERNION_IN(q); + obj->setMotorTarget(BTQUATERNION_USE(q)); +} + +void btConeTwistConstraint_setMotorTargetInConstraintSpace(btConeTwistConstraint* obj, + const btQuaternion* q) +{ + BTQUATERNION_IN(q); + obj->setMotorTargetInConstraintSpace(BTQUATERNION_USE(q)); +} + +void btConeTwistConstraint_updateRHS(btConeTwistConstraint* obj, btScalar timeStep) +{ + obj->updateRHS(timeStep); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.h new file mode 100644 index 0000000..32feec3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConeTwistConstraint_wrap.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConeTwistConstraint* btConeTwistConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* rbAFrame, const btTransform* rbBFrame); + EXPORT btConeTwistConstraint* btConeTwistConstraint_new2(btRigidBody* rbA, const btTransform* rbAFrame); + EXPORT void btConeTwistConstraint_calcAngleInfo(btConeTwistConstraint* obj); + EXPORT void btConeTwistConstraint_calcAngleInfo2(btConeTwistConstraint* obj, const btTransform* transA, const btTransform* transB, const btMatrix3x3* invInertiaWorldA, const btMatrix3x3* invInertiaWorldB); + EXPORT void btConeTwistConstraint_enableMotor(btConeTwistConstraint* obj, bool b); + EXPORT void btConeTwistConstraint_getAFrame(btConeTwistConstraint* obj, btTransform* value); + EXPORT bool btConeTwistConstraint_getAngularOnly(btConeTwistConstraint* obj); + EXPORT void btConeTwistConstraint_getBFrame(btConeTwistConstraint* obj, btTransform* value); + EXPORT btScalar btConeTwistConstraint_getBiasFactor(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getDamping(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getFixThresh(btConeTwistConstraint* obj); + EXPORT int btConeTwistConstraint_getFlags(btConeTwistConstraint* obj); + EXPORT void btConeTwistConstraint_getFrameOffsetA(btConeTwistConstraint* obj, btTransform* value); + EXPORT void btConeTwistConstraint_getFrameOffsetB(btConeTwistConstraint* obj, btTransform* value); + EXPORT void btConeTwistConstraint_getInfo1NonVirtual(btConeTwistConstraint* obj, btTypedConstraint_btConstraintInfo1* info); + EXPORT void btConeTwistConstraint_getInfo2NonVirtual(btConeTwistConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* transA, const btTransform* transB, const btMatrix3x3* invInertiaWorldA, const btMatrix3x3* invInertiaWorldB); + EXPORT btScalar btConeTwistConstraint_getLimit(btConeTwistConstraint* obj, int limitIndex); + EXPORT btScalar btConeTwistConstraint_getLimitSoftness(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getMaxMotorImpulse(btConeTwistConstraint* obj); + EXPORT void btConeTwistConstraint_getMotorTarget(btConeTwistConstraint* obj, btQuaternion* value); + EXPORT void btConeTwistConstraint_GetPointForAngle(btConeTwistConstraint* obj, btScalar fAngleInRadians, btScalar fLength, btVector3* value); + EXPORT btScalar btConeTwistConstraint_getRelaxationFactor(btConeTwistConstraint* obj); + EXPORT int btConeTwistConstraint_getSolveSwingLimit(btConeTwistConstraint* obj); + EXPORT int btConeTwistConstraint_getSolveTwistLimit(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getSwingSpan1(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getSwingSpan2(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getTwistAngle(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getTwistLimitSign(btConeTwistConstraint* obj); + EXPORT btScalar btConeTwistConstraint_getTwistSpan(btConeTwistConstraint* obj); + EXPORT bool btConeTwistConstraint_isMaxMotorImpulseNormalized(btConeTwistConstraint* obj); + EXPORT bool btConeTwistConstraint_isMotorEnabled(btConeTwistConstraint* obj); + EXPORT bool btConeTwistConstraint_isPastSwingLimit(btConeTwistConstraint* obj); + EXPORT void btConeTwistConstraint_setAngularOnly(btConeTwistConstraint* obj, bool angularOnly); + EXPORT void btConeTwistConstraint_setDamping(btConeTwistConstraint* obj, btScalar damping); + EXPORT void btConeTwistConstraint_setFixThresh(btConeTwistConstraint* obj, btScalar fixThresh); + EXPORT void btConeTwistConstraint_setFrames(btConeTwistConstraint* obj, const btTransform* frameA, const btTransform* frameB); + EXPORT void btConeTwistConstraint_setLimit(btConeTwistConstraint* obj, int limitIndex, btScalar limitValue); + EXPORT void btConeTwistConstraint_setLimit2(btConeTwistConstraint* obj, btScalar _swingSpan1, btScalar _swingSpan2, btScalar _twistSpan, btScalar _softness, btScalar _biasFactor, btScalar _relaxationFactor); + EXPORT void btConeTwistConstraint_setMaxMotorImpulse(btConeTwistConstraint* obj, btScalar maxMotorImpulse); + EXPORT void btConeTwistConstraint_setMaxMotorImpulseNormalized(btConeTwistConstraint* obj, btScalar maxMotorImpulse); + EXPORT void btConeTwistConstraint_setMotorTarget(btConeTwistConstraint* obj, const btQuaternion* q); + EXPORT void btConeTwistConstraint_setMotorTargetInConstraintSpace(btConeTwistConstraint* obj, const btQuaternion* q); + EXPORT void btConeTwistConstraint_updateRHS(btConeTwistConstraint* obj, btScalar timeStep); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.cpp new file mode 100644 index 0000000..d49b698 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "btConstraintSolver_wrap.h" + +void btConstraintSolver_allSolved(btConstraintSolver* obj, const btContactSolverInfo* __unnamed0, + btIDebugDraw* __unnamed1) +{ + obj->allSolved(*__unnamed0, __unnamed1); +} + +btConstraintSolverType btConstraintSolver_getSolverType(btConstraintSolver* obj) +{ + return obj->getSolverType(); +} + +void btConstraintSolver_prepareSolve(btConstraintSolver* obj, int __unnamed0, int __unnamed1) +{ + obj->prepareSolve(__unnamed0, __unnamed1); +} + +void btConstraintSolver_reset(btConstraintSolver* obj) +{ + obj->reset(); +} + +btScalar btConstraintSolver_solveGroup(btConstraintSolver* obj, btCollisionObject** bodies, + int numBodies, btPersistentManifold** manifold, int numManifolds, btTypedConstraint** constraints, + int numConstraints, const btContactSolverInfo* info, btIDebugDraw* debugDrawer, + btDispatcher* dispatcher) +{ + return obj->solveGroup(bodies, numBodies, manifold, numManifolds, constraints, + numConstraints, *info, debugDrawer, dispatcher); +} + +void btConstraintSolver_delete(btConstraintSolver* obj) +{ + ALIGNED_FREE(obj); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.h new file mode 100644 index 0000000..aafe1ab --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConstraintSolver_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btConstraintSolver_allSolved(btConstraintSolver* obj, const btContactSolverInfo* __unnamed0, btIDebugDraw* __unnamed1); + EXPORT btConstraintSolverType btConstraintSolver_getSolverType(btConstraintSolver* obj); + EXPORT void btConstraintSolver_prepareSolve(btConstraintSolver* obj, int __unnamed0, int __unnamed1); + EXPORT void btConstraintSolver_reset(btConstraintSolver* obj); + EXPORT btScalar btConstraintSolver_solveGroup(btConstraintSolver* obj, btCollisionObject** bodies, int numBodies, btPersistentManifold** manifold, int numManifolds, btTypedConstraint** constraints, int numConstraints, const btContactSolverInfo* info, btIDebugDraw* debugDrawer, btDispatcher* dispatcher); + EXPORT void btConstraintSolver_delete(btConstraintSolver* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.cpp new file mode 100644 index 0000000..337ef35 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +/* +#include + +#include "btContactConstraint_wrap.h" + +btPersistentManifold* btContactConstraint_getContactManifold(btContactConstraint* obj) +{ + return obj->getContactManifold(); +} + +void btContactConstraint_setContactManifold(btContactConstraint* obj, btPersistentManifold* contactManifold) +{ + obj->setContactManifold(contactManifold); +} +*/ diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.h new file mode 100644 index 0000000..a80d4c2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btContactConstraint_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btPersistentManifold* btContactConstraint_getContactManifold(btContactConstraint* obj); + EXPORT void btContactConstraint_setContactManifold(btContactConstraint* obj, btPersistentManifold* contactManifold); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.cpp new file mode 100644 index 0000000..1729412 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.cpp @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btContactSolverInfo_wrap.h" + +btContactSolverInfoData* btContactSolverInfoData_new() +{ + return new btContactSolverInfoData(); +} + +btScalar btContactSolverInfoData_getDamping(btContactSolverInfoData* obj) +{ + return obj->m_damping; +} + +btScalar btContactSolverInfoData_getDeformableErp(btContactSolverInfoData* obj) +{ + return obj->m_deformable_erp; +} + +btScalar btContactSolverInfoData_getErp(btContactSolverInfoData* obj) +{ + return obj->m_erp; +} + +btScalar btContactSolverInfoData_getErp2(btContactSolverInfoData* obj) +{ + return obj->m_erp2; +} + +btScalar btContactSolverInfoData_getFriction(btContactSolverInfoData* obj) +{ + return obj->m_friction; +} + +btScalar btContactSolverInfoData_getFrictionCfm(btContactSolverInfoData* obj) +{ + return obj->m_frictionCFM; +} + +btScalar btContactSolverInfoData_getFrictionErp(btContactSolverInfoData* obj) +{ + return obj->m_frictionERP; +} + +btScalar btContactSolverInfoData_getGlobalCfm(btContactSolverInfoData* obj) +{ + return obj->m_globalCfm; +} + +btScalar btContactSolverInfoData_getLeastSquaresResidualThreshold(btContactSolverInfoData* obj) +{ + return obj->m_leastSquaresResidualThreshold; +} + +btScalar btContactSolverInfoData_getLinearSlop(btContactSolverInfoData* obj) +{ + return obj->m_linearSlop; +} + +btScalar btContactSolverInfoData_getMaxErrorReduction(btContactSolverInfoData* obj) +{ + return obj->m_maxErrorReduction; +} + +btScalar btContactSolverInfoData_getMaxGyroscopicForce(btContactSolverInfoData* obj) +{ + return obj->m_maxGyroscopicForce; +} + +int btContactSolverInfoData_getMinimumSolverBatchSize(btContactSolverInfoData* obj) +{ + return obj->m_minimumSolverBatchSize; +} + +int btContactSolverInfoData_getNumIterations(btContactSolverInfoData* obj) +{ + return obj->m_numIterations; +} + +int btContactSolverInfoData_getRestingContactRestitutionThreshold(btContactSolverInfoData* obj) +{ + return obj->m_restingContactRestitutionThreshold; +} + +btScalar btContactSolverInfoData_getRestitution(btContactSolverInfoData* obj) +{ + return obj->m_restitution; +} + +btScalar btContactSolverInfoData_getRestitutionVelocityThreshold(btContactSolverInfoData* obj) +{ + return obj->m_restitutionVelocityThreshold; +} + +btScalar btContactSolverInfoData_getSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj) +{ + return obj->m_singleAxisRollingFrictionThreshold; +} + +int btContactSolverInfoData_getSolverMode(btContactSolverInfoData* obj) +{ + return obj->m_solverMode; +} + +btScalar btContactSolverInfoData_getSor(btContactSolverInfoData* obj) +{ + return obj->m_sor; +} + +int btContactSolverInfoData_getSplitImpulse(btContactSolverInfoData* obj) +{ + return obj->m_splitImpulse; +} + +btScalar btContactSolverInfoData_getSplitImpulsePenetrationThreshold(btContactSolverInfoData* obj) +{ + return obj->m_splitImpulsePenetrationThreshold; +} + +btScalar btContactSolverInfoData_getSplitImpulseTurnErp(btContactSolverInfoData* obj) +{ + return obj->m_splitImpulseTurnErp; +} + +btScalar btContactSolverInfoData_getTau(btContactSolverInfoData* obj) +{ + return obj->m_tau; +} + +btScalar btContactSolverInfoData_getTimeStep(btContactSolverInfoData* obj) +{ + return obj->m_timeStep; +} + +btScalar btContactSolverInfoData_getWarmstartingFactor(btContactSolverInfoData* obj) +{ + return obj->m_warmstartingFactor; +} + +void btContactSolverInfoData_setDamping(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_damping = value; +} + +void btContactSolverInfoData_setDeformableErp(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_deformable_erp = value; +} + +void btContactSolverInfoData_setErp(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_erp = value; +} + +void btContactSolverInfoData_setErp2(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_erp2 = value; +} + +void btContactSolverInfoData_setFriction(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_friction = value; +} + +void btContactSolverInfoData_setFrictionCfm(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_frictionCFM = value; +} + +void btContactSolverInfoData_setFrictionErp(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_frictionERP = value; +} + +void btContactSolverInfoData_setGlobalCfm(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_globalCfm = value; +} + +void btContactSolverInfoData_setLeastSquaresResidualThreshold(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_leastSquaresResidualThreshold = value; +} + +void btContactSolverInfoData_setLinearSlop(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_linearSlop = value; +} + +void btContactSolverInfoData_setMaxErrorReduction(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_maxErrorReduction = value; +} + +void btContactSolverInfoData_setMaxGyroscopicForce(btContactSolverInfoData* obj, + btScalar value) +{ + obj->m_maxGyroscopicForce = value; +} + +void btContactSolverInfoData_setMinimumSolverBatchSize(btContactSolverInfoData* obj, + int value) +{ + obj->m_minimumSolverBatchSize = value; +} + +void btContactSolverInfoData_setNumIterations(btContactSolverInfoData* obj, int value) +{ + obj->m_numIterations = value; +} + +void btContactSolverInfoData_setRestingContactRestitutionThreshold(btContactSolverInfoData* obj, + int value) +{ + obj->m_restingContactRestitutionThreshold = value; +} + +void btContactSolverInfoData_setRestitution(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_restitution = value; +} + +void btContactSolverInfoData_setRestitutionVelocityThreshold(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_restitutionVelocityThreshold = value; +} + +void btContactSolverInfoData_setSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj, + btScalar value) +{ + obj->m_singleAxisRollingFrictionThreshold = value; +} + +void btContactSolverInfoData_setSolverMode(btContactSolverInfoData* obj, int value) +{ + obj->m_solverMode = value; +} + +void btContactSolverInfoData_setSor(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_sor = value; +} + +void btContactSolverInfoData_setSplitImpulse(btContactSolverInfoData* obj, int value) +{ + obj->m_splitImpulse = value; +} + +void btContactSolverInfoData_setSplitImpulsePenetrationThreshold(btContactSolverInfoData* obj, + btScalar value) +{ + obj->m_splitImpulsePenetrationThreshold = value; +} + +void btContactSolverInfoData_setSplitImpulseTurnErp(btContactSolverInfoData* obj, + btScalar value) +{ + obj->m_splitImpulseTurnErp = value; +} + +void btContactSolverInfoData_setTau(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_tau = value; +} + +void btContactSolverInfoData_setTimeStep(btContactSolverInfoData* obj, btScalar value) +{ + obj->m_timeStep = value; +} + +void btContactSolverInfoData_setWarmstartingFactor(btContactSolverInfoData* obj, + btScalar value) +{ + obj->m_warmstartingFactor = value; +} + +void btContactSolverInfoData_delete(btContactSolverInfoData* obj) +{ + delete obj; +} + + +btContactSolverInfo* btContactSolverInfo_new() +{ + return new btContactSolverInfo(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.h new file mode 100644 index 0000000..d54000e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btContactSolverInfo_wrap.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btContactSolverInfoData* btContactSolverInfoData_new(); + EXPORT btScalar btContactSolverInfoData_getDamping(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getDeformableErp(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getErp(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getErp2(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getFriction(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getFrictionCfm(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getFrictionErp(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getGlobalCfm(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getLeastSquaresResidualThreshold(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getLinearSlop(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getMaxErrorReduction(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getMaxGyroscopicForce(btContactSolverInfoData* obj); + EXPORT int btContactSolverInfoData_getMinimumSolverBatchSize(btContactSolverInfoData* obj); + EXPORT int btContactSolverInfoData_getNumIterations(btContactSolverInfoData* obj); + EXPORT int btContactSolverInfoData_getRestingContactRestitutionThreshold(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getRestitution(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getRestitutionVelocityThreshold(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj); + EXPORT int btContactSolverInfoData_getSolverMode(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getSor(btContactSolverInfoData* obj); + EXPORT int btContactSolverInfoData_getSplitImpulse(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getSplitImpulsePenetrationThreshold(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getSplitImpulseTurnErp(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getTau(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getTimeStep(btContactSolverInfoData* obj); + EXPORT btScalar btContactSolverInfoData_getWarmstartingFactor(btContactSolverInfoData* obj); + EXPORT void btContactSolverInfoData_setDamping(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setDeformableErp(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setErp(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setErp2(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setFriction(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setFrictionCfm(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setFrictionErp(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setGlobalCfm(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setLeastSquaresResidualThreshold(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setLinearSlop(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setMaxErrorReduction(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setMaxGyroscopicForce(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setMinimumSolverBatchSize(btContactSolverInfoData* obj, int value); + EXPORT void btContactSolverInfoData_setNumIterations(btContactSolverInfoData* obj, int value); + EXPORT void btContactSolverInfoData_setRestingContactRestitutionThreshold(btContactSolverInfoData* obj, int value); + EXPORT void btContactSolverInfoData_setRestitution(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setRestitutionVelocityThreshold(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setSingleAxisRollingFrictionThreshold(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setSolverMode(btContactSolverInfoData* obj, int value); + EXPORT void btContactSolverInfoData_setSor(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setSplitImpulse(btContactSolverInfoData* obj, int value); + EXPORT void btContactSolverInfoData_setSplitImpulsePenetrationThreshold(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setSplitImpulseTurnErp(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setTau(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setTimeStep(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_setWarmstartingFactor(btContactSolverInfoData* obj, btScalar value); + EXPORT void btContactSolverInfoData_delete(btContactSolverInfoData* obj); + + EXPORT btContactSolverInfo* btContactSolverInfo_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.cpp new file mode 100644 index 0000000..0b6995f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "btContinuousConvexCollision_wrap.h" + +btContinuousConvexCollision* btContinuousConvexCollision_new(const btConvexShape* shapeA, + const btConvexShape* shapeB, btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver) +{ + return new btContinuousConvexCollision(shapeA, shapeB, simplexSolver, penetrationDepthSolver); +} + +btContinuousConvexCollision* btContinuousConvexCollision_new2(const btConvexShape* shapeA, + const btStaticPlaneShape* plane) +{ + return new btContinuousConvexCollision(shapeA, plane); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.h new file mode 100644 index 0000000..82d9da2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btContinuousConvexCollision* btContinuousConvexCollision_new(const btConvexShape* shapeA, const btConvexShape* shapeB, btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver); + EXPORT btContinuousConvexCollision* btContinuousConvexCollision_new2(const btConvexShape* shapeA, const btStaticPlaneShape* plane); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.cpp new file mode 100644 index 0000000..5303494 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.cpp @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btConvex2dConvex2dAlgorithm_wrap.h" + +btConvex2dConvex2dAlgorithm_CreateFunc* btConvex2dConvex2dAlgorithm_CreateFunc_new( + btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) +{ + return new btConvex2dConvex2dAlgorithm::CreateFunc(simplexSolver, pdSolver); +} + +int btConvex2dConvex2dAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold( + btConvex2dConvex2dAlgorithm_CreateFunc* obj) +{ + return obj->m_minimumPointsPerturbationThreshold; +} + +int btConvex2dConvex2dAlgorithm_CreateFunc_getNumPerturbationIterations(btConvex2dConvex2dAlgorithm_CreateFunc* obj) +{ + return obj->m_numPerturbationIterations; +} + +btConvexPenetrationDepthSolver* btConvex2dConvex2dAlgorithm_CreateFunc_getPdSolver( + btConvex2dConvex2dAlgorithm_CreateFunc* obj) +{ + return obj->m_pdSolver; +} + +btVoronoiSimplexSolver* btConvex2dConvex2dAlgorithm_CreateFunc_getSimplexSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj) +{ + return obj->m_simplexSolver; +} + +void btConvex2dConvex2dAlgorithm_CreateFunc_setMinimumPointsPerturbationThreshold( + btConvex2dConvex2dAlgorithm_CreateFunc* obj, int value) +{ + obj->m_minimumPointsPerturbationThreshold = value; +} + +void btConvex2dConvex2dAlgorithm_CreateFunc_setNumPerturbationIterations(btConvex2dConvex2dAlgorithm_CreateFunc* obj, + int value) +{ + obj->m_numPerturbationIterations = value; +} + +void btConvex2dConvex2dAlgorithm_CreateFunc_setPdSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj, + btConvexPenetrationDepthSolver* value) +{ + obj->m_pdSolver = value; +} + +void btConvex2dConvex2dAlgorithm_CreateFunc_setSimplexSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj, + btVoronoiSimplexSolver* value) +{ + obj->m_simplexSolver = value; +} + + +btConvex2dConvex2dAlgorithm* btConvex2dConvex2dAlgorithm_new(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap, btVoronoiSimplexSolver* simplexSolver, + btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold) +{ + return new btConvex2dConvex2dAlgorithm(mf, *ci, body0Wrap, body1Wrap, simplexSolver, + pdSolver, numPerturbationIterations, minimumPointsPerturbationThreshold); +} + +const btPersistentManifold* btConvex2dConvex2dAlgorithm_getManifold(btConvex2dConvex2dAlgorithm* obj) +{ + return obj->getManifold(); +} + +void btConvex2dConvex2dAlgorithm_setLowLevelOfDetail(btConvex2dConvex2dAlgorithm* obj, + bool useLowLevel) +{ + obj->setLowLevelOfDetail(useLowLevel); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.h new file mode 100644 index 0000000..45e679d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvex2dConvex2dAlgorithm_CreateFunc* btConvex2dConvex2dAlgorithm_CreateFunc_new(btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); + EXPORT int btConvex2dConvex2dAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold(btConvex2dConvex2dAlgorithm_CreateFunc* obj); + EXPORT int btConvex2dConvex2dAlgorithm_CreateFunc_getNumPerturbationIterations(btConvex2dConvex2dAlgorithm_CreateFunc* obj); + EXPORT btConvexPenetrationDepthSolver* btConvex2dConvex2dAlgorithm_CreateFunc_getPdSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj); + EXPORT btVoronoiSimplexSolver* btConvex2dConvex2dAlgorithm_CreateFunc_getSimplexSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj); + EXPORT void btConvex2dConvex2dAlgorithm_CreateFunc_setMinimumPointsPerturbationThreshold(btConvex2dConvex2dAlgorithm_CreateFunc* obj, int value); + EXPORT void btConvex2dConvex2dAlgorithm_CreateFunc_setNumPerturbationIterations(btConvex2dConvex2dAlgorithm_CreateFunc* obj, int value); + EXPORT void btConvex2dConvex2dAlgorithm_CreateFunc_setPdSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj, btConvexPenetrationDepthSolver* value); + EXPORT void btConvex2dConvex2dAlgorithm_CreateFunc_setSimplexSolver(btConvex2dConvex2dAlgorithm_CreateFunc* obj, btVoronoiSimplexSolver* value); + + EXPORT btConvex2dConvex2dAlgorithm* btConvex2dConvex2dAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold); + EXPORT const btPersistentManifold* btConvex2dConvex2dAlgorithm_getManifold(btConvex2dConvex2dAlgorithm* obj); + EXPORT void btConvex2dConvex2dAlgorithm_setLowLevelOfDetail(btConvex2dConvex2dAlgorithm* obj, bool useLowLevel); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.cpp new file mode 100644 index 0000000..524b5a5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btConvex2dShape_wrap.h" + +btConvex2dShape* btConvex2dShape_new(btConvexShape* convexChildShape) +{ + return new btConvex2dShape(convexChildShape); +} + +btConvexShape* btConvex2dShape_getChildShape(btConvex2dShape* obj) +{ + return obj->getChildShape(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.h new file mode 100644 index 0000000..5dafc7f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvex2dShape_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvex2dShape* btConvex2dShape_new(btConvexShape* convexChildShape); + EXPORT btConvexShape* btConvex2dShape_getChildShape(btConvex2dShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.cpp new file mode 100644 index 0000000..002ddb4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.cpp @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexCast_wrap.h" + +btConvexCast_CastResult* btConvexCast_CastResult_new() +{ + return new btConvexCast::CastResult(); +} + +void btConvexCast_CastResult_DebugDraw(btConvexCast_CastResult* obj, btScalar fraction) +{ + obj->DebugDraw(fraction); +} + +void btConvexCast_CastResult_drawCoordSystem(btConvexCast_CastResult* obj, const btTransform* trans) +{ + BTTRANSFORM_IN(trans); + obj->drawCoordSystem(BTTRANSFORM_USE(trans)); +} + +btScalar btConvexCast_CastResult_getAllowedPenetration(btConvexCast_CastResult* obj) +{ + return obj->m_allowedPenetration; +} + +btIDebugDraw* btConvexCast_CastResult_getDebugDrawer(btConvexCast_CastResult* obj) +{ + return obj->m_debugDrawer; +} + +btScalar btConvexCast_CastResult_getFraction(btConvexCast_CastResult* obj) +{ + return obj->m_fraction; +} + +void btConvexCast_CastResult_getHitPoint(btConvexCast_CastResult* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitPoint); +} + +void btConvexCast_CastResult_getHitTransformA(btConvexCast_CastResult* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_hitTransformA); +} + +void btConvexCast_CastResult_getHitTransformB(btConvexCast_CastResult* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_hitTransformB); +} + +void btConvexCast_CastResult_getNormal(btConvexCast_CastResult* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normal); +} + +void btConvexCast_CastResult_reportFailure(btConvexCast_CastResult* obj, int errNo, + int numIterations) +{ + obj->reportFailure(errNo, numIterations); +} + +void btConvexCast_CastResult_setAllowedPenetration(btConvexCast_CastResult* obj, + btScalar value) +{ + obj->m_allowedPenetration = value; +} + +void btConvexCast_CastResult_setDebugDrawer(btConvexCast_CastResult* obj, btIDebugDraw* value) +{ + obj->m_debugDrawer = value; +} + +void btConvexCast_CastResult_setFraction(btConvexCast_CastResult* obj, btScalar value) +{ + obj->m_fraction = value; +} + +void btConvexCast_CastResult_setHitPoint(btConvexCast_CastResult* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitPoint, value); +} + +void btConvexCast_CastResult_setHitTransformA(btConvexCast_CastResult* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_hitTransformA, value); +} + +void btConvexCast_CastResult_setHitTransformB(btConvexCast_CastResult* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_hitTransformB, value); +} + +void btConvexCast_CastResult_setNormal(btConvexCast_CastResult* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normal, value); +} + +void btConvexCast_CastResult_delete(btConvexCast_CastResult* obj) +{ + delete obj; +} + + +bool btConvexCast_calcTimeOfImpact(btConvexCast* obj, const btTransform* fromA, const btTransform* toA, + const btTransform* fromB, const btTransform* toB, btConvexCast_CastResult* result) +{ + BTTRANSFORM_IN(fromA); + BTTRANSFORM_IN(toA); + BTTRANSFORM_IN(fromB); + BTTRANSFORM_IN(toB); + return obj->calcTimeOfImpact(BTTRANSFORM_USE(fromA), BTTRANSFORM_USE(toA), BTTRANSFORM_USE(fromB), + BTTRANSFORM_USE(toB), *result); +} + +void btConvexCast_delete(btConvexCast* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.h new file mode 100644 index 0000000..976d736 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexCast_wrap.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexCast_CastResult* btConvexCast_CastResult_new(); + EXPORT void btConvexCast_CastResult_DebugDraw(btConvexCast_CastResult* obj, btScalar fraction); + EXPORT void btConvexCast_CastResult_drawCoordSystem(btConvexCast_CastResult* obj, const btTransform* trans); + EXPORT btScalar btConvexCast_CastResult_getAllowedPenetration(btConvexCast_CastResult* obj); + EXPORT btIDebugDraw* btConvexCast_CastResult_getDebugDrawer(btConvexCast_CastResult* obj); + EXPORT btScalar btConvexCast_CastResult_getFraction(btConvexCast_CastResult* obj); + EXPORT void btConvexCast_CastResult_getHitPoint(btConvexCast_CastResult* obj, btVector3* value); + EXPORT void btConvexCast_CastResult_getHitTransformA(btConvexCast_CastResult* obj, btTransform* value); + EXPORT void btConvexCast_CastResult_getHitTransformB(btConvexCast_CastResult* obj, btTransform* value); + EXPORT void btConvexCast_CastResult_getNormal(btConvexCast_CastResult* obj, btVector3* value); + EXPORT void btConvexCast_CastResult_reportFailure(btConvexCast_CastResult* obj, int errNo, int numIterations); + EXPORT void btConvexCast_CastResult_setAllowedPenetration(btConvexCast_CastResult* obj, btScalar value); + EXPORT void btConvexCast_CastResult_setDebugDrawer(btConvexCast_CastResult* obj, btIDebugDraw* value); + EXPORT void btConvexCast_CastResult_setFraction(btConvexCast_CastResult* obj, btScalar value); + EXPORT void btConvexCast_CastResult_setHitPoint(btConvexCast_CastResult* obj, const btVector3* value); + EXPORT void btConvexCast_CastResult_setHitTransformA(btConvexCast_CastResult* obj, const btTransform* value); + EXPORT void btConvexCast_CastResult_setHitTransformB(btConvexCast_CastResult* obj, const btTransform* value); + EXPORT void btConvexCast_CastResult_setNormal(btConvexCast_CastResult* obj, const btVector3* value); + EXPORT void btConvexCast_CastResult_delete(btConvexCast_CastResult* obj); + + EXPORT bool btConvexCast_calcTimeOfImpact(btConvexCast* obj, const btTransform* fromA, const btTransform* toA, const btTransform* fromB, const btTransform* toB, btConvexCast_CastResult* result); + EXPORT void btConvexCast_delete(btConvexCast* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..ec7ce25 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.cpp @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btConvexConcaveCollisionAlgorithm_wrap.h" + +btConvexTriangleCallback* btConvexTriangleCallback_new(btDispatcher* dispatcher, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + bool isSwapped) +{ + return new btConvexTriangleCallback(dispatcher, body0Wrap, body1Wrap, isSwapped); +} + +void btConvexTriangleCallback_clearCache(btConvexTriangleCallback* obj) +{ + obj->clearCache(); +} + +void btConvexTriangleCallback_clearWrapperData(btConvexTriangleCallback* obj) +{ + obj->clearWrapperData(); +} + +void btConvexTriangleCallback_getAabbMax(btConvexTriangleCallback* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAabbMax()); +} + +void btConvexTriangleCallback_getAabbMin(btConvexTriangleCallback* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAabbMin()); +} + +btPersistentManifold* btConvexTriangleCallback_getManifoldPtr(btConvexTriangleCallback* obj) +{ + return obj->m_manifoldPtr; +} + +int btConvexTriangleCallback_getTriangleCount(btConvexTriangleCallback* obj) +{ + return obj->m_triangleCount; +} + +void btConvexTriangleCallback_setManifoldPtr(btConvexTriangleCallback* obj, btPersistentManifold* value) +{ + obj->m_manifoldPtr = value; +} + +void btConvexTriangleCallback_setTimeStepAndCounters(btConvexTriangleCallback* obj, + btScalar collisionMarginTriangle, const btDispatcherInfo* dispatchInfo, const btCollisionObjectWrapper* convexBodyWrap, + const btCollisionObjectWrapper* triBodyWrap, btManifoldResult* resultOut) +{ + obj->setTimeStepAndCounters(collisionMarginTriangle, *dispatchInfo, convexBodyWrap, + triBodyWrap, resultOut); +} + +void btConvexTriangleCallback_setTriangleCount(btConvexTriangleCallback* obj, int value) +{ + obj->m_triangleCount = value; +} + + +btConvexConcaveCollisionAlgorithm_CreateFunc* btConvexConcaveCollisionAlgorithm_CreateFunc_new() +{ + return new btConvexConcaveCollisionAlgorithm::CreateFunc(); +} + + +btConvexConcaveCollisionAlgorithm_SwappedCreateFunc* btConvexConcaveCollisionAlgorithm_SwappedCreateFunc_new() +{ + return new btConvexConcaveCollisionAlgorithm::SwappedCreateFunc(); +} + + +btConvexConcaveCollisionAlgorithm* btConvexConcaveCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + bool isSwapped) +{ + return new btConvexConcaveCollisionAlgorithm(*ci, body0Wrap, body1Wrap, isSwapped); +} + +void btConvexConcaveCollisionAlgorithm_clearCache(btConvexConcaveCollisionAlgorithm* obj) +{ + obj->clearCache(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..39da841 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexTriangleCallback* btConvexTriangleCallback_new(btDispatcher* dispatcher, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped); + EXPORT void btConvexTriangleCallback_clearCache(btConvexTriangleCallback* obj); + EXPORT void btConvexTriangleCallback_clearWrapperData(btConvexTriangleCallback* obj); + EXPORT void btConvexTriangleCallback_getAabbMax(btConvexTriangleCallback* obj, btVector3* value); + EXPORT void btConvexTriangleCallback_getAabbMin(btConvexTriangleCallback* obj, btVector3* value); + EXPORT btPersistentManifold* btConvexTriangleCallback_getManifoldPtr(btConvexTriangleCallback* obj); + EXPORT int btConvexTriangleCallback_getTriangleCount(btConvexTriangleCallback* obj); + EXPORT void btConvexTriangleCallback_setManifoldPtr(btConvexTriangleCallback* obj, btPersistentManifold* value); + EXPORT void btConvexTriangleCallback_setTimeStepAndCounters(btConvexTriangleCallback* obj, btScalar collisionMarginTriangle, const btDispatcherInfo* dispatchInfo, const btCollisionObjectWrapper* convexBodyWrap, const btCollisionObjectWrapper* triBodyWrap, btManifoldResult* resultOut); + EXPORT void btConvexTriangleCallback_setTriangleCount(btConvexTriangleCallback* obj, int value); + + EXPORT btConvexConcaveCollisionAlgorithm_CreateFunc* btConvexConcaveCollisionAlgorithm_CreateFunc_new(); + + EXPORT btConvexConcaveCollisionAlgorithm_SwappedCreateFunc* btConvexConcaveCollisionAlgorithm_SwappedCreateFunc_new(); + + EXPORT btConvexConcaveCollisionAlgorithm* btConvexConcaveCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped); + EXPORT void btConvexConcaveCollisionAlgorithm_clearCache(btConvexConcaveCollisionAlgorithm* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.cpp new file mode 100644 index 0000000..758076a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btConvexConvexAlgorithm_wrap.h" + +btConvexConvexAlgorithm_CreateFunc* btConvexConvexAlgorithm_CreateFunc_new(btConvexPenetrationDepthSolver* pdSolver) +{ + return new btConvexConvexAlgorithm::CreateFunc(pdSolver); +} + +int btConvexConvexAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold(btConvexConvexAlgorithm_CreateFunc* obj) +{ + return obj->m_minimumPointsPerturbationThreshold; +} + +int btConvexConvexAlgorithm_CreateFunc_getNumPerturbationIterations(btConvexConvexAlgorithm_CreateFunc* obj) +{ + return obj->m_numPerturbationIterations; +} + +btConvexPenetrationDepthSolver* btConvexConvexAlgorithm_CreateFunc_getPdSolver(btConvexConvexAlgorithm_CreateFunc* obj) +{ + return obj->m_pdSolver; +} + +void btConvexConvexAlgorithm_CreateFunc_setMinimumPointsPerturbationThreshold(btConvexConvexAlgorithm_CreateFunc* obj, + int value) +{ + obj->m_minimumPointsPerturbationThreshold = value; +} + +void btConvexConvexAlgorithm_CreateFunc_setNumPerturbationIterations(btConvexConvexAlgorithm_CreateFunc* obj, + int value) +{ + obj->m_numPerturbationIterations = value; +} + +void btConvexConvexAlgorithm_CreateFunc_setPdSolver(btConvexConvexAlgorithm_CreateFunc* obj, + btConvexPenetrationDepthSolver* value) +{ + obj->m_pdSolver = value; +} + + +btConvexConvexAlgorithm* btConvexConvexAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, + int minimumPointsPerturbationThreshold) +{ + return new btConvexConvexAlgorithm(mf, *ci, body0Wrap, body1Wrap, pdSolver, + numPerturbationIterations, minimumPointsPerturbationThreshold); +} + +const btPersistentManifold* btConvexConvexAlgorithm_getManifold(btConvexConvexAlgorithm* obj) +{ + return obj->getManifold(); +} + +void btConvexConvexAlgorithm_setLowLevelOfDetail(btConvexConvexAlgorithm* obj, bool useLowLevel) +{ + obj->setLowLevelOfDetail(useLowLevel); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.h new file mode 100644 index 0000000..68f90b1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexConvexAlgorithm_CreateFunc* btConvexConvexAlgorithm_CreateFunc_new(btConvexPenetrationDepthSolver* pdSolver); + EXPORT int btConvexConvexAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold(btConvexConvexAlgorithm_CreateFunc* obj); + EXPORT int btConvexConvexAlgorithm_CreateFunc_getNumPerturbationIterations(btConvexConvexAlgorithm_CreateFunc* obj); + EXPORT btConvexPenetrationDepthSolver* btConvexConvexAlgorithm_CreateFunc_getPdSolver(btConvexConvexAlgorithm_CreateFunc* obj); + EXPORT void btConvexConvexAlgorithm_CreateFunc_setMinimumPointsPerturbationThreshold(btConvexConvexAlgorithm_CreateFunc* obj, int value); + EXPORT void btConvexConvexAlgorithm_CreateFunc_setNumPerturbationIterations(btConvexConvexAlgorithm_CreateFunc* obj, int value); + EXPORT void btConvexConvexAlgorithm_CreateFunc_setPdSolver(btConvexConvexAlgorithm_CreateFunc* obj, btConvexPenetrationDepthSolver* value); + + EXPORT btConvexConvexAlgorithm* btConvexConvexAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold); + EXPORT const btPersistentManifold* btConvexConvexAlgorithm_getManifold(btConvexConvexAlgorithm* obj); + EXPORT void btConvexConvexAlgorithm_setLowLevelOfDetail(btConvexConvexAlgorithm* obj, bool useLowLevel); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.cpp new file mode 100644 index 0000000..f3cd6b9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.cpp @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexHullShape_wrap.h" + +btConvexHullShape* btConvexHullShape_new() +{ + return new btConvexHullShape(); +} + +btConvexHullShape* btConvexHullShape_new2(const btScalar* points) +{ + return new btConvexHullShape(points); +} + +btConvexHullShape* btConvexHullShape_new3(const btScalar* points, int numPoints) +{ + return new btConvexHullShape(points, numPoints); +} + +btConvexHullShape* btConvexHullShape_new4(const btScalar* points, int numPoints, + int stride) +{ + return new btConvexHullShape(points, numPoints, stride); +} + +void btConvexHullShape_addPoint(btConvexHullShape* obj, const btVector3* point, + bool recalculateLocalAabb) +{ + BTVECTOR3_IN(point); + obj->addPoint(BTVECTOR3_USE(point), recalculateLocalAabb); +} + +int btConvexHullShape_getNumPoints(btConvexHullShape* obj) +{ + return obj->getNumPoints(); +} + +void btConvexHullShape_getScaledPoint(btConvexHullShape* obj, int i, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getScaledPoint(i); + BTVECTOR3_SET(value, temp); +} + +btVector3* btConvexHullShape_getUnscaledPoints(btConvexHullShape* obj) +{ + return obj->getUnscaledPoints(); +} + +void btConvexHullShape_optimizeConvexHull(btConvexHullShape* obj) +{ + obj->optimizeConvexHull(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.h new file mode 100644 index 0000000..7d91487 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexHullShape_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexHullShape* btConvexHullShape_new(); + EXPORT btConvexHullShape* btConvexHullShape_new2(const btScalar* points); + EXPORT btConvexHullShape* btConvexHullShape_new3(const btScalar* points, int numPoints); + EXPORT btConvexHullShape* btConvexHullShape_new4(const btScalar* points, int numPoints, int stride); + EXPORT void btConvexHullShape_addPoint(btConvexHullShape* obj, const btVector3* point, bool recalculateLocalAabb); + EXPORT int btConvexHullShape_getNumPoints(btConvexHullShape* obj); + EXPORT void btConvexHullShape_getScaledPoint(btConvexHullShape* obj, int i, btVector3* value); + EXPORT btVector3* btConvexHullShape_getUnscaledPoints(btConvexHullShape* obj); + EXPORT void btConvexHullShape_optimizeConvexHull(btConvexHullShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.cpp new file mode 100644 index 0000000..580fdd2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.cpp @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexInternalShape_wrap.h" + +void btConvexInternalShape_getImplicitShapeDimensions(btConvexInternalShape* obj, + btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getImplicitShapeDimensions()); +} + +void btConvexInternalShape_getLocalScalingNV(btConvexInternalShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLocalScalingNV()); +} + +btScalar btConvexInternalShape_getMarginNV(btConvexInternalShape* obj) +{ + return obj->getMarginNV(); +} + +void btConvexInternalShape_setImplicitShapeDimensions(btConvexInternalShape* obj, + const btVector3* dimensions) +{ + BTVECTOR3_IN(dimensions); + obj->setImplicitShapeDimensions(BTVECTOR3_USE(dimensions)); +} + +void btConvexInternalShape_setSafeMargin(btConvexInternalShape* obj, btScalar minDimension, + btScalar defaultMarginMultiplier) +{ + obj->setSafeMargin(minDimension, defaultMarginMultiplier); +} + +void btConvexInternalShape_setSafeMargin2(btConvexInternalShape* obj, const btVector3* halfExtents, + btScalar defaultMarginMultiplier) +{ + BTVECTOR3_IN(halfExtents); + obj->setSafeMargin(BTVECTOR3_USE(halfExtents), defaultMarginMultiplier); +} + + +void btConvexInternalAabbCachingShape_recalcLocalAabb(btConvexInternalAabbCachingShape* obj) +{ + obj->recalcLocalAabb(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.h new file mode 100644 index 0000000..2a7f47e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexInternalShape_wrap.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btConvexInternalShape_getImplicitShapeDimensions(btConvexInternalShape* obj, btVector3* value); + EXPORT void btConvexInternalShape_getLocalScalingNV(btConvexInternalShape* obj, btVector3* value); + EXPORT btScalar btConvexInternalShape_getMarginNV(btConvexInternalShape* obj); + EXPORT void btConvexInternalShape_setImplicitShapeDimensions(btConvexInternalShape* obj, const btVector3* dimensions); + EXPORT void btConvexInternalShape_setSafeMargin(btConvexInternalShape* obj, btScalar minDimension, btScalar defaultMarginMultiplier); + EXPORT void btConvexInternalShape_setSafeMargin2(btConvexInternalShape* obj, const btVector3* halfExtents, btScalar defaultMarginMultiplier); + + EXPORT void btConvexInternalAabbCachingShape_recalcLocalAabb(btConvexInternalAabbCachingShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.cpp new file mode 100644 index 0000000..336a412 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btConvexPenetrationDepthSolver_wrap.h" + +bool btConvexPenetrationDepthSolver_calcPenDepth(btConvexPenetrationDepthSolver* obj, + btVoronoiSimplexSolver* simplexSolver, const btConvexShape* convexA, const btConvexShape* convexB, + const btTransform* transA, const btTransform* transB, btVector3* v, btVector3* pa, + btVector3* pb, btIDebugDraw* debugDraw) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_DEF(v); + BTVECTOR3_DEF(pa); + BTVECTOR3_DEF(pb); + bool ret = obj->calcPenDepth(*simplexSolver, convexA, convexB, BTTRANSFORM_USE(transA), + BTTRANSFORM_USE(transB), BTVECTOR3_USE(v), BTVECTOR3_USE(pa), BTVECTOR3_USE(pb), + debugDraw); + BTVECTOR3_DEF_OUT(v); + BTVECTOR3_DEF_OUT(pa); + BTVECTOR3_DEF_OUT(pb); + return ret; +} + +void btConvexPenetrationDepthSolver_delete(btConvexPenetrationDepthSolver* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.h new file mode 100644 index 0000000..a65a86a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT bool btConvexPenetrationDepthSolver_calcPenDepth(btConvexPenetrationDepthSolver* obj, btVoronoiSimplexSolver* simplexSolver, const btConvexShape* convexA, const btConvexShape* convexB, const btTransform* transA, const btTransform* transB, btVector3* v, btVector3* pa, btVector3* pb, btIDebugDraw* debugDraw); + EXPORT void btConvexPenetrationDepthSolver_delete(btConvexPenetrationDepthSolver* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..728eae8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexPlaneCollisionAlgorithm_wrap.h" + +btConvexPlaneCollisionAlgorithm_CreateFunc* btConvexPlaneCollisionAlgorithm_CreateFunc_new() +{ + return new btConvexPlaneCollisionAlgorithm::CreateFunc(); +} + +int btConvexPlaneCollisionAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold( + btConvexPlaneCollisionAlgorithm_CreateFunc* obj) +{ + return obj->m_minimumPointsPerturbationThreshold; +} + +int btConvexPlaneCollisionAlgorithm_CreateFunc_getNumPerturbationIterations(btConvexPlaneCollisionAlgorithm_CreateFunc* obj) +{ + return obj->m_numPerturbationIterations; +} + +void btConvexPlaneCollisionAlgorithm_CreateFunc_setMinimumPointsPerturbationThreshold( + btConvexPlaneCollisionAlgorithm_CreateFunc* obj, int value) +{ + obj->m_minimumPointsPerturbationThreshold = value; +} + +void btConvexPlaneCollisionAlgorithm_CreateFunc_setNumPerturbationIterations(btConvexPlaneCollisionAlgorithm_CreateFunc* obj, + int value) +{ + obj->m_numPerturbationIterations = value; +} + + +btConvexPlaneCollisionAlgorithm* btConvexPlaneCollisionAlgorithm_new(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap, bool isSwapped, int numPerturbationIterations, + int minimumPointsPerturbationThreshold) +{ + return new btConvexPlaneCollisionAlgorithm(mf, *ci, body0Wrap, body1Wrap, isSwapped, + numPerturbationIterations, minimumPointsPerturbationThreshold); +} + +void btConvexPlaneCollisionAlgorithm_collideSingleContact(btConvexPlaneCollisionAlgorithm* obj, + const btQuaternion* perturbeRot, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + const btDispatcherInfo* dispatchInfo, btManifoldResult* resultOut) +{ + BTQUATERNION_IN(perturbeRot); + obj->collideSingleContact(BTQUATERNION_USE(perturbeRot), body0Wrap, body1Wrap, + *dispatchInfo, resultOut); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..a3d45ca --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexPlaneCollisionAlgorithm_CreateFunc* btConvexPlaneCollisionAlgorithm_CreateFunc_new(); + EXPORT int btConvexPlaneCollisionAlgorithm_CreateFunc_getMinimumPointsPerturbationThreshold(btConvexPlaneCollisionAlgorithm_CreateFunc* obj); + EXPORT int btConvexPlaneCollisionAlgorithm_CreateFunc_getNumPerturbationIterations(btConvexPlaneCollisionAlgorithm_CreateFunc* obj); + EXPORT void btConvexPlaneCollisionAlgorithm_CreateFunc_setMinimumPointsPerturbationThreshold(btConvexPlaneCollisionAlgorithm_CreateFunc* obj, int value); + EXPORT void btConvexPlaneCollisionAlgorithm_CreateFunc_setNumPerturbationIterations(btConvexPlaneCollisionAlgorithm_CreateFunc* obj, int value); + + EXPORT btConvexPlaneCollisionAlgorithm* btConvexPlaneCollisionAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped, int numPerturbationIterations, int minimumPointsPerturbationThreshold); + EXPORT void btConvexPlaneCollisionAlgorithm_collideSingleContact(btConvexPlaneCollisionAlgorithm* obj, const btQuaternion* perturbeRot, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, const btDispatcherInfo* dispatchInfo, btManifoldResult* resultOut); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.cpp new file mode 100644 index 0000000..6751adc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.cpp @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexPointCloudShape_wrap.h" + +btConvexPointCloudShape* btConvexPointCloudShape_new() +{ + return new btConvexPointCloudShape(); +} + +btConvexPointCloudShape* btConvexPointCloudShape_new2(btVector3* points, int numPoints, + const btVector3* localScaling, bool computeAabb) +{ + BTVECTOR3_IN(localScaling); + return new btConvexPointCloudShape(points, numPoints, BTVECTOR3_USE(localScaling), + computeAabb); +} + +int btConvexPointCloudShape_getNumPoints(btConvexPointCloudShape* obj) +{ + return obj->getNumPoints(); +} + +void btConvexPointCloudShape_getScaledPoint(btConvexPointCloudShape* obj, int index, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getScaledPoint(index); + BTVECTOR3_SET(value, temp); +} + +btVector3* btConvexPointCloudShape_getUnscaledPoints(btConvexPointCloudShape* obj) +{ + return obj->getUnscaledPoints(); +} + +void btConvexPointCloudShape_setPoints(btConvexPointCloudShape* obj, btVector3* points, + int numPoints) +{ + obj->setPoints(points, numPoints); +} + +void btConvexPointCloudShape_setPoints(btConvexPointCloudShape* obj, btVector3* points, + int numPoints, bool computeAabb) +{ + obj->setPoints(points, numPoints, computeAabb); +} + +void btConvexPointCloudShape_setPoints2(btConvexPointCloudShape* obj, btVector3* points, + int numPoints, bool computeAabb, const btVector3* localScaling) +{ + BTVECTOR3_IN(localScaling); + obj->setPoints(points, numPoints, computeAabb, BTVECTOR3_USE(localScaling)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.h new file mode 100644 index 0000000..2597681 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexPointCloudShape* btConvexPointCloudShape_new(); + EXPORT btConvexPointCloudShape* btConvexPointCloudShape_new2(btVector3* points, int numPoints, const btVector3* localScaling, bool computeAabb); + EXPORT int btConvexPointCloudShape_getNumPoints(btConvexPointCloudShape* obj); + EXPORT void btConvexPointCloudShape_getScaledPoint(btConvexPointCloudShape* obj, int index, btVector3* value); + EXPORT btVector3* btConvexPointCloudShape_getUnscaledPoints(btConvexPointCloudShape* obj); + EXPORT void btConvexPointCloudShape_setPoints(btConvexPointCloudShape* obj, btVector3* points, int numPoints, bool computeAabb); + EXPORT void btConvexPointCloudShape_setPoints2(btConvexPointCloudShape* obj, btVector3* points, int numPoints, bool computeAabb, const btVector3* localScaling); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.cpp new file mode 100644 index 0000000..ebf49ee --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.cpp @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexPolyhedron_wrap.h" + +btFace* btFace_new() +{ + return new btFace(); +} + +btAlignedObjectArray_int* btFace_getIndices(btFace* obj) +{ + return &obj->m_indices; +} + +btScalar* btFace_getPlane(btFace* obj) +{ + return obj->m_plane; +} + +void btFace_delete(btFace* obj) +{ + delete obj; +} + + +btConvexPolyhedron* btConvexPolyhedron_new() +{ + return new btConvexPolyhedron(); +} + +void btConvexPolyhedron_getExtents(btConvexPolyhedron* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_extents); +} + +btAlignedObjectArray_btFace* btConvexPolyhedron_getFaces(btConvexPolyhedron* obj) +{ + return &obj->m_faces; +} + +void btConvexPolyhedron_getLocalCenter(btConvexPolyhedron* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_localCenter); +} + +void btConvexPolyhedron_getMC(btConvexPolyhedron* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->mC); +} + +void btConvexPolyhedron_getME(btConvexPolyhedron* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->mE); +} + +btScalar btConvexPolyhedron_getRadius(btConvexPolyhedron* obj) +{ + return obj->m_radius; +} + +btAlignedObjectArray_btVector3* btConvexPolyhedron_getUniqueEdges(btConvexPolyhedron* obj) +{ + return &obj->m_uniqueEdges; +} + +btAlignedObjectArray_btVector3* btConvexPolyhedron_getVertices(btConvexPolyhedron* obj) +{ + return &obj->m_vertices; +} + +void btConvexPolyhedron_initialize(btConvexPolyhedron* obj) +{ + obj->initialize(); +} + +void btConvexPolyhedron_initialize2(btConvexPolyhedron* obj) +{ + obj->initialize2(); +} + +void btConvexPolyhedron_project(btConvexPolyhedron* obj, const btTransform* trans, + const btVector3* dir, btScalar* minProj, btScalar* maxProj, btVector3* witnesPtMin, + btVector3* witnesPtMax) +{ + BTTRANSFORM_IN(trans); + BTVECTOR3_IN(dir); + BTVECTOR3_DEF(witnesPtMin); + BTVECTOR3_DEF(witnesPtMax); + obj->project(BTTRANSFORM_USE(trans), BTVECTOR3_USE(dir), *minProj, *maxProj, + BTVECTOR3_USE(witnesPtMin), BTVECTOR3_USE(witnesPtMax)); + BTVECTOR3_DEF_OUT(witnesPtMin); + BTVECTOR3_DEF_OUT(witnesPtMax); +} + +void btConvexPolyhedron_setExtents(btConvexPolyhedron* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_extents, value); +} + +void btConvexPolyhedron_setLocalCenter(btConvexPolyhedron* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_localCenter, value); +} + +void btConvexPolyhedron_setMC(btConvexPolyhedron* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->mC, value); +} + +void btConvexPolyhedron_setME(btConvexPolyhedron* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->mE, value); +} + +void btConvexPolyhedron_setRadius(btConvexPolyhedron* obj, btScalar value) +{ + obj->m_radius = value; +} + +bool btConvexPolyhedron_testContainment(btConvexPolyhedron* obj) +{ + return obj->testContainment(); +} + +void btConvexPolyhedron_delete(btConvexPolyhedron* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.h new file mode 100644 index 0000000..933aab0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexPolyhedron_wrap.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btFace* btFace_new(); + EXPORT btAlignedObjectArray_int* btFace_getIndices(btFace* obj); + EXPORT btScalar* btFace_getPlane(btFace* obj); + EXPORT void btFace_delete(btFace* obj); + + EXPORT btConvexPolyhedron* btConvexPolyhedron_new(); + EXPORT void btConvexPolyhedron_getExtents(btConvexPolyhedron* obj, btVector3* value); + EXPORT btAlignedObjectArray_btFace* btConvexPolyhedron_getFaces(btConvexPolyhedron* obj); + EXPORT void btConvexPolyhedron_getLocalCenter(btConvexPolyhedron* obj, btVector3* value); + EXPORT void btConvexPolyhedron_getMC(btConvexPolyhedron* obj, btVector3* value); + EXPORT void btConvexPolyhedron_getME(btConvexPolyhedron* obj, btVector3* value); + EXPORT btScalar btConvexPolyhedron_getRadius(btConvexPolyhedron* obj); + EXPORT btAlignedObjectArray_btVector3* btConvexPolyhedron_getUniqueEdges(btConvexPolyhedron* obj); + EXPORT btAlignedObjectArray_btVector3* btConvexPolyhedron_getVertices(btConvexPolyhedron* obj); + EXPORT void btConvexPolyhedron_initialize(btConvexPolyhedron* obj); + EXPORT void btConvexPolyhedron_initialize2(btConvexPolyhedron* obj); + EXPORT void btConvexPolyhedron_project(btConvexPolyhedron* obj, const btTransform* trans, const btVector3* dir, btScalar* minProj, btScalar* maxProj, btVector3* witnesPtMin, btVector3* witnesPtMax); + EXPORT void btConvexPolyhedron_setExtents(btConvexPolyhedron* obj, const btVector3* value); + EXPORT void btConvexPolyhedron_setLocalCenter(btConvexPolyhedron* obj, const btVector3* value); + EXPORT void btConvexPolyhedron_setMC(btConvexPolyhedron* obj, const btVector3* value); + EXPORT void btConvexPolyhedron_setME(btConvexPolyhedron* obj, const btVector3* value); + EXPORT void btConvexPolyhedron_setRadius(btConvexPolyhedron* obj, btScalar value); + EXPORT bool btConvexPolyhedron_testContainment(btConvexPolyhedron* obj); + EXPORT void btConvexPolyhedron_delete(btConvexPolyhedron* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.cpp new file mode 100644 index 0000000..c8e3d82 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.cpp @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btConvexShape_wrap.h" + +void btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin(btConvexShape* obj, + const btVector3* vectors, btVector3* supportVerticesOut, int numVectors) +{ + obj->batchedUnitVectorGetSupportingVertexWithoutMargin(vectors, supportVerticesOut, + numVectors); +} + +void btConvexShape_getAabbNonVirtual(btConvexShape* obj, const btTransform* t, btVector3* aabbMin, + btVector3* aabbMax) +{ + BTTRANSFORM_IN(t); + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getAabbNonVirtual(BTTRANSFORM_USE(t), BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +void btConvexShape_getAabbSlow(btConvexShape* obj, const btTransform* t, btVector3* aabbMin, + btVector3* aabbMax) +{ + BTTRANSFORM_IN(t); + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getAabbSlow(BTTRANSFORM_USE(t), BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +btScalar btConvexShape_getMarginNonVirtual(btConvexShape* obj) +{ + return obj->getMarginNonVirtual(); +} + +int btConvexShape_getNumPreferredPenetrationDirections(btConvexShape* obj) +{ + return obj->getNumPreferredPenetrationDirections(); +} + +void btConvexShape_getPreferredPenetrationDirection(btConvexShape* obj, int index, + btVector3* penetrationVector) +{ + BTVECTOR3_DEF(penetrationVector); + obj->getPreferredPenetrationDirection(index, BTVECTOR3_USE(penetrationVector)); + BTVECTOR3_DEF_OUT(penetrationVector); +} + +void btConvexShape_localGetSupportingVertex(btConvexShape* obj, const btVector3* vec, + btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localGetSupportingVertex(BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btConvexShape_localGetSupportingVertexWithoutMargin(btConvexShape* obj, const btVector3* vec, + btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localGetSupportingVertexWithoutMargin(BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btConvexShape_localGetSupportVertexNonVirtual(btConvexShape* obj, const btVector3* vec, + btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localGetSupportVertexNonVirtual(BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btConvexShape_localGetSupportVertexWithoutMarginNonVirtual(btConvexShape* obj, + const btVector3* vec, btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localGetSupportVertexWithoutMarginNonVirtual(BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btConvexShape_project(btConvexShape* obj, const btTransform* trans, const btVector3* dir, + btScalar* minProj, btScalar* maxProj, btVector3* witnesPtMin, btVector3* witnesPtMax) +{ + BTTRANSFORM_IN(trans); + BTVECTOR3_IN(dir); + BTVECTOR3_DEF(witnesPtMin); + BTVECTOR3_DEF(witnesPtMax); + obj->project(BTTRANSFORM_USE(trans), BTVECTOR3_USE(dir), *minProj, *maxProj, + BTVECTOR3_USE(witnesPtMin), BTVECTOR3_USE(witnesPtMax)); + BTVECTOR3_DEF_OUT(witnesPtMin); + BTVECTOR3_DEF_OUT(witnesPtMax); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.h new file mode 100644 index 0000000..24bab60 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexShape_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin(btConvexShape* obj, const btVector3* vectors, btVector3* supportVerticesOut, int numVectors); + EXPORT void btConvexShape_getAabbNonVirtual(btConvexShape* obj, const btTransform* t, btVector3* aabbMin, btVector3* aabbMax); + EXPORT void btConvexShape_getAabbSlow(btConvexShape* obj, const btTransform* t, btVector3* aabbMin, btVector3* aabbMax); + EXPORT btScalar btConvexShape_getMarginNonVirtual(btConvexShape* obj); + EXPORT int btConvexShape_getNumPreferredPenetrationDirections(btConvexShape* obj); + EXPORT void btConvexShape_getPreferredPenetrationDirection(btConvexShape* obj, int index, btVector3* penetrationVector); + EXPORT void btConvexShape_localGetSupportingVertex(btConvexShape* obj, const btVector3* vec, btVector3* value); + EXPORT void btConvexShape_localGetSupportingVertexWithoutMargin(btConvexShape* obj, const btVector3* vec, btVector3* value); + EXPORT void btConvexShape_localGetSupportVertexNonVirtual(btConvexShape* obj, const btVector3* vec, btVector3* value); + EXPORT void btConvexShape_localGetSupportVertexWithoutMarginNonVirtual(btConvexShape* obj, const btVector3* vec, btVector3* value); + EXPORT void btConvexShape_project(btConvexShape* obj, const btTransform* trans, const btVector3* dir, btScalar* minProj, btScalar* maxProj, btVector3* witnesPtMin, btVector3* witnesPtMax); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.cpp new file mode 100644 index 0000000..620aec8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btConvexTriangleMeshShape_wrap.h" + +btConvexTriangleMeshShape* btConvexTriangleMeshShape_new(btStridingMeshInterface* meshInterface, + bool calcAabb) +{ + return new btConvexTriangleMeshShape(meshInterface, calcAabb); +} + +void btConvexTriangleMeshShape_calculatePrincipalAxisTransform(btConvexTriangleMeshShape* obj, + btTransform* principal, btVector3* inertia, btScalar* volume) +{ + BTTRANSFORM_IN(principal); + BTVECTOR3_DEF(inertia); + obj->calculatePrincipalAxisTransform(BTTRANSFORM_USE(principal), BTVECTOR3_USE(inertia), + *volume); + BTTRANSFORM_DEF_OUT(principal); + BTVECTOR3_DEF_OUT(inertia); +} + +btStridingMeshInterface* btConvexTriangleMeshShape_getMeshInterface(btConvexTriangleMeshShape* obj) +{ + return obj->getMeshInterface(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.h new file mode 100644 index 0000000..d55e2b1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConvexTriangleMeshShape* btConvexTriangleMeshShape_new(btStridingMeshInterface* meshInterface, bool calcAabb); + EXPORT void btConvexTriangleMeshShape_calculatePrincipalAxisTransform(btConvexTriangleMeshShape* obj, btTransform* principal, btVector3* inertia, btScalar* volume); + EXPORT btStridingMeshInterface* btConvexTriangleMeshShape_getMeshInterface(btConvexTriangleMeshShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.cpp new file mode 100644 index 0000000..54e35f5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include // USE_SIMD +#include + +#include "btCpuFeatureUtility_wrap.h" + +int btCpuFeatureUtility_getCpuFeatures() +{ + return btCpuFeatureUtility::getCpuFeatures(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.h new file mode 100644 index 0000000..b3c052b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT int btCpuFeatureUtility_getCpuFeatures(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.cpp new file mode 100644 index 0000000..bb3b9b8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btCylinderShape_wrap.h" + +btCylinderShape* btCylinderShape_new(const btVector3* halfExtents) +{ + BTVECTOR3_IN(halfExtents); + return new btCylinderShape(BTVECTOR3_USE(halfExtents)); +} + +btCylinderShape* btCylinderShape_new2(btScalar halfExtentX, btScalar halfExtentY, btScalar halfExtentZ) +{ + return new btCylinderShape(btVector3(halfExtentX, halfExtentY, halfExtentZ)); +} + +void btCylinderShape_getHalfExtentsWithMargin(btCylinderShape* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getHalfExtentsWithMargin(); + BTVECTOR3_SET(value, temp); +} + +void btCylinderShape_getHalfExtentsWithoutMargin(btCylinderShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getHalfExtentsWithoutMargin()); +} + +btScalar btCylinderShape_getRadius(btCylinderShape* obj) +{ + return obj->getRadius(); +} + +int btCylinderShape_getUpAxis(btCylinderShape* obj) +{ + return obj->getUpAxis(); +} + + +btCylinderShapeX* btCylinderShapeX_new(const btVector3* halfExtents) +{ + BTVECTOR3_IN(halfExtents); + return new btCylinderShapeX(BTVECTOR3_USE(halfExtents)); +} + +btCylinderShapeX* btCylinderShapeX_new2(btScalar halfExtentX, btScalar halfExtentY, btScalar halfExtentZ) +{ + return new btCylinderShapeX(btVector3(halfExtentX, halfExtentY, halfExtentZ)); +} + + +btCylinderShapeZ* btCylinderShapeZ_new(const btVector3* halfExtents) +{ + BTVECTOR3_IN(halfExtents); + return new btCylinderShapeZ(BTVECTOR3_USE(halfExtents)); +} + +btCylinderShapeZ* btCylinderShapeZ_new2(btScalar halfExtentX, btScalar halfExtentY, btScalar halfExtentZ) +{ + return new btCylinderShapeZ(btVector3(halfExtentX, halfExtentY, halfExtentZ)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.h new file mode 100644 index 0000000..9b648f3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btCylinderShape_wrap.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCylinderShape* btCylinderShape_new(const btVector3* halfExtents); + EXPORT btCylinderShape* btCylinderShape_new2(btScalar halfExtentX, btScalar halfExtentY, btScalar halfExtentZ); + EXPORT void btCylinderShape_getHalfExtentsWithMargin(btCylinderShape* obj, btVector3* value); + EXPORT void btCylinderShape_getHalfExtentsWithoutMargin(btCylinderShape* obj, btVector3* value); + EXPORT btScalar btCylinderShape_getRadius(btCylinderShape* obj); + EXPORT int btCylinderShape_getUpAxis(btCylinderShape* obj); + + EXPORT btCylinderShapeX* btCylinderShapeX_new(const btVector3* halfExtents); + EXPORT btCylinderShapeX* btCylinderShapeX_new2(btScalar halfExtentX, btScalar halfExtentY, btScalar halfExtentZ); + + EXPORT btCylinderShapeZ* btCylinderShapeZ_new(const btVector3* halfExtents); + EXPORT btCylinderShapeZ* btCylinderShapeZ_new2(btScalar halfExtentX, btScalar halfExtentY, btScalar halfExtentZ); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.cpp new file mode 100644 index 0000000..7c51ee8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btDantzigSolver_wrap.h" + +btDantzigSolver* btDantzigSolver_new() +{ + return new btDantzigSolver(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.h new file mode 100644 index 0000000..fa66e5a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDantzigSolver_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDantzigSolver* btDantzigSolver_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.cpp new file mode 100644 index 0000000..40ee6b3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.cpp @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btDbvtBroadphase_wrap.h" + +btDbvtNode* btDbvtProxy_getLeaf(btDbvtProxy* obj) +{ + return obj->leaf; +} + +btDbvtProxy** btDbvtProxy_getLinks(btDbvtProxy* obj) +{ + return obj->links; +} + +int btDbvtProxy_getStage(btDbvtProxy* obj) +{ + return obj->stage; +} + +void btDbvtProxy_setLeaf(btDbvtProxy* obj, btDbvtNode* value) +{ + obj->leaf = value; +} + +void btDbvtProxy_setStage(btDbvtProxy* obj, int value) +{ + obj->stage = value; +} + + +btDbvtBroadphase* btDbvtBroadphase_new(btOverlappingPairCache* paircache) +{ + return new btDbvtBroadphase(paircache); +} + +void btDbvtBroadphase_benchmark(btBroadphaseInterface* __unnamed0) +{ + btDbvtBroadphase::benchmark(__unnamed0); +} + +void btDbvtBroadphase_collide(btDbvtBroadphase* obj, btDispatcher* dispatcher) +{ + obj->collide(dispatcher); +} + +int btDbvtBroadphase_getCid(btDbvtBroadphase* obj) +{ + return obj->m_cid; +} + +int btDbvtBroadphase_getCupdates(btDbvtBroadphase* obj) +{ + return obj->m_cupdates; +} + +bool btDbvtBroadphase_getDeferedcollide(btDbvtBroadphase* obj) +{ + return obj->m_deferedcollide; +} + +int btDbvtBroadphase_getDupdates(btDbvtBroadphase* obj) +{ + return obj->m_dupdates; +} + +int btDbvtBroadphase_getFixedleft(btDbvtBroadphase* obj) +{ + return obj->m_fixedleft; +} + +int btDbvtBroadphase_getFupdates(btDbvtBroadphase* obj) +{ + return obj->m_fupdates; +} + +int btDbvtBroadphase_getGid(btDbvtBroadphase* obj) +{ + return obj->m_gid; +} + +bool btDbvtBroadphase_getNeedcleanup(btDbvtBroadphase* obj) +{ + return obj->m_needcleanup; +} + +int btDbvtBroadphase_getNewpairs(btDbvtBroadphase* obj) +{ + return obj->m_newpairs; +} + +btOverlappingPairCache* btDbvtBroadphase_getPaircache(btDbvtBroadphase* obj) +{ + return obj->m_paircache; +} + +int btDbvtBroadphase_getPid(btDbvtBroadphase* obj) +{ + return obj->m_pid; +} + +btScalar btDbvtBroadphase_getPrediction(btDbvtBroadphase* obj) +{ + return obj->m_prediction; +} + +bool btDbvtBroadphase_getReleasepaircache(btDbvtBroadphase* obj) +{ + return obj->m_releasepaircache; +} + +btDbvt* btDbvtBroadphase_getSets(btDbvtBroadphase* obj) +{ + return obj->m_sets; +} + +int btDbvtBroadphase_getStageCurrent(btDbvtBroadphase* obj) +{ + return obj->m_stageCurrent; +} + +btDbvtProxy** btDbvtBroadphase_getStageRoots(btDbvtBroadphase* obj) +{ + return obj->m_stageRoots; +} + +unsigned int btDbvtBroadphase_getUpdates_call(btDbvtBroadphase* obj) +{ + return obj->m_updates_call; +} + +unsigned int btDbvtBroadphase_getUpdates_done(btDbvtBroadphase* obj) +{ + return obj->m_updates_done; +} + +btScalar btDbvtBroadphase_getUpdates_ratio(btDbvtBroadphase* obj) +{ + return obj->m_updates_ratio; +} + +btScalar btDbvtBroadphase_getVelocityPrediction(btDbvtBroadphase* obj) +{ + return obj->getVelocityPrediction(); +} + +void btDbvtBroadphase_optimize(btDbvtBroadphase* obj) +{ + obj->optimize(); +} + +void btDbvtBroadphase_performDeferredRemoval(btDbvtBroadphase* obj, btDispatcher* dispatcher) +{ + obj->performDeferredRemoval(dispatcher); +} + +void btDbvtBroadphase_setAabbForceUpdate(btDbvtBroadphase* obj, btBroadphaseProxy* absproxy, + const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* __unnamed3) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->setAabbForceUpdate(absproxy, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), + __unnamed3); +} + +void btDbvtBroadphase_setCid(btDbvtBroadphase* obj, int value) +{ + obj->m_cid = value; +} + +void btDbvtBroadphase_setCupdates(btDbvtBroadphase* obj, int value) +{ + obj->m_cupdates = value; +} + +void btDbvtBroadphase_setDeferedcollide(btDbvtBroadphase* obj, bool value) +{ + obj->m_deferedcollide = value; +} + +void btDbvtBroadphase_setDupdates(btDbvtBroadphase* obj, int value) +{ + obj->m_dupdates = value; +} + +void btDbvtBroadphase_setFixedleft(btDbvtBroadphase* obj, int value) +{ + obj->m_fixedleft = value; +} + +void btDbvtBroadphase_setFupdates(btDbvtBroadphase* obj, int value) +{ + obj->m_fupdates = value; +} + +void btDbvtBroadphase_setGid(btDbvtBroadphase* obj, int value) +{ + obj->m_gid = value; +} + +void btDbvtBroadphase_setNeedcleanup(btDbvtBroadphase* obj, bool value) +{ + obj->m_needcleanup = value; +} + +void btDbvtBroadphase_setNewpairs(btDbvtBroadphase* obj, int value) +{ + obj->m_newpairs = value; +} + +void btDbvtBroadphase_setPaircache(btDbvtBroadphase* obj, btOverlappingPairCache* value) +{ + obj->m_paircache = value; +} + +void btDbvtBroadphase_setPid(btDbvtBroadphase* obj, int value) +{ + obj->m_pid = value; +} + +void btDbvtBroadphase_setPrediction(btDbvtBroadphase* obj, btScalar value) +{ + obj->m_prediction = value; +} + +void btDbvtBroadphase_setReleasepaircache(btDbvtBroadphase* obj, bool value) +{ + obj->m_releasepaircache = value; +} + +void btDbvtBroadphase_setStageCurrent(btDbvtBroadphase* obj, int value) +{ + obj->m_stageCurrent = value; +} + +void btDbvtBroadphase_setUpdates_call(btDbvtBroadphase* obj, unsigned int value) +{ + obj->m_updates_call = value; +} + +void btDbvtBroadphase_setUpdates_done(btDbvtBroadphase* obj, unsigned int value) +{ + obj->m_updates_done = value; +} + +void btDbvtBroadphase_setUpdates_ratio(btDbvtBroadphase* obj, btScalar value) +{ + obj->m_updates_ratio = value; +} + +void btDbvtBroadphase_setVelocityPrediction(btDbvtBroadphase* obj, btScalar prediction) +{ + obj->setVelocityPrediction(prediction); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.h new file mode 100644 index 0000000..a83c6d6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDbvtBroadphase_wrap.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDbvtNode* btDbvtProxy_getLeaf(btDbvtProxy* obj); + EXPORT btDbvtProxy** btDbvtProxy_getLinks(btDbvtProxy* obj); + EXPORT int btDbvtProxy_getStage(btDbvtProxy* obj); + EXPORT void btDbvtProxy_setLeaf(btDbvtProxy* obj, btDbvtNode* value); + EXPORT void btDbvtProxy_setStage(btDbvtProxy* obj, int value); + + EXPORT btDbvtBroadphase* btDbvtBroadphase_new(btOverlappingPairCache* paircache); + EXPORT void btDbvtBroadphase_benchmark(btBroadphaseInterface* __unnamed0); + EXPORT void btDbvtBroadphase_collide(btDbvtBroadphase* obj, btDispatcher* dispatcher); + EXPORT int btDbvtBroadphase_getCid(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getCupdates(btDbvtBroadphase* obj); + EXPORT bool btDbvtBroadphase_getDeferedcollide(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getDupdates(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getFixedleft(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getFupdates(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getGid(btDbvtBroadphase* obj); + EXPORT bool btDbvtBroadphase_getNeedcleanup(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getNewpairs(btDbvtBroadphase* obj); + EXPORT btOverlappingPairCache* btDbvtBroadphase_getPaircache(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getPid(btDbvtBroadphase* obj); + EXPORT btScalar btDbvtBroadphase_getPrediction(btDbvtBroadphase* obj); + EXPORT bool btDbvtBroadphase_getReleasepaircache(btDbvtBroadphase* obj); + EXPORT btDbvt* btDbvtBroadphase_getSets(btDbvtBroadphase* obj); + EXPORT int btDbvtBroadphase_getStageCurrent(btDbvtBroadphase* obj); + EXPORT btDbvtProxy** btDbvtBroadphase_getStageRoots(btDbvtBroadphase* obj); + EXPORT unsigned int btDbvtBroadphase_getUpdates_call(btDbvtBroadphase* obj); + EXPORT unsigned int btDbvtBroadphase_getUpdates_done(btDbvtBroadphase* obj); + EXPORT btScalar btDbvtBroadphase_getUpdates_ratio(btDbvtBroadphase* obj); + EXPORT btScalar btDbvtBroadphase_getVelocityPrediction(btDbvtBroadphase* obj); + EXPORT void btDbvtBroadphase_optimize(btDbvtBroadphase* obj); + EXPORT void btDbvtBroadphase_performDeferredRemoval(btDbvtBroadphase* obj, btDispatcher* dispatcher); + EXPORT void btDbvtBroadphase_setAabbForceUpdate(btDbvtBroadphase* obj, btBroadphaseProxy* absproxy, const btVector3* aabbMin, const btVector3* aabbMax, btDispatcher* __unnamed3); + EXPORT void btDbvtBroadphase_setCid(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setCupdates(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setDeferedcollide(btDbvtBroadphase* obj, bool value); + EXPORT void btDbvtBroadphase_setDupdates(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setFixedleft(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setFupdates(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setGid(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setNeedcleanup(btDbvtBroadphase* obj, bool value); + EXPORT void btDbvtBroadphase_setNewpairs(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setPaircache(btDbvtBroadphase* obj, btOverlappingPairCache* value); + EXPORT void btDbvtBroadphase_setPid(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setPrediction(btDbvtBroadphase* obj, btScalar value); + EXPORT void btDbvtBroadphase_setReleasepaircache(btDbvtBroadphase* obj, bool value); + EXPORT void btDbvtBroadphase_setStageCurrent(btDbvtBroadphase* obj, int value); + EXPORT void btDbvtBroadphase_setUpdates_call(btDbvtBroadphase* obj, unsigned int value); + EXPORT void btDbvtBroadphase_setUpdates_done(btDbvtBroadphase* obj, unsigned int value); + EXPORT void btDbvtBroadphase_setUpdates_ratio(btDbvtBroadphase* obj, btScalar value); + EXPORT void btDbvtBroadphase_setVelocityPrediction(btDbvtBroadphase* obj, btScalar prediction); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.cpp new file mode 100644 index 0000000..21dd6bf --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.cpp @@ -0,0 +1,702 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btDbvt_wrap.h" + +btDbvtAabbMm* btDbvtAabbMm_new() +{ + return new btDbvtAabbMm(); +} + +void btDbvtAabbMm_Center(btDbvtAabbMm* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->Center(); + BTVECTOR3_SET(value, temp); +} + +int btDbvtAabbMm_Classify(btDbvtAabbMm* obj, const btVector3* n, btScalar o, int s) +{ + BTVECTOR3_IN(n); + return obj->Classify(BTVECTOR3_USE(n), o, s); +} + +bool btDbvtAabbMm_Contain(btDbvtAabbMm* obj, const btDbvtAabbMm* a) +{ + return obj->Contain(*a); +} + +void btDbvtAabbMm_Expand(btDbvtAabbMm* obj, const btVector3* e) +{ + BTVECTOR3_IN(e); + obj->Expand(BTVECTOR3_USE(e)); +} + +void btDbvtAabbMm_Extents(btDbvtAabbMm* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->Extents(); + BTVECTOR3_SET(value, temp); +} + +btDbvtAabbMm* btDbvtAabbMm_FromCE(const btVector3* c, const btVector3* e) +{ + btDbvtAabbMm* ret = new btDbvtAabbMm; + BTVECTOR3_IN(c); + BTVECTOR3_IN(e); + *ret = btDbvtAabbMm::FromCE(BTVECTOR3_USE(c), BTVECTOR3_USE(e)); + return ret; +} + +btDbvtAabbMm* btDbvtAabbMm_FromCR(const btVector3* c, btScalar r) +{ + btDbvtAabbMm* ret = new btDbvtAabbMm; + BTVECTOR3_IN(c); + *ret = btDbvtAabbMm::FromCR(BTVECTOR3_USE(c), r); + return ret; +} + +btDbvtAabbMm* btDbvtAabbMm_FromMM(const btVector3* mi, const btVector3* mx) +{ + btDbvtAabbMm* ret = new btDbvtAabbMm; + BTVECTOR3_IN(mi); + BTVECTOR3_IN(mx); + *ret = btDbvtAabbMm::FromMM(BTVECTOR3_USE(mi), BTVECTOR3_USE(mx)); + return ret; +} + +btDbvtAabbMm* btDbvtAabbMm_FromPoints(const btVector3** ppts, int n) +{ + btDbvtAabbMm* ret = new btDbvtAabbMm; + *ret = btDbvtAabbMm::FromPoints(ppts, n); + return ret; +} + +btDbvtAabbMm* btDbvtAabbMm_FromPoints2(const btVector3* pts, int n) +{ + btDbvtAabbMm* ret = new btDbvtAabbMm; + *ret = btDbvtAabbMm::FromPoints(pts, n); + return ret; +} + +void btDbvtAabbMm_Lengths(btDbvtAabbMm* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->Lengths(); + BTVECTOR3_SET(value, temp); +} + +void btDbvtAabbMm_Maxs(btDbvtAabbMm* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->Maxs()); +} + +void btDbvtAabbMm_Mins(btDbvtAabbMm* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->Mins()); +} + +btScalar btDbvtAabbMm_ProjectMinimum(btDbvtAabbMm* obj, const btVector3* v, unsigned int signs) +{ + BTVECTOR3_IN(v); + return obj->ProjectMinimum(BTVECTOR3_USE(v), signs); +} + +void btDbvtAabbMm_SignedExpand(btDbvtAabbMm* obj, const btVector3* e) +{ + BTVECTOR3_IN(e); + obj->SignedExpand(BTVECTOR3_USE(e)); +} + +void btDbvtAabbMm_tMaxs(btDbvtAabbMm* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->tMaxs()); +} + +void btDbvtAabbMm_tMins(btDbvtAabbMm* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->tMins()); +} + +void btDbvtAabbMm_delete(btDbvtAabbMm* obj) +{ + delete obj; +} + + +btDbvtNode* btDbvtNode_new() +{ + return new btDbvtNode(); +} + +btDbvtNode** btDbvtNode_getChilds(btDbvtNode* obj) +{ + return obj->childs; +} + +void* btDbvtNode_getData(btDbvtNode* obj) +{ + return obj->data; +} + +int btDbvtNode_getDataAsInt(btDbvtNode* obj) +{ + return obj->dataAsInt; +} + +btDbvtNode* btDbvtNode_getParent(btDbvtNode* obj) +{ + return obj->parent; +} + +btDbvtVolume* btDbvtNode_getVolume(btDbvtNode* obj) +{ + return &obj->volume; +} + +bool btDbvtNode_isinternal(btDbvtNode* obj) +{ + return obj->isinternal(); +} + +bool btDbvtNode_isleaf(btDbvtNode* obj) +{ + return obj->isleaf(); +} + +void btDbvtNode_setData(btDbvtNode* obj, void* value) +{ + obj->data = value; +} + +void btDbvtNode_setDataAsInt(btDbvtNode* obj, int value) +{ + obj->dataAsInt = value; +} + +void btDbvtNode_setParent(btDbvtNode* obj, btDbvtNode* value) +{ + obj->parent = value; +} + +void btDbvtNode_delete(btDbvtNode* obj) +{ + delete obj; +} + + +btDbvt_IClone* btDbvt_IClone_new() +{ + return new btDbvt::IClone(); +} + +void btDbvt_IClone_CloneLeaf(btDbvt_IClone* obj, btDbvtNode* __unnamed0) +{ + obj->CloneLeaf(__unnamed0); +} + +void btDbvt_IClone_delete(btDbvt_IClone* obj) +{ + delete obj; +} + + +btDbvt_ICollide* btDbvt_ICollide_new() +{ + return new btDbvt::ICollide(); +} + +bool btDbvt_ICollide_AllLeaves(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0) +{ + return obj->AllLeaves(__unnamed0); +} + +bool btDbvt_ICollide_Descent(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0) +{ + return obj->Descent(__unnamed0); +} + +void btDbvt_ICollide_Process(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0, + const btDbvtNode* __unnamed1) +{ + obj->Process(__unnamed0, __unnamed1); +} + +void btDbvt_ICollide_Process2(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0) +{ + obj->Process(__unnamed0); +} + +void btDbvt_ICollide_Process3(btDbvt_ICollide* obj, const btDbvtNode* n, btScalar __unnamed1) +{ + obj->Process(n, __unnamed1); +} + +void btDbvt_ICollide_delete(btDbvt_ICollide* obj) +{ + delete obj; +} + + +void btDbvt_IWriter_Prepare(btDbvt_IWriter* obj, const btDbvtNode* root, int numnodes) +{ + obj->Prepare(root, numnodes); +} + +void btDbvt_IWriter_WriteLeaf(btDbvt_IWriter* obj, const btDbvtNode* __unnamed0, + int index, int parent) +{ + obj->WriteLeaf(__unnamed0, index, parent); +} + +void btDbvt_IWriter_WriteNode(btDbvt_IWriter* obj, const btDbvtNode* __unnamed0, + int index, int parent, int child0, int child1) +{ + obj->WriteNode(__unnamed0, index, parent, child0, child1); +} + +void btDbvt_IWriter_delete(btDbvt_IWriter* obj) +{ + delete obj; +} + + +btDbvt_sStkCLN* btDbvt_sStkCLN_new(const btDbvtNode* n, btDbvtNode* p) +{ + return new btDbvt::sStkCLN(n, p); +} + +const btDbvtNode* btDbvt_sStkCLN_getNode(btDbvt_sStkCLN* obj) +{ + return obj->node; +} + +btDbvtNode* btDbvt_sStkCLN_getParent(btDbvt_sStkCLN* obj) +{ + return obj->parent; +} + +void btDbvt_sStkCLN_setNode(btDbvt_sStkCLN* obj, const btDbvtNode* value) +{ + obj->node = value; +} + +void btDbvt_sStkCLN_setParent(btDbvt_sStkCLN* obj, btDbvtNode* value) +{ + obj->parent = value; +} + +void btDbvt_sStkCLN_delete(btDbvt_sStkCLN* obj) +{ + delete obj; +} + + +btDbvt_sStkNN* btDbvt_sStkNN_new() +{ + return new btDbvt::sStkNN(); +} + +btDbvt_sStkNN* btDbvt_sStkNN_new2(const btDbvtNode* na, const btDbvtNode* nb) +{ + return new btDbvt::sStkNN(na, nb); +} + +const btDbvtNode* btDbvt_sStkNN_getA(btDbvt_sStkNN* obj) +{ + return obj->a; +} + +const btDbvtNode* btDbvt_sStkNN_getB(btDbvt_sStkNN* obj) +{ + return obj->b; +} + +void btDbvt_sStkNN_setA(btDbvt_sStkNN* obj, const btDbvtNode* value) +{ + obj->a = value; +} + +void btDbvt_sStkNN_setB(btDbvt_sStkNN* obj, const btDbvtNode* value) +{ + obj->b = value; +} + +void btDbvt_sStkNN_delete(btDbvt_sStkNN* obj) +{ + delete obj; +} + + +btDbvt_sStkNP* btDbvt_sStkNP_new(const btDbvtNode* n, unsigned int m) +{ + return new btDbvt::sStkNP(n, m); +} + +int btDbvt_sStkNP_getMask(btDbvt_sStkNP* obj) +{ + return obj->mask; +} + +const btDbvtNode* btDbvt_sStkNP_getNode(btDbvt_sStkNP* obj) +{ + return obj->node; +} + +void btDbvt_sStkNP_setMask(btDbvt_sStkNP* obj, int value) +{ + obj->mask = value; +} + +void btDbvt_sStkNP_setNode(btDbvt_sStkNP* obj, const btDbvtNode* value) +{ + obj->node = value; +} + +void btDbvt_sStkNP_delete(btDbvt_sStkNP* obj) +{ + delete obj; +} + + +btDbvt_sStkNPS* btDbvt_sStkNPS_new() +{ + return new btDbvt::sStkNPS(); +} + +btDbvt_sStkNPS* btDbvt_sStkNPS_new2(const btDbvtNode* n, unsigned int m, btScalar v) +{ + return new btDbvt::sStkNPS(n, m, v); +} + +int btDbvt_sStkNPS_getMask(btDbvt_sStkNPS* obj) +{ + return obj->mask; +} + +const btDbvtNode* btDbvt_sStkNPS_getNode(btDbvt_sStkNPS* obj) +{ + return obj->node; +} + +btScalar btDbvt_sStkNPS_getValue(btDbvt_sStkNPS* obj) +{ + return obj->value; +} + +void btDbvt_sStkNPS_setMask(btDbvt_sStkNPS* obj, int value) +{ + obj->mask = value; +} + +void btDbvt_sStkNPS_setNode(btDbvt_sStkNPS* obj, const btDbvtNode* value) +{ + obj->node = value; +} + +void btDbvt_sStkNPS_setValue(btDbvt_sStkNPS* obj, btScalar value) +{ + obj->value = value; +} + +void btDbvt_sStkNPS_delete(btDbvt_sStkNPS* obj) +{ + delete obj; +} + + +int btDbvt_allocate(btAlignedObjectArray_int* ifree, btAlignedObjectArray_btDbvt_sStkNPS* stock, + const btDbvt_sStkNPS* value) +{ + return btDbvt::allocate(*ifree, *stock, *value); +} + +void btDbvt_benchmark() +{ + btDbvt::benchmark(); +} + +void btDbvt_clear(btDbvt* obj) +{ + obj->clear(); +} + +void btDbvt_clone(btDbvt* obj, btDbvt* dest) +{ + obj->clone(*dest); +} + +void btDbvt_clone2(btDbvt* obj, btDbvt* dest, btDbvt_IClone* iclone) +{ + obj->clone(*dest, iclone); +} +/* +void btDbvt_collideKDOP(const btDbvtNode* root, const btVector3* normals, const btScalar* offsets, + int count, const btDbvt_ICollide* policy) +{ + btDbvt::collideKDOP(root, normals, offsets, count, *policy); +} + +void btDbvt_collideOCL(const btDbvtNode* root, const btVector3* normals, const btScalar* offsets, + const btVector3* sortaxis, int count, const btDbvt_ICollide* policy) +{ + BTVECTOR3_IN(sortaxis); + btDbvt::collideOCL(root, normals, offsets, BTVECTOR3_USE(sortaxis), count, *policy); +} + +void btDbvt_collideOCL2(const btDbvtNode* root, const btVector3* normals, const btScalar* offsets, + const btVector3* sortaxis, int count, const btDbvt_ICollide* policy, bool fullsort) +{ + BTVECTOR3_IN(sortaxis); + btDbvt::collideOCL(root, normals, offsets, BTVECTOR3_USE(sortaxis), count, *policy, + fullsort); +} + +void btDbvt_collideTT(btDbvt* obj, const btDbvtNode* root0, const btDbvtNode* root1, + const btDbvt_ICollide* policy) +{ + obj->collideTT(root0, root1, *policy); +} + +void btDbvt_collideTTpersistentStack(btDbvt* obj, const btDbvtNode* root0, const btDbvtNode* root1, + const btDbvt_ICollide* policy) +{ + obj->collideTTpersistentStack(root0, root1, *policy); +} + +void btDbvt_collideTU(const btDbvtNode* root, const btDbvt::ICollide* policy) +{ + btDbvt::collideTU(root, *policy); +} + +void btDbvt_collideTV(btDbvt* obj, const btDbvtNode* root, const const btDbvtVolume** volume, + const btDbvt_ICollide* policy) +{ + obj->collideTV(root, *volume, *policy); +} +*/ +int btDbvt_countLeaves(const btDbvtNode* node) +{ + return btDbvt::countLeaves(node); +} + +bool btDbvt_empty(btDbvt* obj) +{ + return obj->empty(); +} +/* +void btDbvt_enumLeaves(const btDbvtNode* root, const btDbvt_ICollide* policy) +{ + btDbvt::enumLeaves(root, *policy); +} + +void btDbvt_enumNodes(const btDbvtNode* root, const btDbvt_ICollide* policy) +{ + btDbvt::enumNodes(root, *policy); +} +*/ +void btDbvt_extractLeaves(const btDbvtNode* node, btAlignedObjectArray_const_btDbvtNodePtr* leaves) +{ + btDbvt::extractLeaves(node, *leaves); +} + +btDbvtNode* btDbvt_getFree(btDbvt* obj) +{ + return obj->m_free; +} + +int btDbvt_getLeaves(btDbvt* obj) +{ + return obj->m_leaves; +} + +int btDbvt_getLkhd(btDbvt* obj) +{ + return obj->m_lkhd; +} + +unsigned int btDbvt_getOpath(btDbvt* obj) +{ + return obj->m_opath; +} + +btDbvtNode* btDbvt_getRoot(btDbvt* obj) +{ + return obj->m_root; +} + +btAlignedObjectArray_btDbvt_sStkNN* btDbvt_getStkStack(btDbvt* obj) +{ + return &obj->m_stkStack; +} + +btDbvtNode* btDbvt_insert(btDbvt* obj, const btDbvtVolume* box, void* data) +{ + return obj->insert(*box, data); +} + +int btDbvt_maxdepth(const btDbvtNode* node) +{ + return btDbvt::maxdepth(node); +} + +int btDbvt_nearest(const int* i, const btDbvt_sStkNPS* a, btScalar v, int l, int h) +{ + return btDbvt::nearest(i, a, v, l, h); +} + +void btDbvt_optimizeBottomUp(btDbvt* obj) +{ + obj->optimizeBottomUp(); +} + +void btDbvt_optimizeIncremental(btDbvt* obj, int passes) +{ + obj->optimizeIncremental(passes); +} + +void btDbvt_optimizeTopDown(btDbvt* obj) +{ + obj->optimizeTopDown(); +} + +void btDbvt_optimizeTopDown2(btDbvt* obj, int bu_treshold) +{ + obj->optimizeTopDown(bu_treshold); +} +/* +void btDbvt_rayTest(const btDbvtNode* root, const btVector3* rayFrom, const btVector3* rayTo, + const btDbvt_ICollide* policy) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + btDbvt::rayTest(root, BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *policy); +} + +void btDbvt_rayTestInternal2(btDbvt* obj, const btDbvtNode* root, const btVector3* rayFrom, + const btVector3* rayTo, const btVector3* rayDirectionInverse, unsigned int* signs, + btScalar lambda_max, const btVector3* aabbMin, const btVector3* aabbMax, const btDbvt_ICollide* policy) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + BTVECTOR3_IN(rayDirectionInverse); + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->rayTestInternal(root, BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), BTVECTOR3_USE(rayDirectionInverse), + signs, lambda_max, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), *policy); +} +*/ +void btDbvt_remove(btDbvt* obj, btDbvtNode* leaf) +{ + obj->remove(leaf); +} + +void btDbvt_setFree(btDbvt* obj, btDbvtNode* value) +{ + obj->m_free = value; +} + +void btDbvt_setLeaves(btDbvt* obj, int value) +{ + obj->m_leaves = value; +} + +void btDbvt_setLkhd(btDbvt* obj, int value) +{ + obj->m_lkhd = value; +} + +void btDbvt_setOpath(btDbvt* obj, unsigned int value) +{ + obj->m_opath = value; +} + +void btDbvt_setRoot(btDbvt* obj, btDbvtNode* value) +{ + obj->m_root = value; +} + +void btDbvt_update(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume) +{ + obj->update(leaf, *volume); +} + +void btDbvt_update2(btDbvt* obj, btDbvtNode* leaf) +{ + obj->update(leaf); +} + +void btDbvt_update3(btDbvt* obj, btDbvtNode* leaf, int lookahead) +{ + obj->update(leaf, lookahead); +} + +bool btDbvt_update4(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume, btScalar margin) +{ + return obj->update(leaf, *volume, margin); +} + +bool btDbvt_update5(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume, const btVector3* velocity) +{ + BTVECTOR3_IN(velocity); + return obj->update(leaf, *volume, BTVECTOR3_USE(velocity)); +} + +bool btDbvt_update6(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume, const btVector3* velocity, + btScalar margin) +{ + BTVECTOR3_IN(velocity); + return obj->update(leaf, *volume, BTVECTOR3_USE(velocity), margin); +} + +void btDbvt_write(btDbvt* obj, btDbvt_IWriter* iwriter) +{ + obj->write(iwriter); +} + + +btDbvt* btDbvt_array_at(btDbvt* obj, int index) +{ + return &obj[index]; +} + +int btDbvt_array_index_of(btDbvt* obj, btDbvt* value, int length) +{ + for (int i = 0; i < length; i++) + { + if (&obj[i] == value) + { + return i; + } + } + return -1; +} + + +btDbvtNode* btDbvtNodePtr_array_at(btDbvtNode** obj, int index) +{ + return obj[index]; +} + +int btDbvtNodePtr_array_index_of(btDbvtNode** obj, btDbvtNode* value, int length) +{ + for (int i = 0; i < length; i++) + { + if (obj[i] == value) + { + return i; + } + } + return -1; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.h new file mode 100644 index 0000000..709e2d3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDbvt_wrap.h @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDbvtAabbMm* btDbvtAabbMm_new(); + EXPORT void btDbvtAabbMm_Center(btDbvtAabbMm* obj, btVector3* value); + EXPORT int btDbvtAabbMm_Classify(btDbvtAabbMm* obj, const btVector3* n, btScalar o, int s); + EXPORT bool btDbvtAabbMm_Contain(btDbvtAabbMm* obj, const btDbvtAabbMm* a); + EXPORT void btDbvtAabbMm_Expand(btDbvtAabbMm* obj, const btVector3* e); + EXPORT void btDbvtAabbMm_Extents(btDbvtAabbMm* obj, btVector3* value); + EXPORT btDbvtAabbMm* btDbvtAabbMm_FromCE(const btVector3* c, const btVector3* e); + EXPORT btDbvtAabbMm* btDbvtAabbMm_FromCR(const btVector3* c, btScalar r); + EXPORT btDbvtAabbMm* btDbvtAabbMm_FromMM(const btVector3* mi, const btVector3* mx); + EXPORT btDbvtAabbMm* btDbvtAabbMm_FromPoints(const btVector3** ppts, int n); + EXPORT btDbvtAabbMm* btDbvtAabbMm_FromPoints2(const btVector3* pts, int n); + EXPORT void btDbvtAabbMm_Lengths(btDbvtAabbMm* obj, btVector3* value); + EXPORT void btDbvtAabbMm_Maxs(btDbvtAabbMm* obj, btVector3* value); + EXPORT void btDbvtAabbMm_Mins(btDbvtAabbMm* obj, btVector3* value); + EXPORT btScalar btDbvtAabbMm_ProjectMinimum(btDbvtAabbMm* obj, const btVector3* v, unsigned int signs); + EXPORT void btDbvtAabbMm_SignedExpand(btDbvtAabbMm* obj, const btVector3* e); + EXPORT void btDbvtAabbMm_tMaxs(btDbvtAabbMm* obj, btVector3* value); + EXPORT void btDbvtAabbMm_tMins(btDbvtAabbMm* obj, btVector3* value); + EXPORT void btDbvtAabbMm_delete(btDbvtAabbMm* obj); + + EXPORT btDbvtNode* btDbvtNode_new(); + EXPORT btDbvtNode** btDbvtNode_getChilds(btDbvtNode* obj); + EXPORT void* btDbvtNode_getData(btDbvtNode* obj); + EXPORT int btDbvtNode_getDataAsInt(btDbvtNode* obj); + EXPORT btDbvtNode* btDbvtNode_getParent(btDbvtNode* obj); + EXPORT btDbvtVolume* btDbvtNode_getVolume(btDbvtNode* obj); + EXPORT bool btDbvtNode_isinternal(btDbvtNode* obj); + EXPORT bool btDbvtNode_isleaf(btDbvtNode* obj); + EXPORT void btDbvtNode_setData(btDbvtNode* obj, void* value); + EXPORT void btDbvtNode_setDataAsInt(btDbvtNode* obj, int value); + EXPORT void btDbvtNode_setParent(btDbvtNode* obj, btDbvtNode* value); + EXPORT void btDbvtNode_delete(btDbvtNode* obj); + + EXPORT btDbvt_IClone* btDbvt_IClone_new(); + EXPORT void btDbvt_IClone_CloneLeaf(btDbvt_IClone* obj, btDbvtNode* __unnamed0); + EXPORT void btDbvt_IClone_delete(btDbvt_IClone* obj); + + EXPORT btDbvt_ICollide* btDbvt_ICollide_new(); + EXPORT bool btDbvt_ICollide_AllLeaves(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0); + EXPORT bool btDbvt_ICollide_Descent(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0); + EXPORT void btDbvt_ICollide_Process(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0, const btDbvtNode* __unnamed1); + EXPORT void btDbvt_ICollide_Process2(btDbvt_ICollide* obj, const btDbvtNode* __unnamed0); + EXPORT void btDbvt_ICollide_Process3(btDbvt_ICollide* obj, const btDbvtNode* n, btScalar __unnamed1); + EXPORT void btDbvt_ICollide_delete(btDbvt_ICollide* obj); + + EXPORT void btDbvt_IWriter_Prepare(btDbvt_IWriter* obj, const btDbvtNode* root, int numnodes); + EXPORT void btDbvt_IWriter_WriteLeaf(btDbvt_IWriter* obj, const btDbvtNode* __unnamed0, int index, int parent); + EXPORT void btDbvt_IWriter_WriteNode(btDbvt_IWriter* obj, const btDbvtNode* __unnamed0, int index, int parent, int child0, int child1); + EXPORT void btDbvt_IWriter_delete(btDbvt_IWriter* obj); + + EXPORT btDbvt_sStkCLN* btDbvt_sStkCLN_new(const btDbvtNode* n, btDbvtNode* p); + EXPORT const btDbvtNode* btDbvt_sStkCLN_getNode(btDbvt_sStkCLN* obj); + EXPORT btDbvtNode* btDbvt_sStkCLN_getParent(btDbvt_sStkCLN* obj); + EXPORT void btDbvt_sStkCLN_setNode(btDbvt_sStkCLN* obj, const btDbvtNode* value); + EXPORT void btDbvt_sStkCLN_setParent(btDbvt_sStkCLN* obj, btDbvtNode* value); + EXPORT void btDbvt_sStkCLN_delete(btDbvt_sStkCLN* obj); + + EXPORT btDbvt_sStkNN* btDbvt_sStkNN_new(); + EXPORT btDbvt_sStkNN* btDbvt_sStkNN_new2(const btDbvtNode* na, const btDbvtNode* nb); + EXPORT const btDbvtNode* btDbvt_sStkNN_getA(btDbvt_sStkNN* obj); + EXPORT const btDbvtNode* btDbvt_sStkNN_getB(btDbvt_sStkNN* obj); + EXPORT void btDbvt_sStkNN_setA(btDbvt_sStkNN* obj, const btDbvtNode* value); + EXPORT void btDbvt_sStkNN_setB(btDbvt_sStkNN* obj, const btDbvtNode* value); + EXPORT void btDbvt_sStkNN_delete(btDbvt_sStkNN* obj); + + EXPORT btDbvt_sStkNP* btDbvt_sStkNP_new(const btDbvtNode* n, unsigned int m); + EXPORT int btDbvt_sStkNP_getMask(btDbvt_sStkNP* obj); + EXPORT const btDbvtNode* btDbvt_sStkNP_getNode(btDbvt_sStkNP* obj); + EXPORT void btDbvt_sStkNP_setMask(btDbvt_sStkNP* obj, int value); + EXPORT void btDbvt_sStkNP_setNode(btDbvt_sStkNP* obj, const btDbvtNode* value); + EXPORT void btDbvt_sStkNP_delete(btDbvt_sStkNP* obj); + + EXPORT btDbvt_sStkNPS* btDbvt_sStkNPS_new(); + EXPORT btDbvt_sStkNPS* btDbvt_sStkNPS_new2(const btDbvtNode* n, unsigned int m, btScalar v); + EXPORT int btDbvt_sStkNPS_getMask(btDbvt_sStkNPS* obj); + EXPORT const btDbvtNode* btDbvt_sStkNPS_getNode(btDbvt_sStkNPS* obj); + EXPORT btScalar btDbvt_sStkNPS_getValue(btDbvt_sStkNPS* obj); + EXPORT void btDbvt_sStkNPS_setMask(btDbvt_sStkNPS* obj, int value); + EXPORT void btDbvt_sStkNPS_setNode(btDbvt_sStkNPS* obj, const btDbvtNode* value); + EXPORT void btDbvt_sStkNPS_setValue(btDbvt_sStkNPS* obj, btScalar value); + EXPORT void btDbvt_sStkNPS_delete(btDbvt_sStkNPS* obj); + + EXPORT int btDbvt_allocate(btAlignedObjectArray_int* ifree, btAlignedObjectArray_btDbvt_sStkNPS* stock, const btDbvt_sStkNPS* value); + EXPORT void btDbvt_benchmark(); + EXPORT void btDbvt_clear(btDbvt* obj); + EXPORT void btDbvt_clone(btDbvt* obj, btDbvt* dest); + EXPORT void btDbvt_clone2(btDbvt* obj, btDbvt* dest, btDbvt_IClone* iclone); + //EXPORT void btDbvt_collideKDOP(const btDbvtNode* root, const btVector3* normals, const btScalar* offsets, int count, const btDbvt_ICollide* policy); + //EXPORT void btDbvt_collideOCL(const btDbvtNode* root, const btVector3* normals, const btScalar* offsets, const btVector3* sortaxis, int count, const btDbvt_ICollide* policy); + //EXPORT void btDbvt_collideOCL2(const btDbvtNode* root, const btVector3* normals, const btScalar* offsets, const btVector3* sortaxis, int count, const btDbvt_ICollide* policy, bool fullsort); + //EXPORT void btDbvt_collideTT(btDbvt* obj, const btDbvtNode* root0, const btDbvtNode* root1, const btDbvt_ICollide* policy); + //EXPORT void btDbvt_collideTTpersistentStack(btDbvt* obj, const btDbvtNode* root0, const btDbvtNode* root1, const btDbvt_ICollide* policy); + //EXPORT void btDbvt_collideTU(const btDbvtNode* root, const btDbvt_ICollide* policy); + //EXPORT void btDbvt_collideTV(btDbvt* obj, const btDbvtNode* root, const btDbvtVolume* volume, const btDbvt_ICollide* policy); + EXPORT int btDbvt_countLeaves(const btDbvtNode* node); + EXPORT bool btDbvt_empty(btDbvt* obj); + //EXPORT void btDbvt_enumLeaves(const btDbvtNode* root, const btDbvt_ICollide* policy); + //EXPORT void btDbvt_enumNodes(const btDbvtNode* root, const btDbvt_ICollide* policy); + EXPORT void btDbvt_extractLeaves(const btDbvtNode* node, btAlignedObjectArray_const_btDbvtNodePtr* leaves); + EXPORT btDbvtNode* btDbvt_getFree(btDbvt* obj); + EXPORT int btDbvt_getLeaves(btDbvt* obj); + EXPORT int btDbvt_getLkhd(btDbvt* obj); + EXPORT unsigned int btDbvt_getOpath(btDbvt* obj); + EXPORT btDbvtNode* btDbvt_getRoot(btDbvt* obj); + EXPORT btAlignedObjectArray_btDbvt_sStkNN* btDbvt_getStkStack(btDbvt* obj); + EXPORT btDbvtNode* btDbvt_insert(btDbvt* obj, const btDbvtVolume* box, void* data); + EXPORT int btDbvt_maxdepth(const btDbvtNode* node); + EXPORT int btDbvt_nearest(const int* i, const btDbvt_sStkNPS* a, btScalar v, int l, int h); + EXPORT void btDbvt_optimizeBottomUp(btDbvt* obj); + EXPORT void btDbvt_optimizeIncremental(btDbvt* obj, int passes); + EXPORT void btDbvt_optimizeTopDown(btDbvt* obj); + EXPORT void btDbvt_optimizeTopDown2(btDbvt* obj, int bu_treshold); + EXPORT void btDbvt_rayTest(const btDbvtNode* root, const btVector3* rayFrom, const btVector3* rayTo, btDbvt_ICollide* policy); + EXPORT void btDbvt_rayTestInternal(btDbvt* obj, const btDbvtNode* root, const btVector3* rayFrom, const btVector3* rayTo, const btVector3* rayDirectionInverse, unsigned int* signs, btScalar lambda_max, const btVector3* aabbMin, const btVector3* aabbMax, const btDbvt_ICollide* policy); + EXPORT void btDbvt_remove(btDbvt* obj, btDbvtNode* leaf); + EXPORT void btDbvt_setFree(btDbvt* obj, btDbvtNode* value); + EXPORT void btDbvt_setLeaves(btDbvt* obj, int value); + EXPORT void btDbvt_setLkhd(btDbvt* obj, int value); + EXPORT void btDbvt_setOpath(btDbvt* obj, unsigned int value); + EXPORT void btDbvt_setRoot(btDbvt* obj, btDbvtNode* value); + EXPORT void btDbvt_update(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume); + EXPORT void btDbvt_update2(btDbvt* obj, btDbvtNode* leaf); + EXPORT void btDbvt_update3(btDbvt* obj, btDbvtNode* leaf, int lookahead); + EXPORT bool btDbvt_update4(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume, btScalar margin); + EXPORT bool btDbvt_update5(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume, const btVector3* velocity); + EXPORT bool btDbvt_update6(btDbvt* obj, btDbvtNode* leaf, btDbvtVolume* volume, const btVector3* velocity, btScalar margin); + EXPORT void btDbvt_write(btDbvt* obj, btDbvt_IWriter* iwriter); + + EXPORT btDbvt* btDbvt_array_at(btDbvt* obj, int index); + EXPORT int btDbvt_array_index_of(btDbvt* obj, btDbvt* value, int length); + + EXPORT btDbvtNode* btDbvtNodePtr_array_at(btDbvtNode** obj, int index); + EXPORT int btDbvtNodePtr_array_index_of(btDbvtNode** obj, btDbvtNode* value, int length); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.cpp new file mode 100644 index 0000000..f294cf4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.cpp @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btDefaultCollisionConfiguration_wrap.h" + +btDefaultCollisionConstructionInfo* btDefaultCollisionConstructionInfo_new() +{ + return new btDefaultCollisionConstructionInfo(); +} + +btPoolAllocator* btDefaultCollisionConstructionInfo_getCollisionAlgorithmPool(btDefaultCollisionConstructionInfo* obj) +{ + return obj->m_collisionAlgorithmPool; +} + +int btDefaultCollisionConstructionInfo_getCustomCollisionAlgorithmMaxElementSize( + btDefaultCollisionConstructionInfo* obj) +{ + return obj->m_customCollisionAlgorithmMaxElementSize; +} + +int btDefaultCollisionConstructionInfo_getDefaultMaxCollisionAlgorithmPoolSize(btDefaultCollisionConstructionInfo* obj) +{ + return obj->m_defaultMaxCollisionAlgorithmPoolSize; +} + +int btDefaultCollisionConstructionInfo_getDefaultMaxPersistentManifoldPoolSize(btDefaultCollisionConstructionInfo* obj) +{ + return obj->m_defaultMaxPersistentManifoldPoolSize; +} + +btPoolAllocator* btDefaultCollisionConstructionInfo_getPersistentManifoldPool(btDefaultCollisionConstructionInfo* obj) +{ + return obj->m_persistentManifoldPool; +} + +int btDefaultCollisionConstructionInfo_getUseEpaPenetrationAlgorithm(btDefaultCollisionConstructionInfo* obj) +{ + return obj->m_useEpaPenetrationAlgorithm; +} + +void btDefaultCollisionConstructionInfo_setCollisionAlgorithmPool(btDefaultCollisionConstructionInfo* obj, + btPoolAllocator* value) +{ + obj->m_collisionAlgorithmPool = value; +} + +void btDefaultCollisionConstructionInfo_setCustomCollisionAlgorithmMaxElementSize( + btDefaultCollisionConstructionInfo* obj, int value) +{ + obj->m_customCollisionAlgorithmMaxElementSize = value; +} + +void btDefaultCollisionConstructionInfo_setDefaultMaxCollisionAlgorithmPoolSize(btDefaultCollisionConstructionInfo* obj, + int value) +{ + obj->m_defaultMaxCollisionAlgorithmPoolSize = value; +} + +void btDefaultCollisionConstructionInfo_setDefaultMaxPersistentManifoldPoolSize(btDefaultCollisionConstructionInfo* obj, + int value) +{ + obj->m_defaultMaxPersistentManifoldPoolSize = value; +} + +void btDefaultCollisionConstructionInfo_setPersistentManifoldPool(btDefaultCollisionConstructionInfo* obj, + btPoolAllocator* value) +{ + obj->m_persistentManifoldPool = value; +} + +void btDefaultCollisionConstructionInfo_setUseEpaPenetrationAlgorithm(btDefaultCollisionConstructionInfo* obj, + int value) +{ + obj->m_useEpaPenetrationAlgorithm = value; +} + +void btDefaultCollisionConstructionInfo_delete(btDefaultCollisionConstructionInfo* obj) +{ + delete obj; +} + + +btDefaultCollisionConfiguration* btDefaultCollisionConfiguration_new() +{ + return new btDefaultCollisionConfiguration(); +} + +btDefaultCollisionConfiguration* btDefaultCollisionConfiguration_new2(const btDefaultCollisionConstructionInfo* constructionInfo) +{ + return new btDefaultCollisionConfiguration(*constructionInfo); +} + +btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration_getClosestPointsAlgorithmCreateFunc( + btDefaultCollisionConfiguration* obj, int proxyType0, int proxyType1) +{ + return obj->getClosestPointsAlgorithmCreateFunc(proxyType0, proxyType1); +} + +void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations(btDefaultCollisionConfiguration* obj, + int numPerturbationIterations, int minimumPointsPerturbationThreshold) +{ + obj->setConvexConvexMultipointIterations(numPerturbationIterations, minimumPointsPerturbationThreshold); +} + +void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations(btDefaultCollisionConfiguration* obj, + int numPerturbationIterations, int minimumPointsPerturbationThreshold) +{ + obj->setPlaneConvexMultipointIterations(numPerturbationIterations, minimumPointsPerturbationThreshold); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.h new file mode 100644 index 0000000..efcf41b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDefaultCollisionConstructionInfo* btDefaultCollisionConstructionInfo_new(); + EXPORT btPoolAllocator* btDefaultCollisionConstructionInfo_getCollisionAlgorithmPool(btDefaultCollisionConstructionInfo* obj); + EXPORT int btDefaultCollisionConstructionInfo_getCustomCollisionAlgorithmMaxElementSize(btDefaultCollisionConstructionInfo* obj); + EXPORT int btDefaultCollisionConstructionInfo_getDefaultMaxCollisionAlgorithmPoolSize(btDefaultCollisionConstructionInfo* obj); + EXPORT int btDefaultCollisionConstructionInfo_getDefaultMaxPersistentManifoldPoolSize(btDefaultCollisionConstructionInfo* obj); + EXPORT btPoolAllocator* btDefaultCollisionConstructionInfo_getPersistentManifoldPool(btDefaultCollisionConstructionInfo* obj); + EXPORT int btDefaultCollisionConstructionInfo_getUseEpaPenetrationAlgorithm(btDefaultCollisionConstructionInfo* obj); + EXPORT void btDefaultCollisionConstructionInfo_setCollisionAlgorithmPool(btDefaultCollisionConstructionInfo* obj, btPoolAllocator* value); + EXPORT void btDefaultCollisionConstructionInfo_setCustomCollisionAlgorithmMaxElementSize(btDefaultCollisionConstructionInfo* obj, int value); + EXPORT void btDefaultCollisionConstructionInfo_setDefaultMaxCollisionAlgorithmPoolSize(btDefaultCollisionConstructionInfo* obj, int value); + EXPORT void btDefaultCollisionConstructionInfo_setDefaultMaxPersistentManifoldPoolSize(btDefaultCollisionConstructionInfo* obj, int value); + EXPORT void btDefaultCollisionConstructionInfo_setPersistentManifoldPool(btDefaultCollisionConstructionInfo* obj, btPoolAllocator* value); + EXPORT void btDefaultCollisionConstructionInfo_setUseEpaPenetrationAlgorithm(btDefaultCollisionConstructionInfo* obj, int value); + EXPORT void btDefaultCollisionConstructionInfo_delete(btDefaultCollisionConstructionInfo* obj); + + EXPORT btDefaultCollisionConfiguration* btDefaultCollisionConfiguration_new(); + EXPORT btDefaultCollisionConfiguration* btDefaultCollisionConfiguration_new2(const btDefaultCollisionConstructionInfo* constructionInfo); + EXPORT btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration_getClosestPointsAlgorithmCreateFunc(btDefaultCollisionConfiguration* obj, int proxyType0, int proxyType1); + EXPORT void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations(btDefaultCollisionConfiguration* obj, int numPerturbationIterations, int minimumPointsPerturbationThreshold); + EXPORT void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations(btDefaultCollisionConfiguration* obj, int numPerturbationIterations, int minimumPointsPerturbationThreshold); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.cpp new file mode 100644 index 0000000..b9335d3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btDefaultMotionState_wrap.h" + +btDefaultMotionState* btDefaultMotionState_new() +{ + return ALIGNED_NEW(btDefaultMotionState)(); +} + +btDefaultMotionState* btDefaultMotionState_new2(const btTransform* startTrans) +{ + BTTRANSFORM_IN(startTrans); + return ALIGNED_NEW(btDefaultMotionState)(BTTRANSFORM_USE(startTrans)); +} + +btDefaultMotionState* btDefaultMotionState_new3(const btTransform* startTrans, const btTransform* centerOfMassOffset) +{ + BTTRANSFORM_IN(startTrans); + BTTRANSFORM_IN(centerOfMassOffset); + return ALIGNED_NEW(btDefaultMotionState)(BTTRANSFORM_USE(startTrans), BTTRANSFORM_USE(centerOfMassOffset)); +} + +void btDefaultMotionState_getCenterOfMassOffset(btDefaultMotionState* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_centerOfMassOffset); +} + +void btDefaultMotionState_getGraphicsWorldTrans(btDefaultMotionState* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_graphicsWorldTrans); +} + +void btDefaultMotionState_getStartWorldTrans(btDefaultMotionState* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_startWorldTrans); +} + +void* btDefaultMotionState_getUserPointer(btDefaultMotionState* obj) +{ + return obj->m_userPointer; +} + +void btDefaultMotionState_setCenterOfMassOffset(btDefaultMotionState* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_centerOfMassOffset, value); +} + +void btDefaultMotionState_setGraphicsWorldTrans(btDefaultMotionState* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_graphicsWorldTrans, value); +} + +void btDefaultMotionState_setStartWorldTrans(btDefaultMotionState* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_startWorldTrans, value); +} + +void btDefaultMotionState_setUserPointer(btDefaultMotionState* obj, void* value) +{ + obj->m_userPointer = value; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.h new file mode 100644 index 0000000..a850b39 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultMotionState_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDefaultMotionState* btDefaultMotionState_new(); + EXPORT btDefaultMotionState* btDefaultMotionState_new2(const btTransform* startTrans); + EXPORT btDefaultMotionState* btDefaultMotionState_new3(const btTransform* startTrans, const btTransform* centerOfMassOffset); + EXPORT void btDefaultMotionState_getCenterOfMassOffset(btDefaultMotionState* obj, btTransform* value); + EXPORT void btDefaultMotionState_getGraphicsWorldTrans(btDefaultMotionState* obj, btTransform* value); + EXPORT void btDefaultMotionState_getStartWorldTrans(btDefaultMotionState* obj, btTransform* value); + EXPORT void* btDefaultMotionState_getUserPointer(btDefaultMotionState* obj); + EXPORT void btDefaultMotionState_setCenterOfMassOffset(btDefaultMotionState* obj, const btTransform* value); + EXPORT void btDefaultMotionState_setGraphicsWorldTrans(btDefaultMotionState* obj, const btTransform* value); + EXPORT void btDefaultMotionState_setStartWorldTrans(btDefaultMotionState* obj, const btTransform* value); + EXPORT void btDefaultMotionState_setUserPointer(btDefaultMotionState* obj, void* value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.cpp new file mode 100644 index 0000000..e5653ed --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btDefaultSoftBodySolver_wrap.h" + +btDefaultSoftBodySolver* btDefaultSoftBodySolver_new() +{ + return new btDefaultSoftBodySolver(); +} + +void btDefaultSoftBodySolver_copySoftBodyToVertexBuffer(btDefaultSoftBodySolver* obj, + const btSoftBody* softBody, btVertexBufferDescriptor* vertexBuffer) +{ + obj->copySoftBodyToVertexBuffer(softBody, vertexBuffer); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.h new file mode 100644 index 0000000..ccd376f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDefaultSoftBodySolver* btDefaultSoftBodySolver_new(); + EXPORT void btDefaultSoftBodySolver_copySoftBodyToVertexBuffer(btDefaultSoftBodySolver* obj, const btSoftBody* softBody, btVertexBufferDescriptor* vertexBuffer); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.cpp new file mode 100644 index 0000000..778036b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btDeformableBodySolver_wrap.h" + +btDeformableBodySolver* btDeformableBodySolver_new() +{ + return new btDeformableBodySolver(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.h new file mode 100644 index 0000000..d815d95 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableBodySolver_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDeformableBodySolver* btDeformableBodySolver_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.cpp new file mode 100644 index 0000000..41c5d42 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btDeformableGravityForce_wrap.h" + +btDeformableGravityForce* btDeformableGravityForce_new(const btVector3* gravity) +{ + BTVECTOR3_IN(gravity); + return new btDeformableGravityForce(BTVECTOR3_USE(gravity)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.h new file mode 100644 index 0000000..4fa3183 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableGravityForce_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDeformableGravityForce* btDeformableGravityForce_new(const btVector3* gravity); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.cpp new file mode 100644 index 0000000..03ca54e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btDeformableLagrangianForce_wrap.h" + +void btDeformableLagrangianForce_delete(btDeformableLagrangianForce* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.h new file mode 100644 index 0000000..d2f9d34 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btDeformableLagrangianForce_delete(btDeformableLagrangianForce* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.cpp new file mode 100644 index 0000000..6ac9c85 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btDeformableMultiBodyConstraintSolver_wrap.h" + +btDeformableMultiBodyConstraintSolver* btDeformableMultiBodyConstraintSolver_new() +{ + return new btDeformableMultiBodyConstraintSolver(); +} + +void btDeformableMultiBodyConstraintSolver_setDeformableSolver(btDeformableMultiBodyConstraintSolver* obj, btDeformableBodySolver* deformableSolver) +{ + obj->setDeformableSolver(deformableSolver); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.h new file mode 100644 index 0000000..741b994 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDeformableMultiBodyConstraintSolver* btDeformableMultiBodyConstraintSolver_new(); + EXPORT void btDeformableMultiBodyConstraintSolver_setDeformableSolver(btDeformableMultiBodyConstraintSolver* obj, btDeformableBodySolver* deformableSolver); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.cpp new file mode 100644 index 0000000..59296d3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btDeformableMultiBodyDynamicsWorld_wrap.h" + +btDeformableMultiBodyDynamicsWorld* btDeformableMultiBodyDynamicsWorld_new(btDispatcher* dispatcher, + btBroadphaseInterface* pairCache, btDeformableMultiBodyConstraintSolver* constraintSolver, + btCollisionConfiguration* collisionCOnfiguration, btDeformableBodySolver* deformableBodySolver) +{ + return new btDeformableMultiBodyDynamicsWorld(dispatcher, pairCache, constraintSolver, + collisionCOnfiguration, deformableBodySolver); +} + +void btDeformableMultiBodyDynamicsWorld_addForce(btDeformableMultiBodyDynamicsWorld* obj, btSoftBody* psb, + btDeformableLagrangianForce* force) +{ + obj->addForce(psb, force); +} + +void btDeformableMultiBodyDynamicsWorld_addSoftBody(btDeformableMultiBodyDynamicsWorld* obj, btSoftBody* body, + int collisionFilterGroup, int collisionFilterMask) +{ + obj->addSoftBody(body, collisionFilterGroup, collisionFilterMask); +} + +btSoftBodyWorldInfo* btDeformableMultiBodyDynamicsWorld_getWorldInfo(btDeformableMultiBodyDynamicsWorld* obj) +{ + return &obj->getWorldInfo(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.h new file mode 100644 index 0000000..8558617 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDeformableMultiBodyDynamicsWorld* btDeformableMultiBodyDynamicsWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, btDeformableMultiBodyConstraintSolver* constraintSolver, btCollisionConfiguration* collisionCOnfiguration, btDeformableBodySolver* deformableBodySolver); + EXPORT void btDeformableMultiBodyDynamicsWorld_addForce(btDeformableMultiBodyDynamicsWorld* obj, btSoftBody* psb, btDeformableLagrangianForce* force); + EXPORT void btDeformableMultiBodyDynamicsWorld_addSoftBody(btDeformableMultiBodyDynamicsWorld* obj, btSoftBody* body, int collisionFilterGroup, int collisionFilterMask); + EXPORT btSoftBodyWorldInfo* btDeformableMultiBodyDynamicsWorld_getWorldInfo(btDeformableMultiBodyDynamicsWorld* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.cpp new file mode 100644 index 0000000..bd2a6c0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btDeformableNeoHookeanForce_wrap.h" + +btDeformableNeoHookeanForce* btDeformableNeoHookeanForce_new(btScalar mu, btScalar lambda, btScalar damping) +{ + return new btDeformableNeoHookeanForce(mu, lambda, damping); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.h new file mode 100644 index 0000000..f1598f3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDeformableNeoHookeanForce* btDeformableNeoHookeanForce_new(btScalar mu, btScalar lambda, btScalar damping); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.cpp new file mode 100644 index 0000000..5414b5b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.cpp @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btDiscreteCollisionDetectorInterface_wrap.h" + +btDiscreteCollisionDetectorInterface_ClosestPointInput* btDiscreteCollisionDetectorInterface_ClosestPointInput_new() +{ + return new btDiscreteCollisionDetectorInterface::ClosestPointInput(); +} + +btScalar btDiscreteCollisionDetectorInterface_ClosestPointInput_getMaximumDistanceSquared( + btDiscreteCollisionDetectorInterface_ClosestPointInput* obj) +{ + return obj->m_maximumDistanceSquared; +} + +void btDiscreteCollisionDetectorInterface_ClosestPointInput_getTransformA(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, + btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_transformA); +} + +void btDiscreteCollisionDetectorInterface_ClosestPointInput_getTransformB(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, + btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_transformB); +} + +void btDiscreteCollisionDetectorInterface_ClosestPointInput_setMaximumDistanceSquared( + btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, btScalar value) +{ + obj->m_maximumDistanceSquared = value; +} + +void btDiscreteCollisionDetectorInterface_ClosestPointInput_setTransformA(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, + const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_transformA, value); +} + +void btDiscreteCollisionDetectorInterface_ClosestPointInput_setTransformB(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, + const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_transformB, value); +} + +void btDiscreteCollisionDetectorInterface_ClosestPointInput_delete(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj) +{ + delete obj; +} + + +void btDiscreteCollisionDetectorInterface_Result_addContactPoint(btDiscreteCollisionDetectorInterface_Result* obj, + const btVector3* normalOnBInWorld, const btVector3* pointInWorld, btScalar depth) +{ + BTVECTOR3_IN(normalOnBInWorld); + BTVECTOR3_IN(pointInWorld); + obj->addContactPoint(BTVECTOR3_USE(normalOnBInWorld), BTVECTOR3_USE(pointInWorld), + depth); +} + +void btDiscreteCollisionDetectorInterface_Result_setShapeIdentifiersA(btDiscreteCollisionDetectorInterface_Result* obj, + int partId0, int index0) +{ + obj->setShapeIdentifiersA(partId0, index0); +} + +void btDiscreteCollisionDetectorInterface_Result_setShapeIdentifiersB(btDiscreteCollisionDetectorInterface_Result* obj, + int partId1, int index1) +{ + obj->setShapeIdentifiersB(partId1, index1); +} + +void btDiscreteCollisionDetectorInterface_Result_delete(btDiscreteCollisionDetectorInterface_Result* obj) +{ + delete obj; +} + + +void btDiscreteCollisionDetectorInterface_getClosestPoints(btDiscreteCollisionDetectorInterface* obj, + const btDiscreteCollisionDetectorInterface_ClosestPointInput* input, btDiscreteCollisionDetectorInterface_Result* output, + btIDebugDraw* debugDraw, bool swapResults) +{ + obj->getClosestPoints(*input, *output, debugDraw, swapResults); +} + +void btDiscreteCollisionDetectorInterface_delete(btDiscreteCollisionDetectorInterface* obj) +{ + delete obj; +} + + +void btStorageResult_getClosestPointInB(btStorageResult* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_closestPointInB); +} + +btScalar btStorageResult_getDistance(btStorageResult* obj) +{ + return obj->m_distance; +} + +void btStorageResult_getNormalOnSurfaceB(btStorageResult* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normalOnSurfaceB); +} + +void btStorageResult_setClosestPointInB(btStorageResult* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_closestPointInB, value); +} + +void btStorageResult_setDistance(btStorageResult* obj, btScalar value) +{ + obj->m_distance = value; +} + +void btStorageResult_setNormalOnSurfaceB(btStorageResult* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normalOnSurfaceB, value); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.h new file mode 100644 index 0000000..f83d598 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDiscreteCollisionDetectorInterface_ClosestPointInput* btDiscreteCollisionDetectorInterface_ClosestPointInput_new(); + EXPORT btScalar btDiscreteCollisionDetectorInterface_ClosestPointInput_getMaximumDistanceSquared(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj); + EXPORT void btDiscreteCollisionDetectorInterface_ClosestPointInput_getTransformA(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, btTransform* value); + EXPORT void btDiscreteCollisionDetectorInterface_ClosestPointInput_getTransformB(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, btTransform* value); + EXPORT void btDiscreteCollisionDetectorInterface_ClosestPointInput_setMaximumDistanceSquared(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, btScalar value); + EXPORT void btDiscreteCollisionDetectorInterface_ClosestPointInput_setTransformA(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, const btTransform* value); + EXPORT void btDiscreteCollisionDetectorInterface_ClosestPointInput_setTransformB(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj, const btTransform* value); + EXPORT void btDiscreteCollisionDetectorInterface_ClosestPointInput_delete(btDiscreteCollisionDetectorInterface_ClosestPointInput* obj); + + EXPORT void btDiscreteCollisionDetectorInterface_Result_addContactPoint(btDiscreteCollisionDetectorInterface_Result* obj, const btVector3* normalOnBInWorld, const btVector3* pointInWorld, btScalar depth); + EXPORT void btDiscreteCollisionDetectorInterface_Result_setShapeIdentifiersA(btDiscreteCollisionDetectorInterface_Result* obj, int partId0, int index0); + EXPORT void btDiscreteCollisionDetectorInterface_Result_setShapeIdentifiersB(btDiscreteCollisionDetectorInterface_Result* obj, int partId1, int index1); + EXPORT void btDiscreteCollisionDetectorInterface_Result_delete(btDiscreteCollisionDetectorInterface_Result* obj); + + EXPORT void btDiscreteCollisionDetectorInterface_getClosestPoints(btDiscreteCollisionDetectorInterface* obj, const btDiscreteCollisionDetectorInterface_ClosestPointInput* input, btDiscreteCollisionDetectorInterface_Result* output, btIDebugDraw* debugDraw, bool swapResults); + EXPORT void btDiscreteCollisionDetectorInterface_delete(btDiscreteCollisionDetectorInterface* obj); + + EXPORT void btStorageResult_getClosestPointInB(btStorageResult* obj, btVector3* value); + EXPORT btScalar btStorageResult_getDistance(btStorageResult* obj); + EXPORT void btStorageResult_getNormalOnSurfaceB(btStorageResult* obj, btVector3* value); + EXPORT void btStorageResult_setClosestPointInB(btStorageResult* obj, const btVector3* value); + EXPORT void btStorageResult_setDistance(btStorageResult* obj, btScalar value); + EXPORT void btStorageResult_setNormalOnSurfaceB(btStorageResult* obj, const btVector3* value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.cpp new file mode 100644 index 0000000..b005aa3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.cpp @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "btDiscreteDynamicsWorldMt_wrap.h" + +btConstraintSolverPoolMt* btConstraintSolverPoolMt_new(int numSolvers) +{ + return ALIGNED_NEW(btConstraintSolverPoolMt)(numSolvers); +} + +btConstraintSolverPoolMt* btConstraintSolverPoolMt_new2(btConstraintSolver** solvers, int numSolvers) +{ + return ALIGNED_NEW(btConstraintSolverPoolMt)(solvers, numSolvers); +} + + +btDiscreteDynamicsWorldMt* btDiscreteDynamicsWorldMt_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, + btConstraintSolverPoolMt* constraintSolver, btConstraintSolver* constraintSolverMt, + btCollisionConfiguration* collisionConfiguration) +{ + return new btDiscreteDynamicsWorldMt(dispatcher, pairCache, constraintSolver, constraintSolverMt, + collisionConfiguration); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.h new file mode 100644 index 0000000..e51e6b6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConstraintSolverPoolMt* btConstraintSolverPoolMt_new(int numSolvers); + EXPORT btConstraintSolverPoolMt* btConstraintSolverPoolMt_new2(btConstraintSolver** solvers, int numSolvers); + + EXPORT btDiscreteDynamicsWorldMt* btDiscreteDynamicsWorldMt_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, btConstraintSolverPoolMt* constraintSolver, btConstraintSolver* constraintSolverMt, btCollisionConfiguration* collisionConfiguration); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.cpp new file mode 100644 index 0000000..6d0febc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.cpp @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "btDiscreteDynamicsWorld_wrap.h" + +btDiscreteDynamicsWorld* btDiscreteDynamicsWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, + btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration) +{ + return new btDiscreteDynamicsWorld(dispatcher, pairCache, constraintSolver, collisionConfiguration); +} + +void btDiscreteDynamicsWorld_applyGravity(btDiscreteDynamicsWorld* obj) +{ + obj->applyGravity(); +} + +void btDiscreteDynamicsWorld_debugDrawConstraint(btDiscreteDynamicsWorld* obj, btTypedConstraint* constraint) +{ + obj->debugDrawConstraint(constraint); +} + +bool btDiscreteDynamicsWorld_getApplySpeculativeContactRestitution(btDiscreteDynamicsWorld* obj) +{ + return obj->getApplySpeculativeContactRestitution(); +} + +btCollisionWorld* btDiscreteDynamicsWorld_getCollisionWorld(btDiscreteDynamicsWorld* obj) +{ + return obj->getCollisionWorld(); +} + +bool btDiscreteDynamicsWorld_getLatencyMotionStateInterpolation(btDiscreteDynamicsWorld* obj) +{ + return obj->getLatencyMotionStateInterpolation(); +} + +btAlignedObjectArray_btRigidBodyPtr* btDiscreteDynamicsWorld_getNonStaticRigidBodies(btDiscreteDynamicsWorld* obj) +{ + return &obj->getNonStaticRigidBodies(); +} + +btSimulationIslandManager* btDiscreteDynamicsWorld_getSimulationIslandManager(btDiscreteDynamicsWorld* obj) +{ + return obj->getSimulationIslandManager(); +} + +bool btDiscreteDynamicsWorld_getSynchronizeAllMotionStates(btDiscreteDynamicsWorld* obj) +{ + return obj->getSynchronizeAllMotionStates(); +} + +void btDiscreteDynamicsWorld_setApplySpeculativeContactRestitution(btDiscreteDynamicsWorld* obj, + bool enable) +{ + obj->setApplySpeculativeContactRestitution(enable); +} + +void btDiscreteDynamicsWorld_setLatencyMotionStateInterpolation(btDiscreteDynamicsWorld* obj, + bool latencyInterpolation) +{ + obj->setLatencyMotionStateInterpolation(latencyInterpolation); +} + +void btDiscreteDynamicsWorld_setNumTasks(btDiscreteDynamicsWorld* obj, int numTasks) +{ + obj->setNumTasks(numTasks); +} + +void btDiscreteDynamicsWorld_setSynchronizeAllMotionStates(btDiscreteDynamicsWorld* obj, + bool synchronizeAll) +{ + obj->setSynchronizeAllMotionStates(synchronizeAll); +} + +void btDiscreteDynamicsWorld_solveConstraints(btDiscreteDynamicsWorld* obj, btContactSolverInfo* solverInfo) +{ + obj->solveConstraints(*solverInfo); +} + +void btDiscreteDynamicsWorld_synchronizeSingleMotionState(btDiscreteDynamicsWorld* obj, + btRigidBody* body) +{ + obj->synchronizeSingleMotionState(body); +} + +void btDiscreteDynamicsWorld_updateVehicles(btDiscreteDynamicsWorld* obj, btScalar timeStep) +{ + obj->updateVehicles(timeStep); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.h new file mode 100644 index 0000000..44ac7e8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btDiscreteDynamicsWorld* btDiscreteDynamicsWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration); + EXPORT void btDiscreteDynamicsWorld_applyGravity(btDiscreteDynamicsWorld* obj); + EXPORT void btDiscreteDynamicsWorld_debugDrawConstraint(btDiscreteDynamicsWorld* obj, btTypedConstraint* constraint); + EXPORT bool btDiscreteDynamicsWorld_getApplySpeculativeContactRestitution(btDiscreteDynamicsWorld* obj); + EXPORT btCollisionWorld* btDiscreteDynamicsWorld_getCollisionWorld(btDiscreteDynamicsWorld* obj); + EXPORT bool btDiscreteDynamicsWorld_getLatencyMotionStateInterpolation(btDiscreteDynamicsWorld* obj); + EXPORT btAlignedObjectArray_btRigidBodyPtr* btDiscreteDynamicsWorld_getNonStaticRigidBodies(btDiscreteDynamicsWorld* obj); + EXPORT btSimulationIslandManager* btDiscreteDynamicsWorld_getSimulationIslandManager(btDiscreteDynamicsWorld* obj); + EXPORT bool btDiscreteDynamicsWorld_getSynchronizeAllMotionStates(btDiscreteDynamicsWorld* obj); + EXPORT void btDiscreteDynamicsWorld_setApplySpeculativeContactRestitution(btDiscreteDynamicsWorld* obj, bool enable); + EXPORT void btDiscreteDynamicsWorld_setLatencyMotionStateInterpolation(btDiscreteDynamicsWorld* obj, bool latencyInterpolation); + EXPORT void btDiscreteDynamicsWorld_setNumTasks(btDiscreteDynamicsWorld* obj, int numTasks); + EXPORT void btDiscreteDynamicsWorld_setSynchronizeAllMotionStates(btDiscreteDynamicsWorld* obj, bool synchronizeAll); + EXPORT void btDiscreteDynamicsWorld_solveConstraints(btDiscreteDynamicsWorld* obj, btContactSolverInfo* solverInfo); + EXPORT void btDiscreteDynamicsWorld_synchronizeSingleMotionState(btDiscreteDynamicsWorld* obj, btRigidBody* body); + EXPORT void btDiscreteDynamicsWorld_updateVehicles(btDiscreteDynamicsWorld* obj, btScalar timeStep); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.cpp new file mode 100644 index 0000000..4cf62dd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.cpp @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "btDispatcher_wrap.h" + +btScalar btDispatcherInfo_getAllowedCcdPenetration(btDispatcherInfo* obj) +{ + return obj->m_allowedCcdPenetration; +} + +btScalar btDispatcherInfo_getConvexConservativeDistanceThreshold(btDispatcherInfo* obj) +{ + return obj->m_convexConservativeDistanceThreshold; +} + +btIDebugDraw* btDispatcherInfo_getDebugDraw(btDispatcherInfo* obj) +{ + return obj->m_debugDraw; +} + +bool btDispatcherInfo_getDeterministicOverlappingPairs(btDispatcherInfo* obj) +{ + return obj->m_deterministicOverlappingPairs; +} + +int btDispatcherInfo_getDispatchFunc(btDispatcherInfo* obj) +{ + return obj->m_dispatchFunc; +} + +bool btDispatcherInfo_getEnableSatConvex(btDispatcherInfo* obj) +{ + return obj->m_enableSatConvex; +} + +bool btDispatcherInfo_getEnableSPU(btDispatcherInfo* obj) +{ + return obj->m_enableSPU; +} + +int btDispatcherInfo_getStepCount(btDispatcherInfo* obj) +{ + return obj->m_stepCount; +} + +btScalar btDispatcherInfo_getTimeOfImpact(btDispatcherInfo* obj) +{ + return obj->m_timeOfImpact; +} + +btScalar btDispatcherInfo_getTimeStep(btDispatcherInfo* obj) +{ + return obj->m_timeStep; +} + +bool btDispatcherInfo_getUseContinuous(btDispatcherInfo* obj) +{ + return obj->m_useContinuous; +} + +bool btDispatcherInfo_getUseConvexConservativeDistanceUtil(btDispatcherInfo* obj) +{ + return obj->m_useConvexConservativeDistanceUtil; +} + +bool btDispatcherInfo_getUseEpa(btDispatcherInfo* obj) +{ + return obj->m_useEpa; +} + +void btDispatcherInfo_setAllowedCcdPenetration(btDispatcherInfo* obj, btScalar value) +{ + obj->m_allowedCcdPenetration = value; +} + +void btDispatcherInfo_setConvexConservativeDistanceThreshold(btDispatcherInfo* obj, + btScalar value) +{ + obj->m_convexConservativeDistanceThreshold = value; +} + +void btDispatcherInfo_setDebugDraw(btDispatcherInfo* obj, btIDebugDraw* value) +{ + obj->m_debugDraw = value; +} + +void btDispatcherInfo_setDeterministicOverlappingPairs(btDispatcherInfo* obj, bool value) +{ + obj->m_deterministicOverlappingPairs = value; +} + +void btDispatcherInfo_setDispatchFunc(btDispatcherInfo* obj, int value) +{ + obj->m_dispatchFunc = value; +} + +void btDispatcherInfo_setEnableSatConvex(btDispatcherInfo* obj, bool value) +{ + obj->m_enableSatConvex = value; +} + +void btDispatcherInfo_setEnableSPU(btDispatcherInfo* obj, bool value) +{ + obj->m_enableSPU = value; +} + +void btDispatcherInfo_setStepCount(btDispatcherInfo* obj, int value) +{ + obj->m_stepCount = value; +} + +void btDispatcherInfo_setTimeOfImpact(btDispatcherInfo* obj, btScalar value) +{ + obj->m_timeOfImpact = value; +} + +void btDispatcherInfo_setTimeStep(btDispatcherInfo* obj, btScalar value) +{ + obj->m_timeStep = value; +} + +void btDispatcherInfo_setUseContinuous(btDispatcherInfo* obj, bool value) +{ + obj->m_useContinuous = value; +} + +void btDispatcherInfo_setUseConvexConservativeDistanceUtil(btDispatcherInfo* obj, + bool value) +{ + obj->m_useConvexConservativeDistanceUtil = value; +} + +void btDispatcherInfo_setUseEpa(btDispatcherInfo* obj, bool value) +{ + obj->m_useEpa = value; +} + + +void* btDispatcher_allocateCollisionAlgorithm(btDispatcher* obj, int size) +{ + return obj->allocateCollisionAlgorithm(size); +} + +void btDispatcher_clearManifold(btDispatcher* obj, btPersistentManifold* manifold) +{ + obj->clearManifold(manifold); +} + +void btDispatcher_dispatchAllCollisionPairs(btDispatcher* obj, btOverlappingPairCache* pairCache, + const btDispatcherInfo* dispatchInfo, btDispatcher* dispatcher) +{ + obj->dispatchAllCollisionPairs(pairCache, *dispatchInfo, dispatcher); +} + +btCollisionAlgorithm* btDispatcher_findAlgorithm(btDispatcher* obj, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap, btPersistentManifold* sharedManifold, + ebtDispatcherQueryType queryType) +{ + return obj->findAlgorithm(body0Wrap, body1Wrap, sharedManifold, queryType); +} + +void btDispatcher_freeCollisionAlgorithm(btDispatcher* obj, void* ptr) +{ + obj->freeCollisionAlgorithm(ptr); +} + +btPersistentManifold** btDispatcher_getInternalManifoldPointer(btDispatcher* obj) +{ + return obj->getInternalManifoldPointer(); +} + +btPoolAllocator* btDispatcher_getInternalManifoldPool(btDispatcher* obj) +{ + return obj->getInternalManifoldPool(); +} + +btPersistentManifold* btDispatcher_getManifoldByIndexInternal(btDispatcher* obj, + int index) +{ + return obj->getManifoldByIndexInternal(index); +} + +btPersistentManifold* btDispatcher_getNewManifold(btDispatcher* obj, const btCollisionObject* b0, + const btCollisionObject* b1) +{ + return obj->getNewManifold(b0, b1); +} + +int btDispatcher_getNumManifolds(btDispatcher* obj) +{ + return obj->getNumManifolds(); +} + +bool btDispatcher_needsCollision(btDispatcher* obj, const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return obj->needsCollision(body0, body1); +} + +bool btDispatcher_needsResponse(btDispatcher* obj, const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return obj->needsResponse(body0, body1); +} + +void btDispatcher_releaseManifold(btDispatcher* obj, btPersistentManifold* manifold) +{ + obj->releaseManifold(manifold); +} + +void btDispatcher_delete(btDispatcher* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.h new file mode 100644 index 0000000..e1cbe9e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDispatcher_wrap.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btScalar btDispatcherInfo_getAllowedCcdPenetration(btDispatcherInfo* obj); + EXPORT btScalar btDispatcherInfo_getConvexConservativeDistanceThreshold(btDispatcherInfo* obj); + EXPORT btIDebugDraw* btDispatcherInfo_getDebugDraw(btDispatcherInfo* obj); + EXPORT bool btDispatcherInfo_getDeterministicOverlappingPairs(btDispatcherInfo* obj); + EXPORT int btDispatcherInfo_getDispatchFunc(btDispatcherInfo* obj); + EXPORT bool btDispatcherInfo_getEnableSatConvex(btDispatcherInfo* obj); + EXPORT bool btDispatcherInfo_getEnableSPU(btDispatcherInfo* obj); + EXPORT int btDispatcherInfo_getStepCount(btDispatcherInfo* obj); + EXPORT btScalar btDispatcherInfo_getTimeOfImpact(btDispatcherInfo* obj); + EXPORT btScalar btDispatcherInfo_getTimeStep(btDispatcherInfo* obj); + EXPORT bool btDispatcherInfo_getUseContinuous(btDispatcherInfo* obj); + EXPORT bool btDispatcherInfo_getUseConvexConservativeDistanceUtil(btDispatcherInfo* obj); + EXPORT bool btDispatcherInfo_getUseEpa(btDispatcherInfo* obj); + EXPORT void btDispatcherInfo_setAllowedCcdPenetration(btDispatcherInfo* obj, btScalar value); + EXPORT void btDispatcherInfo_setConvexConservativeDistanceThreshold(btDispatcherInfo* obj, btScalar value); + EXPORT void btDispatcherInfo_setDebugDraw(btDispatcherInfo* obj, btIDebugDraw* value); + EXPORT void btDispatcherInfo_setDeterministicOverlappingPairs(btDispatcherInfo* obj, bool value); + EXPORT void btDispatcherInfo_setDispatchFunc(btDispatcherInfo* obj, int value); + EXPORT void btDispatcherInfo_setEnableSatConvex(btDispatcherInfo* obj, bool value); + EXPORT void btDispatcherInfo_setEnableSPU(btDispatcherInfo* obj, bool value); + EXPORT void btDispatcherInfo_setStepCount(btDispatcherInfo* obj, int value); + EXPORT void btDispatcherInfo_setTimeOfImpact(btDispatcherInfo* obj, btScalar value); + EXPORT void btDispatcherInfo_setTimeStep(btDispatcherInfo* obj, btScalar value); + EXPORT void btDispatcherInfo_setUseContinuous(btDispatcherInfo* obj, bool value); + EXPORT void btDispatcherInfo_setUseConvexConservativeDistanceUtil(btDispatcherInfo* obj, bool value); + EXPORT void btDispatcherInfo_setUseEpa(btDispatcherInfo* obj, bool value); + + EXPORT void* btDispatcher_allocateCollisionAlgorithm(btDispatcher* obj, int size); + EXPORT void btDispatcher_clearManifold(btDispatcher* obj, btPersistentManifold* manifold); + EXPORT void btDispatcher_dispatchAllCollisionPairs(btDispatcher* obj, btOverlappingPairCache* pairCache, const btDispatcherInfo* dispatchInfo, btDispatcher* dispatcher); + EXPORT btCollisionAlgorithm* btDispatcher_findAlgorithm(btDispatcher* obj, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, btPersistentManifold* sharedManifold, ebtDispatcherQueryType queryType); + EXPORT void btDispatcher_freeCollisionAlgorithm(btDispatcher* obj, void* ptr); + EXPORT btPersistentManifold** btDispatcher_getInternalManifoldPointer(btDispatcher* obj); + EXPORT btPoolAllocator* btDispatcher_getInternalManifoldPool(btDispatcher* obj); + EXPORT btPersistentManifold* btDispatcher_getManifoldByIndexInternal(btDispatcher* obj, int index); + EXPORT btPersistentManifold* btDispatcher_getNewManifold(btDispatcher* obj, const btCollisionObject* b0, const btCollisionObject* b1); + EXPORT int btDispatcher_getNumManifolds(btDispatcher* obj); + EXPORT bool btDispatcher_needsCollision(btDispatcher* obj, const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT bool btDispatcher_needsResponse(btDispatcher* obj, const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT void btDispatcher_releaseManifold(btDispatcher* obj, btPersistentManifold* manifold); + EXPORT void btDispatcher_delete(btDispatcher* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.cpp new file mode 100644 index 0000000..ee6d689 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.cpp @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include + +#include "conversion.h" +#include "btDynamicsWorld_wrap.h" + +void btDynamicsWorld_addAction(btDynamicsWorld* obj, btActionInterface* action) +{ + obj->addAction(action); +} + +void btDynamicsWorld_addConstraint(btDynamicsWorld* obj, btTypedConstraint* constraint, + bool disableCollisionsBetweenLinkedBodies) +{ + obj->addConstraint(constraint, disableCollisionsBetweenLinkedBodies); +} + +void btDynamicsWorld_addRigidBody(btDynamicsWorld* obj, btRigidBody* body) +{ + obj->addRigidBody(body); +} + +void btDynamicsWorld_addRigidBody2(btDynamicsWorld* obj, btRigidBody* body, int group, + int mask) +{ + obj->addRigidBody(body, group, mask); +} + +void btDynamicsWorld_clearForces(btDynamicsWorld* obj) +{ + obj->clearForces(); +} + +btTypedConstraint* btDynamicsWorld_getConstraint(btDynamicsWorld* obj, int index) +{ + return obj->getConstraint(index); +} + +btConstraintSolver* btDynamicsWorld_getConstraintSolver(btDynamicsWorld* obj) +{ + return obj->getConstraintSolver(); +} + +void btDynamicsWorld_getGravity(btDynamicsWorld* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getGravity(); + BTVECTOR3_SET(value, temp); +} + +int btDynamicsWorld_getNumConstraints(btDynamicsWorld* obj) +{ + return obj->getNumConstraints(); +} + +btContactSolverInfo* btDynamicsWorld_getSolverInfo(btDynamicsWorld* obj) +{ + return &obj->getSolverInfo(); +} + +btDynamicsWorldType btDynamicsWorld_getWorldType(btDynamicsWorld* obj) +{ + return obj->getWorldType(); +} + +void* btDynamicsWorld_getWorldUserInfo(btDynamicsWorld* obj) +{ + return obj->getWorldUserInfo(); +} + +void btDynamicsWorld_removeAction(btDynamicsWorld* obj, btActionInterface* action) +{ + obj->removeAction(action); +} + +void btDynamicsWorld_removeConstraint(btDynamicsWorld* obj, btTypedConstraint* constraint) +{ + obj->removeConstraint(constraint); +} + +void btDynamicsWorld_removeRigidBody(btDynamicsWorld* obj, btRigidBody* body) +{ + obj->removeRigidBody(body); +} + +void btDynamicsWorld_setConstraintSolver(btDynamicsWorld* obj, btConstraintSolver* solver) +{ + obj->setConstraintSolver(solver); +} + +void btDynamicsWorld_setGravity(btDynamicsWorld* obj, const btVector3* gravity) +{ + BTVECTOR3_IN(gravity); + obj->setGravity(BTVECTOR3_USE(gravity)); +} + +void btDynamicsWorld_setInternalTickCallback(btDynamicsWorld* obj, btInternalTickCallback cb, + void* worldUserInfo, bool isPreTick) +{ + obj->setInternalTickCallback(cb, worldUserInfo, isPreTick); +} + +void btDynamicsWorld_setWorldUserInfo(btDynamicsWorld* obj, void* worldUserInfo) +{ + obj->setWorldUserInfo(worldUserInfo); +} + +int btDynamicsWorld_stepSimulation(btDynamicsWorld* obj, btScalar timeStep, int maxSubSteps, + btScalar fixedTimeStep) +{ + return obj->stepSimulation(timeStep, maxSubSteps, fixedTimeStep); +} + +void btDynamicsWorld_synchronizeMotionStates(btDynamicsWorld* obj) +{ + obj->synchronizeMotionStates(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.h new file mode 100644 index 0000000..f2c0650 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btDynamicsWorld_wrap.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btDynamicsWorld_addAction(btDynamicsWorld* obj, btActionInterface* action); + EXPORT void btDynamicsWorld_addConstraint(btDynamicsWorld* obj, btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies); + EXPORT void btDynamicsWorld_addRigidBody(btDynamicsWorld* obj, btRigidBody* body); + EXPORT void btDynamicsWorld_addRigidBody2(btDynamicsWorld* obj, btRigidBody* body, int group, int mask); + EXPORT void btDynamicsWorld_clearForces(btDynamicsWorld* obj); + EXPORT btTypedConstraint* btDynamicsWorld_getConstraint(btDynamicsWorld* obj, int index); + EXPORT btConstraintSolver* btDynamicsWorld_getConstraintSolver(btDynamicsWorld* obj); + EXPORT void btDynamicsWorld_getGravity(btDynamicsWorld* obj, btVector3* value); + EXPORT int btDynamicsWorld_getNumConstraints(btDynamicsWorld* obj); + EXPORT btContactSolverInfo* btDynamicsWorld_getSolverInfo(btDynamicsWorld* obj); + EXPORT btDynamicsWorldType btDynamicsWorld_getWorldType(btDynamicsWorld* obj); + EXPORT void* btDynamicsWorld_getWorldUserInfo(btDynamicsWorld* obj); + EXPORT void btDynamicsWorld_removeAction(btDynamicsWorld* obj, btActionInterface* action); + EXPORT void btDynamicsWorld_removeConstraint(btDynamicsWorld* obj, btTypedConstraint* constraint); + EXPORT void btDynamicsWorld_removeRigidBody(btDynamicsWorld* obj, btRigidBody* body); + EXPORT void btDynamicsWorld_setConstraintSolver(btDynamicsWorld* obj, btConstraintSolver* solver); + EXPORT void btDynamicsWorld_setGravity(btDynamicsWorld* obj, const btVector3* gravity); + EXPORT void btDynamicsWorld_setInternalTickCallback(btDynamicsWorld* obj, btInternalTickCallback cb, void* worldUserInfo, bool isPreTick); + EXPORT void btDynamicsWorld_setWorldUserInfo(btDynamicsWorld* obj, void* worldUserInfo); + EXPORT int btDynamicsWorld_stepSimulation(btDynamicsWorld* obj, btScalar timeStep, int maxSubSteps, btScalar fixedTimeStep); + EXPORT void btDynamicsWorld_synchronizeMotionStates(btDynamicsWorld* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..bba6d70 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btEmptyCollisionAlgorithm_wrap.h" + +btEmptyAlgorithm_CreateFunc* btEmptyAlgorithm_CreateFunc_new() +{ + return new btEmptyAlgorithm::CreateFunc(); +} + + +btEmptyAlgorithm* btEmptyAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci) +{ + return new btEmptyAlgorithm(*ci); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..b0e3d2a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btEmptyAlgorithm_CreateFunc* btEmptyAlgorithm_CreateFunc_new(); + + EXPORT btEmptyAlgorithm* btEmptyAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.cpp new file mode 100644 index 0000000..94aa52b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btEmptyShape_wrap.h" + +btEmptyShape* btEmptyShape_new() +{ + return new btEmptyShape(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.h new file mode 100644 index 0000000..2da1712 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btEmptyShape_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btEmptyShape* btEmptyShape_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.cpp new file mode 100644 index 0000000..c5f5594 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btFixedConstraint_wrap.h" + +btFixedConstraint* btFixedConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, + const btTransform* frameInB) +{ + BTTRANSFORM_IN(frameInA); + BTTRANSFORM_IN(frameInB); + return new btFixedConstraint(*rbA, *rbB, BTTRANSFORM_USE(frameInA), BTTRANSFORM_USE(frameInB)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.h new file mode 100644 index 0000000..b3a791e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btFixedConstraint_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btFixedConstraint* btFixedConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.cpp new file mode 100644 index 0000000..04dbb37 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.cpp @@ -0,0 +1,409 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGImpactBvh_wrap.h" + +GIM_PAIR* GIM_PAIR_new() +{ + return new GIM_PAIR(); +} + +GIM_PAIR* GIM_PAIR_new2(const GIM_PAIR* p) +{ + return new GIM_PAIR(*p); +} + +GIM_PAIR* GIM_PAIR_new3(int index1, int index2) +{ + return new GIM_PAIR(index1, index2); +} + +int GIM_PAIR_getIndex1(GIM_PAIR* obj) +{ + return obj->m_index1; +} + +int GIM_PAIR_getIndex2(GIM_PAIR* obj) +{ + return obj->m_index2; +} + +void GIM_PAIR_setIndex1(GIM_PAIR* obj, int value) +{ + obj->m_index1 = value; +} + +void GIM_PAIR_setIndex2(GIM_PAIR* obj, int value) +{ + obj->m_index2 = value; +} + +void GIM_PAIR_delete(GIM_PAIR* obj) +{ + delete obj; +} + + +btPairSet* btPairSet_new() +{ + return new btPairSet(); +} + +void btPairSet_push_pair(btPairSet* obj, int index1, int index2) +{ + obj->push_pair(index1, index2); +} + +void btPairSet_push_pair_inv(btPairSet* obj, int index1, int index2) +{ + obj->push_pair_inv(index1, index2); +} + +void btPairSet_delete(btPairSet* obj) +{ + delete obj; +} + + +GIM_BVH_DATA* GIM_BVH_DATA_new() +{ + return new GIM_BVH_DATA(); +} + +btAABB* GIM_BVH_DATA_getBound(GIM_BVH_DATA* obj) +{ + return &obj->m_bound; +} + +int GIM_BVH_DATA_getData(GIM_BVH_DATA* obj) +{ + return obj->m_data; +} + +void GIM_BVH_DATA_setBound(GIM_BVH_DATA* obj, const btAABB* value) +{ + obj->m_bound = *value; +} + +void GIM_BVH_DATA_setData(GIM_BVH_DATA* obj, int value) +{ + obj->m_data = value; +} + +void GIM_BVH_DATA_delete(GIM_BVH_DATA* obj) +{ + delete obj; +} + + +GIM_BVH_TREE_NODE* GIM_BVH_TREE_NODE_new() +{ + return new GIM_BVH_TREE_NODE(); +} + +btAABB* GIM_BVH_TREE_NODE_getBound(GIM_BVH_TREE_NODE* obj) +{ + return &obj->m_bound; +} + +int GIM_BVH_TREE_NODE_getDataIndex(GIM_BVH_TREE_NODE* obj) +{ + return obj->getDataIndex(); +} + +int GIM_BVH_TREE_NODE_getEscapeIndex(GIM_BVH_TREE_NODE* obj) +{ + return obj->getEscapeIndex(); +} + +bool GIM_BVH_TREE_NODE_isLeafNode(GIM_BVH_TREE_NODE* obj) +{ + return obj->isLeafNode(); +} + +void GIM_BVH_TREE_NODE_setBound(GIM_BVH_TREE_NODE* obj, const btAABB* value) +{ + obj->m_bound = *value; +} + +void GIM_BVH_TREE_NODE_setDataIndex(GIM_BVH_TREE_NODE* obj, int index) +{ + obj->setDataIndex(index); +} + +void GIM_BVH_TREE_NODE_setEscapeIndex(GIM_BVH_TREE_NODE* obj, int index) +{ + obj->setEscapeIndex(index); +} + +void GIM_BVH_TREE_NODE_delete(GIM_BVH_TREE_NODE* obj) +{ + delete obj; +} + + +GIM_BVH_DATA_ARRAY* GIM_BVH_DATA_ARRAY_new() +{ + return new GIM_BVH_DATA_ARRAY(); +} + +void GIM_BVH_DATA_ARRAY_delete(GIM_BVH_DATA_ARRAY* obj) +{ + delete obj; +} + + +GIM_BVH_TREE_NODE_ARRAY* GIM_BVH_TREE_NODE_ARRAY_new() +{ + return new GIM_BVH_TREE_NODE_ARRAY(); +} + +void GIM_BVH_TREE_NODE_ARRAY_delete(GIM_BVH_TREE_NODE_ARRAY* obj) +{ + delete obj; +} + + +btBvhTree* btBvhTree_new() +{ + return new btBvhTree(); +} + +void btBvhTree_build_tree(btBvhTree* obj, GIM_BVH_DATA_ARRAY* primitive_boxes) +{ + obj->build_tree(*primitive_boxes); +} + +void btBvhTree_clearNodes(btBvhTree* obj) +{ + obj->clearNodes(); +} + +const GIM_BVH_TREE_NODE* btBvhTree_get_node_pointer(btBvhTree* obj) +{ + return obj->get_node_pointer(); +} + +const GIM_BVH_TREE_NODE* btBvhTree_get_node_pointer2(btBvhTree* obj, int index) +{ + return obj->get_node_pointer(index); +} + +int btBvhTree_getEscapeNodeIndex(btBvhTree* obj, int nodeindex) +{ + return obj->getEscapeNodeIndex(nodeindex); +} + +int btBvhTree_getLeftNode(btBvhTree* obj, int nodeindex) +{ + return obj->getLeftNode(nodeindex); +} + +void btBvhTree_getNodeBound(btBvhTree* obj, int nodeindex, btAABB* bound) +{ + obj->getNodeBound(nodeindex, *bound); +} + +int btBvhTree_getNodeCount(btBvhTree* obj) +{ + return obj->getNodeCount(); +} + +int btBvhTree_getNodeData(btBvhTree* obj, int nodeindex) +{ + return obj->getNodeData(nodeindex); +} + +int btBvhTree_getRightNode(btBvhTree* obj, int nodeindex) +{ + return obj->getRightNode(nodeindex); +} + +bool btBvhTree_isLeafNode(btBvhTree* obj, int nodeindex) +{ + return obj->isLeafNode(nodeindex); +} + +void btBvhTree_setNodeBound(btBvhTree* obj, int nodeindex, const btAABB* bound) +{ + obj->setNodeBound(nodeindex, *bound); +} + +void btBvhTree_delete(btBvhTree* obj) +{ + delete obj; +} + + +void btPrimitiveManagerBase_get_primitive_box(btPrimitiveManagerBase* obj, int prim_index, + btAABB* primbox) +{ + obj->get_primitive_box(prim_index, *primbox); +} + +int btPrimitiveManagerBase_get_primitive_count(btPrimitiveManagerBase* obj) +{ + return obj->get_primitive_count(); +} + +void btPrimitiveManagerBase_get_primitive_triangle(btPrimitiveManagerBase* obj, int prim_index, + btPrimitiveTriangle* triangle) +{ + obj->get_primitive_triangle(prim_index, *triangle); +} + +bool btPrimitiveManagerBase_is_trimesh(btPrimitiveManagerBase* obj) +{ + return obj->is_trimesh(); +} + +void btPrimitiveManagerBase_delete(btPrimitiveManagerBase* obj) +{ + delete obj; +} + + +btGImpactBvh* btGImpactBvh_new() +{ + return new btGImpactBvh(); +} + +btGImpactBvh* btGImpactBvh_new2(btPrimitiveManagerBase* primitive_manager) +{ + return new btGImpactBvh(primitive_manager); +} + +bool btGImpactBvh_boxQuery(btGImpactBvh* obj, const btAABB* box, btAlignedObjectArray_int* collided_results) +{ + return obj->boxQuery(*box, *collided_results); +} + +bool btGImpactBvh_boxQueryTrans(btGImpactBvh* obj, const btAABB* box, const btTransform* transform, + btAlignedObjectArray_int* collided_results) +{ + BTTRANSFORM_IN(transform); + return obj->boxQueryTrans(*box, BTTRANSFORM_USE(transform), *collided_results); +} + +void btGImpactBvh_buildSet(btGImpactBvh* obj) +{ + obj->buildSet(); +} + +void btGImpactBvh_find_collision(btGImpactBvh* boxset1, const btTransform* trans1, + btGImpactBvh* boxset2, const btTransform* trans2, btPairSet* collision_pairs) +{ + BTTRANSFORM_IN(trans1); + BTTRANSFORM_IN(trans2); + btGImpactBvh::find_collision(boxset1, BTTRANSFORM_USE(trans1), boxset2, BTTRANSFORM_USE(trans2), + *collision_pairs); +} + +const GIM_BVH_TREE_NODE* btGImpactBvh_get_node_pointer(btGImpactBvh* obj, int index) +{ + return obj->get_node_pointer(index); +} + +int btGImpactBvh_getEscapeNodeIndex(btGImpactBvh* obj, int nodeindex) +{ + return obj->getEscapeNodeIndex(nodeindex); +} + +btAABB* btGImpactBvh_getGlobalBox(btGImpactBvh* obj) +{ + btAABB* box = new btAABB; + *box = obj->getGlobalBox(); + return box; +} + +int btGImpactBvh_getLeftNode(btGImpactBvh* obj, int nodeindex) +{ + return obj->getLeftNode(nodeindex); +} + +void btGImpactBvh_getNodeBound(btGImpactBvh* obj, int nodeindex, btAABB* bound) +{ + obj->getNodeBound(nodeindex, *bound); +} + +int btGImpactBvh_getNodeCount(btGImpactBvh* obj) +{ + return obj->getNodeCount(); +} + +int btGImpactBvh_getNodeData(btGImpactBvh* obj, int nodeindex) +{ + return obj->getNodeData(nodeindex); +} + +void btGImpactBvh_getNodeTriangle(btGImpactBvh* obj, int nodeindex, btPrimitiveTriangle* triangle) +{ + obj->getNodeTriangle(nodeindex, *triangle); +} + +btPrimitiveManagerBase* btGImpactBvh_getPrimitiveManager(btGImpactBvh* obj) +{ + return obj->getPrimitiveManager(); +} + +int btGImpactBvh_getRightNode(btGImpactBvh* obj, int nodeindex) +{ + return obj->getRightNode(nodeindex); +} + +bool btGImpactBvh_hasHierarchy(btGImpactBvh* obj) +{ + return obj->hasHierarchy(); +} + +bool btGImpactBvh_isLeafNode(btGImpactBvh* obj, int nodeindex) +{ + return obj->isLeafNode(nodeindex); +} + +bool btGImpactBvh_isTrimesh(btGImpactBvh* obj) +{ + return obj->isTrimesh(); +} + +bool btGImpactBvh_rayQuery(btGImpactBvh* obj, const btVector3* ray_dir, const btVector3* ray_origin, + btAlignedObjectArray_int* collided_results) +{ + BTVECTOR3_IN(ray_dir); + BTVECTOR3_IN(ray_origin); + return obj->rayQuery(BTVECTOR3_USE(ray_dir), BTVECTOR3_USE(ray_origin), *collided_results); +} + +void btGImpactBvh_setNodeBound(btGImpactBvh* obj, int nodeindex, const btAABB* bound) +{ + obj->setNodeBound(nodeindex, *bound); +} + +void btGImpactBvh_setPrimitiveManager(btGImpactBvh* obj, btPrimitiveManagerBase* primitive_manager) +{ + obj->setPrimitiveManager(primitive_manager); +} + +void btGImpactBvh_update(btGImpactBvh* obj) +{ + obj->update(); +} + +void btGImpactBvh_delete(btGImpactBvh* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.h new file mode 100644 index 0000000..10d865b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactBvh_wrap.h @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT GIM_PAIR* GIM_PAIR_new(); + EXPORT GIM_PAIR* GIM_PAIR_new2(const GIM_PAIR* p); + EXPORT GIM_PAIR* GIM_PAIR_new3(int index1, int index2); + EXPORT int GIM_PAIR_getIndex1(GIM_PAIR* obj); + EXPORT int GIM_PAIR_getIndex2(GIM_PAIR* obj); + EXPORT void GIM_PAIR_setIndex1(GIM_PAIR* obj, int value); + EXPORT void GIM_PAIR_setIndex2(GIM_PAIR* obj, int value); + EXPORT void GIM_PAIR_delete(GIM_PAIR* obj); + + EXPORT btPairSet* btPairSet_new(); + EXPORT void btPairSet_push_pair(btPairSet* obj, int index1, int index2); + EXPORT void btPairSet_push_pair_inv(btPairSet* obj, int index1, int index2); + EXPORT void btPairSet_delete(btPairSet* obj); + + EXPORT GIM_BVH_DATA* GIM_BVH_DATA_new(); + EXPORT btAABB* GIM_BVH_DATA_getBound(GIM_BVH_DATA* obj); + EXPORT int GIM_BVH_DATA_getData(GIM_BVH_DATA* obj); + EXPORT void GIM_BVH_DATA_setBound(GIM_BVH_DATA* obj, const btAABB* value); + EXPORT void GIM_BVH_DATA_setData(GIM_BVH_DATA* obj, int value); + EXPORT void GIM_BVH_DATA_delete(GIM_BVH_DATA* obj); + + EXPORT GIM_BVH_TREE_NODE* GIM_BVH_TREE_NODE_new(); + EXPORT btAABB* GIM_BVH_TREE_NODE_getBound(GIM_BVH_TREE_NODE* obj); + EXPORT int GIM_BVH_TREE_NODE_getDataIndex(GIM_BVH_TREE_NODE* obj); + EXPORT int GIM_BVH_TREE_NODE_getEscapeIndex(GIM_BVH_TREE_NODE* obj); + EXPORT bool GIM_BVH_TREE_NODE_isLeafNode(GIM_BVH_TREE_NODE* obj); + EXPORT void GIM_BVH_TREE_NODE_setBound(GIM_BVH_TREE_NODE* obj, const btAABB* value); + EXPORT void GIM_BVH_TREE_NODE_setDataIndex(GIM_BVH_TREE_NODE* obj, int index); + EXPORT void GIM_BVH_TREE_NODE_setEscapeIndex(GIM_BVH_TREE_NODE* obj, int index); + EXPORT void GIM_BVH_TREE_NODE_delete(GIM_BVH_TREE_NODE* obj); + + EXPORT GIM_BVH_DATA_ARRAY* GIM_BVH_DATA_ARRAY_new(); + EXPORT void GIM_BVH_DATA_ARRAY_delete(GIM_BVH_DATA_ARRAY* obj); + + EXPORT GIM_BVH_TREE_NODE_ARRAY* GIM_BVH_TREE_NODE_ARRAY_new(); + EXPORT void GIM_BVH_TREE_NODE_ARRAY_delete(GIM_BVH_TREE_NODE_ARRAY* obj); + + EXPORT btBvhTree* btBvhTree_new(); + EXPORT void btBvhTree_build_tree(btBvhTree* obj, GIM_BVH_DATA_ARRAY* primitive_boxes); + EXPORT void btBvhTree_clearNodes(btBvhTree* obj); + EXPORT const GIM_BVH_TREE_NODE* btBvhTree_get_node_pointer(btBvhTree* obj); + EXPORT const GIM_BVH_TREE_NODE* btBvhTree_get_node_pointer2(btBvhTree* obj, int index); + EXPORT int btBvhTree_getEscapeNodeIndex(btBvhTree* obj, int nodeindex); + EXPORT int btBvhTree_getLeftNode(btBvhTree* obj, int nodeindex); + EXPORT void btBvhTree_getNodeBound(btBvhTree* obj, int nodeindex, btAABB* bound); + EXPORT int btBvhTree_getNodeCount(btBvhTree* obj); + EXPORT int btBvhTree_getNodeData(btBvhTree* obj, int nodeindex); + EXPORT int btBvhTree_getRightNode(btBvhTree* obj, int nodeindex); + EXPORT bool btBvhTree_isLeafNode(btBvhTree* obj, int nodeindex); + EXPORT void btBvhTree_setNodeBound(btBvhTree* obj, int nodeindex, const btAABB* bound); + EXPORT void btBvhTree_delete(btBvhTree* obj); + + EXPORT void btPrimitiveManagerBase_get_primitive_box(btPrimitiveManagerBase* obj, int prim_index, btAABB* primbox); + EXPORT int btPrimitiveManagerBase_get_primitive_count(btPrimitiveManagerBase* obj); + EXPORT void btPrimitiveManagerBase_get_primitive_triangle(btPrimitiveManagerBase* obj, int prim_index, btPrimitiveTriangle* triangle); + EXPORT bool btPrimitiveManagerBase_is_trimesh(btPrimitiveManagerBase* obj); + EXPORT void btPrimitiveManagerBase_delete(btPrimitiveManagerBase* obj); + + EXPORT btGImpactBvh* btGImpactBvh_new(); + EXPORT btGImpactBvh* btGImpactBvh_new2(btPrimitiveManagerBase* primitive_manager); + EXPORT bool btGImpactBvh_boxQuery(btGImpactBvh* obj, const btAABB* box, btAlignedObjectArray_int* collided_results); + EXPORT bool btGImpactBvh_boxQueryTrans(btGImpactBvh* obj, const btAABB* box, const btTransform* transform, btAlignedObjectArray_int* collided_results); + EXPORT void btGImpactBvh_buildSet(btGImpactBvh* obj); + EXPORT void btGImpactBvh_find_collision(btGImpactBvh* boxset1, const btTransform* trans1, btGImpactBvh* boxset2, const btTransform* trans2, btPairSet* collision_pairs); + EXPORT const GIM_BVH_TREE_NODE* btGImpactBvh_get_node_pointer(btGImpactBvh* obj, int index); + EXPORT int btGImpactBvh_getEscapeNodeIndex(btGImpactBvh* obj, int nodeindex); + EXPORT btAABB* btGImpactBvh_getGlobalBox(btGImpactBvh* obj); + EXPORT int btGImpactBvh_getLeftNode(btGImpactBvh* obj, int nodeindex); + EXPORT void btGImpactBvh_getNodeBound(btGImpactBvh* obj, int nodeindex, btAABB* bound); + EXPORT int btGImpactBvh_getNodeCount(btGImpactBvh* obj); + EXPORT int btGImpactBvh_getNodeData(btGImpactBvh* obj, int nodeindex); + EXPORT void btGImpactBvh_getNodeTriangle(btGImpactBvh* obj, int nodeindex, btPrimitiveTriangle* triangle); + EXPORT btPrimitiveManagerBase* btGImpactBvh_getPrimitiveManager(btGImpactBvh* obj); + EXPORT int btGImpactBvh_getRightNode(btGImpactBvh* obj, int nodeindex); + EXPORT bool btGImpactBvh_hasHierarchy(btGImpactBvh* obj); + EXPORT bool btGImpactBvh_isLeafNode(btGImpactBvh* obj, int nodeindex); + EXPORT bool btGImpactBvh_isTrimesh(btGImpactBvh* obj); + EXPORT bool btGImpactBvh_rayQuery(btGImpactBvh* obj, const btVector3* ray_dir, const btVector3* ray_origin, btAlignedObjectArray_int* collided_results); + EXPORT void btGImpactBvh_setNodeBound(btGImpactBvh* obj, int nodeindex, const btAABB* bound); + EXPORT void btGImpactBvh_setPrimitiveManager(btGImpactBvh* obj, btPrimitiveManagerBase* primitive_manager); + EXPORT void btGImpactBvh_update(btGImpactBvh* obj); + EXPORT void btGImpactBvh_delete(btGImpactBvh* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..aea4ccc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btGImpactCollisionAlgorithm_wrap.h" + +btGImpactCollisionAlgorithm_CreateFunc* btGImpactCollisionAlgorithm_CreateFunc_new() +{ + return new btGImpactCollisionAlgorithm::CreateFunc(); +} + + +btGImpactCollisionAlgorithm* btGImpactCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap) +{ + return new btGImpactCollisionAlgorithm(*ci, body0Wrap, body1Wrap); +} + +int btGImpactCollisionAlgorithm_getFace0(btGImpactCollisionAlgorithm* obj) +{ + return obj->getFace0(); +} + +int btGImpactCollisionAlgorithm_getFace1(btGImpactCollisionAlgorithm* obj) +{ + return obj->getFace1(); +} + +int btGImpactCollisionAlgorithm_getPart0(btGImpactCollisionAlgorithm* obj) +{ + return obj->getPart0(); +} + +int btGImpactCollisionAlgorithm_getPart1(btGImpactCollisionAlgorithm* obj) +{ + return obj->getPart1(); +} + +void btGImpactCollisionAlgorithm_gimpact_vs_compoundshape(btGImpactCollisionAlgorithm* obj, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + const btGImpactShapeInterface* shape0, const btCompoundShape* shape1, bool swapped) +{ + obj->gimpact_vs_compoundshape(body0Wrap, body1Wrap, shape0, shape1, swapped); +} + +void btGImpactCollisionAlgorithm_gimpact_vs_concave(btGImpactCollisionAlgorithm* obj, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + const btGImpactShapeInterface* shape0, const btConcaveShape* shape1, bool swapped) +{ + obj->gimpact_vs_concave(body0Wrap, body1Wrap, shape0, shape1, swapped); +} + +void btGImpactCollisionAlgorithm_gimpact_vs_gimpact(btGImpactCollisionAlgorithm* obj, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + const btGImpactShapeInterface* shape0, const btGImpactShapeInterface* shape1) +{ + obj->gimpact_vs_gimpact(body0Wrap, body1Wrap, shape0, shape1); +} + +void btGImpactCollisionAlgorithm_gimpact_vs_shape(btGImpactCollisionAlgorithm* obj, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + const btGImpactShapeInterface* shape0, const btCollisionShape* shape1, bool swapped) +{ + obj->gimpact_vs_shape(body0Wrap, body1Wrap, shape0, shape1, swapped); +} + +btManifoldResult* btGImpactCollisionAlgorithm_internalGetResultOut(btGImpactCollisionAlgorithm* obj) +{ + return obj->internalGetResultOut(); +} + +void btGImpactCollisionAlgorithm_registerAlgorithm(btCollisionDispatcher* dispatcher) +{ + btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); +} + +void btGImpactCollisionAlgorithm_setFace0(btGImpactCollisionAlgorithm* obj, int value) +{ + obj->setFace0(value); +} + +void btGImpactCollisionAlgorithm_setFace1(btGImpactCollisionAlgorithm* obj, int value) +{ + obj->setFace1(value); +} + +void btGImpactCollisionAlgorithm_setPart0(btGImpactCollisionAlgorithm* obj, int value) +{ + obj->setPart0(value); +} + +void btGImpactCollisionAlgorithm_setPart1(btGImpactCollisionAlgorithm* obj, int value) +{ + obj->setPart1(value); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..b34f832 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGImpactCollisionAlgorithm_CreateFunc* btGImpactCollisionAlgorithm_CreateFunc_new(); + + EXPORT btGImpactCollisionAlgorithm* btGImpactCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); + EXPORT int btGImpactCollisionAlgorithm_getFace0(btGImpactCollisionAlgorithm* obj); + EXPORT int btGImpactCollisionAlgorithm_getFace1(btGImpactCollisionAlgorithm* obj); + EXPORT int btGImpactCollisionAlgorithm_getPart0(btGImpactCollisionAlgorithm* obj); + EXPORT int btGImpactCollisionAlgorithm_getPart1(btGImpactCollisionAlgorithm* obj); + EXPORT void btGImpactCollisionAlgorithm_gimpact_vs_compoundshape(btGImpactCollisionAlgorithm* obj, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, const btGImpactShapeInterface* shape0, const btCompoundShape* shape1, bool swapped); + EXPORT void btGImpactCollisionAlgorithm_gimpact_vs_concave(btGImpactCollisionAlgorithm* obj, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, const btGImpactShapeInterface* shape0, const btConcaveShape* shape1, bool swapped); + EXPORT void btGImpactCollisionAlgorithm_gimpact_vs_gimpact(btGImpactCollisionAlgorithm* obj, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, const btGImpactShapeInterface* shape0, const btGImpactShapeInterface* shape1); + EXPORT void btGImpactCollisionAlgorithm_gimpact_vs_shape(btGImpactCollisionAlgorithm* obj, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, const btGImpactShapeInterface* shape0, const btCollisionShape* shape1, bool swapped); + EXPORT btManifoldResult* btGImpactCollisionAlgorithm_internalGetResultOut(btGImpactCollisionAlgorithm* obj); + EXPORT void btGImpactCollisionAlgorithm_registerAlgorithm(btCollisionDispatcher* dispatcher); + EXPORT void btGImpactCollisionAlgorithm_setFace0(btGImpactCollisionAlgorithm* obj, int value); + EXPORT void btGImpactCollisionAlgorithm_setFace1(btGImpactCollisionAlgorithm* obj, int value); + EXPORT void btGImpactCollisionAlgorithm_setPart0(btGImpactCollisionAlgorithm* obj, int value); + EXPORT void btGImpactCollisionAlgorithm_setPart1(btGImpactCollisionAlgorithm* obj, int value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.cpp new file mode 100644 index 0000000..5a80cf6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.cpp @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGImpactQuantizedBvh_wrap.h" + +BT_QUANTIZED_BVH_NODE* BT_QUANTIZED_BVH_NODE_new() +{ + return new BT_QUANTIZED_BVH_NODE(); +} + +int BT_QUANTIZED_BVH_NODE_getDataIndex(BT_QUANTIZED_BVH_NODE* obj) +{ + return obj->getDataIndex(); +} + +int BT_QUANTIZED_BVH_NODE_getEscapeIndex(BT_QUANTIZED_BVH_NODE* obj) +{ + return obj->getEscapeIndex(); +} + +int BT_QUANTIZED_BVH_NODE_getEscapeIndexOrDataIndex(BT_QUANTIZED_BVH_NODE* obj) +{ + return obj->m_escapeIndexOrDataIndex; +} + +unsigned short* BT_QUANTIZED_BVH_NODE_getQuantizedAabbMax(BT_QUANTIZED_BVH_NODE* obj) +{ + return obj->m_quantizedAabbMax; +} + +unsigned short* BT_QUANTIZED_BVH_NODE_getQuantizedAabbMin(BT_QUANTIZED_BVH_NODE* obj) +{ + return obj->m_quantizedAabbMin; +} + +bool BT_QUANTIZED_BVH_NODE_isLeafNode(BT_QUANTIZED_BVH_NODE* obj) +{ + return obj->isLeafNode(); +} + +void BT_QUANTIZED_BVH_NODE_setDataIndex(BT_QUANTIZED_BVH_NODE* obj, int index) +{ + obj->setDataIndex(index); +} + +void BT_QUANTIZED_BVH_NODE_setEscapeIndex(BT_QUANTIZED_BVH_NODE* obj, int index) +{ + obj->setEscapeIndex(index); +} + +void BT_QUANTIZED_BVH_NODE_setEscapeIndexOrDataIndex(BT_QUANTIZED_BVH_NODE* obj, + int value) +{ + obj->m_escapeIndexOrDataIndex = value; +} + +bool BT_QUANTIZED_BVH_NODE_testQuantizedBoxOverlapp(BT_QUANTIZED_BVH_NODE* obj, unsigned short* quantizedMin, + unsigned short* quantizedMax) +{ + return obj->testQuantizedBoxOverlapp(quantizedMin, quantizedMax); +} + +void BT_QUANTIZED_BVH_NODE_delete(BT_QUANTIZED_BVH_NODE* obj) +{ + delete obj; +} + + +GIM_QUANTIZED_BVH_NODE_ARRAY* GIM_QUANTIZED_BVH_NODE_ARRAY_new() +{ + return new GIM_QUANTIZED_BVH_NODE_ARRAY(); +} + +void GIM_QUANTIZED_BVH_NODE_ARRAY_delete(GIM_QUANTIZED_BVH_NODE_ARRAY* obj) +{ + delete obj; +} + + +btQuantizedBvhTree* btQuantizedBvhTree_new() +{ + return new btQuantizedBvhTree(); +} + +void btQuantizedBvhTree_build_tree(btQuantizedBvhTree* obj, GIM_BVH_DATA_ARRAY* primitive_boxes) +{ + obj->build_tree(*primitive_boxes); +} + +void btQuantizedBvhTree_clearNodes(btQuantizedBvhTree* obj) +{ + obj->clearNodes(); +} + +const BT_QUANTIZED_BVH_NODE* btQuantizedBvhTree_get_node_pointer(btQuantizedBvhTree* obj, + int index) +{ + return obj->get_node_pointer(index); +} + +int btQuantizedBvhTree_getEscapeNodeIndex(btQuantizedBvhTree* obj, int nodeindex) +{ + return obj->getEscapeNodeIndex(nodeindex); +} + +int btQuantizedBvhTree_getLeftNode(btQuantizedBvhTree* obj, int nodeindex) +{ + return obj->getLeftNode(nodeindex); +} + +void btQuantizedBvhTree_getNodeBound(btQuantizedBvhTree* obj, int nodeindex, btAABB* bound) +{ + obj->getNodeBound(nodeindex, *bound); +} + +int btQuantizedBvhTree_getNodeCount(btQuantizedBvhTree* obj) +{ + return obj->getNodeCount(); +} + +int btQuantizedBvhTree_getNodeData(btQuantizedBvhTree* obj, int nodeindex) +{ + return obj->getNodeData(nodeindex); +} + +int btQuantizedBvhTree_getRightNode(btQuantizedBvhTree* obj, int nodeindex) +{ + return obj->getRightNode(nodeindex); +} + +bool btQuantizedBvhTree_isLeafNode(btQuantizedBvhTree* obj, int nodeindex) +{ + return obj->isLeafNode(nodeindex); +} + +void btQuantizedBvhTree_quantizePoint(btQuantizedBvhTree* obj, unsigned short* quantizedpoint, + const btVector3* point) +{ + BTVECTOR3_IN(point); + obj->quantizePoint(quantizedpoint, BTVECTOR3_USE(point)); +} + +void btQuantizedBvhTree_setNodeBound(btQuantizedBvhTree* obj, int nodeindex, const btAABB* bound) +{ + obj->setNodeBound(nodeindex, *bound); +} + +bool btQuantizedBvhTree_testQuantizedBoxOverlapp(btQuantizedBvhTree* obj, int node_index, + unsigned short* quantizedMin, unsigned short* quantizedMax) +{ + return obj->testQuantizedBoxOverlapp(node_index, quantizedMin, quantizedMax); +} + +void btQuantizedBvhTree_delete(btQuantizedBvhTree* obj) +{ + delete obj; +} + + +btGImpactQuantizedBvh* btGImpactQuantizedBvh_new() +{ + return new btGImpactQuantizedBvh(); +} + +btGImpactQuantizedBvh* btGImpactQuantizedBvh_new2(btPrimitiveManagerBase* primitive_manager) +{ + return new btGImpactQuantizedBvh(primitive_manager); +} + +bool btGImpactQuantizedBvh_boxQuery(btGImpactQuantizedBvh* obj, const btAABB* box, + btAlignedObjectArray_int* collided_results) +{ + return obj->boxQuery(*box, *collided_results); +} + +bool btGImpactQuantizedBvh_boxQueryTrans(btGImpactQuantizedBvh* obj, const btAABB* box, + const btTransform* transform, btAlignedObjectArray_int* collided_results) +{ + BTTRANSFORM_IN(transform); + return obj->boxQueryTrans(*box, BTTRANSFORM_USE(transform), *collided_results); +} + +void btGImpactQuantizedBvh_buildSet(btGImpactQuantizedBvh* obj) +{ + obj->buildSet(); +} + +void btGImpactQuantizedBvh_find_collision(const btGImpactQuantizedBvh* boxset1, const btTransform* trans1, + const btGImpactQuantizedBvh* boxset2, const btTransform* trans2, btPairSet* collision_pairs) +{ + BTTRANSFORM_IN(trans1); + BTTRANSFORM_IN(trans2); + btGImpactQuantizedBvh::find_collision(boxset1, BTTRANSFORM_USE(trans1), boxset2, + BTTRANSFORM_USE(trans2), *collision_pairs); +} + +const BT_QUANTIZED_BVH_NODE* btGImpactQuantizedBvh_get_node_pointer(btGImpactQuantizedBvh* obj, + int index) +{ + return obj->get_node_pointer(index); +} + +int btGImpactQuantizedBvh_getEscapeNodeIndex(btGImpactQuantizedBvh* obj, int nodeindex) +{ + return obj->getEscapeNodeIndex(nodeindex); +} + +btAABB* btGImpactQuantizedBvh_getGlobalBox(btGImpactQuantizedBvh* obj) +{ + btAABB* box = new btAABB; + *box = obj->getGlobalBox(); + return box; +} + +int btGImpactQuantizedBvh_getLeftNode(btGImpactQuantizedBvh* obj, int nodeindex) +{ + return obj->getLeftNode(nodeindex); +} + +void btGImpactQuantizedBvh_getNodeBound(btGImpactQuantizedBvh* obj, int nodeindex, + btAABB* bound) +{ + obj->getNodeBound(nodeindex, *bound); +} + +int btGImpactQuantizedBvh_getNodeCount(btGImpactQuantizedBvh* obj) +{ + return obj->getNodeCount(); +} + +int btGImpactQuantizedBvh_getNodeData(btGImpactQuantizedBvh* obj, int nodeindex) +{ + return obj->getNodeData(nodeindex); +} + +void btGImpactQuantizedBvh_getNodeTriangle(btGImpactQuantizedBvh* obj, int nodeindex, + btPrimitiveTriangle* triangle) +{ + obj->getNodeTriangle(nodeindex, *triangle); +} + +btPrimitiveManagerBase* btGImpactQuantizedBvh_getPrimitiveManager(btGImpactQuantizedBvh* obj) +{ + return obj->getPrimitiveManager(); +} + +int btGImpactQuantizedBvh_getRightNode(btGImpactQuantizedBvh* obj, int nodeindex) +{ + return obj->getRightNode(nodeindex); +} + +bool btGImpactQuantizedBvh_hasHierarchy(btGImpactQuantizedBvh* obj) +{ + return obj->hasHierarchy(); +} + +bool btGImpactQuantizedBvh_isLeafNode(btGImpactQuantizedBvh* obj, int nodeindex) +{ + return obj->isLeafNode(nodeindex); +} + +bool btGImpactQuantizedBvh_isTrimesh(btGImpactQuantizedBvh* obj) +{ + return obj->isTrimesh(); +} + +bool btGImpactQuantizedBvh_rayQuery(btGImpactQuantizedBvh* obj, const btVector3* ray_dir, + const btVector3* ray_origin, btAlignedObjectArray_int* collided_results) +{ + BTVECTOR3_IN(ray_dir); + BTVECTOR3_IN(ray_origin); + return obj->rayQuery(BTVECTOR3_USE(ray_dir), BTVECTOR3_USE(ray_origin), *collided_results); +} + +void btGImpactQuantizedBvh_setNodeBound(btGImpactQuantizedBvh* obj, int nodeindex, + const btAABB* bound) +{ + obj->setNodeBound(nodeindex, *bound); +} + +void btGImpactQuantizedBvh_setPrimitiveManager(btGImpactQuantizedBvh* obj, btPrimitiveManagerBase* primitive_manager) +{ + obj->setPrimitiveManager(primitive_manager); +} + +void btGImpactQuantizedBvh_update(btGImpactQuantizedBvh* obj) +{ + obj->update(); +} + +void btGImpactQuantizedBvh_delete(btGImpactQuantizedBvh* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.h new file mode 100644 index 0000000..0fd8651 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT BT_QUANTIZED_BVH_NODE* BT_QUANTIZED_BVH_NODE_new(); + EXPORT int BT_QUANTIZED_BVH_NODE_getDataIndex(BT_QUANTIZED_BVH_NODE* obj); + EXPORT int BT_QUANTIZED_BVH_NODE_getEscapeIndex(BT_QUANTIZED_BVH_NODE* obj); + EXPORT int BT_QUANTIZED_BVH_NODE_getEscapeIndexOrDataIndex(BT_QUANTIZED_BVH_NODE* obj); + EXPORT unsigned short* BT_QUANTIZED_BVH_NODE_getQuantizedAabbMax(BT_QUANTIZED_BVH_NODE* obj); + EXPORT unsigned short* BT_QUANTIZED_BVH_NODE_getQuantizedAabbMin(BT_QUANTIZED_BVH_NODE* obj); + EXPORT bool BT_QUANTIZED_BVH_NODE_isLeafNode(BT_QUANTIZED_BVH_NODE* obj); + EXPORT void BT_QUANTIZED_BVH_NODE_setDataIndex(BT_QUANTIZED_BVH_NODE* obj, int index); + EXPORT void BT_QUANTIZED_BVH_NODE_setEscapeIndex(BT_QUANTIZED_BVH_NODE* obj, int index); + EXPORT void BT_QUANTIZED_BVH_NODE_setEscapeIndexOrDataIndex(BT_QUANTIZED_BVH_NODE* obj, int value); + EXPORT bool BT_QUANTIZED_BVH_NODE_testQuantizedBoxOverlapp(BT_QUANTIZED_BVH_NODE* obj, unsigned short* quantizedMin, unsigned short* quantizedMax); + EXPORT void BT_QUANTIZED_BVH_NODE_delete(BT_QUANTIZED_BVH_NODE* obj); + + EXPORT GIM_QUANTIZED_BVH_NODE_ARRAY* GIM_QUANTIZED_BVH_NODE_ARRAY_new(); + EXPORT void GIM_QUANTIZED_BVH_NODE_ARRAY_delete(GIM_QUANTIZED_BVH_NODE_ARRAY* obj); + + EXPORT btQuantizedBvhTree* btQuantizedBvhTree_new(); + EXPORT void btQuantizedBvhTree_build_tree(btQuantizedBvhTree* obj, GIM_BVH_DATA_ARRAY* primitive_boxes); + EXPORT void btQuantizedBvhTree_clearNodes(btQuantizedBvhTree* obj); + EXPORT const BT_QUANTIZED_BVH_NODE* btQuantizedBvhTree_get_node_pointer(btQuantizedBvhTree* obj, int index); + EXPORT int btQuantizedBvhTree_getEscapeNodeIndex(btQuantizedBvhTree* obj, int nodeindex); + EXPORT int btQuantizedBvhTree_getLeftNode(btQuantizedBvhTree* obj, int nodeindex); + EXPORT void btQuantizedBvhTree_getNodeBound(btQuantizedBvhTree* obj, int nodeindex, btAABB* bound); + EXPORT int btQuantizedBvhTree_getNodeCount(btQuantizedBvhTree* obj); + EXPORT int btQuantizedBvhTree_getNodeData(btQuantizedBvhTree* obj, int nodeindex); + EXPORT int btQuantizedBvhTree_getRightNode(btQuantizedBvhTree* obj, int nodeindex); + EXPORT bool btQuantizedBvhTree_isLeafNode(btQuantizedBvhTree* obj, int nodeindex); + EXPORT void btQuantizedBvhTree_quantizePoint(btQuantizedBvhTree* obj, unsigned short* quantizedpoint, const btVector3* point); + EXPORT void btQuantizedBvhTree_setNodeBound(btQuantizedBvhTree* obj, int nodeindex, const btAABB* bound); + EXPORT bool btQuantizedBvhTree_testQuantizedBoxOverlapp(btQuantizedBvhTree* obj, int node_index, unsigned short* quantizedMin, unsigned short* quantizedMax); + EXPORT void btQuantizedBvhTree_delete(btQuantizedBvhTree* obj); + + EXPORT btGImpactQuantizedBvh* btGImpactQuantizedBvh_new(); + EXPORT btGImpactQuantizedBvh* btGImpactQuantizedBvh_new2(btPrimitiveManagerBase* primitive_manager); + EXPORT bool btGImpactQuantizedBvh_boxQuery(btGImpactQuantizedBvh* obj, const btAABB* box, btAlignedObjectArray_int* collided_results); + EXPORT bool btGImpactQuantizedBvh_boxQueryTrans(btGImpactQuantizedBvh* obj, const btAABB* box, const btTransform* transform, btAlignedObjectArray_int* collided_results); + EXPORT void btGImpactQuantizedBvh_buildSet(btGImpactQuantizedBvh* obj); + EXPORT void btGImpactQuantizedBvh_find_collision(const btGImpactQuantizedBvh* boxset1, const btTransform* trans1, const btGImpactQuantizedBvh* boxset2, const btTransform* trans2, btPairSet* collision_pairs); + EXPORT const BT_QUANTIZED_BVH_NODE* btGImpactQuantizedBvh_get_node_pointer(btGImpactQuantizedBvh* obj, int index); + EXPORT int btGImpactQuantizedBvh_getEscapeNodeIndex(btGImpactQuantizedBvh* obj, int nodeindex); + EXPORT btAABB* btGImpactQuantizedBvh_getGlobalBox(btGImpactQuantizedBvh* obj); + EXPORT int btGImpactQuantizedBvh_getLeftNode(btGImpactQuantizedBvh* obj, int nodeindex); + EXPORT void btGImpactQuantizedBvh_getNodeBound(btGImpactQuantizedBvh* obj, int nodeindex, btAABB* bound); + EXPORT int btGImpactQuantizedBvh_getNodeCount(btGImpactQuantizedBvh* obj); + EXPORT int btGImpactQuantizedBvh_getNodeData(btGImpactQuantizedBvh* obj, int nodeindex); + EXPORT void btGImpactQuantizedBvh_getNodeTriangle(btGImpactQuantizedBvh* obj, int nodeindex, btPrimitiveTriangle* triangle); + EXPORT btPrimitiveManagerBase* btGImpactQuantizedBvh_getPrimitiveManager(btGImpactQuantizedBvh* obj); + EXPORT int btGImpactQuantizedBvh_getRightNode(btGImpactQuantizedBvh* obj, int nodeindex); + EXPORT bool btGImpactQuantizedBvh_hasHierarchy(btGImpactQuantizedBvh* obj); + EXPORT bool btGImpactQuantizedBvh_isLeafNode(btGImpactQuantizedBvh* obj, int nodeindex); + EXPORT bool btGImpactQuantizedBvh_isTrimesh(btGImpactQuantizedBvh* obj); + EXPORT bool btGImpactQuantizedBvh_rayQuery(btGImpactQuantizedBvh* obj, const btVector3* ray_dir, const btVector3* ray_origin, btAlignedObjectArray_int* collided_results); + EXPORT void btGImpactQuantizedBvh_setNodeBound(btGImpactQuantizedBvh* obj, int nodeindex, const btAABB* bound); + EXPORT void btGImpactQuantizedBvh_setPrimitiveManager(btGImpactQuantizedBvh* obj, btPrimitiveManagerBase* primitive_manager); + EXPORT void btGImpactQuantizedBvh_update(btGImpactQuantizedBvh* obj); + EXPORT void btGImpactQuantizedBvh_delete(btGImpactQuantizedBvh* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.cpp new file mode 100644 index 0000000..ea62a6b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.cpp @@ -0,0 +1,475 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGImpactShape_wrap.h" + +btTetrahedronShapeEx* btTetrahedronShapeEx_new() +{ + return new btTetrahedronShapeEx(); +} + +void btTetrahedronShapeEx_setVertices(btTetrahedronShapeEx* obj, const btVector3* v0, + const btVector3* v1, const btVector3* v2, const btVector3* v3) +{ + BTVECTOR3_IN(v0); + BTVECTOR3_IN(v1); + BTVECTOR3_IN(v2); + BTVECTOR3_IN(v3); + obj->setVertices(BTVECTOR3_USE(v0), BTVECTOR3_USE(v1), BTVECTOR3_USE(v2), BTVECTOR3_USE(v3)); +} + + +bool btGImpactShapeInterface_childrenHasTransform(btGImpactShapeInterface* obj) +{ + return obj->childrenHasTransform(); +} + +const btGImpactBoxSet* btGImpactShapeInterface_getBoxSet(btGImpactShapeInterface* obj) +{ + return obj->getBoxSet(); +} + +void btGImpactShapeInterface_getBulletTetrahedron(btGImpactShapeInterface* obj, int prim_index, + btTetrahedronShapeEx* tetrahedron) +{ + obj->getBulletTetrahedron(prim_index, *tetrahedron); +} + +void btGImpactShapeInterface_getBulletTriangle(btGImpactShapeInterface* obj, int prim_index, + btTriangleShapeEx* triangle) +{ + obj->getBulletTriangle(prim_index, *triangle); +} + +void btGImpactShapeInterface_getChildAabb(btGImpactShapeInterface* obj, int child_index, + const btTransform* t, btVector3* aabbMin, btVector3* aabbMax) +{ + BTTRANSFORM_IN(t); + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getChildAabb(child_index, BTTRANSFORM_USE(t), BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +btCollisionShape* btGImpactShapeInterface_getChildShape(btGImpactShapeInterface* obj, + int index) +{ + return obj->getChildShape(index); +} + +void btGImpactShapeInterface_getChildTransform(btGImpactShapeInterface* obj, int index, + btTransform* value) +{ + ATTRIBUTE_ALIGNED16(btTransform) temp = obj->getChildTransform(index); + BTTRANSFORM_SET(value, temp); +} + +eGIMPACT_SHAPE_TYPE btGImpactShapeInterface_getGImpactShapeType(btGImpactShapeInterface* obj) +{ + return obj->getGImpactShapeType(); +} + +const btAABB* btGImpactShapeInterface_getLocalBox(btGImpactShapeInterface* obj) +{ + return &obj->getLocalBox(); +} + +int btGImpactShapeInterface_getNumChildShapes(btGImpactShapeInterface* obj) +{ + return obj->getNumChildShapes(); +} + +const btPrimitiveManagerBase* btGImpactShapeInterface_getPrimitiveManager(btGImpactShapeInterface* obj) +{ + return obj->getPrimitiveManager(); +} + +void btGImpactShapeInterface_getPrimitiveTriangle(btGImpactShapeInterface* obj, int index, + btPrimitiveTriangle* triangle) +{ + obj->getPrimitiveTriangle(index, *triangle); +} + +bool btGImpactShapeInterface_hasBoxSet(btGImpactShapeInterface* obj) +{ + return obj->hasBoxSet(); +} + +void btGImpactShapeInterface_lockChildShapes(btGImpactShapeInterface* obj) +{ + obj->lockChildShapes(); +} + +bool btGImpactShapeInterface_needsRetrieveTetrahedrons(btGImpactShapeInterface* obj) +{ + return obj->needsRetrieveTetrahedrons(); +} + +bool btGImpactShapeInterface_needsRetrieveTriangles(btGImpactShapeInterface* obj) +{ + return obj->needsRetrieveTriangles(); +} + +void btGImpactShapeInterface_postUpdate(btGImpactShapeInterface* obj) +{ + obj->postUpdate(); +} + +void btGImpactShapeInterface_processAllTrianglesRay(btGImpactShapeInterface* obj, + btTriangleCallback* __unnamed0, const btVector3* __unnamed1, const btVector3* __unnamed2) +{ + BTVECTOR3_IN(__unnamed1); + BTVECTOR3_IN(__unnamed2); + obj->processAllTrianglesRay(__unnamed0, BTVECTOR3_USE(__unnamed1), BTVECTOR3_USE(__unnamed2)); +} + +void btGImpactShapeInterface_rayTest(btGImpactShapeInterface* obj, const btVector3* rayFrom, + const btVector3* rayTo, btCollisionWorld_RayResultCallback* resultCallback) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + obj->rayTest(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *resultCallback); +} + +void btGImpactShapeInterface_setChildTransform(btGImpactShapeInterface* obj, int index, + const btTransform* transform) +{ + BTTRANSFORM_IN(transform); + obj->setChildTransform(index, BTTRANSFORM_USE(transform)); +} + +void btGImpactShapeInterface_unlockChildShapes(btGImpactShapeInterface* obj) +{ + obj->unlockChildShapes(); +} + +void btGImpactShapeInterface_updateBound(btGImpactShapeInterface* obj) +{ + obj->updateBound(); +} + + +btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_CompoundPrimitiveManager_new( + const btGImpactCompoundShape_CompoundPrimitiveManager* compound) +{ + return new btGImpactCompoundShape::CompoundPrimitiveManager(*compound); +} + +btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_CompoundPrimitiveManager_new2( + btGImpactCompoundShape* compoundShape) +{ + return new btGImpactCompoundShape::CompoundPrimitiveManager(compoundShape); +} + +btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_CompoundPrimitiveManager_new3() +{ + return new btGImpactCompoundShape::CompoundPrimitiveManager(); +} + +btGImpactCompoundShape* btGImpactCompoundShape_CompoundPrimitiveManager_getCompoundShape( + btGImpactCompoundShape_CompoundPrimitiveManager* obj) +{ + return obj->m_compoundShape; +} + +void btGImpactCompoundShape_CompoundPrimitiveManager_setCompoundShape(btGImpactCompoundShape_CompoundPrimitiveManager* obj, + btGImpactCompoundShape* value) +{ + obj->m_compoundShape = value; +} + + +btGImpactCompoundShape* btGImpactCompoundShape_new(bool children_has_transform) +{ + return new btGImpactCompoundShape(children_has_transform); +} + +void btGImpactCompoundShape_addChildShape(btGImpactCompoundShape* obj, const btTransform* localTransform, + btCollisionShape* shape) +{ + BTTRANSFORM_IN(localTransform); + obj->addChildShape(BTTRANSFORM_USE(localTransform), shape); +} + +void btGImpactCompoundShape_addChildShape2(btGImpactCompoundShape* obj, btCollisionShape* shape) +{ + obj->addChildShape(shape); +} + +btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_getCompoundPrimitiveManager( + btGImpactCompoundShape* obj) +{ + return obj->getCompoundPrimitiveManager(); +} + + +btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_TrimeshPrimitiveManager_new( + btStridingMeshInterface* meshInterface, int part) +{ + return new btGImpactMeshShapePart::TrimeshPrimitiveManager(meshInterface, part); +} + +btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_TrimeshPrimitiveManager_new2( + const btGImpactMeshShapePart_TrimeshPrimitiveManager* manager) +{ + return new btGImpactMeshShapePart::TrimeshPrimitiveManager(*manager); +} + +btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_TrimeshPrimitiveManager_new3() +{ + return new btGImpactMeshShapePart::TrimeshPrimitiveManager(); +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_get_bullet_triangle(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int prim_index, btTriangleShapeEx* triangle) +{ + obj->get_bullet_triangle(prim_index, *triangle); +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_get_indices(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int face_index, unsigned int* i0, unsigned int* i1, unsigned int* i2b) +{ + obj->get_indices(face_index, *i0, *i1, *i2b); +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_get_vertex(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + unsigned int vertex_index, btVector3* vertex) +{ + BTVECTOR3_DEF(vertex); + obj->get_vertex(vertex_index, BTVECTOR3_USE(vertex)); + BTVECTOR3_DEF_OUT(vertex); +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_get_vertex_count(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->get_vertex_count(); +} + +const unsigned char* btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexbase( + btGImpactMeshShapePart::TrimeshPrimitiveManager* obj) +{ + return obj->indexbase; +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexstride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->indexstride; +} + +PHY_ScalarType btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndicestype(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->indicestype; +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_getLock_count(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->m_lock_count; +} + +btScalar btGImpactMeshShapePart_TrimeshPrimitiveManager_getMargin(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->m_margin; +} + +btStridingMeshInterface* btGImpactMeshShapePart_TrimeshPrimitiveManager_getMeshInterface( + btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->m_meshInterface; +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumfaces(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->numfaces; +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumverts(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->numverts; +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_getPart(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->m_part; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_getScale(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_scale); +} + +int btGImpactMeshShapePart_TrimeshPrimitiveManager_getStride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->stride; +} + +PHY_ScalarType btGImpactMeshShapePart_TrimeshPrimitiveManager_getType(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + return obj->type; +} + +const unsigned char* btGImpactMeshShapePart_TrimeshPrimitiveManager_getVertexbase( + btGImpactMeshShapePart::TrimeshPrimitiveManager* obj) +{ + return obj->vertexbase; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_lock(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + obj->lock(); +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexbase(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + const unsigned char* value) +{ + obj->indexbase = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexstride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int value) +{ + obj->indexstride = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndicestype(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + PHY_ScalarType value) +{ + obj->indicestype = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setLock_count(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int value) +{ + obj->m_lock_count = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setMargin(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + btScalar value) +{ + obj->m_margin = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setMeshInterface(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + btStridingMeshInterface* value) +{ + obj->m_meshInterface = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumfaces(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int value) +{ + obj->numfaces = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumverts(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int value) +{ + obj->numverts = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setPart(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int value) +{ + obj->m_part = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setScale(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_scale, value); +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setStride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + int value) +{ + obj->stride = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setType(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + PHY_ScalarType value) +{ + obj->type = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_setVertexbase(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, + const unsigned char* value) +{ + obj->vertexbase = value; +} + +void btGImpactMeshShapePart_TrimeshPrimitiveManager_unlock(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj) +{ + obj->unlock(); +} + + +btGImpactMeshShapePart* btGImpactMeshShapePart_new() +{ + return new btGImpactMeshShapePart(); +} + +btGImpactMeshShapePart* btGImpactMeshShapePart_new2(btStridingMeshInterface* meshInterface, + int part) +{ + return new btGImpactMeshShapePart(meshInterface, part); +} + +int btGImpactMeshShapePart_getPart(btGImpactMeshShapePart* obj) +{ + return obj->getPart(); +} + +btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_getTrimeshPrimitiveManager( + btGImpactMeshShapePart* obj) +{ + return obj->getTrimeshPrimitiveManager(); +} + +void btGImpactMeshShapePart_getVertex(btGImpactMeshShapePart* obj, int vertex_index, + btVector3* vertex) +{ + BTVECTOR3_DEF(vertex); + obj->getVertex(vertex_index, BTVECTOR3_USE(vertex)); + BTVECTOR3_DEF_OUT(vertex); +} + +int btGImpactMeshShapePart_getVertexCount(btGImpactMeshShapePart* obj) +{ + return obj->getVertexCount(); +} + + +btGImpactMeshShape* btGImpactMeshShape_new(btStridingMeshInterface* meshInterface) +{ + return new btGImpactMeshShape(meshInterface); +} + +btStridingMeshInterface* btGImpactMeshShape_getMeshInterface(btGImpactMeshShape* obj) +{ + return obj->getMeshInterface(); +} + +btGImpactMeshShapePart* btGImpactMeshShape_getMeshPart(btGImpactMeshShape* obj, int index) +{ + return obj->getMeshPart(index); +} + +int btGImpactMeshShape_getMeshPartCount(btGImpactMeshShape* obj) +{ + return obj->getMeshPartCount(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.h new file mode 100644 index 0000000..491f9c9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGImpactShape_wrap.h @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btTetrahedronShapeEx* btTetrahedronShapeEx_new(); + EXPORT void btTetrahedronShapeEx_setVertices(btTetrahedronShapeEx* obj, const btVector3* v0, const btVector3* v1, const btVector3* v2, const btVector3* v3); + + EXPORT bool btGImpactShapeInterface_childrenHasTransform(btGImpactShapeInterface* obj); + EXPORT const btGImpactBoxSet* btGImpactShapeInterface_getBoxSet(btGImpactShapeInterface* obj); + EXPORT void btGImpactShapeInterface_getBulletTetrahedron(btGImpactShapeInterface* obj, int prim_index, btTetrahedronShapeEx* tetrahedron); + EXPORT void btGImpactShapeInterface_getBulletTriangle(btGImpactShapeInterface* obj, int prim_index, btTriangleShapeEx* triangle); + EXPORT void btGImpactShapeInterface_getChildAabb(btGImpactShapeInterface* obj, int child_index, const btTransform* t, btVector3* aabbMin, btVector3* aabbMax); + EXPORT btCollisionShape* btGImpactShapeInterface_getChildShape(btGImpactShapeInterface* obj, int index); + EXPORT void btGImpactShapeInterface_getChildTransform(btGImpactShapeInterface* obj, int index, btTransform* value); + EXPORT eGIMPACT_SHAPE_TYPE btGImpactShapeInterface_getGImpactShapeType(btGImpactShapeInterface* obj); + EXPORT const btAABB* btGImpactShapeInterface_getLocalBox(btGImpactShapeInterface* obj); + EXPORT int btGImpactShapeInterface_getNumChildShapes(btGImpactShapeInterface* obj); + EXPORT const btPrimitiveManagerBase* btGImpactShapeInterface_getPrimitiveManager(btGImpactShapeInterface* obj); + EXPORT void btGImpactShapeInterface_getPrimitiveTriangle(btGImpactShapeInterface* obj, int index, btPrimitiveTriangle* triangle); + EXPORT bool btGImpactShapeInterface_hasBoxSet(btGImpactShapeInterface* obj); + EXPORT void btGImpactShapeInterface_lockChildShapes(btGImpactShapeInterface* obj); + EXPORT bool btGImpactShapeInterface_needsRetrieveTetrahedrons(btGImpactShapeInterface* obj); + EXPORT bool btGImpactShapeInterface_needsRetrieveTriangles(btGImpactShapeInterface* obj); + EXPORT void btGImpactShapeInterface_postUpdate(btGImpactShapeInterface* obj); + EXPORT void btGImpactShapeInterface_processAllTrianglesRay(btGImpactShapeInterface* obj, btTriangleCallback* __unnamed0, const btVector3* __unnamed1, const btVector3* __unnamed2); + EXPORT void btGImpactShapeInterface_rayTest(btGImpactShapeInterface* obj, const btVector3* rayFrom, const btVector3* rayTo, btCollisionWorld_RayResultCallback* resultCallback); + EXPORT void btGImpactShapeInterface_setChildTransform(btGImpactShapeInterface* obj, int index, const btTransform* transform); + EXPORT void btGImpactShapeInterface_unlockChildShapes(btGImpactShapeInterface* obj); + EXPORT void btGImpactShapeInterface_updateBound(btGImpactShapeInterface* obj); + + EXPORT btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_CompoundPrimitiveManager_new(const btGImpactCompoundShape_CompoundPrimitiveManager* compound); + EXPORT btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_CompoundPrimitiveManager_new2(btGImpactCompoundShape* compoundShape); + EXPORT btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_CompoundPrimitiveManager_new3(); + EXPORT btGImpactCompoundShape* btGImpactCompoundShape_CompoundPrimitiveManager_getCompoundShape(btGImpactCompoundShape_CompoundPrimitiveManager* obj); + EXPORT void btGImpactCompoundShape_CompoundPrimitiveManager_setCompoundShape(btGImpactCompoundShape_CompoundPrimitiveManager* obj, btGImpactCompoundShape* value); + + EXPORT btGImpactCompoundShape* btGImpactCompoundShape_new(bool children_has_transform); + EXPORT void btGImpactCompoundShape_addChildShape(btGImpactCompoundShape* obj, const btTransform* localTransform, btCollisionShape* shape); + EXPORT void btGImpactCompoundShape_addChildShape2(btGImpactCompoundShape* obj, btCollisionShape* shape); + EXPORT btGImpactCompoundShape_CompoundPrimitiveManager* btGImpactCompoundShape_getCompoundPrimitiveManager(btGImpactCompoundShape* obj); + + EXPORT btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_TrimeshPrimitiveManager_new(btStridingMeshInterface* meshInterface, int part); + EXPORT btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_TrimeshPrimitiveManager_new2(const btGImpactMeshShapePart_TrimeshPrimitiveManager* manager); + EXPORT btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_TrimeshPrimitiveManager_new3(); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_get_bullet_triangle(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int prim_index, btTriangleShapeEx* triangle); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_get_indices(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int face_index, unsigned int* i0, unsigned int* i1, unsigned int* i2b); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_get_vertex(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, unsigned int vertex_index, btVector3* vertex); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_get_vertex_count(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT const unsigned char* btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexbase(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndexstride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT PHY_ScalarType btGImpactMeshShapePart_TrimeshPrimitiveManager_getIndicestype(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_getLock_count(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT btScalar btGImpactMeshShapePart_TrimeshPrimitiveManager_getMargin(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT btStridingMeshInterface* btGImpactMeshShapePart_TrimeshPrimitiveManager_getMeshInterface(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumfaces(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_getNumverts(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_getPart(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_getScale(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, btVector3* value); + EXPORT int btGImpactMeshShapePart_TrimeshPrimitiveManager_getStride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT PHY_ScalarType btGImpactMeshShapePart_TrimeshPrimitiveManager_getType(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT const unsigned char* btGImpactMeshShapePart_TrimeshPrimitiveManager_getVertexbase(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_lock(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexbase(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, const unsigned char* value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndexstride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setIndicestype(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, PHY_ScalarType value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setLock_count(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setMargin(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, btScalar value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setMeshInterface(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, btStridingMeshInterface* value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumfaces(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setNumverts(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setPart(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setScale(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, const btVector3* value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setStride(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, int value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setType(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, PHY_ScalarType value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_setVertexbase(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj, const unsigned char* value); + EXPORT void btGImpactMeshShapePart_TrimeshPrimitiveManager_unlock(btGImpactMeshShapePart_TrimeshPrimitiveManager* obj); + + EXPORT btGImpactMeshShapePart* btGImpactMeshShapePart_new(); + EXPORT btGImpactMeshShapePart* btGImpactMeshShapePart_new2(btStridingMeshInterface* meshInterface, int part); + EXPORT int btGImpactMeshShapePart_getPart(btGImpactMeshShapePart* obj); + EXPORT btGImpactMeshShapePart_TrimeshPrimitiveManager* btGImpactMeshShapePart_getTrimeshPrimitiveManager(btGImpactMeshShapePart* obj); + EXPORT void btGImpactMeshShapePart_getVertex(btGImpactMeshShapePart* obj, int vertex_index, btVector3* vertex); + EXPORT int btGImpactMeshShapePart_getVertexCount(btGImpactMeshShapePart* obj); + + EXPORT btGImpactMeshShape* btGImpactMeshShape_new(btStridingMeshInterface* meshInterface); + EXPORT btStridingMeshInterface* btGImpactMeshShape_getMeshInterface(btGImpactMeshShape* obj); + EXPORT btGImpactMeshShapePart* btGImpactMeshShape_getMeshPart(btGImpactMeshShape* obj, int index); + EXPORT int btGImpactMeshShape_getMeshPartCount(btGImpactMeshShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.cpp new file mode 100644 index 0000000..7b73f8b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGearConstraint_wrap.h" + +btGearConstraint* btGearConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* axisInA, + const btVector3* axisInB, btScalar ratio) +{ + BTVECTOR3_IN(axisInA); + BTVECTOR3_IN(axisInB); + return new btGearConstraint(*rbA, *rbB, BTVECTOR3_USE(axisInA), BTVECTOR3_USE(axisInB), + ratio); +} + +void btGearConstraint_getAxisA(btGearConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxisA()); +} + +void btGearConstraint_getAxisB(btGearConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxisB()); +} + +btScalar btGearConstraint_getRatio(btGearConstraint* obj) +{ + return obj->getRatio(); +} + +void btGearConstraint_setAxisA(btGearConstraint* obj, btVector3* axisA) +{ + BTVECTOR3_IN(axisA); + obj->setAxisA(BTVECTOR3_USE(axisA)); +} + +void btGearConstraint_setAxisB(btGearConstraint* obj, btVector3* axisB) +{ + BTVECTOR3_IN(axisB); + obj->setAxisB(BTVECTOR3_USE(axisB)); +} + +void btGearConstraint_setRatio(btGearConstraint* obj, btScalar ratio) +{ + obj->setRatio(ratio); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.h new file mode 100644 index 0000000..c2934ff --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGearConstraint_wrap.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGearConstraint* btGearConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* axisInA, const btVector3* axisInB, btScalar ratio); + EXPORT void btGearConstraint_getAxisA(btGearConstraint* obj, btVector3* value); + EXPORT void btGearConstraint_getAxisB(btGearConstraint* obj, btVector3* value); + EXPORT btScalar btGearConstraint_getRatio(btGearConstraint* obj); + EXPORT void btGearConstraint_setAxisA(btGearConstraint* obj, btVector3* axisA); + EXPORT void btGearConstraint_setAxisB(btGearConstraint* obj, btVector3* axisB); + EXPORT void btGearConstraint_setRatio(btGearConstraint* obj, btScalar ratio); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.cpp new file mode 100644 index 0000000..2b71003 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.cpp @@ -0,0 +1,662 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGeneric6DofConstraint_wrap.h" + +btRotationalLimitMotor* btRotationalLimitMotor_new() +{ + return new btRotationalLimitMotor(); +} + +btRotationalLimitMotor* btRotationalLimitMotor_new2(const btRotationalLimitMotor* limot) +{ + return new btRotationalLimitMotor(*limot); +} + +btScalar btRotationalLimitMotor_getAccumulatedImpulse(btRotationalLimitMotor* obj) +{ + return obj->m_accumulatedImpulse; +} + +btScalar btRotationalLimitMotor_getBounce(btRotationalLimitMotor* obj) +{ + return obj->m_bounce; +} + +int btRotationalLimitMotor_getCurrentLimit(btRotationalLimitMotor* obj) +{ + return obj->m_currentLimit; +} + +btScalar btRotationalLimitMotor_getCurrentLimitError(btRotationalLimitMotor* obj) +{ + return obj->m_currentLimitError; +} + +btScalar btRotationalLimitMotor_getCurrentPosition(btRotationalLimitMotor* obj) +{ + return obj->m_currentPosition; +} + +btScalar btRotationalLimitMotor_getDamping(btRotationalLimitMotor* obj) +{ + return obj->m_damping; +} + +bool btRotationalLimitMotor_getEnableMotor(btRotationalLimitMotor* obj) +{ + return obj->m_enableMotor; +} + +btScalar btRotationalLimitMotor_getHiLimit(btRotationalLimitMotor* obj) +{ + return obj->m_hiLimit; +} + +btScalar btRotationalLimitMotor_getLimitSoftness(btRotationalLimitMotor* obj) +{ + return obj->m_limitSoftness; +} + +btScalar btRotationalLimitMotor_getLoLimit(btRotationalLimitMotor* obj) +{ + return obj->m_loLimit; +} + +btScalar btRotationalLimitMotor_getMaxLimitForce(btRotationalLimitMotor* obj) +{ + return obj->m_maxLimitForce; +} + +btScalar btRotationalLimitMotor_getMaxMotorForce(btRotationalLimitMotor* obj) +{ + return obj->m_maxMotorForce; +} + +btScalar btRotationalLimitMotor_getNormalCFM(btRotationalLimitMotor* obj) +{ + return obj->m_normalCFM; +} + +btScalar btRotationalLimitMotor_getStopCFM(btRotationalLimitMotor* obj) +{ + return obj->m_stopCFM; +} + +btScalar btRotationalLimitMotor_getStopERP(btRotationalLimitMotor* obj) +{ + return obj->m_stopERP; +} + +btScalar btRotationalLimitMotor_getTargetVelocity(btRotationalLimitMotor* obj) +{ + return obj->m_targetVelocity; +} + +bool btRotationalLimitMotor_isLimited(btRotationalLimitMotor* obj) +{ + return obj->isLimited(); +} + +bool btRotationalLimitMotor_needApplyTorques(btRotationalLimitMotor* obj) +{ + return obj->needApplyTorques(); +} + +void btRotationalLimitMotor_setAccumulatedImpulse(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_accumulatedImpulse = value; +} + +void btRotationalLimitMotor_setBounce(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_bounce = value; +} + +void btRotationalLimitMotor_setCurrentLimit(btRotationalLimitMotor* obj, int value) +{ + obj->m_currentLimit = value; +} + +void btRotationalLimitMotor_setCurrentLimitError(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_currentLimitError = value; +} + +void btRotationalLimitMotor_setCurrentPosition(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_currentPosition = value; +} + +void btRotationalLimitMotor_setDamping(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_damping = value; +} + +void btRotationalLimitMotor_setEnableMotor(btRotationalLimitMotor* obj, bool value) +{ + obj->m_enableMotor = value; +} + +void btRotationalLimitMotor_setHiLimit(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_hiLimit = value; +} + +void btRotationalLimitMotor_setLimitSoftness(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_limitSoftness = value; +} + +void btRotationalLimitMotor_setLoLimit(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_loLimit = value; +} + +void btRotationalLimitMotor_setMaxLimitForce(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_maxLimitForce = value; +} + +void btRotationalLimitMotor_setMaxMotorForce(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_maxMotorForce = value; +} + +void btRotationalLimitMotor_setNormalCFM(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_normalCFM = value; +} + +void btRotationalLimitMotor_setStopCFM(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_stopCFM = value; +} + +void btRotationalLimitMotor_setStopERP(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_stopERP = value; +} + +void btRotationalLimitMotor_setTargetVelocity(btRotationalLimitMotor* obj, btScalar value) +{ + obj->m_targetVelocity = value; +} + +btScalar btRotationalLimitMotor_solveAngularLimits(btRotationalLimitMotor* obj, btScalar timeStep, + btVector3* axis, btScalar jacDiagABInv, btRigidBody* body0, btRigidBody* body1) +{ + BTVECTOR3_IN(axis); + return obj->solveAngularLimits(timeStep, BTVECTOR3_USE(axis), jacDiagABInv, body0, + body1); +} + +int btRotationalLimitMotor_testLimitValue(btRotationalLimitMotor* obj, btScalar test_value) +{ + return obj->testLimitValue(test_value); +} + +void btRotationalLimitMotor_delete(btRotationalLimitMotor* obj) +{ + delete obj; +} + + +btTranslationalLimitMotor* btTranslationalLimitMotor_new() +{ + return new btTranslationalLimitMotor(); +} + +btTranslationalLimitMotor* btTranslationalLimitMotor_new2(const btTranslationalLimitMotor* other) +{ + return new btTranslationalLimitMotor(*other); +} + +void btTranslationalLimitMotor_getAccumulatedImpulse(btTranslationalLimitMotor* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_accumulatedImpulse); +} + +int* btTranslationalLimitMotor_getCurrentLimit(btTranslationalLimitMotor* obj) +{ + return obj->m_currentLimit; +} + +void btTranslationalLimitMotor_getCurrentLimitError(btTranslationalLimitMotor* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_currentLimitError); +} + +void btTranslationalLimitMotor_getCurrentLinearDiff(btTranslationalLimitMotor* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_currentLinearDiff); +} + +btScalar btTranslationalLimitMotor_getDamping(btTranslationalLimitMotor* obj) +{ + return obj->m_damping; +} + +bool* btTranslationalLimitMotor_getEnableMotor(btTranslationalLimitMotor* obj) +{ + return obj->m_enableMotor; +} + +btScalar btTranslationalLimitMotor_getLimitSoftness(btTranslationalLimitMotor* obj) +{ + return obj->m_limitSoftness; +} + +void btTranslationalLimitMotor_getLowerLimit(btTranslationalLimitMotor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_lowerLimit); +} + +void btTranslationalLimitMotor_getMaxMotorForce(btTranslationalLimitMotor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_maxMotorForce); +} + +void btTranslationalLimitMotor_getNormalCFM(btTranslationalLimitMotor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normalCFM); +} + +btScalar btTranslationalLimitMotor_getRestitution(btTranslationalLimitMotor* obj) +{ + return obj->m_restitution; +} + +void btTranslationalLimitMotor_getStopCFM(btTranslationalLimitMotor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_stopCFM); +} + +void btTranslationalLimitMotor_getStopERP(btTranslationalLimitMotor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_stopERP); +} + +void btTranslationalLimitMotor_getTargetVelocity(btTranslationalLimitMotor* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_targetVelocity); +} + +void btTranslationalLimitMotor_getUpperLimit(btTranslationalLimitMotor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_upperLimit); +} + +bool btTranslationalLimitMotor_isLimited(btTranslationalLimitMotor* obj, int limitIndex) +{ + return obj->isLimited(limitIndex); +} + +bool btTranslationalLimitMotor_needApplyForce(btTranslationalLimitMotor* obj, int limitIndex) +{ + return obj->needApplyForce(limitIndex); +} + +void btTranslationalLimitMotor_setAccumulatedImpulse(btTranslationalLimitMotor* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_accumulatedImpulse, value); +} + +void btTranslationalLimitMotor_setCurrentLimitError(btTranslationalLimitMotor* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_currentLimitError, value); +} + +void btTranslationalLimitMotor_setCurrentLinearDiff(btTranslationalLimitMotor* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_currentLinearDiff, value); +} + +void btTranslationalLimitMotor_setDamping(btTranslationalLimitMotor* obj, btScalar value) +{ + obj->m_damping = value; +} + +void btTranslationalLimitMotor_setLimitSoftness(btTranslationalLimitMotor* obj, btScalar value) +{ + obj->m_limitSoftness = value; +} + +void btTranslationalLimitMotor_setLowerLimit(btTranslationalLimitMotor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_lowerLimit, value); +} + +void btTranslationalLimitMotor_setMaxMotorForce(btTranslationalLimitMotor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_maxMotorForce, value); +} + +void btTranslationalLimitMotor_setNormalCFM(btTranslationalLimitMotor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normalCFM, value); +} + +void btTranslationalLimitMotor_setRestitution(btTranslationalLimitMotor* obj, btScalar value) +{ + obj->m_restitution = value; +} + +void btTranslationalLimitMotor_setStopCFM(btTranslationalLimitMotor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_stopCFM, value); +} + +void btTranslationalLimitMotor_setStopERP(btTranslationalLimitMotor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_stopERP, value); +} + +void btTranslationalLimitMotor_setTargetVelocity(btTranslationalLimitMotor* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_targetVelocity, value); +} + +void btTranslationalLimitMotor_setUpperLimit(btTranslationalLimitMotor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_upperLimit, value); +} + +btScalar btTranslationalLimitMotor_solveLinearAxis(btTranslationalLimitMotor* obj, + btScalar timeStep, btScalar jacDiagABInv, btRigidBody* body1, const btVector3* pointInA, + btRigidBody* body2, const btVector3* pointInB, int limit_index, const btVector3* axis_normal_on_a, + const btVector3* anchorPos) +{ + BTVECTOR3_IN(pointInA); + BTVECTOR3_IN(pointInB); + BTVECTOR3_IN(axis_normal_on_a); + BTVECTOR3_IN(anchorPos); + return obj->solveLinearAxis(timeStep, jacDiagABInv, *body1, BTVECTOR3_USE(pointInA), + *body2, BTVECTOR3_USE(pointInB), limit_index, BTVECTOR3_USE(axis_normal_on_a), + BTVECTOR3_USE(anchorPos)); +} + +int btTranslationalLimitMotor_testLimitValue(btTranslationalLimitMotor* obj, int limitIndex, + btScalar test_value) +{ + return obj->testLimitValue(limitIndex, test_value); +} + +void btTranslationalLimitMotor_delete(btTranslationalLimitMotor* obj) +{ + delete obj; +} + + +btGeneric6DofConstraint* btGeneric6DofConstraint_new(btRigidBody* rbA, btRigidBody* rbB, + const btTransform* frameInA, const btTransform* frameInB, bool useLinearReferenceFrameA) +{ + BTTRANSFORM_IN(frameInA); + BTTRANSFORM_IN(frameInB); + return new btGeneric6DofConstraint(*rbA, *rbB, BTTRANSFORM_USE(frameInA), BTTRANSFORM_USE(frameInB), + useLinearReferenceFrameA); +} + +btGeneric6DofConstraint* btGeneric6DofConstraint_new2(btRigidBody* rbB, const btTransform* frameInB, + bool useLinearReferenceFrameB) +{ + BTTRANSFORM_IN(frameInB); + return new btGeneric6DofConstraint(*rbB, BTTRANSFORM_USE(frameInB), useLinearReferenceFrameB); +} + +void btGeneric6DofConstraint_calcAnchorPos(btGeneric6DofConstraint* obj) +{ + obj->calcAnchorPos(); +} + +void btGeneric6DofConstraint_calculateTransforms(btGeneric6DofConstraint* obj, const btTransform* transA, + const btTransform* transB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + obj->calculateTransforms(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +void btGeneric6DofConstraint_calculateTransforms2(btGeneric6DofConstraint* obj) +{ + obj->calculateTransforms(); +} + +int btGeneric6DofConstraint_get_limit_motor_info2(btGeneric6DofConstraint* obj, + btRotationalLimitMotor* limot, const btTransform* transA, const btTransform* transB, + const btVector3* linVelA, const btVector3* linVelB, const btVector3* angVelA, const btVector3* angVelB, + btTypedConstraint_btConstraintInfo2* info, int row, btVector3* ax1, int rotational, + int rotAllowed = 0) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_IN(linVelA); + BTVECTOR3_IN(linVelB); + BTVECTOR3_IN(angVelA); + BTVECTOR3_IN(angVelB); + BTVECTOR3_IN(ax1); + int ret = obj->get_limit_motor_info2(limot, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTVECTOR3_USE(linVelA), BTVECTOR3_USE(linVelB), BTVECTOR3_USE(angVelA), BTVECTOR3_USE(angVelB), + info, row, BTVECTOR3_USE(ax1), rotational, rotAllowed); + BTVECTOR3_DEF_OUT(ax1); + return ret; +} + +btScalar btGeneric6DofConstraint_getAngle(btGeneric6DofConstraint* obj, int axis_index) +{ + return obj->getAngle(axis_index); +} + +void btGeneric6DofConstraint_getAngularLowerLimit(btGeneric6DofConstraint* obj, btVector3* angularLower) +{ + BTVECTOR3_IN(angularLower); + obj->getAngularLowerLimit(BTVECTOR3_USE(angularLower)); + BTVECTOR3_DEF_OUT(angularLower); +} + +void btGeneric6DofConstraint_getAngularUpperLimit(btGeneric6DofConstraint* obj, btVector3* angularUpper) +{ + BTVECTOR3_IN(angularUpper); + obj->getAngularUpperLimit(BTVECTOR3_USE(angularUpper)); + BTVECTOR3_DEF_OUT(angularUpper); +} + +void btGeneric6DofConstraint_getAxis(btGeneric6DofConstraint* obj, int axis_index, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getAxis(axis_index); + BTVECTOR3_SET(value, temp); +} + +void btGeneric6DofConstraint_getCalculatedTransformA(btGeneric6DofConstraint* obj, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCalculatedTransformA()); +} + +void btGeneric6DofConstraint_getCalculatedTransformB(btGeneric6DofConstraint* obj, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCalculatedTransformB()); +} + +int btGeneric6DofConstraint_getFlags(btGeneric6DofConstraint* obj) +{ + return obj->getFlags(); +} + +void btGeneric6DofConstraint_getFrameOffsetA(btGeneric6DofConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetA()); +} + +void btGeneric6DofConstraint_getFrameOffsetB(btGeneric6DofConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetB()); +} + +void btGeneric6DofConstraint_getInfo1NonVirtual(btGeneric6DofConstraint* obj, btTypedConstraint_btConstraintInfo1* info) +{ + obj->getInfo1NonVirtual(info); +} + +void btGeneric6DofConstraint_getInfo2NonVirtual(btGeneric6DofConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* transA, const btTransform* transB, const btVector3* linVelA, + const btVector3* linVelB, const btVector3* angVelA, const btVector3* angVelB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_IN(linVelA); + BTVECTOR3_IN(linVelB); + BTVECTOR3_IN(angVelA); + BTVECTOR3_IN(angVelB); + obj->getInfo2NonVirtual(info, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTVECTOR3_USE(linVelA), BTVECTOR3_USE(linVelB), BTVECTOR3_USE(angVelA), BTVECTOR3_USE(angVelB)); +} + +void btGeneric6DofConstraint_getLinearLowerLimit(btGeneric6DofConstraint* obj, btVector3* linearLower) +{ + BTVECTOR3_IN(linearLower); + obj->getLinearLowerLimit(BTVECTOR3_USE(linearLower)); + BTVECTOR3_DEF_OUT(linearLower); +} + +void btGeneric6DofConstraint_getLinearUpperLimit(btGeneric6DofConstraint* obj, btVector3* linearUpper) +{ + BTVECTOR3_IN(linearUpper); + obj->getLinearUpperLimit(BTVECTOR3_USE(linearUpper)); + BTVECTOR3_DEF_OUT(linearUpper); +} + +btScalar btGeneric6DofConstraint_getRelativePivotPosition(btGeneric6DofConstraint* obj, + int axis_index) +{ + return obj->getRelativePivotPosition(axis_index); +} + +btRotationalLimitMotor* btGeneric6DofConstraint_getRotationalLimitMotor(btGeneric6DofConstraint* obj, + int index) +{ + return obj->getRotationalLimitMotor(index); +} + +btTranslationalLimitMotor* btGeneric6DofConstraint_getTranslationalLimitMotor(btGeneric6DofConstraint* obj) +{ + return obj->getTranslationalLimitMotor(); +} + +bool btGeneric6DofConstraint_getUseFrameOffset(btGeneric6DofConstraint* obj) +{ + return obj->getUseFrameOffset(); +} + +bool btGeneric6DofConstraint_getUseLinearReferenceFrameA(btGeneric6DofConstraint* obj) +{ + return obj->getUseLinearReferenceFrameA(); +} + +bool btGeneric6DofConstraint_getUseSolveConstraintObsolete(btGeneric6DofConstraint* obj) +{ + return obj->m_useSolveConstraintObsolete; +} + +bool btGeneric6DofConstraint_isLimited(btGeneric6DofConstraint* obj, int limitIndex) +{ + return obj->isLimited(limitIndex); +} + +void btGeneric6DofConstraint_setAngularLowerLimit(btGeneric6DofConstraint* obj, const btVector3* angularLower) +{ + BTVECTOR3_IN(angularLower); + obj->setAngularLowerLimit(BTVECTOR3_USE(angularLower)); +} + +void btGeneric6DofConstraint_setAngularUpperLimit(btGeneric6DofConstraint* obj, const btVector3* angularUpper) +{ + BTVECTOR3_IN(angularUpper); + obj->setAngularUpperLimit(BTVECTOR3_USE(angularUpper)); +} + +void btGeneric6DofConstraint_setAxis(btGeneric6DofConstraint* obj, const btVector3* axis1, + const btVector3* axis2) +{ + BTVECTOR3_IN(axis1); + BTVECTOR3_IN(axis2); + obj->setAxis(BTVECTOR3_USE(axis1), BTVECTOR3_USE(axis2)); +} + +void btGeneric6DofConstraint_setFrames(btGeneric6DofConstraint* obj, const btTransform* frameA, + const btTransform* frameB) +{ + BTTRANSFORM_IN(frameA); + BTTRANSFORM_IN(frameB); + obj->setFrames(BTTRANSFORM_USE(frameA), BTTRANSFORM_USE(frameB)); +} + +void btGeneric6DofConstraint_setLimit(btGeneric6DofConstraint* obj, int axis, btScalar lo, + btScalar hi) +{ + obj->setLimit(axis, lo, hi); +} + +void btGeneric6DofConstraint_setLinearLowerLimit(btGeneric6DofConstraint* obj, const btVector3* linearLower) +{ + BTVECTOR3_IN(linearLower); + obj->setLinearLowerLimit(BTVECTOR3_USE(linearLower)); +} + +void btGeneric6DofConstraint_setLinearUpperLimit(btGeneric6DofConstraint* obj, const btVector3* linearUpper) +{ + BTVECTOR3_IN(linearUpper); + obj->setLinearUpperLimit(BTVECTOR3_USE(linearUpper)); +} + +void btGeneric6DofConstraint_setUseFrameOffset(btGeneric6DofConstraint* obj, bool frameOffsetOnOff) +{ + obj->setUseFrameOffset(frameOffsetOnOff); +} + +void btGeneric6DofConstraint_setUseLinearReferenceFrameA(btGeneric6DofConstraint* obj, + bool linearReferenceFrameA) +{ + obj->setUseLinearReferenceFrameA(linearReferenceFrameA); +} + +void btGeneric6DofConstraint_setUseSolveConstraintObsolete(btGeneric6DofConstraint* obj, + bool value) +{ + obj->m_useSolveConstraintObsolete = value; +} + +bool btGeneric6DofConstraint_testAngularLimitMotor(btGeneric6DofConstraint* obj, + int axis_index) +{ + return obj->testAngularLimitMotor(axis_index); +} + +void btGeneric6DofConstraint_updateRHS(btGeneric6DofConstraint* obj, btScalar timeStep) +{ + obj->updateRHS(timeStep); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.h new file mode 100644 index 0000000..067470e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btRotationalLimitMotor* btRotationalLimitMotor_new(); + EXPORT btRotationalLimitMotor* btRotationalLimitMotor_new2(const btRotationalLimitMotor* limot); + EXPORT btScalar btRotationalLimitMotor_getAccumulatedImpulse(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getBounce(btRotationalLimitMotor* obj); + EXPORT int btRotationalLimitMotor_getCurrentLimit(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getCurrentLimitError(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getCurrentPosition(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getDamping(btRotationalLimitMotor* obj); + EXPORT bool btRotationalLimitMotor_getEnableMotor(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getHiLimit(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getLimitSoftness(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getLoLimit(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getMaxLimitForce(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getMaxMotorForce(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getNormalCFM(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getStopCFM(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getStopERP(btRotationalLimitMotor* obj); + EXPORT btScalar btRotationalLimitMotor_getTargetVelocity(btRotationalLimitMotor* obj); + EXPORT bool btRotationalLimitMotor_isLimited(btRotationalLimitMotor* obj); + EXPORT bool btRotationalLimitMotor_needApplyTorques(btRotationalLimitMotor* obj); + EXPORT void btRotationalLimitMotor_setAccumulatedImpulse(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setBounce(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setCurrentLimit(btRotationalLimitMotor* obj, int value); + EXPORT void btRotationalLimitMotor_setCurrentLimitError(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setCurrentPosition(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setDamping(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setEnableMotor(btRotationalLimitMotor* obj, bool value); + EXPORT void btRotationalLimitMotor_setHiLimit(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setLimitSoftness(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setLoLimit(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setMaxLimitForce(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setMaxMotorForce(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setNormalCFM(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setStopCFM(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setStopERP(btRotationalLimitMotor* obj, btScalar value); + EXPORT void btRotationalLimitMotor_setTargetVelocity(btRotationalLimitMotor* obj, btScalar value); + EXPORT btScalar btRotationalLimitMotor_solveAngularLimits(btRotationalLimitMotor* obj, btScalar timeStep, btVector3* axis, btScalar jacDiagABInv, btRigidBody* body0, btRigidBody* body1); + EXPORT int btRotationalLimitMotor_testLimitValue(btRotationalLimitMotor* obj, btScalar test_value); + EXPORT void btRotationalLimitMotor_delete(btRotationalLimitMotor* obj); + + EXPORT btTranslationalLimitMotor* btTranslationalLimitMotor_new(); + EXPORT btTranslationalLimitMotor* btTranslationalLimitMotor_new2(const btTranslationalLimitMotor* other); + EXPORT void btTranslationalLimitMotor_getAccumulatedImpulse(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT int* btTranslationalLimitMotor_getCurrentLimit(btTranslationalLimitMotor* obj); + EXPORT void btTranslationalLimitMotor_getCurrentLimitError(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor_getCurrentLinearDiff(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT btScalar btTranslationalLimitMotor_getDamping(btTranslationalLimitMotor* obj); + EXPORT bool* btTranslationalLimitMotor_getEnableMotor(btTranslationalLimitMotor* obj); + EXPORT btScalar btTranslationalLimitMotor_getLimitSoftness(btTranslationalLimitMotor* obj); + EXPORT void btTranslationalLimitMotor_getLowerLimit(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor_getMaxMotorForce(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor_getNormalCFM(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT btScalar btTranslationalLimitMotor_getRestitution(btTranslationalLimitMotor* obj); + EXPORT void btTranslationalLimitMotor_getStopCFM(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor_getStopERP(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor_getTargetVelocity(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor_getUpperLimit(btTranslationalLimitMotor* obj, btVector3* value); + EXPORT bool btTranslationalLimitMotor_isLimited(btTranslationalLimitMotor* obj, int limitIndex); + EXPORT bool btTranslationalLimitMotor_needApplyForce(btTranslationalLimitMotor* obj, int limitIndex); + EXPORT void btTranslationalLimitMotor_setAccumulatedImpulse(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setCurrentLimitError(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setCurrentLinearDiff(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setDamping(btTranslationalLimitMotor* obj, btScalar value); + EXPORT void btTranslationalLimitMotor_setLimitSoftness(btTranslationalLimitMotor* obj, btScalar value); + EXPORT void btTranslationalLimitMotor_setLowerLimit(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setMaxMotorForce(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setNormalCFM(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setRestitution(btTranslationalLimitMotor* obj, btScalar value); + EXPORT void btTranslationalLimitMotor_setStopCFM(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setStopERP(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setTargetVelocity(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor_setUpperLimit(btTranslationalLimitMotor* obj, const btVector3* value); + EXPORT btScalar btTranslationalLimitMotor_solveLinearAxis(btTranslationalLimitMotor* obj, btScalar timeStep, btScalar jacDiagABInv, btRigidBody* body1, const btVector3* pointInA, btRigidBody* body2, const btVector3* pointInB, int limit_index, const btVector3* axis_normal_on_a, const btVector3* anchorPos); + EXPORT int btTranslationalLimitMotor_testLimitValue(btTranslationalLimitMotor* obj, int limitIndex, btScalar test_value); + EXPORT void btTranslationalLimitMotor_delete(btTranslationalLimitMotor* obj); + + EXPORT btGeneric6DofConstraint* btGeneric6DofConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB, bool useLinearReferenceFrameA); + EXPORT btGeneric6DofConstraint* btGeneric6DofConstraint_new2(btRigidBody* rbB, const btTransform* frameInB, bool useLinearReferenceFrameB); + EXPORT void btGeneric6DofConstraint_calcAnchorPos(btGeneric6DofConstraint* obj); + EXPORT void btGeneric6DofConstraint_calculateTransforms(btGeneric6DofConstraint* obj, const btTransform* transA, const btTransform* transB); + EXPORT void btGeneric6DofConstraint_calculateTransforms2(btGeneric6DofConstraint* obj); + EXPORT int btGeneric6DofConstraint_get_limit_motor_info2(btGeneric6DofConstraint* obj, btRotationalLimitMotor* limot, const btTransform* transA, const btTransform* transB, const btVector3* linVelA, const btVector3* linVelB, const btVector3* angVelA, const btVector3* angVelB, btTypedConstraint_btConstraintInfo2* info, int row, btVector3* ax1, int rotational, int rotAllowed); + EXPORT btScalar btGeneric6DofConstraint_getAngle(btGeneric6DofConstraint* obj, int axis_index); + EXPORT void btGeneric6DofConstraint_getAngularLowerLimit(btGeneric6DofConstraint* obj, btVector3* angularLower); + EXPORT void btGeneric6DofConstraint_getAngularUpperLimit(btGeneric6DofConstraint* obj, btVector3* angularUpper); + EXPORT void btGeneric6DofConstraint_getAxis(btGeneric6DofConstraint* obj, int axis_index, btVector3* value); + EXPORT void btGeneric6DofConstraint_getCalculatedTransformA(btGeneric6DofConstraint* obj, btTransform* value); + EXPORT void btGeneric6DofConstraint_getCalculatedTransformB(btGeneric6DofConstraint* obj, btTransform* value); + EXPORT int btGeneric6DofConstraint_getFlags(btGeneric6DofConstraint* obj); + EXPORT void btGeneric6DofConstraint_getFrameOffsetA(btGeneric6DofConstraint* obj, btTransform* value); + EXPORT void btGeneric6DofConstraint_getFrameOffsetB(btGeneric6DofConstraint* obj, btTransform* value); + EXPORT void btGeneric6DofConstraint_getInfo1NonVirtual(btGeneric6DofConstraint* obj, btTypedConstraint_btConstraintInfo1* info); + EXPORT void btGeneric6DofConstraint_getInfo2NonVirtual(btGeneric6DofConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* transA, const btTransform* transB, const btVector3* linVelA, const btVector3* linVelB, const btVector3* angVelA, const btVector3* angVelB); + EXPORT void btGeneric6DofConstraint_getLinearLowerLimit(btGeneric6DofConstraint* obj, btVector3* linearLower); + EXPORT void btGeneric6DofConstraint_getLinearUpperLimit(btGeneric6DofConstraint* obj, btVector3* linearUpper); + EXPORT btScalar btGeneric6DofConstraint_getRelativePivotPosition(btGeneric6DofConstraint* obj, int axis_index); + EXPORT btRotationalLimitMotor* btGeneric6DofConstraint_getRotationalLimitMotor(btGeneric6DofConstraint* obj, int index); + EXPORT btTranslationalLimitMotor* btGeneric6DofConstraint_getTranslationalLimitMotor(btGeneric6DofConstraint* obj); + EXPORT bool btGeneric6DofConstraint_getUseFrameOffset(btGeneric6DofConstraint* obj); + EXPORT bool btGeneric6DofConstraint_getUseLinearReferenceFrameA(btGeneric6DofConstraint* obj); + EXPORT bool btGeneric6DofConstraint_getUseSolveConstraintObsolete(btGeneric6DofConstraint* obj); + EXPORT bool btGeneric6DofConstraint_isLimited(btGeneric6DofConstraint* obj, int limitIndex); + EXPORT void btGeneric6DofConstraint_setAngularLowerLimit(btGeneric6DofConstraint* obj, const btVector3* angularLower); + EXPORT void btGeneric6DofConstraint_setAngularUpperLimit(btGeneric6DofConstraint* obj, const btVector3* angularUpper); + EXPORT void btGeneric6DofConstraint_setAxis(btGeneric6DofConstraint* obj, const btVector3* axis1, const btVector3* axis2); + EXPORT void btGeneric6DofConstraint_setFrames(btGeneric6DofConstraint* obj, const btTransform* frameA, const btTransform* frameB); + EXPORT void btGeneric6DofConstraint_setLimit(btGeneric6DofConstraint* obj, int axis, btScalar lo, btScalar hi); + EXPORT void btGeneric6DofConstraint_setLinearLowerLimit(btGeneric6DofConstraint* obj, const btVector3* linearLower); + EXPORT void btGeneric6DofConstraint_setLinearUpperLimit(btGeneric6DofConstraint* obj, const btVector3* linearUpper); + EXPORT void btGeneric6DofConstraint_setUseFrameOffset(btGeneric6DofConstraint* obj, bool frameOffsetOnOff); + EXPORT void btGeneric6DofConstraint_setUseLinearReferenceFrameA(btGeneric6DofConstraint* obj, bool linearReferenceFrameA); + EXPORT void btGeneric6DofConstraint_setUseSolveConstraintObsolete(btGeneric6DofConstraint* obj, bool value); + EXPORT bool btGeneric6DofConstraint_testAngularLimitMotor(btGeneric6DofConstraint* obj, int axis_index); + EXPORT void btGeneric6DofConstraint_updateRHS(btGeneric6DofConstraint* obj, btScalar timeStep); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.cpp new file mode 100644 index 0000000..794193f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.cpp @@ -0,0 +1,857 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGeneric6DofSpring2Constraint_wrap.h" + +btRotationalLimitMotor2* btRotationalLimitMotor2_new() +{ + return new btRotationalLimitMotor2(); +} + +btRotationalLimitMotor2* btRotationalLimitMotor2_new2(const btRotationalLimitMotor2* limot) +{ + return new btRotationalLimitMotor2(*limot); +} + +btScalar btRotationalLimitMotor2_getBounce(btRotationalLimitMotor2* obj) +{ + return obj->m_bounce; +} + +int btRotationalLimitMotor2_getCurrentLimit(btRotationalLimitMotor2* obj) +{ + return obj->m_currentLimit; +} + +btScalar btRotationalLimitMotor2_getCurrentLimitError(btRotationalLimitMotor2* obj) +{ + return obj->m_currentLimitError; +} + +btScalar btRotationalLimitMotor2_getCurrentLimitErrorHi(btRotationalLimitMotor2* obj) +{ + return obj->m_currentLimitErrorHi; +} + +btScalar btRotationalLimitMotor2_getCurrentPosition(btRotationalLimitMotor2* obj) +{ + return obj->m_currentPosition; +} + +bool btRotationalLimitMotor2_getEnableMotor(btRotationalLimitMotor2* obj) +{ + return obj->m_enableMotor; +} + +bool btRotationalLimitMotor2_getEnableSpring(btRotationalLimitMotor2* obj) +{ + return obj->m_enableSpring; +} + +btScalar btRotationalLimitMotor2_getEquilibriumPoint(btRotationalLimitMotor2* obj) +{ + return obj->m_equilibriumPoint; +} + +btScalar btRotationalLimitMotor2_getHiLimit(btRotationalLimitMotor2* obj) +{ + return obj->m_hiLimit; +} + +btScalar btRotationalLimitMotor2_getLoLimit(btRotationalLimitMotor2* obj) +{ + return obj->m_loLimit; +} + +btScalar btRotationalLimitMotor2_getMaxMotorForce(btRotationalLimitMotor2* obj) +{ + return obj->m_maxMotorForce; +} + +btScalar btRotationalLimitMotor2_getMotorCFM(btRotationalLimitMotor2* obj) +{ + return obj->m_motorCFM; +} + +btScalar btRotationalLimitMotor2_getMotorERP(btRotationalLimitMotor2* obj) +{ + return obj->m_motorERP; +} + +bool btRotationalLimitMotor2_getServoMotor(btRotationalLimitMotor2* obj) +{ + return obj->m_servoMotor; +} + +btScalar btRotationalLimitMotor2_getServoTarget(btRotationalLimitMotor2* obj) +{ + return obj->m_servoTarget; +} + +btScalar btRotationalLimitMotor2_getSpringDamping(btRotationalLimitMotor2* obj) +{ + return obj->m_springDamping; +} + +bool btRotationalLimitMotor2_getSpringDampingLimited(btRotationalLimitMotor2* obj) +{ + return obj->m_springDampingLimited; +} + +btScalar btRotationalLimitMotor2_getSpringStiffness(btRotationalLimitMotor2* obj) +{ + return obj->m_springStiffness; +} + +bool btRotationalLimitMotor2_getSpringStiffnessLimited(btRotationalLimitMotor2* obj) +{ + return obj->m_springStiffnessLimited; +} + +btScalar btRotationalLimitMotor2_getStopCFM(btRotationalLimitMotor2* obj) +{ + return obj->m_stopCFM; +} + +btScalar btRotationalLimitMotor2_getStopERP(btRotationalLimitMotor2* obj) +{ + return obj->m_stopERP; +} + +btScalar btRotationalLimitMotor2_getTargetVelocity(btRotationalLimitMotor2* obj) +{ + return obj->m_targetVelocity; +} + +bool btRotationalLimitMotor2_isLimited(btRotationalLimitMotor2* obj) +{ + return obj->isLimited(); +} + +void btRotationalLimitMotor2_setBounce(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_bounce = value; +} + +void btRotationalLimitMotor2_setCurrentLimit(btRotationalLimitMotor2* obj, int value) +{ + obj->m_currentLimit = value; +} + +void btRotationalLimitMotor2_setCurrentLimitError(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_currentLimitError = value; +} + +void btRotationalLimitMotor2_setCurrentLimitErrorHi(btRotationalLimitMotor2* obj, + btScalar value) +{ + obj->m_currentLimitErrorHi = value; +} + +void btRotationalLimitMotor2_setCurrentPosition(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_currentPosition = value; +} + +void btRotationalLimitMotor2_setEnableMotor(btRotationalLimitMotor2* obj, bool value) +{ + obj->m_enableMotor = value; +} + +void btRotationalLimitMotor2_setEnableSpring(btRotationalLimitMotor2* obj, bool value) +{ + obj->m_enableSpring = value; +} + +void btRotationalLimitMotor2_setEquilibriumPoint(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_equilibriumPoint = value; +} + +void btRotationalLimitMotor2_setHiLimit(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_hiLimit = value; +} + +void btRotationalLimitMotor2_setLoLimit(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_loLimit = value; +} + +void btRotationalLimitMotor2_setMaxMotorForce(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_maxMotorForce = value; +} + +void btRotationalLimitMotor2_setMotorCFM(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_motorCFM = value; +} + +void btRotationalLimitMotor2_setMotorERP(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_motorERP = value; +} + +void btRotationalLimitMotor2_setServoMotor(btRotationalLimitMotor2* obj, bool value) +{ + obj->m_servoMotor = value; +} + +void btRotationalLimitMotor2_setServoTarget(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_servoTarget = value; +} + +void btRotationalLimitMotor2_setSpringDamping(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_springDamping = value; +} + +void btRotationalLimitMotor2_setSpringDampingLimited(btRotationalLimitMotor2* obj, + bool value) +{ + obj->m_springDampingLimited = value; +} + +void btRotationalLimitMotor2_setSpringStiffness(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_springStiffness = value; +} + +void btRotationalLimitMotor2_setSpringStiffnessLimited(btRotationalLimitMotor2* obj, + bool value) +{ + obj->m_springStiffnessLimited = value; +} + +void btRotationalLimitMotor2_setStopCFM(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_stopCFM = value; +} + +void btRotationalLimitMotor2_setStopERP(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_stopERP = value; +} + +void btRotationalLimitMotor2_setTargetVelocity(btRotationalLimitMotor2* obj, btScalar value) +{ + obj->m_targetVelocity = value; +} + +void btRotationalLimitMotor2_testLimitValue(btRotationalLimitMotor2* obj, btScalar test_value) +{ + obj->testLimitValue(test_value); +} + +void btRotationalLimitMotor2_delete(btRotationalLimitMotor2* obj) +{ + delete obj; +} + + +btTranslationalLimitMotor2* btTranslationalLimitMotor2_new() +{ + return new btTranslationalLimitMotor2(); +} + +btTranslationalLimitMotor2* btTranslationalLimitMotor2_new2(const btTranslationalLimitMotor2* other) +{ + return new btTranslationalLimitMotor2(*other); +} + +void btTranslationalLimitMotor2_getBounce(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_bounce); +} + +int* btTranslationalLimitMotor2_getCurrentLimit(btTranslationalLimitMotor2* obj) +{ + return obj->m_currentLimit; +} + +void btTranslationalLimitMotor2_getCurrentLimitError(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_currentLimitError); +} + +void btTranslationalLimitMotor2_getCurrentLimitErrorHi(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_currentLimitErrorHi); +} + +void btTranslationalLimitMotor2_getCurrentLinearDiff(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_currentLinearDiff); +} + +bool* btTranslationalLimitMotor2_getEnableMotor(btTranslationalLimitMotor2* obj) +{ + return obj->m_enableMotor; +} + +bool* btTranslationalLimitMotor2_getEnableSpring(btTranslationalLimitMotor2* obj) +{ + return obj->m_enableSpring; +} + +void btTranslationalLimitMotor2_getEquilibriumPoint(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_equilibriumPoint); +} + +void btTranslationalLimitMotor2_getLowerLimit(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_lowerLimit); +} + +void btTranslationalLimitMotor2_getMaxMotorForce(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_maxMotorForce); +} + +void btTranslationalLimitMotor2_getMotorCFM(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_motorCFM); +} + +void btTranslationalLimitMotor2_getMotorERP(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_motorERP); +} + +bool* btTranslationalLimitMotor2_getServoMotor(btTranslationalLimitMotor2* obj) +{ + return obj->m_servoMotor; +} + +void btTranslationalLimitMotor2_getServoTarget(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_servoTarget); +} + +void btTranslationalLimitMotor2_getSpringDamping(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_springDamping); +} + +bool* btTranslationalLimitMotor2_getSpringDampingLimited(btTranslationalLimitMotor2* obj) +{ + return obj->m_springDampingLimited; +} + +void btTranslationalLimitMotor2_getSpringStiffness(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_springStiffness); +} + +bool* btTranslationalLimitMotor2_getSpringStiffnessLimited(btTranslationalLimitMotor2* obj) +{ + return obj->m_springStiffnessLimited; +} + +void btTranslationalLimitMotor2_getStopCFM(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_stopCFM); +} + +void btTranslationalLimitMotor2_getStopERP(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_stopERP); +} + +void btTranslationalLimitMotor2_getTargetVelocity(btTranslationalLimitMotor2* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_targetVelocity); +} + +void btTranslationalLimitMotor2_getUpperLimit(btTranslationalLimitMotor2* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_upperLimit); +} + +bool btTranslationalLimitMotor2_isLimited(btTranslationalLimitMotor2* obj, int limitIndex) +{ + return obj->isLimited(limitIndex); +} + +void btTranslationalLimitMotor2_setBounce(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_bounce, value); +} + +void btTranslationalLimitMotor2_setCurrentLimitError(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_currentLimitError, value); +} + +void btTranslationalLimitMotor2_setCurrentLimitErrorHi(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_currentLimitErrorHi, value); +} + +void btTranslationalLimitMotor2_setCurrentLinearDiff(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_currentLinearDiff, value); +} + +void btTranslationalLimitMotor2_setEquilibriumPoint(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_equilibriumPoint, value); +} + +void btTranslationalLimitMotor2_setLowerLimit(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_lowerLimit, value); +} + +void btTranslationalLimitMotor2_setMaxMotorForce(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_maxMotorForce, value); +} + +void btTranslationalLimitMotor2_setMotorCFM(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_motorCFM, value); +} + +void btTranslationalLimitMotor2_setMotorERP(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_motorERP, value); +} + +void btTranslationalLimitMotor2_setServoTarget(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_servoTarget, value); +} + +void btTranslationalLimitMotor2_setSpringDamping(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_springDamping, value); +} + +void btTranslationalLimitMotor2_setSpringStiffness(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_springStiffness, value); +} + +void btTranslationalLimitMotor2_setStopCFM(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_stopCFM, value); +} + +void btTranslationalLimitMotor2_setStopERP(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_stopERP, value); +} + +void btTranslationalLimitMotor2_setTargetVelocity(btTranslationalLimitMotor2* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_targetVelocity, value); +} + +void btTranslationalLimitMotor2_setUpperLimit(btTranslationalLimitMotor2* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_upperLimit, value); +} + +void btTranslationalLimitMotor2_testLimitValue(btTranslationalLimitMotor2* obj, int limitIndex, + btScalar test_value) +{ + obj->testLimitValue(limitIndex, test_value); +} + +void btTranslationalLimitMotor2_delete(btTranslationalLimitMotor2* obj) +{ + delete obj; +} + + +btGeneric6DofSpring2Constraint* btGeneric6DofSpring2Constraint_new(btRigidBody* rbA, + btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB, RotateOrder rotOrder) +{ + BTTRANSFORM_IN(frameInA); + BTTRANSFORM_IN(frameInB); + return new btGeneric6DofSpring2Constraint(*rbA, *rbB, BTTRANSFORM_USE(frameInA), + BTTRANSFORM_USE(frameInB), rotOrder); +} + +btGeneric6DofSpring2Constraint* btGeneric6DofSpring2Constraint_new2(btRigidBody* rbB, + const btTransform* frameInB, RotateOrder rotOrder) +{ + BTTRANSFORM_IN(frameInB); + return new btGeneric6DofSpring2Constraint(*rbB, BTTRANSFORM_USE(frameInB), rotOrder); +} + +btScalar btGeneric6DofSpring2Constraint_btGetMatrixElem(const btMatrix3x3* mat, int index) +{ + BTMATRIX3X3_IN(mat); + return btGeneric6DofSpring2Constraint::btGetMatrixElem(BTMATRIX3X3_USE(mat), + index); +} + +void btGeneric6DofSpring2Constraint_calculateTransforms(btGeneric6DofSpring2Constraint* obj, + const btTransform* transA, const btTransform* transB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + obj->calculateTransforms(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +void btGeneric6DofSpring2Constraint_calculateTransforms2(btGeneric6DofSpring2Constraint* obj) +{ + obj->calculateTransforms(); +} + +void btGeneric6DofSpring2Constraint_enableMotor(btGeneric6DofSpring2Constraint* obj, + int index, bool onOff) +{ + obj->enableMotor(index, onOff); +} + +void btGeneric6DofSpring2Constraint_enableSpring(btGeneric6DofSpring2Constraint* obj, + int index, bool onOff) +{ + obj->enableSpring(index, onOff); +} + +btScalar btGeneric6DofSpring2Constraint_getAngle(btGeneric6DofSpring2Constraint* obj, + int axis_index) +{ + return obj->getAngle(axis_index); +} + +void btGeneric6DofSpring2Constraint_getAngularLowerLimit(btGeneric6DofSpring2Constraint* obj, + btVector3* angularLower) +{ + BTVECTOR3_IN(angularLower); + obj->getAngularLowerLimit(BTVECTOR3_USE(angularLower)); + BTVECTOR3_DEF_OUT(angularLower); +} + +void btGeneric6DofSpring2Constraint_getAngularLowerLimitReversed(btGeneric6DofSpring2Constraint* obj, + btVector3* angularLower) +{ + BTVECTOR3_IN(angularLower); + obj->getAngularLowerLimitReversed(BTVECTOR3_USE(angularLower)); + BTVECTOR3_DEF_OUT(angularLower); +} + +void btGeneric6DofSpring2Constraint_getAngularUpperLimit(btGeneric6DofSpring2Constraint* obj, + btVector3* angularUpper) +{ + BTVECTOR3_IN(angularUpper); + obj->getAngularUpperLimit(BTVECTOR3_USE(angularUpper)); + BTVECTOR3_DEF_OUT(angularUpper); +} + +void btGeneric6DofSpring2Constraint_getAngularUpperLimitReversed(btGeneric6DofSpring2Constraint* obj, + btVector3* angularUpper) +{ + BTVECTOR3_IN(angularUpper); + obj->getAngularUpperLimitReversed(BTVECTOR3_USE(angularUpper)); + BTVECTOR3_DEF_OUT(angularUpper); +} + +void btGeneric6DofSpring2Constraint_getAxis(btGeneric6DofSpring2Constraint* obj, + int axis_index, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getAxis(axis_index); + BTVECTOR3_SET(value, temp); +} + +void btGeneric6DofSpring2Constraint_getCalculatedTransformA(btGeneric6DofSpring2Constraint* obj, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCalculatedTransformA()); +} + +void btGeneric6DofSpring2Constraint_getCalculatedTransformB(btGeneric6DofSpring2Constraint* obj, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCalculatedTransformB()); +} + +void btGeneric6DofSpring2Constraint_getFrameOffsetA(btGeneric6DofSpring2Constraint* obj, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetA()); +} + +void btGeneric6DofSpring2Constraint_getFrameOffsetB(btGeneric6DofSpring2Constraint* obj, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetB()); +} + +void btGeneric6DofSpring2Constraint_getLinearLowerLimit(btGeneric6DofSpring2Constraint* obj, + btVector3* linearLower) +{ + BTVECTOR3_IN(linearLower); + obj->getLinearLowerLimit(BTVECTOR3_USE(linearLower)); + BTVECTOR3_DEF_OUT(linearLower); +} + +void btGeneric6DofSpring2Constraint_getLinearUpperLimit(btGeneric6DofSpring2Constraint* obj, + btVector3* linearUpper) +{ + BTVECTOR3_IN(linearUpper); + obj->getLinearUpperLimit(BTVECTOR3_USE(linearUpper)); + BTVECTOR3_DEF_OUT(linearUpper); +} + +btScalar btGeneric6DofSpring2Constraint_getRelativePivotPosition(btGeneric6DofSpring2Constraint* obj, + int axis_index) +{ + return obj->getRelativePivotPosition(axis_index); +} + +btRotationalLimitMotor2* btGeneric6DofSpring2Constraint_getRotationalLimitMotor(btGeneric6DofSpring2Constraint* obj, + int index) +{ + return obj->getRotationalLimitMotor(index); +} + +RotateOrder btGeneric6DofSpring2Constraint_getRotationOrder(btGeneric6DofSpring2Constraint* obj) +{ + return obj->getRotationOrder(); +} + +btTranslationalLimitMotor2* btGeneric6DofSpring2Constraint_getTranslationalLimitMotor( + btGeneric6DofSpring2Constraint* obj) +{ + return obj->getTranslationalLimitMotor(); +} + +bool btGeneric6DofSpring2Constraint_isLimited(btGeneric6DofSpring2Constraint* obj, + int limitIndex) +{ + return obj->isLimited(limitIndex); +} + +bool btGeneric6DofSpring2Constraint_matrixToEulerZXY(const btMatrix3x3* mat, btVector3* xyz) +{ + BTMATRIX3X3_IN(mat); + BTVECTOR3_IN(xyz); + bool ret = btGeneric6DofSpring2Constraint::matrixToEulerZXY(BTMATRIX3X3_USE(mat), + BTVECTOR3_USE(xyz)); + BTVECTOR3_DEF_OUT(xyz); + return ret; +} + +bool btGeneric6DofSpring2Constraint_matrixToEulerZYX(const btMatrix3x3* mat, btVector3* xyz) +{ + BTMATRIX3X3_IN(mat); + BTVECTOR3_IN(xyz); + bool ret = btGeneric6DofSpring2Constraint::matrixToEulerZYX(BTMATRIX3X3_USE(mat), + BTVECTOR3_USE(xyz)); + BTVECTOR3_DEF_OUT(xyz); + return ret; +} + +bool btGeneric6DofSpring2Constraint_matrixToEulerXZY(const btMatrix3x3* mat, btVector3* xyz) +{ + BTMATRIX3X3_IN(mat); + BTVECTOR3_IN(xyz); + bool ret = btGeneric6DofSpring2Constraint::matrixToEulerXZY(BTMATRIX3X3_USE(mat), + BTVECTOR3_USE(xyz)); + BTVECTOR3_DEF_OUT(xyz); + return ret; +} + +bool btGeneric6DofSpring2Constraint_matrixToEulerXYZ(const btMatrix3x3* mat, btVector3* xyz) +{ + BTMATRIX3X3_IN(mat); + BTVECTOR3_IN(xyz); + bool ret = btGeneric6DofSpring2Constraint::matrixToEulerXYZ(BTMATRIX3X3_USE(mat), + BTVECTOR3_USE(xyz)); + BTVECTOR3_DEF_OUT(xyz); + return ret; +} + +bool btGeneric6DofSpring2Constraint_matrixToEulerYZX(const btMatrix3x3* mat, btVector3* xyz) +{ + BTMATRIX3X3_IN(mat); + BTVECTOR3_IN(xyz); + bool ret = btGeneric6DofSpring2Constraint::matrixToEulerYZX(BTMATRIX3X3_USE(mat), + BTVECTOR3_USE(xyz)); + BTVECTOR3_DEF_OUT(xyz); + return ret; +} + +bool btGeneric6DofSpring2Constraint_matrixToEulerYXZ(const btMatrix3x3* mat, btVector3* xyz) +{ + BTMATRIX3X3_IN(mat); + BTVECTOR3_IN(xyz); + bool ret = btGeneric6DofSpring2Constraint::matrixToEulerYXZ(BTMATRIX3X3_USE(mat), + BTVECTOR3_USE(xyz)); + BTVECTOR3_DEF_OUT(xyz); + return ret; +} + +void btGeneric6DofSpring2Constraint_setAngularLowerLimit(btGeneric6DofSpring2Constraint* obj, + const btVector3* angularLower) +{ + BTVECTOR3_IN(angularLower); + obj->setAngularLowerLimit(BTVECTOR3_USE(angularLower)); +} + +void btGeneric6DofSpring2Constraint_setAngularLowerLimitReversed(btGeneric6DofSpring2Constraint* obj, + const btVector3* angularLower) +{ + BTVECTOR3_IN(angularLower); + obj->setAngularLowerLimitReversed(BTVECTOR3_USE(angularLower)); +} + +void btGeneric6DofSpring2Constraint_setAngularUpperLimit(btGeneric6DofSpring2Constraint* obj, + const btVector3* angularUpper) +{ + BTVECTOR3_IN(angularUpper); + obj->setAngularUpperLimit(BTVECTOR3_USE(angularUpper)); +} + +void btGeneric6DofSpring2Constraint_setAngularUpperLimitReversed(btGeneric6DofSpring2Constraint* obj, + const btVector3* angularUpper) +{ + BTVECTOR3_IN(angularUpper); + obj->setAngularUpperLimitReversed(BTVECTOR3_USE(angularUpper)); +} + +void btGeneric6DofSpring2Constraint_setAxis(btGeneric6DofSpring2Constraint* obj, + const btVector3* axis1, const btVector3* axis2) +{ + BTVECTOR3_IN(axis1); + BTVECTOR3_IN(axis2); + obj->setAxis(BTVECTOR3_USE(axis1), BTVECTOR3_USE(axis2)); +} + +void btGeneric6DofSpring2Constraint_setBounce(btGeneric6DofSpring2Constraint* obj, + int index, btScalar bounce) +{ + obj->setBounce(index, bounce); +} + +void btGeneric6DofSpring2Constraint_setDamping(btGeneric6DofSpring2Constraint* obj, + int index, btScalar damping, bool limitIfNeeded) +{ + obj->setDamping(index, damping, limitIfNeeded); +} + +void btGeneric6DofSpring2Constraint_setEquilibriumPoint(btGeneric6DofSpring2Constraint* obj) +{ + obj->setEquilibriumPoint(); +} + +void btGeneric6DofSpring2Constraint_setEquilibriumPoint2(btGeneric6DofSpring2Constraint* obj, + int index, btScalar val) +{ + obj->setEquilibriumPoint(index, val); +} + +void btGeneric6DofSpring2Constraint_setEquilibriumPoint3(btGeneric6DofSpring2Constraint* obj, + int index) +{ + obj->setEquilibriumPoint(index); +} + +void btGeneric6DofSpring2Constraint_setFrames(btGeneric6DofSpring2Constraint* obj, + const btTransform* frameA, const btTransform* frameB) +{ + BTTRANSFORM_IN(frameA); + BTTRANSFORM_IN(frameB); + obj->setFrames(BTTRANSFORM_USE(frameA), BTTRANSFORM_USE(frameB)); +} + +void btGeneric6DofSpring2Constraint_setLimit(btGeneric6DofSpring2Constraint* obj, + int axis, btScalar lo, btScalar hi) +{ + obj->setLimit(axis, lo, hi); +} + +void btGeneric6DofSpring2Constraint_setLimitReversed(btGeneric6DofSpring2Constraint* obj, + int axis, btScalar lo, btScalar hi) +{ + obj->setLimitReversed(axis, lo, hi); +} + +void btGeneric6DofSpring2Constraint_setLinearLowerLimit(btGeneric6DofSpring2Constraint* obj, + const btVector3* linearLower) +{ + BTVECTOR3_IN(linearLower); + obj->setLinearLowerLimit(BTVECTOR3_USE(linearLower)); +} + +void btGeneric6DofSpring2Constraint_setLinearUpperLimit(btGeneric6DofSpring2Constraint* obj, + const btVector3* linearUpper) +{ + BTVECTOR3_IN(linearUpper); + obj->setLinearUpperLimit(BTVECTOR3_USE(linearUpper)); +} + +void btGeneric6DofSpring2Constraint_setMaxMotorForce(btGeneric6DofSpring2Constraint* obj, + int index, btScalar force) +{ + obj->setMaxMotorForce(index, force); +} + +void btGeneric6DofSpring2Constraint_setRotationOrder(btGeneric6DofSpring2Constraint* obj, + RotateOrder order) +{ + obj->setRotationOrder(order); +} + +void btGeneric6DofSpring2Constraint_setServo(btGeneric6DofSpring2Constraint* obj, + int index, bool onOff) +{ + obj->setServo(index, onOff); +} + +void btGeneric6DofSpring2Constraint_setServoTarget(btGeneric6DofSpring2Constraint* obj, + int index, btScalar target) +{ + obj->setServoTarget(index, target); +} + +void btGeneric6DofSpring2Constraint_setStiffness(btGeneric6DofSpring2Constraint* obj, + int index, btScalar stiffness, bool limitIfNeeded) +{ + obj->setStiffness(index, stiffness, limitIfNeeded); +} + +void btGeneric6DofSpring2Constraint_setTargetVelocity(btGeneric6DofSpring2Constraint* obj, + int index, btScalar velocity) +{ + obj->setTargetVelocity(index, velocity); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.h new file mode 100644 index 0000000..315057a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.h @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btRotationalLimitMotor2* btRotationalLimitMotor2_new(); + EXPORT btRotationalLimitMotor2* btRotationalLimitMotor2_new2(const btRotationalLimitMotor2* limot); + EXPORT btScalar btRotationalLimitMotor2_getBounce(btRotationalLimitMotor2* obj); + EXPORT int btRotationalLimitMotor2_getCurrentLimit(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getCurrentLimitError(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getCurrentLimitErrorHi(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getCurrentPosition(btRotationalLimitMotor2* obj); + EXPORT bool btRotationalLimitMotor2_getEnableMotor(btRotationalLimitMotor2* obj); + EXPORT bool btRotationalLimitMotor2_getEnableSpring(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getEquilibriumPoint(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getHiLimit(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getLoLimit(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getMaxMotorForce(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getMotorCFM(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getMotorERP(btRotationalLimitMotor2* obj); + EXPORT bool btRotationalLimitMotor2_getServoMotor(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getServoTarget(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getSpringDamping(btRotationalLimitMotor2* obj); + EXPORT bool btRotationalLimitMotor2_getSpringDampingLimited(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getSpringStiffness(btRotationalLimitMotor2* obj); + EXPORT bool btRotationalLimitMotor2_getSpringStiffnessLimited(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getStopCFM(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getStopERP(btRotationalLimitMotor2* obj); + EXPORT btScalar btRotationalLimitMotor2_getTargetVelocity(btRotationalLimitMotor2* obj); + EXPORT bool btRotationalLimitMotor2_isLimited(btRotationalLimitMotor2* obj); + EXPORT void btRotationalLimitMotor2_setBounce(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setCurrentLimit(btRotationalLimitMotor2* obj, int value); + EXPORT void btRotationalLimitMotor2_setCurrentLimitError(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setCurrentLimitErrorHi(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setCurrentPosition(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setEnableMotor(btRotationalLimitMotor2* obj, bool value); + EXPORT void btRotationalLimitMotor2_setEnableSpring(btRotationalLimitMotor2* obj, bool value); + EXPORT void btRotationalLimitMotor2_setEquilibriumPoint(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setHiLimit(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setLoLimit(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setMaxMotorForce(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setMotorCFM(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setMotorERP(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setServoMotor(btRotationalLimitMotor2* obj, bool value); + EXPORT void btRotationalLimitMotor2_setServoTarget(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setSpringDamping(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setSpringDampingLimited(btRotationalLimitMotor2* obj, bool value); + EXPORT void btRotationalLimitMotor2_setSpringStiffness(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setSpringStiffnessLimited(btRotationalLimitMotor2* obj, bool value); + EXPORT void btRotationalLimitMotor2_setStopCFM(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setStopERP(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_setTargetVelocity(btRotationalLimitMotor2* obj, btScalar value); + EXPORT void btRotationalLimitMotor2_testLimitValue(btRotationalLimitMotor2* obj, btScalar test_value); + EXPORT void btRotationalLimitMotor2_delete(btRotationalLimitMotor2* obj); + + EXPORT btTranslationalLimitMotor2* btTranslationalLimitMotor2_new(); + EXPORT btTranslationalLimitMotor2* btTranslationalLimitMotor2_new2(const btTranslationalLimitMotor2* other); + EXPORT void btTranslationalLimitMotor2_getBounce(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT int* btTranslationalLimitMotor2_getCurrentLimit(btTranslationalLimitMotor2* obj); + EXPORT void btTranslationalLimitMotor2_getCurrentLimitError(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getCurrentLimitErrorHi(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getCurrentLinearDiff(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT bool* btTranslationalLimitMotor2_getEnableMotor(btTranslationalLimitMotor2* obj); + EXPORT bool* btTranslationalLimitMotor2_getEnableSpring(btTranslationalLimitMotor2* obj); + EXPORT void btTranslationalLimitMotor2_getEquilibriumPoint(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getLowerLimit(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getMaxMotorForce(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getMotorCFM(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getMotorERP(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT bool* btTranslationalLimitMotor2_getServoMotor(btTranslationalLimitMotor2* obj); + EXPORT void btTranslationalLimitMotor2_getServoTarget(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getSpringDamping(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT bool* btTranslationalLimitMotor2_getSpringDampingLimited(btTranslationalLimitMotor2* obj); + EXPORT void btTranslationalLimitMotor2_getSpringStiffness(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT bool* btTranslationalLimitMotor2_getSpringStiffnessLimited(btTranslationalLimitMotor2* obj); + EXPORT void btTranslationalLimitMotor2_getStopCFM(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getStopERP(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getTargetVelocity(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT void btTranslationalLimitMotor2_getUpperLimit(btTranslationalLimitMotor2* obj, btVector3* value); + EXPORT bool btTranslationalLimitMotor2_isLimited(btTranslationalLimitMotor2* obj, int limitIndex); + EXPORT void btTranslationalLimitMotor2_setBounce(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setCurrentLimitError(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setCurrentLimitErrorHi(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setCurrentLinearDiff(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setEquilibriumPoint(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setLowerLimit(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setMaxMotorForce(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setMotorCFM(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setMotorERP(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setServoTarget(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setSpringDamping(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setSpringStiffness(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setStopCFM(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setStopERP(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setTargetVelocity(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_setUpperLimit(btTranslationalLimitMotor2* obj, const btVector3* value); + EXPORT void btTranslationalLimitMotor2_testLimitValue(btTranslationalLimitMotor2* obj, int limitIndex, btScalar test_value); + EXPORT void btTranslationalLimitMotor2_delete(btTranslationalLimitMotor2* obj); + + EXPORT btGeneric6DofSpring2Constraint* btGeneric6DofSpring2Constraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB, RotateOrder rotOrder); + EXPORT btGeneric6DofSpring2Constraint* btGeneric6DofSpring2Constraint_new2(btRigidBody* rbB, const btTransform* frameInB, RotateOrder rotOrder); + EXPORT btScalar btGeneric6DofSpring2Constraint_btGetMatrixElem(const btMatrix3x3* mat, int index); + EXPORT void btGeneric6DofSpring2Constraint_calculateTransforms(btGeneric6DofSpring2Constraint* obj, const btTransform* transA, const btTransform* transB); + EXPORT void btGeneric6DofSpring2Constraint_calculateTransforms2(btGeneric6DofSpring2Constraint* obj); + EXPORT void btGeneric6DofSpring2Constraint_enableMotor(btGeneric6DofSpring2Constraint* obj, int index, bool onOff); + EXPORT void btGeneric6DofSpring2Constraint_enableSpring(btGeneric6DofSpring2Constraint* obj, int index, bool onOff); + EXPORT btScalar btGeneric6DofSpring2Constraint_getAngle(btGeneric6DofSpring2Constraint* obj, int axis_index); + EXPORT void btGeneric6DofSpring2Constraint_getAngularLowerLimit(btGeneric6DofSpring2Constraint* obj, btVector3* angularLower); + EXPORT void btGeneric6DofSpring2Constraint_getAngularLowerLimitReversed(btGeneric6DofSpring2Constraint* obj, btVector3* angularLower); + EXPORT void btGeneric6DofSpring2Constraint_getAngularUpperLimit(btGeneric6DofSpring2Constraint* obj, btVector3* angularUpper); + EXPORT void btGeneric6DofSpring2Constraint_getAngularUpperLimitReversed(btGeneric6DofSpring2Constraint* obj, btVector3* angularUpper); + EXPORT void btGeneric6DofSpring2Constraint_getAxis(btGeneric6DofSpring2Constraint* obj, int axis_index, btVector3* value); + EXPORT void btGeneric6DofSpring2Constraint_getCalculatedTransformA(btGeneric6DofSpring2Constraint* obj, btTransform* value); + EXPORT void btGeneric6DofSpring2Constraint_getCalculatedTransformB(btGeneric6DofSpring2Constraint* obj, btTransform* value); + EXPORT void btGeneric6DofSpring2Constraint_getFrameOffsetA(btGeneric6DofSpring2Constraint* obj, btTransform* value); + EXPORT void btGeneric6DofSpring2Constraint_getFrameOffsetB(btGeneric6DofSpring2Constraint* obj, btTransform* value); + EXPORT void btGeneric6DofSpring2Constraint_getLinearLowerLimit(btGeneric6DofSpring2Constraint* obj, btVector3* linearLower); + EXPORT void btGeneric6DofSpring2Constraint_getLinearUpperLimit(btGeneric6DofSpring2Constraint* obj, btVector3* linearUpper); + EXPORT btScalar btGeneric6DofSpring2Constraint_getRelativePivotPosition(btGeneric6DofSpring2Constraint* obj, int axis_index); + EXPORT btRotationalLimitMotor2* btGeneric6DofSpring2Constraint_getRotationalLimitMotor(btGeneric6DofSpring2Constraint* obj, int index); + EXPORT RotateOrder btGeneric6DofSpring2Constraint_getRotationOrder(btGeneric6DofSpring2Constraint* obj); + EXPORT btTranslationalLimitMotor2* btGeneric6DofSpring2Constraint_getTranslationalLimitMotor(btGeneric6DofSpring2Constraint* obj); + EXPORT bool btGeneric6DofSpring2Constraint_isLimited(btGeneric6DofSpring2Constraint* obj, int limitIndex); + EXPORT bool btGeneric6DofSpring2Constraint_matrixToEulerZXY(const btMatrix3x3* mat, btVector3* xyz); + EXPORT bool btGeneric6DofSpring2Constraint_matrixToEulerZYX(const btMatrix3x3* mat, btVector3* xyz); + EXPORT bool btGeneric6DofSpring2Constraint_matrixToEulerXZY(const btMatrix3x3* mat, btVector3* xyz); + EXPORT bool btGeneric6DofSpring2Constraint_matrixToEulerXYZ(const btMatrix3x3* mat, btVector3* xyz); + EXPORT bool btGeneric6DofSpring2Constraint_matrixToEulerYZX(const btMatrix3x3* mat, btVector3* xyz); + EXPORT bool btGeneric6DofSpring2Constraint_matrixToEulerYXZ(const btMatrix3x3* mat, btVector3* xyz); + EXPORT void btGeneric6DofSpring2Constraint_setAngularLowerLimit(btGeneric6DofSpring2Constraint* obj, const btVector3* angularLower); + EXPORT void btGeneric6DofSpring2Constraint_setAngularLowerLimitReversed(btGeneric6DofSpring2Constraint* obj, const btVector3* angularLower); + EXPORT void btGeneric6DofSpring2Constraint_setAngularUpperLimit(btGeneric6DofSpring2Constraint* obj, const btVector3* angularUpper); + EXPORT void btGeneric6DofSpring2Constraint_setAngularUpperLimitReversed(btGeneric6DofSpring2Constraint* obj, const btVector3* angularUpper); + EXPORT void btGeneric6DofSpring2Constraint_setAxis(btGeneric6DofSpring2Constraint* obj, const btVector3* axis1, const btVector3* axis2); + EXPORT void btGeneric6DofSpring2Constraint_setBounce(btGeneric6DofSpring2Constraint* obj, int index, btScalar bounce); + EXPORT void btGeneric6DofSpring2Constraint_setDamping(btGeneric6DofSpring2Constraint* obj, int index, btScalar damping, bool limitIfNeeded); + EXPORT void btGeneric6DofSpring2Constraint_setEquilibriumPoint(btGeneric6DofSpring2Constraint* obj); + EXPORT void btGeneric6DofSpring2Constraint_setEquilibriumPoint2(btGeneric6DofSpring2Constraint* obj, int index, btScalar val); + EXPORT void btGeneric6DofSpring2Constraint_setEquilibriumPoint3(btGeneric6DofSpring2Constraint* obj, int index); + EXPORT void btGeneric6DofSpring2Constraint_setFrames(btGeneric6DofSpring2Constraint* obj, const btTransform* frameA, const btTransform* frameB); + EXPORT void btGeneric6DofSpring2Constraint_setLimit(btGeneric6DofSpring2Constraint* obj, int axis, btScalar lo, btScalar hi); + EXPORT void btGeneric6DofSpring2Constraint_setLimitReversed(btGeneric6DofSpring2Constraint* obj, int axis, btScalar lo, btScalar hi); + EXPORT void btGeneric6DofSpring2Constraint_setLinearLowerLimit(btGeneric6DofSpring2Constraint* obj, const btVector3* linearLower); + EXPORT void btGeneric6DofSpring2Constraint_setLinearUpperLimit(btGeneric6DofSpring2Constraint* obj, const btVector3* linearUpper); + EXPORT void btGeneric6DofSpring2Constraint_setMaxMotorForce(btGeneric6DofSpring2Constraint* obj, int index, btScalar force); + EXPORT void btGeneric6DofSpring2Constraint_setRotationOrder(btGeneric6DofSpring2Constraint* obj, RotateOrder order); + EXPORT void btGeneric6DofSpring2Constraint_setServo(btGeneric6DofSpring2Constraint* obj, int index, bool onOff); + EXPORT void btGeneric6DofSpring2Constraint_setServoTarget(btGeneric6DofSpring2Constraint* obj, int index, btScalar target); + EXPORT void btGeneric6DofSpring2Constraint_setStiffness(btGeneric6DofSpring2Constraint* obj, int index, btScalar stiffness, bool limitIfNeeded); + EXPORT void btGeneric6DofSpring2Constraint_setTargetVelocity(btGeneric6DofSpring2Constraint* obj, int index, btScalar velocity); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.cpp new file mode 100644 index 0000000..ce09113 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.cpp @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGeneric6DofSpringConstraint_wrap.h" + +btGeneric6DofSpringConstraint* btGeneric6DofSpringConstraint_new(btRigidBody* rbA, + btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB, bool useLinearReferenceFrameA) +{ + BTTRANSFORM_IN(frameInA); + BTTRANSFORM_IN(frameInB); + return new btGeneric6DofSpringConstraint(*rbA, *rbB, BTTRANSFORM_USE(frameInA), + BTTRANSFORM_USE(frameInB), useLinearReferenceFrameA); +} + +btGeneric6DofSpringConstraint* btGeneric6DofSpringConstraint_new2(btRigidBody* rbB, + const btTransform* frameInB, bool useLinearReferenceFrameB) +{ + BTTRANSFORM_IN(frameInB); + return new btGeneric6DofSpringConstraint(*rbB, BTTRANSFORM_USE(frameInB), useLinearReferenceFrameB); +} + +void btGeneric6DofSpringConstraint_enableSpring(btGeneric6DofSpringConstraint* obj, + int index, bool onOff) +{ + obj->enableSpring(index, onOff); +} + +btScalar btGeneric6DofSpringConstraint_getDamping(btGeneric6DofSpringConstraint* obj, + int index) +{ + return obj->getDamping(index); +} + +btScalar btGeneric6DofSpringConstraint_getEquilibriumPoint(btGeneric6DofSpringConstraint* obj, + int index) +{ + return obj->getEquilibriumPoint(index); +} + +btScalar btGeneric6DofSpringConstraint_getStiffness(btGeneric6DofSpringConstraint* obj, + int index) +{ + return obj->getStiffness(index); +} + +bool btGeneric6DofSpringConstraint_isSpringEnabled(btGeneric6DofSpringConstraint* obj, + int index) +{ + return obj->isSpringEnabled(index); +} + +void btGeneric6DofSpringConstraint_setDamping(btGeneric6DofSpringConstraint* obj, + int index, btScalar damping) +{ + obj->setDamping(index, damping); +} + +void btGeneric6DofSpringConstraint_setEquilibriumPoint(btGeneric6DofSpringConstraint* obj) +{ + obj->setEquilibriumPoint(); +} + +void btGeneric6DofSpringConstraint_setEquilibriumPoint2(btGeneric6DofSpringConstraint* obj, + int index) +{ + obj->setEquilibriumPoint(index); +} + +void btGeneric6DofSpringConstraint_setEquilibriumPoint3(btGeneric6DofSpringConstraint* obj, + int index, btScalar val) +{ + obj->setEquilibriumPoint(index, val); +} + +void btGeneric6DofSpringConstraint_setStiffness(btGeneric6DofSpringConstraint* obj, + int index, btScalar stiffness) +{ + obj->setStiffness(index, stiffness); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.h new file mode 100644 index 0000000..3528819 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGeneric6DofSpringConstraint* btGeneric6DofSpringConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB, bool useLinearReferenceFrameA); + EXPORT btGeneric6DofSpringConstraint* btGeneric6DofSpringConstraint_new2(btRigidBody* rbB, const btTransform* frameInB, bool useLinearReferenceFrameB); + EXPORT void btGeneric6DofSpringConstraint_enableSpring(btGeneric6DofSpringConstraint* obj, int index, bool onOff); + EXPORT btScalar btGeneric6DofSpringConstraint_getDamping(btGeneric6DofSpringConstraint* obj, int index); + EXPORT btScalar btGeneric6DofSpringConstraint_getEquilibriumPoint(btGeneric6DofSpringConstraint* obj, int index); + EXPORT btScalar btGeneric6DofSpringConstraint_getStiffness(btGeneric6DofSpringConstraint* obj, int index); + EXPORT bool btGeneric6DofSpringConstraint_isSpringEnabled(btGeneric6DofSpringConstraint* obj, int index); + EXPORT void btGeneric6DofSpringConstraint_setDamping(btGeneric6DofSpringConstraint* obj, int index, btScalar damping); + EXPORT void btGeneric6DofSpringConstraint_setEquilibriumPoint(btGeneric6DofSpringConstraint* obj); + EXPORT void btGeneric6DofSpringConstraint_setEquilibriumPoint2(btGeneric6DofSpringConstraint* obj, int index); + EXPORT void btGeneric6DofSpringConstraint_setEquilibriumPoint3(btGeneric6DofSpringConstraint* obj, int index, btScalar val); + EXPORT void btGeneric6DofSpringConstraint_setStiffness(btGeneric6DofSpringConstraint* obj, int index, btScalar stiffness); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.cpp new file mode 100644 index 0000000..d7551fc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btGeometryUtil_wrap.h" + +#ifndef BULLETC_DISABLE_GEOMETRY_UTIL + +bool btGeometryUtil_areVerticesBehindPlane(const btVector3* planeNormal, const btAlignedObjectArray_btVector3* vertices, + btScalar margin) +{ + BTVECTOR3_IN(planeNormal); + return btGeometryUtil::areVerticesBehindPlane(BTVECTOR3_USE(planeNormal), *vertices, + margin); +} + +void btGeometryUtil_getPlaneEquationsFromVertices(btAlignedObjectArray_btVector3* vertices, + btAlignedObjectArray_btVector3* planeEquationsOut) +{ + btGeometryUtil::getPlaneEquationsFromVertices(*vertices, *planeEquationsOut); +} + +void btGeometryUtil_getVerticesFromPlaneEquations(const btAlignedObjectArray_btVector3* planeEquations, + btAlignedObjectArray_btVector3* verticesOut) +{ + btGeometryUtil::getVerticesFromPlaneEquations(*planeEquations, *verticesOut); +} +/* +bool btGeometryUtil_isInside(const btAlignedObjectArray_btVector3* vertices, const btVector3* planeNormal, + btScalar margin) +{ + BTVECTOR3_IN(planeNormal); + return btGeometryUtil::isInside(*vertices, BTVECTOR3_USE(planeNormal), margin); +} +*/ +bool btGeometryUtil_isPointInsidePlanes(const btAlignedObjectArray_btVector3* planeEquations, + const btVector3* point, btScalar margin) +{ + BTVECTOR3_IN(point); + return btGeometryUtil::isPointInsidePlanes(*planeEquations, BTVECTOR3_USE(point), + margin); +} + +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.h new file mode 100644 index 0000000..443c05d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGeometryUtil_wrap.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BULLETC_DISABLE_GEOMETRY_UTIL +#ifdef __cplusplus +extern "C" { +#endif + EXPORT bool btGeometryUtil_areVerticesBehindPlane(const btVector3* planeNormal, const btAlignedObjectArray_btVector3* vertices, btScalar margin); + EXPORT void btGeometryUtil_getPlaneEquationsFromVertices(btAlignedObjectArray_btVector3* vertices, btAlignedObjectArray_btVector3* planeEquationsOut); + EXPORT void btGeometryUtil_getVerticesFromPlaneEquations(const btAlignedObjectArray_btVector3* planeEquations, btAlignedObjectArray_btVector3* verticesOut); + //EXPORT bool btGeometryUtil_isInside(const btAlignedObjectArray_btVector3* vertices, const btVector3* planeNormal, btScalar margin); + EXPORT bool btGeometryUtil_isPointInsidePlanes(const btAlignedObjectArray_btVector3* planeEquations, const btVector3* point, btScalar margin); +#ifdef __cplusplus +} +#endif +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.cpp new file mode 100644 index 0000000..f82cfcb --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.cpp @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btGhostObject_wrap.h" + +btGhostObject* btGhostObject_new() +{ + return new btGhostObject(); +} + +void btGhostObject_addOverlappingObjectInternal(btGhostObject* obj, btBroadphaseProxy* otherProxy, + btBroadphaseProxy* thisProxy) +{ + obj->addOverlappingObjectInternal(otherProxy, thisProxy); +} + +void btGhostObject_convexSweepTest(btGhostObject* obj, const btConvexShape* castShape, + const btTransform* convexFromWorld, const btTransform* convexToWorld, btCollisionWorld_ConvexResultCallback* resultCallback, + btScalar allowedCcdPenetration) +{ + BTTRANSFORM_IN(convexFromWorld); + BTTRANSFORM_IN(convexToWorld); + obj->convexSweepTest(castShape, BTTRANSFORM_USE(convexFromWorld), BTTRANSFORM_USE(convexToWorld), + *resultCallback, allowedCcdPenetration); +} + +int btGhostObject_getNumOverlappingObjects(btGhostObject* obj) +{ + return obj->getNumOverlappingObjects(); +} + +btCollisionObject* btGhostObject_getOverlappingObject(btGhostObject* obj, int index) +{ + return obj->getOverlappingObject(index); +} + +btAlignedObjectArray_btCollisionObjectPtr* btGhostObject_getOverlappingPairs(btGhostObject* obj) +{ + return &obj->getOverlappingPairs(); +} + +void btGhostObject_rayTest(btGhostObject* obj, const btVector3* rayFromWorld, const btVector3* rayToWorld, + btCollisionWorld_RayResultCallback* resultCallback) +{ + BTVECTOR3_IN(rayFromWorld); + BTVECTOR3_IN(rayToWorld); + obj->rayTest(BTVECTOR3_USE(rayFromWorld), BTVECTOR3_USE(rayToWorld), *resultCallback); +} + +void btGhostObject_removeOverlappingObjectInternal(btGhostObject* obj, btBroadphaseProxy* otherProxy, + btDispatcher* dispatcher, btBroadphaseProxy* thisProxy) +{ + obj->removeOverlappingObjectInternal(otherProxy, dispatcher, thisProxy); +} + +btGhostObject* btGhostObject_upcast(btCollisionObject* colObj) +{ + return btGhostObject::upcast(colObj); +} + + +btPairCachingGhostObject* btPairCachingGhostObject_new() +{ + return new btPairCachingGhostObject(); +} + +btHashedOverlappingPairCache* btPairCachingGhostObject_getOverlappingPairCache(btPairCachingGhostObject* obj) +{ + return obj->getOverlappingPairCache(); +} + + +btGhostPairCallback* btGhostPairCallback_new() +{ + return new btGhostPairCallback(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.h new file mode 100644 index 0000000..60b124e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGhostObject_wrap.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGhostObject* btGhostObject_new(); + EXPORT void btGhostObject_addOverlappingObjectInternal(btGhostObject* obj, btBroadphaseProxy* otherProxy, btBroadphaseProxy* thisProxy); + EXPORT void btGhostObject_convexSweepTest(btGhostObject* obj, const btConvexShape* castShape, const btTransform* convexFromWorld, const btTransform* convexToWorld, btCollisionWorld_ConvexResultCallback* resultCallback, btScalar allowedCcdPenetration); + EXPORT int btGhostObject_getNumOverlappingObjects(btGhostObject* obj); + EXPORT btCollisionObject* btGhostObject_getOverlappingObject(btGhostObject* obj, int index); + EXPORT btAlignedObjectArray_btCollisionObjectPtr* btGhostObject_getOverlappingPairs(btGhostObject* obj); + EXPORT void btGhostObject_rayTest(btGhostObject* obj, const btVector3* rayFromWorld, const btVector3* rayToWorld, btCollisionWorld_RayResultCallback* resultCallback); + EXPORT void btGhostObject_removeOverlappingObjectInternal(btGhostObject* obj, btBroadphaseProxy* otherProxy, btDispatcher* dispatcher, btBroadphaseProxy* thisProxy); + EXPORT btGhostObject* btGhostObject_upcast(btCollisionObject* colObj); + + EXPORT btPairCachingGhostObject* btPairCachingGhostObject_new(); + EXPORT btHashedOverlappingPairCache* btPairCachingGhostObject_getOverlappingPairCache(btPairCachingGhostObject* obj); + + EXPORT btGhostPairCallback* btGhostPairCallback_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.cpp new file mode 100644 index 0000000..6d23951 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btGjkConvexCast_wrap.h" + +btGjkConvexCast* btGjkConvexCast_new(const btConvexShape* convexA, const btConvexShape* convexB, + btVoronoiSimplexSolver* simplexSolver) +{ + return new btGjkConvexCast(convexA, convexB, simplexSolver); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.h new file mode 100644 index 0000000..96ff802 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGjkConvexCast_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGjkConvexCast* btGjkConvexCast_new(const btConvexShape* convexA, const btConvexShape* convexB, btVoronoiSimplexSolver* simplexSolver); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.cpp new file mode 100644 index 0000000..83461de --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btGjkEpaPenetrationDepthSolver_wrap.h" + +btGjkEpaPenetrationDepthSolver* btGjkEpaPenetrationDepthSolver_new() +{ + return new btGjkEpaPenetrationDepthSolver(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.h new file mode 100644 index 0000000..6f38b1c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGjkEpaPenetrationDepthSolver* btGjkEpaPenetrationDepthSolver_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.cpp new file mode 100644 index 0000000..cacc6a9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.cpp @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "conversion.h" +#include "btGjkPairDetector_wrap.h" + +btGjkPairDetector* btGjkPairDetector_new(const btConvexShape* objectA, const btConvexShape* objectB, + btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver) +{ + return new btGjkPairDetector(objectA, objectB, simplexSolver, penetrationDepthSolver); +} + +btGjkPairDetector* btGjkPairDetector_new2(const btConvexShape* objectA, const btConvexShape* objectB, + int shapeTypeA, int shapeTypeB, btScalar marginA, btScalar marginB, btVoronoiSimplexSolver* simplexSolver, + btConvexPenetrationDepthSolver* penetrationDepthSolver) +{ + return new btGjkPairDetector(objectA, objectB, shapeTypeA, shapeTypeB, marginA, + marginB, simplexSolver, penetrationDepthSolver); +} + +void btGjkPairDetector_getCachedSeparatingAxis(btGjkPairDetector* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getCachedSeparatingAxis()); +} + +btScalar btGjkPairDetector_getCachedSeparatingDistance(btGjkPairDetector* obj) +{ + return obj->getCachedSeparatingDistance(); +} + +int btGjkPairDetector_getCatchDegeneracies(btGjkPairDetector* obj) +{ + return obj->m_catchDegeneracies; +} + +void btGjkPairDetector_getClosestPointsNonVirtual(btGjkPairDetector* obj, const btDiscreteCollisionDetectorInterface_ClosestPointInput* input, + btDiscreteCollisionDetectorInterface_Result* output, btIDebugDraw* debugDraw) +{ + obj->getClosestPointsNonVirtual(*input, *output, debugDraw); +} + +int btGjkPairDetector_getCurIter(btGjkPairDetector* obj) +{ + return obj->m_curIter; +} + +int btGjkPairDetector_getDegenerateSimplex(btGjkPairDetector* obj) +{ + return obj->m_degenerateSimplex; +} + +int btGjkPairDetector_getFixContactNormalDirection(btGjkPairDetector* obj) +{ + return obj->m_fixContactNormalDirection; +} + +int btGjkPairDetector_getLastUsedMethod(btGjkPairDetector* obj) +{ + return obj->m_lastUsedMethod; +} + +void btGjkPairDetector_setCachedSeparatingAxis(btGjkPairDetector* obj, const btVector3* seperatingAxis) +{ + BTVECTOR3_IN(seperatingAxis); + obj->setCachedSeparatingAxis(BTVECTOR3_USE(seperatingAxis)); +} + +void btGjkPairDetector_setCatchDegeneracies(btGjkPairDetector* obj, int value) +{ + obj->m_catchDegeneracies = value; +} + +void btGjkPairDetector_setCurIter(btGjkPairDetector* obj, int value) +{ + obj->m_curIter = value; +} + +void btGjkPairDetector_setDegenerateSimplex(btGjkPairDetector* obj, int value) +{ + obj->m_degenerateSimplex = value; +} + +void btGjkPairDetector_setFixContactNormalDirection(btGjkPairDetector* obj, int value) +{ + obj->m_fixContactNormalDirection = value; +} + +void btGjkPairDetector_setIgnoreMargin(btGjkPairDetector* obj, bool ignoreMargin) +{ + obj->setIgnoreMargin(ignoreMargin); +} + +void btGjkPairDetector_setLastUsedMethod(btGjkPairDetector* obj, int value) +{ + obj->m_lastUsedMethod = value; +} + +void btGjkPairDetector_setMinkowskiA(btGjkPairDetector* obj, const btConvexShape* minkA) +{ + obj->setMinkowskiA(minkA); +} + +void btGjkPairDetector_setMinkowskiB(btGjkPairDetector* obj, const btConvexShape* minkB) +{ + obj->setMinkowskiB(minkB); +} + +void btGjkPairDetector_setPenetrationDepthSolver(btGjkPairDetector* obj, btConvexPenetrationDepthSolver* penetrationDepthSolver) +{ + obj->setPenetrationDepthSolver(penetrationDepthSolver); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.h new file mode 100644 index 0000000..27f1ed0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btGjkPairDetector_wrap.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btGjkPairDetector* btGjkPairDetector_new(const btConvexShape* objectA, const btConvexShape* objectB, btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver); + EXPORT btGjkPairDetector* btGjkPairDetector_new2(const btConvexShape* objectA, const btConvexShape* objectB, int shapeTypeA, int shapeTypeB, btScalar marginA, btScalar marginB, btVoronoiSimplexSolver* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver); + EXPORT void btGjkPairDetector_getCachedSeparatingAxis(btGjkPairDetector* obj, btVector3* value); + EXPORT btScalar btGjkPairDetector_getCachedSeparatingDistance(btGjkPairDetector* obj); + EXPORT int btGjkPairDetector_getCatchDegeneracies(btGjkPairDetector* obj); + EXPORT void btGjkPairDetector_getClosestPointsNonVirtual(btGjkPairDetector* obj, const btDiscreteCollisionDetectorInterface_ClosestPointInput* input, btDiscreteCollisionDetectorInterface_Result* output, btIDebugDraw* debugDraw); + EXPORT int btGjkPairDetector_getCurIter(btGjkPairDetector* obj); + EXPORT int btGjkPairDetector_getDegenerateSimplex(btGjkPairDetector* obj); + EXPORT int btGjkPairDetector_getFixContactNormalDirection(btGjkPairDetector* obj); + EXPORT int btGjkPairDetector_getLastUsedMethod(btGjkPairDetector* obj); + EXPORT void btGjkPairDetector_setCachedSeparatingAxis(btGjkPairDetector* obj, const btVector3* seperatingAxis); + EXPORT void btGjkPairDetector_setCatchDegeneracies(btGjkPairDetector* obj, int value); + EXPORT void btGjkPairDetector_setCurIter(btGjkPairDetector* obj, int value); + EXPORT void btGjkPairDetector_setDegenerateSimplex(btGjkPairDetector* obj, int value); + EXPORT void btGjkPairDetector_setFixContactNormalDirection(btGjkPairDetector* obj, int value); + EXPORT void btGjkPairDetector_setIgnoreMargin(btGjkPairDetector* obj, bool ignoreMargin); + EXPORT void btGjkPairDetector_setLastUsedMethod(btGjkPairDetector* obj, int value); + EXPORT void btGjkPairDetector_setMinkowskiA(btGjkPairDetector* obj, const btConvexShape* minkA); + EXPORT void btGjkPairDetector_setMinkowskiB(btGjkPairDetector* obj, const btConvexShape* minkB); + EXPORT void btGjkPairDetector_setPenetrationDepthSolver(btGjkPairDetector* obj, btConvexPenetrationDepthSolver* penetrationDepthSolver); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.cpp new file mode 100644 index 0000000..2e714f5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btHeightfieldTerrainShape_wrap.h" + +btHeightfieldTerrainShape* btHeightfieldTerrainShape_new(int heightStickWidth, int heightStickLength, + const void* heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight, + int upAxis, PHY_ScalarType heightDataType, bool flipQuadEdges) +{ + return new btHeightfieldTerrainShape(heightStickWidth, heightStickLength, heightfieldData, + heightScale, minHeight, maxHeight, upAxis, heightDataType, flipQuadEdges); +} + +btHeightfieldTerrainShape* btHeightfieldTerrainShape_new2(int heightStickWidth, int heightStickLength, + const void* heightfieldData, btScalar maxHeight, int upAxis, bool useFloatData, + bool flipQuadEdges) +{ + return new btHeightfieldTerrainShape(heightStickWidth, heightStickLength, heightfieldData, + maxHeight, upAxis, useFloatData, flipQuadEdges); +} + +void btHeightfieldTerrainShape_performRaycast(btHeightfieldTerrainShape* obj, btTriangleCallback* callback, const btVector3* raySource, const btVector3* rayTarget) +{ + BTVECTOR3_IN(raySource); + BTVECTOR3_IN(rayTarget); + obj->performRaycast(callback, BTVECTOR3_USE(raySource), BTVECTOR3_USE(rayTarget)); +} + +void btHeightfieldTerrainShape_buildAccelerator(btHeightfieldTerrainShape* obj, int chunkSize) +{ + obj->buildAccelerator(chunkSize); +} + +void btHeightfieldTerrainShape_clearAccelerator(btHeightfieldTerrainShape* obj) +{ + obj->clearAccelerator(); +} + +int btHeightfieldTerrainShape_getUpAxis(btHeightfieldTerrainShape* obj) +{ + return obj->getUpAxis(); +} + +void btHeightfieldTerrainShape_setFlipTriangleWinding(btHeightfieldTerrainShape* obj, bool flipTriangleWinding) +{ + obj->setFlipTriangleWinding(flipTriangleWinding); +} + +void btHeightfieldTerrainShape_setUseDiamondSubdivision(btHeightfieldTerrainShape* obj) +{ + obj->setUseDiamondSubdivision(); +} + +void btHeightfieldTerrainShape_setUseDiamondSubdivision2(btHeightfieldTerrainShape* obj, + bool useDiamondSubdivision) +{ + obj->setUseDiamondSubdivision(useDiamondSubdivision); +} + +void btHeightfieldTerrainShape_setUseZigzagSubdivision(btHeightfieldTerrainShape* obj) +{ + obj->setUseZigzagSubdivision(); +} + +void btHeightfieldTerrainShape_setUseZigzagSubdivision2(btHeightfieldTerrainShape* obj, + bool useZigzagSubdivision) +{ + obj->setUseZigzagSubdivision(useZigzagSubdivision); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.h new file mode 100644 index 0000000..dda118d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btHeightfieldTerrainShape* btHeightfieldTerrainShape_new(int heightStickWidth, int heightStickLength, const void* heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis, PHY_ScalarType heightDataType, bool flipQuadEdges); + EXPORT btHeightfieldTerrainShape* btHeightfieldTerrainShape_new2(int heightStickWidth, int heightStickLength, const void* heightfieldData, btScalar maxHeight, int upAxis, bool useFloatData, bool flipQuadEdges); + EXPORT void btHeightfieldTerrainShape_performRaycast(btHeightfieldTerrainShape* obj, btTriangleCallback* callback, const btVector3* raySource, const btVector3* rayTarget); + EXPORT void btHeightfieldTerrainShape_buildAccelerator(btHeightfieldTerrainShape* obj, int chunkSize); + EXPORT void btHeightfieldTerrainShape_clearAccelerator(btHeightfieldTerrainShape* obj); + EXPORT int btHeightfieldTerrainShape_getUpAxis(btHeightfieldTerrainShape* obj); + EXPORT void btHeightfieldTerrainShape_setFlipTriangleWinding(btHeightfieldTerrainShape* obj, bool flipTriangleWinding); + EXPORT void btHeightfieldTerrainShape_setUseDiamondSubdivision(btHeightfieldTerrainShape* obj); + EXPORT void btHeightfieldTerrainShape_setUseDiamondSubdivision2(btHeightfieldTerrainShape* obj, bool useDiamondSubdivision); + EXPORT void btHeightfieldTerrainShape_setUseZigzagSubdivision(btHeightfieldTerrainShape* obj); + EXPORT void btHeightfieldTerrainShape_setUseZigzagSubdivision2(btHeightfieldTerrainShape* obj, bool useZigzagSubdivision); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.cpp new file mode 100644 index 0000000..1d38dfa --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btHinge2Constraint_wrap.h" + +btHinge2Constraint* btHinge2Constraint_new(btRigidBody* rbA, btRigidBody* rbB, btVector3* anchor, + btVector3* axis1, btVector3* axis2) +{ + BTVECTOR3_IN(anchor); + BTVECTOR3_IN(axis1); + BTVECTOR3_IN(axis2); + return new btHinge2Constraint(*rbA, *rbB, BTVECTOR3_USE(anchor), BTVECTOR3_USE(axis1), + BTVECTOR3_USE(axis2)); +} + +void btHinge2Constraint_getAnchor(btHinge2Constraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAnchor()); +} + +void btHinge2Constraint_getAnchor2(btHinge2Constraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAnchor2()); +} + +btScalar btHinge2Constraint_getAngle1(btHinge2Constraint* obj) +{ + return obj->getAngle1(); +} + +btScalar btHinge2Constraint_getAngle2(btHinge2Constraint* obj) +{ + return obj->getAngle2(); +} + +void btHinge2Constraint_getAxis1(btHinge2Constraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxis1()); +} + +void btHinge2Constraint_getAxis2(btHinge2Constraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxis2()); +} + +void btHinge2Constraint_setLowerLimit(btHinge2Constraint* obj, btScalar ang1min) +{ + obj->setLowerLimit(ang1min); +} + +void btHinge2Constraint_setUpperLimit(btHinge2Constraint* obj, btScalar ang1max) +{ + obj->setUpperLimit(ang1max); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.h new file mode 100644 index 0000000..6ca6360 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btHinge2Constraint_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btHinge2Constraint* btHinge2Constraint_new(btRigidBody* rbA, btRigidBody* rbB, btVector3* anchor, btVector3* axis1, btVector3* axis2); + EXPORT void btHinge2Constraint_getAnchor(btHinge2Constraint* obj, btVector3* value); + EXPORT void btHinge2Constraint_getAnchor2(btHinge2Constraint* obj, btVector3* value); + EXPORT btScalar btHinge2Constraint_getAngle1(btHinge2Constraint* obj); + EXPORT btScalar btHinge2Constraint_getAngle2(btHinge2Constraint* obj); + EXPORT void btHinge2Constraint_getAxis1(btHinge2Constraint* obj, btVector3* value); + EXPORT void btHinge2Constraint_getAxis2(btHinge2Constraint* obj, btVector3* value); + EXPORT void btHinge2Constraint_setLowerLimit(btHinge2Constraint* obj, btScalar ang1min); + EXPORT void btHinge2Constraint_setUpperLimit(btHinge2Constraint* obj, btScalar ang1max); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.cpp new file mode 100644 index 0000000..ef312ea --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.cpp @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btHingeConstraint_wrap.h" + +btHingeConstraint* btHingeConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* pivotInA, + const btVector3* pivotInB, const btVector3* axisInA, const btVector3* axisInB, + bool useReferenceFrameA) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + BTVECTOR3_IN(axisInA); + BTVECTOR3_IN(axisInB); + return new btHingeConstraint(*rbA, *rbB, BTVECTOR3_USE(pivotInA), BTVECTOR3_USE(pivotInB), + BTVECTOR3_USE(axisInA), BTVECTOR3_USE(axisInB), useReferenceFrameA); +} + +btHingeConstraint* btHingeConstraint_new2(btRigidBody* rbA, const btVector3* pivotInA, + const btVector3* axisInA, bool useReferenceFrameA) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(axisInA); + return new btHingeConstraint(*rbA, BTVECTOR3_USE(pivotInA), BTVECTOR3_USE(axisInA), + useReferenceFrameA); +} + +btHingeConstraint* btHingeConstraint_new3(btRigidBody* rbA, btRigidBody* rbB, const btTransform* rbAFrame, + const btTransform* rbBFrame, bool useReferenceFrameA) +{ + BTTRANSFORM_IN(rbAFrame); + BTTRANSFORM_IN(rbBFrame); + return new btHingeConstraint(*rbA, *rbB, BTTRANSFORM_USE(rbAFrame), BTTRANSFORM_USE(rbBFrame), + useReferenceFrameA); +} + +btHingeConstraint* btHingeConstraint_new4(btRigidBody* rbA, const btTransform* rbAFrame, + bool useReferenceFrameA) +{ + BTTRANSFORM_IN(rbAFrame); + return new btHingeConstraint(*rbA, BTTRANSFORM_USE(rbAFrame), useReferenceFrameA); +} + +void btHingeConstraint_enableAngularMotor(btHingeConstraint* obj, bool enableMotor, + btScalar targetVelocity, btScalar maxMotorImpulse) +{ + obj->enableAngularMotor(enableMotor, targetVelocity, maxMotorImpulse); +} + +void btHingeConstraint_enableMotor(btHingeConstraint* obj, bool enableMotor) +{ + obj->enableMotor(enableMotor); +} + +void btHingeConstraint_getAFrame(btHingeConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getAFrame()); +} + +bool btHingeConstraint_getAngularOnly(btHingeConstraint* obj) +{ + return obj->getAngularOnly(); +} + +void btHingeConstraint_getBFrame(btHingeConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getBFrame()); +} + +bool btHingeConstraint_getEnableAngularMotor(btHingeConstraint* obj) +{ + return obj->getEnableAngularMotor(); +} + +int btHingeConstraint_getFlags(btHingeConstraint* obj) +{ + return obj->getFlags(); +} + +void btHingeConstraint_getFrameOffsetA(btHingeConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetA()); +} + +void btHingeConstraint_getFrameOffsetB(btHingeConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetB()); +} + +btScalar btHingeConstraint_getHingeAngle(btHingeConstraint* obj, const btTransform* transA, + const btTransform* transB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + return obj->getHingeAngle(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +btScalar btHingeConstraint_getHingeAngle2(btHingeConstraint* obj) +{ + return obj->getHingeAngle(); +} + +void btHingeConstraint_getInfo1NonVirtual(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo1* info) +{ + obj->getInfo1NonVirtual(info); +} + +void btHingeConstraint_getInfo2Internal(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* transA, const btTransform* transB, const btVector3* angVelA, + const btVector3* angVelB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_IN(angVelA); + BTVECTOR3_IN(angVelB); + obj->getInfo2Internal(info, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTVECTOR3_USE(angVelA), BTVECTOR3_USE(angVelB)); +} + +void btHingeConstraint_getInfo2InternalUsingFrameOffset(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* transA, const btTransform* transB, const btVector3* angVelA, + const btVector3* angVelB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_IN(angVelA); + BTVECTOR3_IN(angVelB); + obj->getInfo2InternalUsingFrameOffset(info, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTVECTOR3_USE(angVelA), BTVECTOR3_USE(angVelB)); +} + +void btHingeConstraint_getInfo2NonVirtual(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* transA, const btTransform* transB, const btVector3* angVelA, + const btVector3* angVelB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_IN(angVelA); + BTVECTOR3_IN(angVelB); + obj->getInfo2NonVirtual(info, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTVECTOR3_USE(angVelA), BTVECTOR3_USE(angVelB)); +} + +btScalar btHingeConstraint_getLimitBiasFactor(btHingeConstraint* obj) +{ + return obj->getLimitBiasFactor(); +} + +btScalar btHingeConstraint_getLimitRelaxationFactor(btHingeConstraint* obj) +{ + return obj->getLimitRelaxationFactor(); +} + +btScalar btHingeConstraint_getLimitSign(btHingeConstraint* obj) +{ + return obj->getLimitSign(); +} + +btScalar btHingeConstraint_getLimitSoftness(btHingeConstraint* obj) +{ + return obj->getLimitSoftness(); +} + +btScalar btHingeConstraint_getLowerLimit(btHingeConstraint* obj) +{ + return obj->getLowerLimit(); +} + +btScalar btHingeConstraint_getMaxMotorImpulse(btHingeConstraint* obj) +{ + return obj->getMaxMotorImpulse(); +} + +btScalar btHingeConstraint_getMotorTargetVelocity(btHingeConstraint* obj) +{ + return obj->getMotorTargetVelocity(); +} + +int btHingeConstraint_getSolveLimit(btHingeConstraint* obj) +{ + return obj->getSolveLimit(); +} + +btScalar btHingeConstraint_getUpperLimit(btHingeConstraint* obj) +{ + return obj->getUpperLimit(); +} + +bool btHingeConstraint_getUseFrameOffset(btHingeConstraint* obj) +{ + return obj->getUseFrameOffset(); +} + +bool btHingeConstraint_getUseReferenceFrameA(btHingeConstraint* obj) +{ + return obj->getUseReferenceFrameA(); +} + +bool btHingeConstraint_hasLimit(btHingeConstraint* obj) +{ + return obj->hasLimit(); +} + +void btHingeConstraint_setAngularOnly(btHingeConstraint* obj, bool angularOnly) +{ + obj->setAngularOnly(angularOnly); +} + +void btHingeConstraint_setAxis(btHingeConstraint* obj, btVector3* axisInA) +{ + BTVECTOR3_IN(axisInA); + obj->setAxis(BTVECTOR3_USE(axisInA)); +} + +void btHingeConstraint_setFrames(btHingeConstraint* obj, const btTransform* frameA, + const btTransform* frameB) +{ + BTTRANSFORM_IN(frameA); + BTTRANSFORM_IN(frameB); + obj->setFrames(BTTRANSFORM_USE(frameA), BTTRANSFORM_USE(frameB)); +} + +void btHingeConstraint_setLimit(btHingeConstraint* obj, btScalar low, btScalar high) +{ + obj->setLimit(low, high); +} + +void btHingeConstraint_setLimit2(btHingeConstraint* obj, btScalar low, btScalar high, + btScalar _softness) +{ + obj->setLimit(low, high, _softness); +} + +void btHingeConstraint_setLimit3(btHingeConstraint* obj, btScalar low, btScalar high, + btScalar _softness, btScalar _biasFactor) +{ + obj->setLimit(low, high, _softness, _biasFactor); +} + +void btHingeConstraint_setLimit4(btHingeConstraint* obj, btScalar low, btScalar high, + btScalar _softness, btScalar _biasFactor, btScalar _relaxationFactor) +{ + obj->setLimit(low, high, _softness, _biasFactor, _relaxationFactor); +} + +void btHingeConstraint_setMaxMotorImpulse(btHingeConstraint* obj, btScalar maxMotorImpulse) +{ + obj->setMaxMotorImpulse(maxMotorImpulse); +} + +void btHingeConstraint_setMotorTarget(btHingeConstraint* obj, btScalar targetAngle, + btScalar dt) +{ + obj->setMotorTarget(targetAngle, dt); +} + +void btHingeConstraint_setMotorTarget2(btHingeConstraint* obj, const btQuaternion* qAinB, + btScalar dt) +{ + BTQUATERNION_IN(qAinB); + obj->setMotorTarget(BTQUATERNION_USE(qAinB), dt); +} + +void btHingeConstraint_setMotorTargetVelocity(btHingeConstraint* obj, btScalar motorTargetVelocity) +{ + obj->setMotorTargetVelocity(motorTargetVelocity); +} + +void btHingeConstraint_setUseFrameOffset(btHingeConstraint* obj, bool frameOffsetOnOff) +{ + obj->setUseFrameOffset(frameOffsetOnOff); +} + +void btHingeConstraint_setUseReferenceFrameA(btHingeConstraint* obj, bool useReferenceFrameA) +{ + obj->setUseReferenceFrameA(useReferenceFrameA); +} + +void btHingeConstraint_testLimit(btHingeConstraint* obj, const btTransform* transA, + const btTransform* transB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + obj->testLimit(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +void btHingeConstraint_updateRHS(btHingeConstraint* obj, btScalar timeStep) +{ + obj->updateRHS(timeStep); +} + + +btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new(btRigidBody* rbA, + btRigidBody* rbB, const btVector3* pivotInA, const btVector3* pivotInB, const btVector3* axisInA, + const btVector3* axisInB, bool useReferenceFrameA) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + BTVECTOR3_IN(axisInA); + BTVECTOR3_IN(axisInB); + return new btHingeAccumulatedAngleConstraint(*rbA, *rbB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB), BTVECTOR3_USE(axisInA), BTVECTOR3_USE(axisInB), useReferenceFrameA); +} + +btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new2(btRigidBody* rbA, + const btVector3* pivotInA, const btVector3* axisInA, bool useReferenceFrameA) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(axisInA); + return new btHingeAccumulatedAngleConstraint(*rbA, BTVECTOR3_USE(pivotInA), BTVECTOR3_USE(axisInA), + useReferenceFrameA); +} + +btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new3(btRigidBody* rbA, + btRigidBody* rbB, const btTransform* rbAFrame, const btTransform* rbBFrame, bool useReferenceFrameA) +{ + BTTRANSFORM_IN(rbAFrame); + BTTRANSFORM_IN(rbBFrame); + return new btHingeAccumulatedAngleConstraint(*rbA, *rbB, BTTRANSFORM_USE(rbAFrame), + BTTRANSFORM_USE(rbBFrame), useReferenceFrameA); +} + +btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new4(btRigidBody* rbA, + const btTransform* rbAFrame, bool useReferenceFrameA) +{ + BTTRANSFORM_IN(rbAFrame); + return new btHingeAccumulatedAngleConstraint(*rbA, BTTRANSFORM_USE(rbAFrame), + useReferenceFrameA); +} + +btScalar btHingeAccumulatedAngleConstraint_getAccumulatedHingeAngle(btHingeAccumulatedAngleConstraint* obj) +{ + return obj->getAccumulatedHingeAngle(); +} + +void btHingeAccumulatedAngleConstraint_setAccumulatedHingeAngle(btHingeAccumulatedAngleConstraint* obj, + btScalar accAngle) +{ + obj->setAccumulatedHingeAngle(accAngle); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.h new file mode 100644 index 0000000..d42bdf8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btHingeConstraint_wrap.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btHingeConstraint* btHingeConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* pivotInA, const btVector3* pivotInB, const btVector3* axisInA, const btVector3* axisInB, bool useReferenceFrameA); + EXPORT btHingeConstraint* btHingeConstraint_new2(btRigidBody* rbA, const btVector3* pivotInA, const btVector3* axisInA, bool useReferenceFrameA); + EXPORT btHingeConstraint* btHingeConstraint_new3(btRigidBody* rbA, btRigidBody* rbB, const btTransform* rbAFrame, const btTransform* rbBFrame, bool useReferenceFrameA); + EXPORT btHingeConstraint* btHingeConstraint_new4(btRigidBody* rbA, const btTransform* rbAFrame, bool useReferenceFrameA); + EXPORT void btHingeConstraint_enableAngularMotor(btHingeConstraint* obj, bool enableMotor, btScalar targetVelocity, btScalar maxMotorImpulse); + EXPORT void btHingeConstraint_enableMotor(btHingeConstraint* obj, bool enableMotor); + EXPORT void btHingeConstraint_getAFrame(btHingeConstraint* obj, btTransform* value); + EXPORT bool btHingeConstraint_getAngularOnly(btHingeConstraint* obj); + EXPORT void btHingeConstraint_getBFrame(btHingeConstraint* obj, btTransform* value); + EXPORT bool btHingeConstraint_getEnableAngularMotor(btHingeConstraint* obj); + EXPORT int btHingeConstraint_getFlags(btHingeConstraint* obj); + EXPORT void btHingeConstraint_getFrameOffsetA(btHingeConstraint* obj, btTransform* value); + EXPORT void btHingeConstraint_getFrameOffsetB(btHingeConstraint* obj, btTransform* value); + EXPORT btScalar btHingeConstraint_getHingeAngle(btHingeConstraint* obj, const btTransform* transA, const btTransform* transB); + EXPORT btScalar btHingeConstraint_getHingeAngle2(btHingeConstraint* obj); + EXPORT void btHingeConstraint_getInfo1NonVirtual(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo1* info); + EXPORT void btHingeConstraint_getInfo2Internal(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* transA, const btTransform* transB, const btVector3* angVelA, const btVector3* angVelB); + EXPORT void btHingeConstraint_getInfo2InternalUsingFrameOffset(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* transA, const btTransform* transB, const btVector3* angVelA, const btVector3* angVelB); + EXPORT void btHingeConstraint_getInfo2NonVirtual(btHingeConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* transA, const btTransform* transB, const btVector3* angVelA, const btVector3* angVelB); + EXPORT btScalar btHingeConstraint_getLimitBiasFactor(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getLimitRelaxationFactor(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getLimitSign(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getLimitSoftness(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getLowerLimit(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getMaxMotorImpulse(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getMotorTargetVelocity(btHingeConstraint* obj); + EXPORT int btHingeConstraint_getSolveLimit(btHingeConstraint* obj); + EXPORT btScalar btHingeConstraint_getUpperLimit(btHingeConstraint* obj); + EXPORT bool btHingeConstraint_getUseFrameOffset(btHingeConstraint* obj); + EXPORT bool btHingeConstraint_getUseReferenceFrameA(btHingeConstraint* obj); + EXPORT bool btHingeConstraint_hasLimit(btHingeConstraint* obj); + EXPORT void btHingeConstraint_setAngularOnly(btHingeConstraint* obj, bool angularOnly); + EXPORT void btHingeConstraint_setAxis(btHingeConstraint* obj, btVector3* axisInA); + EXPORT void btHingeConstraint_setFrames(btHingeConstraint* obj, const btTransform* frameA, const btTransform* frameB); + EXPORT void btHingeConstraint_setLimit(btHingeConstraint* obj, btScalar low, btScalar high); + EXPORT void btHingeConstraint_setLimit2(btHingeConstraint* obj, btScalar low, btScalar high, btScalar _softness); + EXPORT void btHingeConstraint_setLimit3(btHingeConstraint* obj, btScalar low, btScalar high, btScalar _softness, btScalar _biasFactor); + EXPORT void btHingeConstraint_setLimit4(btHingeConstraint* obj, btScalar low, btScalar high, btScalar _softness, btScalar _biasFactor, btScalar _relaxationFactor); + EXPORT void btHingeConstraint_setMaxMotorImpulse(btHingeConstraint* obj, btScalar maxMotorImpulse); + EXPORT void btHingeConstraint_setMotorTarget(btHingeConstraint* obj, btScalar targetAngle, btScalar dt); + EXPORT void btHingeConstraint_setMotorTarget2(btHingeConstraint* obj, const btQuaternion* qAinB, btScalar dt); + EXPORT void btHingeConstraint_setMotorTargetVelocity(btHingeConstraint* obj, btScalar motorTargetVelocity); + EXPORT void btHingeConstraint_setUseFrameOffset(btHingeConstraint* obj, bool frameOffsetOnOff); + EXPORT void btHingeConstraint_setUseReferenceFrameA(btHingeConstraint* obj, bool useReferenceFrameA); + EXPORT void btHingeConstraint_testLimit(btHingeConstraint* obj, const btTransform* transA, const btTransform* transB); + EXPORT void btHingeConstraint_updateRHS(btHingeConstraint* obj, btScalar timeStep); + + EXPORT btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* pivotInA, const btVector3* pivotInB, const btVector3* axisInA, const btVector3* axisInB, bool useReferenceFrameA); + EXPORT btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new2(btRigidBody* rbA, const btVector3* pivotInA, const btVector3* axisInA, bool useReferenceFrameA); + EXPORT btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new3(btRigidBody* rbA, btRigidBody* rbB, const btTransform* rbAFrame, const btTransform* rbBFrame, bool useReferenceFrameA); + EXPORT btHingeAccumulatedAngleConstraint* btHingeAccumulatedAngleConstraint_new4(btRigidBody* rbA, const btTransform* rbAFrame, bool useReferenceFrameA); + EXPORT btScalar btHingeAccumulatedAngleConstraint_getAccumulatedHingeAngle(btHingeAccumulatedAngleConstraint* obj); + EXPORT void btHingeAccumulatedAngleConstraint_setAccumulatedHingeAngle(btHingeAccumulatedAngleConstraint* obj, btScalar accAngle); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.cpp new file mode 100644 index 0000000..8f875a2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.cpp @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btIDebugDraw_wrap.h" + +btIDebugDrawWrapper::btIDebugDrawWrapper(void* debugDrawGCHandle, + p_btIDebugDraw_drawAabb drawAabbCallback, p_btIDebugDraw_drawArc drawArcCallback, + p_btIDebugDraw_drawBox drawBoxCallback, + p_btIDebugDraw_drawCapsule drawCapsuleCallback, p_btIDebugDraw_drawCone drawConeCallback, + p_btIDebugDraw_drawContactPoint drawContactPointCallback, p_btIDebugDraw_drawCylinder drawCylinderCallback, + p_btIDebugDraw_drawLine drawLineCallback, + p_btIDebugDraw_drawPlane drawPlaneCallback, p_btIDebugDraw_drawSphere drawSphereCallback, + p_btIDebugDraw_drawSpherePatch drawSpherePatchCallback, + p_btIDebugDraw_drawTransform drawTransformCallback, p_btIDebugDraw_drawTriangle drawTriangleCallback, + p_btIDebugDraw_getDebugMode getDebugModeCallback, pSimpleCallback cb) +{ + _debugDrawGCHandle = debugDrawGCHandle; + _drawAabbCallback = drawAabbCallback; + _drawArcCallback = drawArcCallback; + _drawBoxCallback = drawBoxCallback; + _drawCapsuleCallback = drawCapsuleCallback; + _drawConeCallback = drawConeCallback; + _drawContactPointCallback = drawContactPointCallback; + _drawCylinderCallback = drawCylinderCallback; + _drawLineCallback = drawLineCallback; + _drawPlaneCallback = drawPlaneCallback; + _drawSphereCallback = drawSphereCallback; + _drawSpherePatchCallback = drawSpherePatchCallback; + _drawTransformCallback = drawTransformCallback; + _drawTriangleCallback = drawTriangleCallback; + _getDebugModeCallback = getDebugModeCallback; + _cb = cb; +} + +void btIDebugDrawWrapper::draw3dText(const btVector3& location, const char* textString) +{ + _cb(0); + //_debugDraw->Draw3dText(Math::BtVector3ToVector3(&location), StringConv::UnmanagedToManaged(textString)); +} + +void btIDebugDrawWrapper::drawAabb(const btVector3& from, const btVector3& to, const btVector3& color) +{ + _drawAabbCallback(&from, &to, &color); +} + +void btIDebugDrawWrapper::drawArc(const btVector3& center, const btVector3& normal, + const btVector3& axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, + const btVector3& color, bool drawSect, btScalar stepDegrees) +{ + _drawArcCallback(¢er, &normal, &axis, radiusA, radiusB, minAngle, maxAngle, + &color, drawSect, stepDegrees); +} + +void btIDebugDrawWrapper::drawArc(const btVector3& center, const btVector3& normal, const btVector3& axis, + btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, + const btVector3& color, bool drawSect) +{ + _cb(1); + //_debugDraw->DrawArc(Math::BtVector3ToVector3(¢er), Math::BtVector3ToVector3(&normal), Math::BtVector3ToVector3(&axis), + //radiusA, radiusB, minAngle, maxAngle, BtVectorToBtColor(color), drawSect); +} + +void btIDebugDrawWrapper::drawBox(const btVector3& bbMin, const btVector3& bbMax, + const btVector3& color) +{ + _cb(2); + //_debugDraw->DrawBox( + //Math::BtVector3ToVector3(&bbMin), Math::BtVector3ToVector3(&bbMax), BtVectorToBtColor(color)); +} + +void btIDebugDrawWrapper::drawBox(const btVector3& bbMin, const btVector3& bbMax, + const btTransform& trans, const btVector3& color) +{ + BTTRANSFORM_IN_REF(trans); + _drawBoxCallback(&bbMin, &bbMax, &BTTRANSFORM_USE_REF(trans), &color); +} + +void btIDebugDrawWrapper::drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, + const btTransform& transform, const btVector3& color) +{ + BTTRANSFORM_IN_REF(transform); + _drawCapsuleCallback(radius, halfHeight, upAxis, &BTTRANSFORM_USE_REF(transform), &color); +} + +void btIDebugDrawWrapper::drawCone(btScalar radius, btScalar height, int upAxis, + const btTransform& transform, const btVector3& color) +{ + BTTRANSFORM_IN_REF(transform); + _drawConeCallback(radius, height, upAxis, &BTTRANSFORM_USE_REF(transform), &color); +} + +void btIDebugDrawWrapper::drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB, + btScalar distance, int lifeTime, const btVector3& color) +{ + _drawContactPointCallback(&PointOnB, &normalOnB, distance, lifeTime, &color); +} + +void btIDebugDrawWrapper::drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, + const btTransform& transform, const btVector3& color) +{ + BTTRANSFORM_IN_REF(transform); + _drawCylinderCallback(radius, halfHeight, upAxis, &BTTRANSFORM_USE_REF(transform), &color); +} + +void btIDebugDrawWrapper::drawLine(const btVector3& from, const btVector3& to, const btVector3& color) +{ + _drawLineCallback(&from, &to, &color); +} + +void btIDebugDrawWrapper::drawPlane(const btVector3& planeNormal, btScalar planeConst, + const btTransform& transform, const btVector3& color) +{ + BTTRANSFORM_IN_REF(transform); + _drawPlaneCallback(&planeNormal, planeConst, &BTTRANSFORM_USE_REF(transform), &color); +} + +void btIDebugDrawWrapper::drawSphere(const btVector3& p, btScalar radius, const btVector3& color) +{ + _cb(3); + //_debugDraw->DrawSphere(Math::BtVector3ToVector3(&p), radius, BtVectorToBtColor(color)); +} + +void btIDebugDrawWrapper::drawSphere(btScalar radius, const btTransform& transform, + const btVector3& color) +{ + BTTRANSFORM_IN_REF(transform); + _drawSphereCallback(radius, &BTTRANSFORM_USE_REF(transform), &color); +} + +void btIDebugDrawWrapper::drawSpherePatch(const btVector3& center, const btVector3& up, + const btVector3& axis, btScalar radius, btScalar minTh, btScalar maxTh, btScalar minPs, + btScalar maxPs, const btVector3& color, btScalar stepDegrees) +{ + _drawSpherePatchCallback(¢er, &up, &axis, radius, minTh, maxTh, minPs, maxPs, + &color, stepDegrees); +} + +void btIDebugDrawWrapper::drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, btScalar radius, + btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color) +{ + _cb(4); + //_debugDraw->DrawSpherePatch(Math::BtVector3ToVector3(¢er), Math::BtVector3ToVector3(&up), Math::BtVector3ToVector3(&axis), + //radius, minTh, maxTh, minPs, maxPs, BtVectorToBtColor(color)); +} + +void btIDebugDrawWrapper::drawTransform(const btTransform& transform, btScalar orthoLen) +{ + BTTRANSFORM_IN_REF(transform); + _drawTransformCallback(&BTTRANSFORM_USE_REF(transform), orthoLen); +} + +void btIDebugDrawWrapper::drawTriangle(const btVector3& v0, const btVector3& v1, + const btVector3& v2, const btVector3& color, btScalar __unnamed4) +{ + _drawTriangleCallback(&v0, &v1, &v2, &color, __unnamed4); +} + +void btIDebugDrawWrapper::drawTriangle(const btVector3& v0, const btVector3& v1, + const btVector3& v2, const btVector3& __unnamed3, const btVector3& __unnamed4, + const btVector3& __unnamed5, const btVector3& color, btScalar alpha) +{ + _cb(5); + //_debugDraw->DrawTriangle(Math::BtVector3ToVector3(&v0), Math::BtVector3ToVector3(&v1), Math::BtVector3ToVector3(&v2), + //Math::BtVector3ToVector3(&__unnamed3), Math::BtVector3ToVector3(&__unnamed4), Math::BtVector3ToVector3(&__unnamed5), BtVectorToBtColor(color), alpha); +} + +void btIDebugDrawWrapper::baseDrawAabb(const btVector3& from, const btVector3& to, const btVector3& color) +{ + btIDebugDraw::drawAabb(from, to, color); +} + +void btIDebugDrawWrapper::baseDrawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, const btVector3& color) +{ + btIDebugDraw::drawCone(radius, height, upAxis, transform, color); +} + +void btIDebugDrawWrapper::baseDrawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color) +{ + btIDebugDraw::drawCylinder(radius, halfHeight, upAxis, transform, color); +} + +void btIDebugDrawWrapper::baseDrawSphere(const btVector3& p, btScalar radius, const btVector3& color) +{ + btIDebugDraw::drawSphere(p, radius, color); +} + +void btIDebugDrawWrapper::baseDrawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, const btVector3& color, btScalar) +{ + btIDebugDraw::drawTriangle(v0, v1, v2, color, 0); +} + +void btIDebugDrawWrapper::baseDrawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, + const btVector3& n0, const btVector3& n1, const btVector3& n2, const btVector3& color, btScalar alpha) +{ + btIDebugDraw::drawTriangle(v0, v1, v2, n0, n1, n2, color, alpha); +} + +int btIDebugDrawWrapper::getDebugMode() const +{ + return _getDebugModeCallback(); +} + +void btIDebugDrawWrapper::reportErrorWarning(const char* warningString) +{ + //_debugDraw->ReportErrorWarning(StringConv::UnmanagedToManaged(warningString)); +} + +void btIDebugDrawWrapper::setDebugMode(int debugMode) +{ + _cb(6); + //_debugDraw->DebugMode = (BulletSharp::DebugDrawModes)debugMode; +} + + +btIDebugDrawWrapper* btIDebugDrawWrapper_new(void* debugDrawGCHandle, + p_btIDebugDraw_drawAabb drawAabbCallback, p_btIDebugDraw_drawArc drawArcCallback, + p_btIDebugDraw_drawBox drawBoxCallback, + p_btIDebugDraw_drawCapsule drawCapsuleCallback, p_btIDebugDraw_drawCone drawConeCallback, + p_btIDebugDraw_drawContactPoint drawContactPointCallback, p_btIDebugDraw_drawCylinder drawCylinderCallback, + p_btIDebugDraw_drawLine drawLineCallback, + p_btIDebugDraw_drawPlane drawPlaneCallback, p_btIDebugDraw_drawSphere drawSphereCallback, + p_btIDebugDraw_drawSpherePatch drawSpherePatchCallback, + p_btIDebugDraw_drawTransform drawTransformCallback, p_btIDebugDraw_drawTriangle drawTriangleCallback, + p_btIDebugDraw_getDebugMode getDebugModeCallback, pSimpleCallback cb) +{ + return new btIDebugDrawWrapper(debugDrawGCHandle, drawAabbCallback, drawArcCallback, + drawBoxCallback, drawCapsuleCallback, drawConeCallback, drawContactPointCallback, + drawCylinderCallback, drawLineCallback, drawPlaneCallback, + drawSphereCallback, drawSpherePatchCallback, drawTransformCallback, + drawTriangleCallback, getDebugModeCallback, cb); +} + +void* btIDebugDrawWrapper_getGCHandle(btIDebugDrawWrapper* obj) +{ + return obj->_debugDrawGCHandle; +} + +void btIDebugDraw_delete(btIDebugDraw* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.h new file mode 100644 index 0000000..267beff --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btIDebugDraw_wrap.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_IDEBUG_DRAW__H +#define p_btIDebugDraw_drawAabb void* +#define p_btIDebugDraw_drawArc void* +#define p_btIDebugDraw_drawBox void* +#define p_btIDebugDraw_drawCapsule void* +#define p_btIDebugDraw_drawCone void* +#define p_btIDebugDraw_drawContactPoint void* +#define p_btIDebugDraw_drawCylinder void* +#define p_btIDebugDraw_drawLine void* +#define p_btIDebugDraw_drawPlane void* +#define p_btIDebugDraw_drawSphere void* +#define p_btIDebugDraw_drawSpherePatch void* +#define p_btIDebugDraw_drawTransform void* +#define p_btIDebugDraw_drawTriangle void* +#define p_btIDebugDraw_getDebugMode void* +#define pSimpleCallback void* + +#define btIDebugDrawWrapper void +#else +typedef void (*p_btIDebugDraw_drawAabb)(const btVector3* from, const btVector3* to, + const btVector3* color); +typedef void (*p_btIDebugDraw_drawArc)(const btVector3* center, const btVector3* normal, + const btVector3* axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, + const btVector3* color, bool drawSect, btScalar stepDegrees); +typedef void (*p_btIDebugDraw_drawBox)(const btVector3* bbMin, const btVector3* bbMax, + const btTransform* trans, const btVector3* color); +typedef void (*p_btIDebugDraw_drawCapsule)(btScalar radius, btScalar halfHeight, + int upAxis, const btTransform* transform, const btVector3* color); +typedef void (*p_btIDebugDraw_drawCone)(btScalar radius, btScalar height, int upAxis, + const btTransform* transform, const btVector3* color); +typedef void (*p_btIDebugDraw_drawContactPoint)(const btVector3* PointOnB, const btVector3* normalOnB, + btScalar distance, int lifeTime, const btVector3* color); +typedef void (*p_btIDebugDraw_drawCylinder)(btScalar radius, btScalar halfHeight, + int upAxis, const btTransform* transform, const btVector3* color); +typedef void (*p_btIDebugDraw_drawLine)(const btVector3* from, const btVector3* to, + const btVector3* color); +typedef void (*p_btIDebugDraw_drawPlane)(const btVector3* planeNormal, btScalar planeConst, + const btTransform* transform, const btVector3* color); +typedef void (*p_btIDebugDraw_drawSphere)(btScalar radius, const btTransform* transform, + const btVector3* color); +typedef void (*p_btIDebugDraw_drawSpherePatch)(const btVector3* center, const btVector3* up, + const btVector3* axis, btScalar radius, btScalar minTh, btScalar maxTh, btScalar minPs, + btScalar maxPs, const btVector3* color, btScalar stepDegrees); +typedef void (*p_btIDebugDraw_drawTransform)(const btTransform* transform, btScalar orthoLen); +typedef void (*p_btIDebugDraw_drawTriangle)(const btVector3* v0, const btVector3* v1, + const btVector3* v2, const btVector3* color, btScalar __unnamed4); +typedef int (*p_btIDebugDraw_getDebugMode)(); +typedef void (*pSimpleCallback)(int x); + +class btIDebugDrawWrapper : public btIDebugDraw +{ +private: + p_btIDebugDraw_drawAabb _drawAabbCallback; + p_btIDebugDraw_drawArc _drawArcCallback; + p_btIDebugDraw_drawBox _drawBoxCallback; + p_btIDebugDraw_drawCapsule _drawCapsuleCallback; + p_btIDebugDraw_drawCone _drawConeCallback; + p_btIDebugDraw_drawContactPoint _drawContactPointCallback; + p_btIDebugDraw_drawCylinder _drawCylinderCallback; + p_btIDebugDraw_drawLine _drawLineCallback; + p_btIDebugDraw_drawPlane _drawPlaneCallback; + p_btIDebugDraw_drawSphere _drawSphereCallback; + p_btIDebugDraw_drawSpherePatch _drawSpherePatchCallback; + p_btIDebugDraw_drawTransform _drawTransformCallback; + p_btIDebugDraw_drawTriangle _drawTriangleCallback; + p_btIDebugDraw_getDebugMode _getDebugModeCallback; + +public: + void* _debugDrawGCHandle; + void* getGCHandle(); + + pSimpleCallback _cb; + + btIDebugDrawWrapper(void* debugDrawGCHandle, + p_btIDebugDraw_drawAabb drawAabbCallback, p_btIDebugDraw_drawArc drawArcCallback, + p_btIDebugDraw_drawBox drawBoxCallback, p_btIDebugDraw_drawCapsule drawCapsuleCallback, + p_btIDebugDraw_drawCone drawConeCallback, p_btIDebugDraw_drawContactPoint drawContactPointCallback, + p_btIDebugDraw_drawCylinder drawCylinderCallback, p_btIDebugDraw_drawLine drawLineCallback, + p_btIDebugDraw_drawPlane drawPlaneCallback, p_btIDebugDraw_drawSphere drawSphereCallback, + p_btIDebugDraw_drawSpherePatch drawSpherePatchCallback, p_btIDebugDraw_drawTransform drawTransformCallback, + p_btIDebugDraw_drawTriangle drawTriangleCallback, p_btIDebugDraw_getDebugMode getDebugModeCallback, + pSimpleCallback cb); + + virtual void draw3dText(const btVector3& location, const char* textString); + virtual void drawAabb(const btVector3& from, const btVector3& to, const btVector3& color); + virtual void drawArc(const btVector3& center, const btVector3& normal, const btVector3& axis, + btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, const btVector3& color, + bool drawSect, btScalar stepDegrees); + virtual void drawArc(const btVector3& center, const btVector3& normal, const btVector3& axis, + btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, + const btVector3& color, bool drawSect); + virtual void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btVector3& color); + virtual void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btTransform& trans, + const btVector3& color); + virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, + const btVector3& color); + virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, + const btVector3& color); + virtual void drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB, + btScalar distance, int lifeTime, const btVector3& color); + virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, + const btVector3& color); + virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& color); + virtual void drawPlane(const btVector3& planeNormal, btScalar planeConst, const btTransform& transform, + const btVector3& color); + virtual void drawSphere(const btVector3& p, btScalar radius, const btVector3& color); + virtual void drawSphere(btScalar radius, const btTransform& transform, const btVector3& color); + virtual void drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, + btScalar radius, btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, + const btVector3& color, btScalar stepDegrees); + virtual void drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, btScalar radius, + btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color); + virtual void drawTransform(const btTransform& transform, btScalar orthoLen); + virtual void drawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, + const btVector3& color, btScalar __unnamed4); + virtual void drawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, + const btVector3&, const btVector3&, const btVector3&, const btVector3& color, btScalar alpha); + + virtual void baseDrawAabb(const btVector3& from, const btVector3& to, const btVector3& color); + virtual void baseDrawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, const btVector3& color); + virtual void baseDrawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color); + virtual void baseDrawSphere(const btVector3& p, btScalar radius, const btVector3& color); + virtual void baseDrawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, const btVector3& color, btScalar); + virtual void baseDrawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, + const btVector3&, const btVector3&, const btVector3&, const btVector3& color, btScalar alpha); + + virtual void reportErrorWarning(const char* warningString); + + virtual void setDebugMode(int debugMode); + virtual int getDebugMode() const; + + // Never called from Bullet + //virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& fromColor, + // const btVector3& toColor); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btIDebugDrawWrapper* btIDebugDrawWrapper_new(void* debugDrawGCHandle, + p_btIDebugDraw_drawAabb drawAabbCallback, p_btIDebugDraw_drawArc drawArcCallback, + p_btIDebugDraw_drawBox drawBoxCallback, + p_btIDebugDraw_drawCapsule drawCapsuleCallback, p_btIDebugDraw_drawCone drawConeCallback, + p_btIDebugDraw_drawContactPoint drawContactPointCallback, p_btIDebugDraw_drawCylinder drawCylinderCallback, + p_btIDebugDraw_drawLine drawLineCallback, + p_btIDebugDraw_drawPlane drawPlaneCallback, p_btIDebugDraw_drawSphere drawSphereCallback, + p_btIDebugDraw_drawSpherePatch drawSpherePatchCallback, + p_btIDebugDraw_drawTransform drawTransformCallback, p_btIDebugDraw_drawTriangle drawTriangleCallback, + p_btIDebugDraw_getDebugMode getDebugModeCallback, pSimpleCallback cb); + EXPORT void* btIDebugDrawWrapper_getGCHandle(btIDebugDrawWrapper* obj); + + EXPORT void btIDebugDraw_delete(btIDebugDraw* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.cpp new file mode 100644 index 0000000..e82553e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.cpp @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btKinematicCharacterController_wrap.h" + +#ifndef BULLETC_DISABLE_IACTION_CLASSES + +btKinematicCharacterController* btKinematicCharacterController_new(btPairCachingGhostObject* ghostObject, + btConvexShape* convexShape, btScalar stepHeight) +{ + return new btKinematicCharacterController(ghostObject, convexShape, stepHeight); +} + +btKinematicCharacterController* btKinematicCharacterController_new2(btPairCachingGhostObject* ghostObject, + btConvexShape* convexShape, btScalar stepHeight, const btVector3* up) +{ + BTVECTOR3_IN(up); + return new btKinematicCharacterController(ghostObject, convexShape, stepHeight, + BTVECTOR3_USE(up)); +} + +void btKinematicCharacterController_applyImpulse(btKinematicCharacterController* obj, + const btVector3* v) +{ + BTVECTOR3_IN(v); + obj->applyImpulse(BTVECTOR3_USE(v)); +} + +btScalar btKinematicCharacterController_getAngularDamping(btKinematicCharacterController* obj) +{ + return obj->getAngularDamping(); +} + +void btKinematicCharacterController_getAngularVelocity(btKinematicCharacterController* obj, + btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAngularVelocity()); +} + +btScalar btKinematicCharacterController_getFallSpeed(btKinematicCharacterController* obj) +{ + return obj->getFallSpeed(); +} + +btPairCachingGhostObject* btKinematicCharacterController_getGhostObject(btKinematicCharacterController* obj) +{ + return obj->getGhostObject(); +} + +void btKinematicCharacterController_getGravity(btKinematicCharacterController* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->getGravity()); +} + +btScalar btKinematicCharacterController_getJumpSpeed(btKinematicCharacterController* obj) +{ + return obj->getJumpSpeed(); +} + +btScalar btKinematicCharacterController_getLinearDamping(btKinematicCharacterController* obj) +{ + return obj->getLinearDamping(); +} + +void btKinematicCharacterController_getLinearVelocity(btKinematicCharacterController* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->getLinearVelocity()); +} + +btScalar btKinematicCharacterController_getMaxPenetrationDepth(btKinematicCharacterController* obj) +{ + return obj->getMaxPenetrationDepth(); +} + +btScalar btKinematicCharacterController_getMaxSlope(btKinematicCharacterController* obj) +{ + return obj->getMaxSlope(); +} + +btScalar btKinematicCharacterController_getStepHeight(btKinematicCharacterController* obj) +{ + return obj->getStepHeight(); +} + +void btKinematicCharacterController_getUp(btKinematicCharacterController* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getUp()); +} + +void btKinematicCharacterController_setAngularDamping(btKinematicCharacterController* obj, + btScalar d) +{ + obj->setAngularDamping(d); +} + +void btKinematicCharacterController_setAngularVelocity(btKinematicCharacterController* obj, + const btVector3* velocity) +{ + BTVECTOR3_IN(velocity); + obj->setAngularVelocity(BTVECTOR3_USE(velocity)); +} + +void btKinematicCharacterController_setFallSpeed(btKinematicCharacterController* obj, + btScalar fallSpeed) +{ + obj->setFallSpeed(fallSpeed); +} + +void btKinematicCharacterController_setGravity(btKinematicCharacterController* obj, + const btVector3* gravity) +{ + BTVECTOR3_IN(gravity); + obj->setGravity(BTVECTOR3_USE(gravity)); +} + +void btKinematicCharacterController_setJumpSpeed(btKinematicCharacterController* obj, + btScalar jumpSpeed) +{ + obj->setJumpSpeed(jumpSpeed); +} + +void btKinematicCharacterController_setLinearDamping(btKinematicCharacterController* obj, + btScalar d) +{ + obj->setLinearDamping(d); +} + +void btKinematicCharacterController_setLinearVelocity(btKinematicCharacterController* obj, + const btVector3* velocity) +{ + BTVECTOR3_IN(velocity); + obj->setLinearVelocity(BTVECTOR3_USE(velocity)); +} + +void btKinematicCharacterController_setMaxJumpHeight(btKinematicCharacterController* obj, + btScalar maxJumpHeight) +{ + obj->setMaxJumpHeight(maxJumpHeight); +} + +void btKinematicCharacterController_setMaxPenetrationDepth(btKinematicCharacterController* obj, + btScalar d) +{ + obj->setMaxPenetrationDepth(d); +} + +void btKinematicCharacterController_setMaxSlope(btKinematicCharacterController* obj, + btScalar slopeRadians) +{ + obj->setMaxSlope(slopeRadians); +} + +void btKinematicCharacterController_setStepHeight(btKinematicCharacterController* obj, + btScalar h) +{ + obj->setStepHeight(h); +} + +void btKinematicCharacterController_setUp(btKinematicCharacterController* obj, const btVector3* up) +{ + BTVECTOR3_IN(up); + obj->setUp(BTVECTOR3_USE(up)); +} + +void btKinematicCharacterController_setUseGhostSweepTest(btKinematicCharacterController* obj, + bool useGhostObjectSweepTest) +{ + obj->setUseGhostSweepTest(useGhostObjectSweepTest); +} + +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.h new file mode 100644 index 0000000..7cc7fb6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btKinematicCharacterController_wrap.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btKinematicCharacterController* btKinematicCharacterController_new(btPairCachingGhostObject* ghostObject, btConvexShape* convexShape, btScalar stepHeight); + EXPORT btKinematicCharacterController* btKinematicCharacterController_new2(btPairCachingGhostObject* ghostObject, btConvexShape* convexShape, btScalar stepHeight, const btVector3* up); + EXPORT void btKinematicCharacterController_applyImpulse(btKinematicCharacterController* obj, const btVector3* v); + EXPORT btScalar btKinematicCharacterController_getAngularDamping(btKinematicCharacterController* obj); + EXPORT void btKinematicCharacterController_getAngularVelocity(btKinematicCharacterController* obj, btVector3* value); + EXPORT btScalar btKinematicCharacterController_getFallSpeed(btKinematicCharacterController* obj); + EXPORT btPairCachingGhostObject* btKinematicCharacterController_getGhostObject(btKinematicCharacterController* obj); + EXPORT void btKinematicCharacterController_getGravity(btKinematicCharacterController* obj, btVector3* value); + EXPORT btScalar btKinematicCharacterController_getJumpSpeed(btKinematicCharacterController* obj); + EXPORT btScalar btKinematicCharacterController_getLinearDamping(btKinematicCharacterController* obj); + EXPORT void btKinematicCharacterController_getLinearVelocity(btKinematicCharacterController* obj, btVector3* value); + EXPORT btScalar btKinematicCharacterController_getMaxPenetrationDepth(btKinematicCharacterController* obj); + EXPORT btScalar btKinematicCharacterController_getMaxSlope(btKinematicCharacterController* obj); + EXPORT btScalar btKinematicCharacterController_getStepHeight(btKinematicCharacterController* obj); + EXPORT void btKinematicCharacterController_getUp(btKinematicCharacterController* obj, btVector3* value); + EXPORT void btKinematicCharacterController_setAngularDamping(btKinematicCharacterController* obj, btScalar d); + EXPORT void btKinematicCharacterController_setAngularVelocity(btKinematicCharacterController* obj, const btVector3* velocity); + EXPORT void btKinematicCharacterController_setFallSpeed(btKinematicCharacterController* obj, btScalar fallSpeed); + EXPORT void btKinematicCharacterController_setGravity(btKinematicCharacterController* obj, const btVector3* gravity); + EXPORT void btKinematicCharacterController_setJumpSpeed(btKinematicCharacterController* obj, btScalar jumpSpeed); + EXPORT void btKinematicCharacterController_setLinearDamping(btKinematicCharacterController* obj, btScalar d); + EXPORT void btKinematicCharacterController_setLinearVelocity(btKinematicCharacterController* obj, const btVector3* velocity); + EXPORT void btKinematicCharacterController_setMaxJumpHeight(btKinematicCharacterController* obj, btScalar maxJumpHeight); + EXPORT void btKinematicCharacterController_setMaxPenetrationDepth(btKinematicCharacterController* obj, btScalar d); + EXPORT void btKinematicCharacterController_setMaxSlope(btKinematicCharacterController* obj, btScalar slopeRadians); + EXPORT void btKinematicCharacterController_setStepHeight(btKinematicCharacterController* obj, btScalar h); + EXPORT void btKinematicCharacterController_setUp(btKinematicCharacterController* obj, const btVector3* up); + EXPORT void btKinematicCharacterController_setUseGhostSweepTest(btKinematicCharacterController* obj, bool useGhostObjectSweepTest); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.cpp new file mode 100644 index 0000000..049fecf --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +// FIXME: weird linker error, unresolved external symbol btLemkeAlgorithm::solve +#if 0 +#include + +#include "btLemkeSolver_wrap.h" + +btLemkeSolver* btLemkeSolver_new() +{ + return new btLemkeSolver(); +} + +int btLemkeSolver_getDebugLevel(btLemkeSolver* obj) +{ + return obj->m_debugLevel; +} + +int btLemkeSolver_getMaxLoops(btLemkeSolver* obj) +{ + return obj->m_maxLoops; +} + +btScalar btLemkeSolver_getMaxValue(btLemkeSolver* obj) +{ + return obj->m_maxValue; +} + +bool btLemkeSolver_getUseLoHighBounds(btLemkeSolver* obj) +{ + return obj->m_useLoHighBounds; +} + +void btLemkeSolver_setDebugLevel(btLemkeSolver* obj, int value) +{ + obj->m_debugLevel = value; +} + +void btLemkeSolver_setMaxLoops(btLemkeSolver* obj, int value) +{ + obj->m_maxLoops = value; +} + +void btLemkeSolver_setMaxValue(btLemkeSolver* obj, btScalar value) +{ + obj->m_maxValue = value; +} + +void btLemkeSolver_setUseLoHighBounds(btLemkeSolver* obj, bool value) +{ + obj->m_useLoHighBounds = value; +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.h new file mode 100644 index 0000000..5adeb6c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btLemkeSolver_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btLemkeSolver* btLemkeSolver_new(); + EXPORT int btLemkeSolver_getDebugLevel(btLemkeSolver* obj); + EXPORT int btLemkeSolver_getMaxLoops(btLemkeSolver* obj); + EXPORT btScalar btLemkeSolver_getMaxValue(btLemkeSolver* obj); + EXPORT bool btLemkeSolver_getUseLoHighBounds(btLemkeSolver* obj); + EXPORT void btLemkeSolver_setDebugLevel(btLemkeSolver* obj, int value); + EXPORT void btLemkeSolver_setMaxLoops(btLemkeSolver* obj, int value); + EXPORT void btLemkeSolver_setMaxValue(btLemkeSolver* obj, btScalar value); + EXPORT void btLemkeSolver_setUseLoHighBounds(btLemkeSolver* obj, bool value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.cpp new file mode 100644 index 0000000..425ae2d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btMLCPSolverInterface_wrap.h" +/* +bool btMLCPSolverInterface_solveMLCP(btMLCPSolverInterface* obj, const btMatrixX_float* A, + const btVectorX_float* b, btVectorX_float* x, const btVectorX_float* lo, + const btVectorX_float* hi, const btAlignedObjectArray_int* limitDependency, + int numIterations, bool useSparsity) +{ + return obj->solveMLCP(*A, *b, *x, *lo, *hi, *limitDependency, numIterations, + useSparsity); +} +*/ +void btMLCPSolverInterface_delete(btMLCPSolverInterface* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.h new file mode 100644 index 0000000..d3225d2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + //EXPORT bool btMLCPSolverInterface_solveMLCP(btMLCPSolverInterface* obj, const btMatrixX_float* A, const btVectorX_float* b, btVectorX_float* x, const btVectorX_float* lo, const btVectorX_float* hi, const btAlignedObjectArray_int* limitDependency, int numIterations, bool useSparsity); + EXPORT void btMLCPSolverInterface_delete(btMLCPSolverInterface* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.cpp new file mode 100644 index 0000000..8488b47 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btMLCPSolver_wrap.h" + +btMLCPSolver* btMLCPSolver_new(btMLCPSolverInterface* solver) +{ + return new btMLCPSolver(solver); +} + +int btMLCPSolver_getNumFallbacks(btMLCPSolver* obj) +{ + return obj->getNumFallbacks(); +} + +void btMLCPSolver_setMLCPSolver(btMLCPSolver* obj, btMLCPSolverInterface* solver) +{ + obj->setMLCPSolver(solver); +} + +void btMLCPSolver_setNumFallbacks(btMLCPSolver* obj, int num) +{ + obj->setNumFallbacks(num); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.h new file mode 100644 index 0000000..75e127d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMLCPSolver_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMLCPSolver* btMLCPSolver_new(btMLCPSolverInterface* solver); + EXPORT int btMLCPSolver_getNumFallbacks(btMLCPSolver* obj); + EXPORT void btMLCPSolver_setMLCPSolver(btMLCPSolver* obj, btMLCPSolverInterface* solver); + EXPORT void btMLCPSolver_setNumFallbacks(btMLCPSolver* obj, int num); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.cpp new file mode 100644 index 0000000..51ea5ce --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.cpp @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btManifoldPoint_wrap.h" + +btManifoldPoint* btManifoldPoint_new() +{ + return new btManifoldPoint(); +} + +btManifoldPoint* btManifoldPoint_new2(const btVector3* pointA, const btVector3* pointB, + const btVector3* normal, btScalar distance) +{ + BTVECTOR3_IN(pointA); + BTVECTOR3_IN(pointB); + BTVECTOR3_IN(normal); + return new btManifoldPoint(BTVECTOR3_USE(pointA), BTVECTOR3_USE(pointB), BTVECTOR3_USE(normal), + distance); +} + +btScalar btManifoldPoint_getAppliedImpulse(btManifoldPoint* obj) +{ + return obj->getAppliedImpulse(); +} + +btScalar btManifoldPoint_getAppliedImpulseLateral1(btManifoldPoint* obj) +{ + return obj->m_appliedImpulseLateral1; +} + +btScalar btManifoldPoint_getAppliedImpulseLateral2(btManifoldPoint* obj) +{ + return obj->m_appliedImpulseLateral2; +} + +btScalar btManifoldPoint_getCombinedContactDamping1(btManifoldPoint* obj) +{ + return obj->m_combinedContactDamping1; +} + +btScalar btManifoldPoint_getCombinedContactStiffness1(btManifoldPoint* obj) +{ + return obj->m_combinedContactStiffness1; +} + +btScalar btManifoldPoint_getCombinedFriction(btManifoldPoint* obj) +{ + return obj->m_combinedFriction; +} + +btScalar btManifoldPoint_getCombinedRestitution(btManifoldPoint* obj) +{ + return obj->m_combinedRestitution; +} + +btScalar btManifoldPoint_getCombinedRollingFriction(btManifoldPoint* obj) +{ + return obj->m_combinedRollingFriction; +} + +btScalar btManifoldPoint_getContactCFM(btManifoldPoint* obj) +{ + return obj->m_contactCFM; +} + +btScalar btManifoldPoint_getContactERP(btManifoldPoint* obj) +{ + return obj->m_contactERP; +} + +btScalar btManifoldPoint_getContactMotion1(btManifoldPoint* obj) +{ + return obj->m_contactMotion1; +} + +btScalar btManifoldPoint_getContactMotion2(btManifoldPoint* obj) +{ + return obj->m_contactMotion2; +} + +int btManifoldPoint_getContactPointFlags(btManifoldPoint* obj) +{ + return obj->m_contactPointFlags; +} + +btScalar btManifoldPoint_getDistance(btManifoldPoint* obj) +{ + return obj->getDistance(); +} + +btScalar btManifoldPoint_getDistance1(btManifoldPoint* obj) +{ + return obj->m_distance1; +} + +btScalar btManifoldPoint_getFrictionCFM(btManifoldPoint* obj) +{ + return obj->m_frictionCFM; +} + +int btManifoldPoint_getIndex0(btManifoldPoint* obj) +{ + return obj->m_index0; +} + +int btManifoldPoint_getIndex1(btManifoldPoint* obj) +{ + return obj->m_index1; +} + +void btManifoldPoint_getLateralFrictionDir1(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_lateralFrictionDir1); +} + +void btManifoldPoint_getLateralFrictionDir2(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_lateralFrictionDir2); +} + +int btManifoldPoint_getLifeTime(btManifoldPoint* obj) +{ + return obj->getLifeTime(); +} + +void btManifoldPoint_getLocalPointA(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_localPointA); +} + +void btManifoldPoint_getLocalPointB(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_localPointB); +} + +void btManifoldPoint_getNormalWorldOnB(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normalWorldOnB); +} + +int btManifoldPoint_getPartId0(btManifoldPoint* obj) +{ + return obj->m_partId0; +} + +int btManifoldPoint_getPartId1(btManifoldPoint* obj) +{ + return obj->m_partId1; +} + +void btManifoldPoint_getPositionWorldOnA(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPositionWorldOnA()); +} + +void btManifoldPoint_getPositionWorldOnB(btManifoldPoint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPositionWorldOnB()); +} + +void* btManifoldPoint_getUserPersistentData(btManifoldPoint* obj) +{ + return obj->m_userPersistentData; +} + +void btManifoldPoint_setAppliedImpulse(btManifoldPoint* obj, btScalar value) +{ + obj->m_appliedImpulse = value; +} + +void btManifoldPoint_setAppliedImpulseLateral1(btManifoldPoint* obj, btScalar value) +{ + obj->m_appliedImpulseLateral1 = value; +} + +void btManifoldPoint_setAppliedImpulseLateral2(btManifoldPoint* obj, btScalar value) +{ + obj->m_appliedImpulseLateral2 = value; +} + +void btManifoldPoint_setCombinedContactDamping1(btManifoldPoint* obj, btScalar value) +{ + obj->m_combinedContactDamping1 = value; +} + +void btManifoldPoint_setCombinedContactStiffness1(btManifoldPoint* obj, btScalar value) +{ + obj->m_combinedContactStiffness1 = value; +} + +void btManifoldPoint_setCombinedFriction(btManifoldPoint* obj, btScalar value) +{ + obj->m_combinedFriction = value; +} + +void btManifoldPoint_setCombinedRestitution(btManifoldPoint* obj, btScalar value) +{ + obj->m_combinedRestitution = value; +} + +void btManifoldPoint_setCombinedRollingFriction(btManifoldPoint* obj, btScalar value) +{ + obj->m_combinedRollingFriction = value; +} + +void btManifoldPoint_setContactCFM(btManifoldPoint* obj, btScalar value) +{ + obj->m_contactCFM = value; +} + +void btManifoldPoint_setContactERP(btManifoldPoint* obj, btScalar value) +{ + obj->m_contactERP = value; +} + +void btManifoldPoint_setContactMotion1(btManifoldPoint* obj, btScalar value) +{ + obj->m_contactMotion1 = value; +} + +void btManifoldPoint_setContactMotion2(btManifoldPoint* obj, btScalar value) +{ + obj->m_contactMotion2 = value; +} + +void btManifoldPoint_setContactPointFlags(btManifoldPoint* obj, int value) +{ + obj->m_contactPointFlags = value; +} + +void btManifoldPoint_setDistance(btManifoldPoint* obj, btScalar dist) +{ + obj->setDistance(dist); +} + +void btManifoldPoint_setDistance1(btManifoldPoint* obj, btScalar value) +{ + obj->m_distance1 = value; +} + +void btManifoldPoint_setFrictionCFM(btManifoldPoint* obj, btScalar value) +{ + obj->m_frictionCFM = value; +} + +void btManifoldPoint_setIndex0(btManifoldPoint* obj, int value) +{ + obj->m_index0 = value; +} + +void btManifoldPoint_setIndex1(btManifoldPoint* obj, int value) +{ + obj->m_index1 = value; +} + +void btManifoldPoint_setLateralFrictionDir1(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_lateralFrictionDir1, value); +} + +void btManifoldPoint_setLateralFrictionDir2(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_lateralFrictionDir2, value); +} + +void btManifoldPoint_setLifeTime(btManifoldPoint* obj, int value) +{ + obj->m_lifeTime = value; +} + +void btManifoldPoint_setLocalPointA(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_localPointA, value); +} + +void btManifoldPoint_setLocalPointB(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_localPointB, value); +} + +void btManifoldPoint_setNormalWorldOnB(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normalWorldOnB, value); +} + +void btManifoldPoint_setPartId0(btManifoldPoint* obj, int value) +{ + obj->m_partId0 = value; +} + +void btManifoldPoint_setPartId1(btManifoldPoint* obj, int value) +{ + obj->m_partId1 = value; +} + +void btManifoldPoint_setPositionWorldOnA(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_positionWorldOnA, value); +} + +void btManifoldPoint_setPositionWorldOnB(btManifoldPoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_positionWorldOnB, value); +} + +void btManifoldPoint_setUserPersistentData(btManifoldPoint* obj, void* value) +{ + obj->m_userPersistentData = value; +} + +void btManifoldPoint_delete(btManifoldPoint* obj) +{ + delete obj; +} + + +ContactAddedCallback getGContactAddedCallback() +{ + return gContactAddedCallback; +} + +void setGContactAddedCallback(ContactAddedCallback value) +{ + gContactAddedCallback = value; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.h new file mode 100644 index 0000000..669bdba --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldPoint_wrap.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btManifoldPoint* btManifoldPoint_new(); + EXPORT btManifoldPoint* btManifoldPoint_new2(const btVector3* pointA, const btVector3* pointB, const btVector3* normal, btScalar distance); + EXPORT btScalar btManifoldPoint_getAppliedImpulse(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getAppliedImpulseLateral1(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getAppliedImpulseLateral2(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getCombinedContactDamping1(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getCombinedContactStiffness1(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getCombinedFriction(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getCombinedRestitution(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getCombinedRollingFriction(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getContactCFM(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getContactERP(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getContactMotion1(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getContactMotion2(btManifoldPoint* obj); + EXPORT int btManifoldPoint_getContactPointFlags(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getDistance(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getDistance1(btManifoldPoint* obj); + EXPORT btScalar btManifoldPoint_getFrictionCFM(btManifoldPoint* obj); + EXPORT int btManifoldPoint_getIndex0(btManifoldPoint* obj); + EXPORT int btManifoldPoint_getIndex1(btManifoldPoint* obj); + EXPORT void btManifoldPoint_getLateralFrictionDir1(btManifoldPoint* obj, btVector3* value); + EXPORT void btManifoldPoint_getLateralFrictionDir2(btManifoldPoint* obj, btVector3* value); + EXPORT int btManifoldPoint_getLifeTime(btManifoldPoint* obj); + EXPORT void btManifoldPoint_getLocalPointA(btManifoldPoint* obj, btVector3* value); + EXPORT void btManifoldPoint_getLocalPointB(btManifoldPoint* obj, btVector3* value); + EXPORT void btManifoldPoint_getNormalWorldOnB(btManifoldPoint* obj, btVector3* value); + EXPORT int btManifoldPoint_getPartId0(btManifoldPoint* obj); + EXPORT int btManifoldPoint_getPartId1(btManifoldPoint* obj); + EXPORT void btManifoldPoint_getPositionWorldOnA(btManifoldPoint* obj, btVector3* value); + EXPORT void btManifoldPoint_getPositionWorldOnB(btManifoldPoint* obj, btVector3* value); + EXPORT void* btManifoldPoint_getUserPersistentData(btManifoldPoint* obj); + EXPORT void btManifoldPoint_setAppliedImpulse(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setAppliedImpulseLateral1(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setAppliedImpulseLateral2(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setCombinedContactDamping1(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setCombinedContactStiffness1(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setCombinedFriction(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setCombinedRestitution(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setCombinedRollingFriction(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setContactCFM(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setContactERP(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setContactMotion1(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setContactMotion2(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setContactPointFlags(btManifoldPoint* obj, int value); + EXPORT void btManifoldPoint_setDistance(btManifoldPoint* obj, btScalar dist); + EXPORT void btManifoldPoint_setDistance1(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setFrictionCFM(btManifoldPoint* obj, btScalar value); + EXPORT void btManifoldPoint_setIndex0(btManifoldPoint* obj, int value); + EXPORT void btManifoldPoint_setIndex1(btManifoldPoint* obj, int value); + EXPORT void btManifoldPoint_setLateralFrictionDir1(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setLateralFrictionDir2(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setLifeTime(btManifoldPoint* obj, int value); + EXPORT void btManifoldPoint_setLocalPointA(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setLocalPointB(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setNormalWorldOnB(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setPartId0(btManifoldPoint* obj, int value); + EXPORT void btManifoldPoint_setPartId1(btManifoldPoint* obj, int value); + EXPORT void btManifoldPoint_setPositionWorldOnA(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setPositionWorldOnB(btManifoldPoint* obj, const btVector3* value); + EXPORT void btManifoldPoint_setUserPersistentData(btManifoldPoint* obj, void* value); + EXPORT void btManifoldPoint_delete(btManifoldPoint* obj); + + EXPORT ContactAddedCallback getGContactAddedCallback(); + EXPORT void setGContactAddedCallback(ContactAddedCallback value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.cpp new file mode 100644 index 0000000..970e1a9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.cpp @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btManifoldResult_wrap.h" + +btManifoldResult* btManifoldResult_new() +{ + return new btManifoldResult(); +} + +btManifoldResult* btManifoldResult_new2(const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap) +{ + return new btManifoldResult(body0Wrap, body1Wrap); +} + +btScalar btManifoldResult_calculateCombinedContactDamping(const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return btManifoldResult::calculateCombinedContactDamping(body0, body1); +} + +btScalar btManifoldResult_calculateCombinedContactStiffness(const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return btManifoldResult::calculateCombinedContactStiffness(body0, body1); +} + +btScalar btManifoldResult_calculateCombinedFriction(const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return btManifoldResult::calculateCombinedFriction(body0, body1); +} + +btScalar btManifoldResult_calculateCombinedRestitution(const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return btManifoldResult::calculateCombinedRestitution(body0, body1); +} + +btScalar btManifoldResult_calculateCombinedRollingFriction(const btCollisionObject* body0, + const btCollisionObject* body1) +{ + return btManifoldResult::calculateCombinedRollingFriction(body0, body1); +} + +btScalar btManifoldResult_getClosestPointDistanceThreshold(btManifoldResult * obj) +{ + return obj->m_closestPointDistanceThreshold; +} + +const btCollisionObject* btManifoldResult_getBody0Internal(btManifoldResult* obj) +{ + return obj->getBody0Internal(); +} + +const btCollisionObjectWrapper* btManifoldResult_getBody0Wrap(btManifoldResult* obj) +{ + return obj->getBody0Wrap(); +} + +const btCollisionObject* btManifoldResult_getBody1Internal(btManifoldResult* obj) +{ + return obj->getBody1Internal(); +} + +const btCollisionObjectWrapper* btManifoldResult_getBody1Wrap(btManifoldResult* obj) +{ + return obj->getBody1Wrap(); +} + +btPersistentManifold* btManifoldResult_getPersistentManifold(btManifoldResult* obj) +{ + return obj->getPersistentManifold(); +} + +void btManifoldResult_refreshContactPoints(btManifoldResult* obj) +{ + obj->refreshContactPoints(); +} + +void btManifoldResult_setBody0Wrap(btManifoldResult* obj, const btCollisionObjectWrapper* obj0Wrap) +{ + obj->setBody0Wrap(obj0Wrap); +} + +void btManifoldResult_setBody1Wrap(btManifoldResult* obj, const btCollisionObjectWrapper* obj1Wrap) +{ + obj->setBody1Wrap(obj1Wrap); +} + +void btManifoldResult_setClosestPointDistanceThreshold(btManifoldResult * obj, btScalar value) +{ + obj->m_closestPointDistanceThreshold = value; +} + +void btManifoldResult_setPersistentManifold(btManifoldResult* obj, btPersistentManifold* manifoldPtr) +{ + obj->setPersistentManifold(manifoldPtr); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.h new file mode 100644 index 0000000..8be96a2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btManifoldResult_wrap.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btManifoldResult* btManifoldResult_new(); + EXPORT btManifoldResult* btManifoldResult_new2(const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); + EXPORT btScalar btManifoldResult_calculateCombinedContactDamping(const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT btScalar btManifoldResult_calculateCombinedContactStiffness(const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT btScalar btManifoldResult_calculateCombinedFriction(const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT btScalar btManifoldResult_calculateCombinedRestitution(const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT btScalar btManifoldResult_calculateCombinedRollingFriction(const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT btScalar btManifoldResult_getClosestPointDistanceThreshold(btManifoldResult* obj); + EXPORT const btCollisionObject* btManifoldResult_getBody0Internal(btManifoldResult* obj); + EXPORT const btCollisionObjectWrapper* btManifoldResult_getBody0Wrap(btManifoldResult* obj); + EXPORT const btCollisionObject* btManifoldResult_getBody1Internal(btManifoldResult* obj); + EXPORT const btCollisionObjectWrapper* btManifoldResult_getBody1Wrap(btManifoldResult* obj); + EXPORT btPersistentManifold* btManifoldResult_getPersistentManifold(btManifoldResult* obj); + EXPORT void btManifoldResult_refreshContactPoints(btManifoldResult* obj); + EXPORT void btManifoldResult_setBody0Wrap(btManifoldResult* obj, const btCollisionObjectWrapper* obj0Wrap); + EXPORT void btManifoldResult_setBody1Wrap(btManifoldResult* obj, const btCollisionObjectWrapper* obj1Wrap); + EXPORT void btManifoldResult_setClosestPointDistanceThreshold(btManifoldResult* obj, btScalar value); + EXPORT void btManifoldResult_setPersistentManifold(btManifoldResult* obj, btPersistentManifold* manifoldPtr); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.cpp new file mode 100644 index 0000000..149c58d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btMinkowskiPenetrationDepthSolver_wrap.h" + +btMinkowskiPenetrationDepthSolver* btMinkowskiPenetrationDepthSolver_new() +{ + return new btMinkowskiPenetrationDepthSolver(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.h new file mode 100644 index 0000000..d6611b6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMinkowskiPenetrationDepthSolver* btMinkowskiPenetrationDepthSolver_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.cpp new file mode 100644 index 0000000..f48225a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.cpp @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btMinkowskiSumShape_wrap.h" + +btMinkowskiSumShape* btMinkowskiSumShape_new(const btConvexShape* shapeA, const btConvexShape* shapeB) +{ + return new btMinkowskiSumShape(shapeA, shapeB); +} + +const btConvexShape* btMinkowskiSumShape_getShapeA(btMinkowskiSumShape* obj) +{ + return obj->getShapeA(); +} + +const btConvexShape* btMinkowskiSumShape_getShapeB(btMinkowskiSumShape* obj) +{ + return obj->getShapeB(); +} + +void btMinkowskiSumShape_getTransformA(btMinkowskiSumShape* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getTransformA()); +} + +void btMinkowskiSumShape_GetTransformB(btMinkowskiSumShape* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->GetTransformB()); +} + +void btMinkowskiSumShape_setTransformA(btMinkowskiSumShape* obj, const btTransform* transA) +{ + BTTRANSFORM_IN(transA); + obj->setTransformA(BTTRANSFORM_USE(transA)); +} + +void btMinkowskiSumShape_setTransformB(btMinkowskiSumShape* obj, const btTransform* transB) +{ + BTTRANSFORM_IN(transB); + obj->setTransformB(BTTRANSFORM_USE(transB)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.h new file mode 100644 index 0000000..ac402a5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMinkowskiSumShape* btMinkowskiSumShape_new(const btConvexShape* shapeA, const btConvexShape* shapeB); + EXPORT const btConvexShape* btMinkowskiSumShape_getShapeA(btMinkowskiSumShape* obj); + EXPORT const btConvexShape* btMinkowskiSumShape_getShapeB(btMinkowskiSumShape* obj); + EXPORT void btMinkowskiSumShape_getTransformA(btMinkowskiSumShape* obj, btTransform* value); + EXPORT void btMinkowskiSumShape_GetTransformB(btMinkowskiSumShape* obj, btTransform* value); + EXPORT void btMinkowskiSumShape_setTransformA(btMinkowskiSumShape* obj, const btTransform* transA); + EXPORT void btMinkowskiSumShape_setTransformB(btMinkowskiSumShape* obj, const btTransform* transB); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.cpp new file mode 100644 index 0000000..75092a4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btMotionState_wrap.h" + +btMotionStateWrapper::btMotionStateWrapper(p_btMotionState_getWorldTransform getWorldTransformCallback, + p_btMotionState_setWorldTransform setWorldTransformCallback) +{ + _getWorldTransformCallback = getWorldTransformCallback; + _setWorldTransformCallback = setWorldTransformCallback; +} + +void btMotionStateWrapper::getWorldTransform(btTransform& worldTrans) const +{ + BTTRANSFORM_DEF(worldTrans); + _getWorldTransformCallback(&BTTRANSFORM_USE_REF(worldTrans)); + BTTRANSFORM_DEF_OUT_REF(worldTrans); +} + +void btMotionStateWrapper::setWorldTransform(const btTransform& worldTrans) +{ + BTTRANSFORM_IN_REF(worldTrans); + _setWorldTransformCallback(&BTTRANSFORM_USE_REF(worldTrans)); +} + + +btMotionStateWrapper* btMotionStateWrapper_new(p_btMotionState_getWorldTransform getWorldTransformCallback, + p_btMotionState_setWorldTransform setWorldTransformCallback) +{ + return ALIGNED_NEW(btMotionStateWrapper)(getWorldTransformCallback, setWorldTransformCallback); +} + + +void btMotionState_getWorldTransform(btMotionState* obj, btTransform* worldTrans) +{ + BTTRANSFORM_IN(worldTrans); + obj->getWorldTransform(BTTRANSFORM_USE(worldTrans)); + BTTRANSFORM_DEF_OUT(worldTrans); +} + +void btMotionState_setWorldTransform(btMotionState* obj, const btTransform* worldTrans) +{ + BTTRANSFORM_IN(worldTrans); + obj->setWorldTransform(BTTRANSFORM_USE(worldTrans)); +} + +void btMotionState_delete(btMotionState* obj) +{ + ALIGNED_FREE(obj); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.h new file mode 100644 index 0000000..0b7f016 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMotionState_wrap.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_MOTIONSTATE_H +#define p_btMotionState_getWorldTransform void* +#define p_btMotionState_setWorldTransform void* +#define btMotionStateWrapper void +#else +typedef void (*p_btMotionState_getWorldTransform)(btTransform* worldTrans); +typedef void (*p_btMotionState_setWorldTransform)(const btTransform* worldTrans); + +class btMotionStateWrapper : public btMotionState +{ +private: + p_btMotionState_getWorldTransform _getWorldTransformCallback; + p_btMotionState_setWorldTransform _setWorldTransformCallback; + +public: + btMotionStateWrapper(p_btMotionState_getWorldTransform getWorldTransformCallback, + p_btMotionState_setWorldTransform setWorldTransformCallback); + + virtual void getWorldTransform(btTransform& worldTrans) const; + virtual void setWorldTransform(const btTransform& worldTrans); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMotionStateWrapper* btMotionStateWrapper_new(p_btMotionState_getWorldTransform getWorldTransformCallback, + p_btMotionState_setWorldTransform setWorldTransformCallback); + + EXPORT void btMotionState_getWorldTransform(btMotionState* obj, btTransform* worldTrans); + EXPORT void btMotionState_setWorldTransform(btMotionState* obj, const btTransform* worldTrans); + EXPORT void btMotionState_delete(btMotionState* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.cpp new file mode 100644 index 0000000..0b106d4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "btMultiBodyConstraintSolver_wrap.h" + +btMultiBodyConstraintSolver* btMultiBodyConstraintSolver_new() +{ + return new btMultiBodyConstraintSolver(); +} + +btScalar btMultiBodyConstraintSolver_solveGroupCacheFriendlyFinish(btMultiBodyConstraintSolver* obj, + btCollisionObject** bodies, int numBodies, const btContactSolverInfo* infoGlobal) +{ + return obj->solveGroupCacheFriendlyFinish(bodies, numBodies, *infoGlobal); +} + +void btMultiBodyConstraintSolver_solveMultiBodyGroup(btMultiBodyConstraintSolver* obj, + btCollisionObject** bodies, int numBodies, btPersistentManifold** manifold, int numManifolds, + btTypedConstraint** constraints, int numConstraints, btMultiBodyConstraint** multiBodyConstraints, + int numMultiBodyConstraints, const btContactSolverInfo* info, btIDebugDraw* debugDrawer, + btDispatcher* dispatcher) +{ + obj->solveMultiBodyGroup(bodies, numBodies, manifold, numManifolds, constraints, + numConstraints, multiBodyConstraints, numMultiBodyConstraints, *info, debugDrawer, + dispatcher); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.h new file mode 100644 index 0000000..1c50895 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyConstraintSolver* btMultiBodyConstraintSolver_new(); + EXPORT btScalar btMultiBodyConstraintSolver_solveGroupCacheFriendlyFinish(btMultiBodyConstraintSolver* obj, btCollisionObject** bodies, int numBodies, const btContactSolverInfo* infoGlobal); + EXPORT void btMultiBodyConstraintSolver_solveMultiBodyGroup(btMultiBodyConstraintSolver* obj, btCollisionObject** bodies, int numBodies, btPersistentManifold** manifold, int numManifolds, btTypedConstraint** constraints, int numConstraints, btMultiBodyConstraint** multiBodyConstraints, int numMultiBodyConstraints, const btContactSolverInfo* info, btIDebugDraw* debugDrawer, btDispatcher* dispatcher); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.cpp new file mode 100644 index 0000000..2ff60eb --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.cpp @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btMultiBodyConstraint_wrap.h" + +void btMultiBodyConstraint_allocateJacobiansMultiDof(btMultiBodyConstraint* obj) +{ + obj->allocateJacobiansMultiDof(); +} + +void btMultiBodyConstraint_createConstraintRows(btMultiBodyConstraint* obj, btAlignedObjectArray_btMultiBodySolverConstraint* constraintRows, + btMultiBodyJacobianData* data, const btContactSolverInfo* infoGlobal) +{ + obj->createConstraintRows(*constraintRows, *data, *infoGlobal); +} + +void btMultiBodyConstraint_debugDraw(btMultiBodyConstraint* obj, btIDebugDraw* drawer) +{ + obj->debugDraw(drawer); +} + +void btMultiBodyConstraint_finalizeMultiDof(btMultiBodyConstraint* obj) +{ + obj->finalizeMultiDof(); +} + +btScalar btMultiBodyConstraint_getAppliedImpulse(btMultiBodyConstraint* obj, int dof) +{ + return obj->getAppliedImpulse(dof); +} + +int btMultiBodyConstraint_getConstraintType(btMultiBodyConstraint* obj) +{ + return obj->getConstraintType(); +} + +int btMultiBodyConstraint_getIslandIdA(btMultiBodyConstraint* obj) +{ + return obj->getIslandIdA(); +} + +int btMultiBodyConstraint_getIslandIdB(btMultiBodyConstraint* obj) +{ + return obj->getIslandIdB(); +} + +btScalar btMultiBodyConstraint_getMaxAppliedImpulse(btMultiBodyConstraint* obj) +{ + return obj->getMaxAppliedImpulse(); +} + +btMultiBody* btMultiBodyConstraint_getMultiBodyA(btMultiBodyConstraint* obj) +{ + return obj->getMultiBodyA(); +} + +btMultiBody* btMultiBodyConstraint_getMultiBodyB(btMultiBodyConstraint* obj) +{ + return obj->getMultiBodyB(); +} + +int btMultiBodyConstraint_getNumRows(btMultiBodyConstraint* obj) +{ + return obj->getNumRows(); +} + +btScalar btMultiBodyConstraint_getPosition(btMultiBodyConstraint* obj, int row) +{ + return obj->getPosition(row); +} + +void btMultiBodyConstraint_internalSetAppliedImpulse(btMultiBodyConstraint* obj, + int dof, btScalar appliedImpulse) +{ + obj->internalSetAppliedImpulse(dof, appliedImpulse); +} + +bool btMultiBodyConstraint_isUnilateral(btMultiBodyConstraint* obj) +{ + return obj->isUnilateral(); +} + +btScalar* btMultiBodyConstraint_jacobianA(btMultiBodyConstraint* obj, int row) +{ + return obj->jacobianA(row); +} + +btScalar* btMultiBodyConstraint_jacobianB(btMultiBodyConstraint* obj, int row) +{ + return obj->jacobianB(row); +} + +void btMultiBodyConstraint_setMaxAppliedImpulse(btMultiBodyConstraint* obj, btScalar maxImp) +{ + obj->setMaxAppliedImpulse(maxImp); +} + +void btMultiBodyConstraint_setPosition(btMultiBodyConstraint* obj, int row, btScalar pos) +{ + obj->setPosition(row, pos); +} + +void btMultiBodyConstraint_updateJacobianSizes(btMultiBodyConstraint* obj) +{ + obj->updateJacobianSizes(); +} + +void btMultiBodyConstraint_delete(btMultiBodyConstraint* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.h new file mode 100644 index 0000000..8368e6c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btMultiBodyConstraint_allocateJacobiansMultiDof(btMultiBodyConstraint* obj); + EXPORT void btMultiBodyConstraint_createConstraintRows(btMultiBodyConstraint* obj, btAlignedObjectArray_btMultiBodySolverConstraint* constraintRows, btMultiBodyJacobianData* data, const btContactSolverInfo* infoGlobal); + EXPORT void btMultiBodyConstraint_debugDraw(btMultiBodyConstraint* obj, btIDebugDraw* drawer); + EXPORT void btMultiBodyConstraint_finalizeMultiDof(btMultiBodyConstraint* obj); + EXPORT btScalar btMultiBodyConstraint_getAppliedImpulse(btMultiBodyConstraint* obj, int dof); + EXPORT int btMultiBodyConstraint_getConstraintType(btMultiBodyConstraint* obj); + EXPORT int btMultiBodyConstraint_getIslandIdA(btMultiBodyConstraint* obj); + EXPORT int btMultiBodyConstraint_getIslandIdB(btMultiBodyConstraint* obj); + EXPORT btScalar btMultiBodyConstraint_getMaxAppliedImpulse(btMultiBodyConstraint* obj); + EXPORT btMultiBody* btMultiBodyConstraint_getMultiBodyA(btMultiBodyConstraint* obj); + EXPORT btMultiBody* btMultiBodyConstraint_getMultiBodyB(btMultiBodyConstraint* obj); + EXPORT int btMultiBodyConstraint_getNumRows(btMultiBodyConstraint* obj); + EXPORT btScalar btMultiBodyConstraint_getPosition(btMultiBodyConstraint* obj, int row); + EXPORT void btMultiBodyConstraint_internalSetAppliedImpulse(btMultiBodyConstraint* obj, int dof, btScalar appliedImpulse); + EXPORT bool btMultiBodyConstraint_isUnilateral(btMultiBodyConstraint* obj); + EXPORT btScalar* btMultiBodyConstraint_jacobianA(btMultiBodyConstraint* obj, int row); + EXPORT btScalar* btMultiBodyConstraint_jacobianB(btMultiBodyConstraint* obj, int row); + EXPORT void btMultiBodyConstraint_setMaxAppliedImpulse(btMultiBodyConstraint* obj, btScalar maxImp); + EXPORT void btMultiBodyConstraint_setPosition(btMultiBodyConstraint* obj, int row, btScalar pos); + EXPORT void btMultiBodyConstraint_updateJacobianSizes(btMultiBodyConstraint* obj); + EXPORT void btMultiBodyConstraint_delete(btMultiBodyConstraint* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.cpp new file mode 100644 index 0000000..0f1cc2b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.cpp @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include + +#include "btMultiBodyDynamicsWorld_wrap.h" + +btMultiBodyDynamicsWorld* btMultiBodyDynamicsWorld_new(btDispatcher* dispatcher, + btBroadphaseInterface* pairCache, btMultiBodyConstraintSolver* constraintSolver, + btCollisionConfiguration* collisionConfiguration) +{ + return new btMultiBodyDynamicsWorld(dispatcher, pairCache, constraintSolver, + collisionConfiguration); +} + +void btMultiBodyDynamicsWorld_addMultiBody(btMultiBodyDynamicsWorld* obj, btMultiBody* body, + int group, int mask) +{ + obj->addMultiBody(body, group, mask); +} + +void btMultiBodyDynamicsWorld_addMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, + btMultiBodyConstraint* constraint) +{ + obj->addMultiBodyConstraint(constraint); +} + +void btMultiBodyDynamicsWorld_buildIslands(btMultiBodyDynamicsWorld* obj) +{ + obj->buildIslands(); +} + +void btMultiBodyDynamicsWorld_clearMultiBodyConstraintForces(btMultiBodyDynamicsWorld* obj) +{ + obj->clearMultiBodyConstraintForces(); +} + +void btMultiBodyDynamicsWorld_clearMultiBodyForces(btMultiBodyDynamicsWorld* obj) +{ + obj->clearMultiBodyForces(); +} + +void btMultiBodyDynamicsWorld_debugDrawMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, + btMultiBodyConstraint* constraint) +{ + obj->debugDrawMultiBodyConstraint(constraint); +} + +void btMultiBodyDynamicsWorld_forwardKinematics(btMultiBodyDynamicsWorld* obj) +{ + obj->forwardKinematics(); +} + +btMultiBody* btMultiBodyDynamicsWorld_getMultiBody(btMultiBodyDynamicsWorld* obj, + int mbIndex) +{ + return obj->getMultiBody(mbIndex); +} + +btMultiBodyConstraint* btMultiBodyDynamicsWorld_getMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, + int constraintIndex) +{ + return obj->getMultiBodyConstraint(constraintIndex); +} + +int btMultiBodyDynamicsWorld_getNumMultibodies(btMultiBodyDynamicsWorld* obj) +{ + return obj->getNumMultibodies(); +} + +int btMultiBodyDynamicsWorld_getNumMultiBodyConstraints(btMultiBodyDynamicsWorld* obj) +{ + return obj->getNumMultiBodyConstraints(); +} + +void btMultiBodyDynamicsWorld_integrateMultiBodyTransforms(btMultiBodyDynamicsWorld* obj, btScalar timeStep) +{ + obj->integrateMultiBodyTransforms(timeStep); +} + +void btMultiBodyDynamicsWorld_integrateTransforms(btMultiBodyDynamicsWorld* obj, + btScalar timeStep) +{ + obj->integrateTransforms(timeStep); +} + +void btMultiBodyDynamicsWorld_predictMultiBodyTransforms(btMultiBodyDynamicsWorld* obj, btScalar timeStep) +{ + obj->predictMultiBodyTransforms(timeStep); +} + +void btMultiBodyDynamicsWorld_predictUnconstraintMotion(btMultiBodyDynamicsWorld* obj, btScalar timeStep) +{ + obj->predictUnconstraintMotion(timeStep); +} + +void btMultiBodyDynamicsWorld_removeMultiBody(btMultiBodyDynamicsWorld* obj, btMultiBody* body) +{ + obj->removeMultiBody(body); +} + +void btMultiBodyDynamicsWorld_removeMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, + btMultiBodyConstraint* constraint) +{ + obj->removeMultiBodyConstraint(constraint); +} + +void btMultiBodyDynamicsWorld_solveExternalForces(btMultiBodyDynamicsWorld* obj, btContactSolverInfo* solverInfo) +{ + obj->solveExternalForces(*solverInfo); +} + +void btMultiBodyDynamicsWorld_solveInternalConstraints(btMultiBodyDynamicsWorld* obj, btContactSolverInfo* solverInfo) +{ + obj->solveInternalConstraints(*solverInfo); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.h new file mode 100644 index 0000000..f69b10a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyDynamicsWorld* btMultiBodyDynamicsWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, btMultiBodyConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration); + EXPORT void btMultiBodyDynamicsWorld_addMultiBody(btMultiBodyDynamicsWorld* obj, btMultiBody* body, int group, int mask); + EXPORT void btMultiBodyDynamicsWorld_addMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, btMultiBodyConstraint* constraint); + EXPORT void btMultiBodyDynamicsWorld_buildIslands(btMultiBodyDynamicsWorld* obj); + EXPORT void btMultiBodyDynamicsWorld_clearMultiBodyConstraintForces(btMultiBodyDynamicsWorld* obj); + EXPORT void btMultiBodyDynamicsWorld_clearMultiBodyForces(btMultiBodyDynamicsWorld* obj); + EXPORT void btMultiBodyDynamicsWorld_debugDrawMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, btMultiBodyConstraint* constraint); + EXPORT void btMultiBodyDynamicsWorld_forwardKinematics(btMultiBodyDynamicsWorld* obj); + EXPORT btMultiBody* btMultiBodyDynamicsWorld_getMultiBody(btMultiBodyDynamicsWorld* obj, int mbIndex); + EXPORT btMultiBodyConstraint* btMultiBodyDynamicsWorld_getMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, int constraintIndex); + EXPORT int btMultiBodyDynamicsWorld_getNumMultibodies(btMultiBodyDynamicsWorld* obj); + EXPORT int btMultiBodyDynamicsWorld_getNumMultiBodyConstraints(btMultiBodyDynamicsWorld* obj); + EXPORT void btMultiBodyDynamicsWorld_integrateMultiBodyTransforms(btMultiBodyDynamicsWorld* obj, btScalar timeStep); + EXPORT void btMultiBodyDynamicsWorld_integrateTransforms(btMultiBodyDynamicsWorld* obj, btScalar timeStep); + EXPORT void btMultiBodyDynamicsWorld_predictMultiBodyTransforms(btMultiBodyDynamicsWorld* obj, btScalar timeStep); + EXPORT void btMultiBodyDynamicsWorld_predictUnconstraintMotion(btMultiBodyDynamicsWorld* obj, btScalar timeStep); + EXPORT void btMultiBodyDynamicsWorld_removeMultiBody(btMultiBodyDynamicsWorld* obj, btMultiBody* body); + EXPORT void btMultiBodyDynamicsWorld_removeMultiBodyConstraint(btMultiBodyDynamicsWorld* obj, btMultiBodyConstraint* constraint); + EXPORT void btMultiBodyDynamicsWorld_solveExternalForces(btMultiBodyDynamicsWorld* obj, btContactSolverInfo* solverInfo); + EXPORT void btMultiBodyDynamicsWorld_solveInternalConstraints(btMultiBodyDynamicsWorld* obj, btContactSolverInfo* solverInfo); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.cpp new file mode 100644 index 0000000..36f25f7 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btMultiBodyFixedConstraint_wrap.h" + +btMultiBodyFixedConstraint* btMultiBodyFixedConstraint_new(btMultiBody* body, int link, + btRigidBody* bodyB, const btVector3* pivotInA, const btVector3* pivotInB, const btMatrix3x3* frameInA, + const btMatrix3x3* frameInB) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + BTMATRIX3X3_IN(frameInA); + BTMATRIX3X3_IN(frameInB); + return new btMultiBodyFixedConstraint(body, link, bodyB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB), BTMATRIX3X3_USE(frameInA), BTMATRIX3X3_USE(frameInB)); +} + +btMultiBodyFixedConstraint* btMultiBodyFixedConstraint_new2(btMultiBody* bodyA, int linkA, + btMultiBody* bodyB, int linkB, const btVector3* pivotInA, const btVector3* pivotInB, + const btMatrix3x3* frameInA, const btMatrix3x3* frameInB) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + BTMATRIX3X3_IN(frameInA); + BTMATRIX3X3_IN(frameInB); + return new btMultiBodyFixedConstraint(bodyA, linkA, bodyB, linkB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB), BTMATRIX3X3_USE(frameInA), BTMATRIX3X3_USE(frameInB)); +} + +void btMultiBodyFixedConstraint_getFrameInA(btMultiBodyFixedConstraint* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->getFrameInA()); +} + +void btMultiBodyFixedConstraint_getFrameInB(btMultiBodyFixedConstraint* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->getFrameInB()); +} + +void btMultiBodyFixedConstraint_getPivotInA(btMultiBodyFixedConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInA()); +} + +void btMultiBodyFixedConstraint_getPivotInB(btMultiBodyFixedConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInB()); +} + +void btMultiBodyFixedConstraint_setFrameInA(btMultiBodyFixedConstraint* obj, const btMatrix3x3* frameInA) +{ + BTMATRIX3X3_IN(frameInA); + obj->setFrameInA(BTMATRIX3X3_USE(frameInA)); +} + +void btMultiBodyFixedConstraint_setFrameInB(btMultiBodyFixedConstraint* obj, const btMatrix3x3* frameInB) +{ + BTMATRIX3X3_IN(frameInB); + obj->setFrameInB(BTMATRIX3X3_USE(frameInB)); +} + +void btMultiBodyFixedConstraint_setPivotInA(btMultiBodyFixedConstraint* obj, const btVector3* pivotInA) +{ + BTVECTOR3_IN(pivotInA); + obj->setPivotInA(BTVECTOR3_USE(pivotInA)); +} + +void btMultiBodyFixedConstraint_setPivotInB(btMultiBodyFixedConstraint* obj, const btVector3* pivotInB) +{ + BTVECTOR3_IN(pivotInB); + obj->setPivotInB(BTVECTOR3_USE(pivotInB)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.h new file mode 100644 index 0000000..5b6ed5c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyFixedConstraint* btMultiBodyFixedConstraint_new(btMultiBody* body, int link, btRigidBody* bodyB, const btVector3* pivotInA, const btVector3* pivotInB, const btMatrix3x3* frameInA, const btMatrix3x3* frameInB); + EXPORT btMultiBodyFixedConstraint* btMultiBodyFixedConstraint_new2(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int linkB, const btVector3* pivotInA, const btVector3* pivotInB, const btMatrix3x3* frameInA, const btMatrix3x3* frameInB); + EXPORT void btMultiBodyFixedConstraint_getFrameInA(btMultiBodyFixedConstraint* obj, btMatrix3x3* value); + EXPORT void btMultiBodyFixedConstraint_getFrameInB(btMultiBodyFixedConstraint* obj, btMatrix3x3* value); + EXPORT void btMultiBodyFixedConstraint_getPivotInA(btMultiBodyFixedConstraint* obj, btVector3* value); + EXPORT void btMultiBodyFixedConstraint_getPivotInB(btMultiBodyFixedConstraint* obj, btVector3* value); + EXPORT void btMultiBodyFixedConstraint_setFrameInA(btMultiBodyFixedConstraint* obj, const btMatrix3x3* frameInA); + EXPORT void btMultiBodyFixedConstraint_setFrameInB(btMultiBodyFixedConstraint* obj, const btMatrix3x3* frameInB); + EXPORT void btMultiBodyFixedConstraint_setPivotInA(btMultiBodyFixedConstraint* obj, const btVector3* pivotInA); + EXPORT void btMultiBodyFixedConstraint_setPivotInB(btMultiBodyFixedConstraint* obj, const btVector3* pivotInB); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.cpp new file mode 100644 index 0000000..02a9430 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btMultiBodyJointLimitConstraint_wrap.h" + +btMultiBodyJointLimitConstraint* btMultiBodyJointLimitConstraint_new(btMultiBody* body, + int link, btScalar lower, btScalar upper) +{ + return new btMultiBodyJointLimitConstraint(body, link, lower, upper); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.h new file mode 100644 index 0000000..87beb9e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyJointLimitConstraint* btMultiBodyJointLimitConstraint_new(btMultiBody* body, int link, btScalar lower, btScalar upper); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.cpp new file mode 100644 index 0000000..9e65146 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.cpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btMultiBodyJointMotor_wrap.h" + +btMultiBodyJointMotor* btMultiBodyJointMotor_new(btMultiBody* body, int link, btScalar desiredVelocity, + btScalar maxMotorImpulse) +{ + return new btMultiBodyJointMotor(body, link, desiredVelocity, maxMotorImpulse); +} + +btMultiBodyJointMotor* btMultiBodyJointMotor_new2(btMultiBody* body, int link, int linkDoF, + btScalar desiredVelocity, btScalar maxMotorImpulse) +{ + return new btMultiBodyJointMotor(body, link, linkDoF, desiredVelocity, maxMotorImpulse); +} + +void btMultiBodyJointMotor_setPositionTarget(btMultiBodyJointMotor* obj, btScalar posTarget) +{ + obj->setPositionTarget(posTarget); +} + +void btMultiBodyJointMotor_setPositionTarget2(btMultiBodyJointMotor* obj, btScalar posTarget, + btScalar kp) +{ + obj->setPositionTarget(posTarget, kp); +} + +void btMultiBodyJointMotor_setVelocityTarget(btMultiBodyJointMotor* obj, btScalar velTarget) +{ + obj->setVelocityTarget(velTarget); +} + +void btMultiBodyJointMotor_setVelocityTarget2(btMultiBodyJointMotor* obj, btScalar velTarget, + btScalar kd) +{ + obj->setVelocityTarget(velTarget, kd); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.h new file mode 100644 index 0000000..85df861 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyJointMotor* btMultiBodyJointMotor_new(btMultiBody* body, int link, btScalar desiredVelocity, btScalar maxMotorImpulse); + EXPORT btMultiBodyJointMotor* btMultiBodyJointMotor_new2(btMultiBody* body, int link, int linkDoF, btScalar desiredVelocity, btScalar maxMotorImpulse); + EXPORT void btMultiBodyJointMotor_setPositionTarget(btMultiBodyJointMotor* obj, btScalar posTarget); + EXPORT void btMultiBodyJointMotor_setPositionTarget2(btMultiBodyJointMotor* obj, btScalar posTarget, btScalar kp); + EXPORT void btMultiBodyJointMotor_setVelocityTarget(btMultiBodyJointMotor* obj, btScalar velTarget); + EXPORT void btMultiBodyJointMotor_setVelocityTarget2(btMultiBodyJointMotor* obj, btScalar velTarget, btScalar kd); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.cpp new file mode 100644 index 0000000..0a5d501 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btMultiBodyLinkCollider_wrap.h" + +btMultiBodyLinkCollider* btMultiBodyLinkCollider_new(btMultiBody* multiBody, int link) +{ + return new btMultiBodyLinkCollider(multiBody, link); +} + +int btMultiBodyLinkCollider_getLink(btMultiBodyLinkCollider* obj) +{ + return obj->m_link; +} + +btMultiBody* btMultiBodyLinkCollider_getMultiBody(btMultiBodyLinkCollider* obj) +{ + return obj->m_multiBody; +} + +void btMultiBodyLinkCollider_setLink(btMultiBodyLinkCollider* obj, int value) +{ + obj->m_link = value; +} + +void btMultiBodyLinkCollider_setMultiBody(btMultiBodyLinkCollider* obj, btMultiBody* value) +{ + obj->m_multiBody = value; +} + +btMultiBodyLinkCollider* btMultiBodyLinkCollider_upcast(btCollisionObject* colObj) +{ + return btMultiBodyLinkCollider::upcast(colObj); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.h new file mode 100644 index 0000000..8da6afb --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyLinkCollider* btMultiBodyLinkCollider_new(btMultiBody* multiBody, int link); + EXPORT int btMultiBodyLinkCollider_getLink(btMultiBodyLinkCollider* obj); + EXPORT btMultiBody* btMultiBodyLinkCollider_getMultiBody(btMultiBodyLinkCollider* obj); + EXPORT void btMultiBodyLinkCollider_setLink(btMultiBodyLinkCollider* obj, int value); + EXPORT void btMultiBodyLinkCollider_setMultiBody(btMultiBodyLinkCollider* obj, btMultiBody* value); + EXPORT btMultiBodyLinkCollider* btMultiBodyLinkCollider_upcast(btCollisionObject* colObj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.cpp new file mode 100644 index 0000000..4a991cb --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.cpp @@ -0,0 +1,374 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btMultiBodyLink_wrap.h" + +btSpatialMotionVector* btMultibodyLink_getAbsFrameLocVelocity(btMultibodyLink* obj) +{ + return &obj->m_absFrameLocVelocity; +} + +btSpatialMotionVector* btMultibodyLink_getAbsFrameTotVelocity(btMultibodyLink* obj) +{ + return &obj->m_absFrameTotVelocity; +} + +void btMultibodyLink_getAppliedConstraintForce(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedConstraintForce); +} + +void btMultibodyLink_getAppliedConstraintTorque(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedConstraintTorque); +} + +void btMultibodyLink_getAppliedForce(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedForce); +} + +void btMultibodyLink_getAppliedTorque(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedTorque); +} + +btSpatialMotionVector* btMultibodyLink_getAxes(btMultibodyLink* obj) +{ + return obj->m_axes; +} + +void btMultibodyLink_getAxisBottom(btMultibodyLink* obj, int dof, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxisBottom(dof)); +} + +void btMultibodyLink_getAxisTop(btMultibodyLink* obj, int dof, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxisTop(dof)); +} + +void btMultibodyLink_getCachedRotParentToThis(btMultibodyLink* obj, btQuaternion* value) +{ + BTQUATERNION_SET(value, obj->m_cachedRotParentToThis); +} + +void btMultibodyLink_getCachedRotParentToThisInterpolate(btMultibodyLink* obj, btQuaternion* value) +{ + BTQUATERNION_SET(value, obj->m_cachedRotParentToThis_interpolate); +} + +void btMultibodyLink_getCachedRVector(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_cachedRVector); +} + +void btMultibodyLink_getCachedRVectorInterpolate(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_cachedRVector_interpolate); +} + +void btMultibodyLink_getCachedWorldTransform(btMultibodyLink* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_cachedWorldTransform); +} + +int btMultibodyLink_getCfgOffset(btMultibodyLink* obj) +{ + return obj->m_cfgOffset; +} + +btMultiBodyLinkCollider* btMultibodyLink_getCollider(btMultibodyLink* obj) +{ + return obj->m_collider; +} + +int btMultibodyLink_getDofCount(btMultibodyLink* obj) +{ + return obj->m_dofCount; +} + +int btMultibodyLink_getDofOffset(btMultibodyLink* obj) +{ + return obj->m_dofOffset; +} + +void btMultibodyLink_getDVector(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_dVector); +} + +void btMultibodyLink_getEVector(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_eVector); +} + +int btMultibodyLink_getFlags(btMultibodyLink* obj) +{ + return obj->m_flags; +} + +void btMultibodyLink_getInertiaLocal(btMultibodyLink* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_inertiaLocal); +} + +btScalar btMultibodyLink_getJointDamping(btMultibodyLink* obj) +{ + return obj->m_jointDamping; +} + +btMultiBodyJointFeedback* btMultibodyLink_getJointFeedback(btMultibodyLink* obj) +{ + return obj->m_jointFeedback; +} + +btScalar btMultibodyLink_getJointFriction(btMultibodyLink* obj) +{ + return obj->m_jointFriction; +} + +const char* btMultibodyLink_getJointName(btMultibodyLink* obj) +{ + return obj->m_jointName; +} + +btScalar* btMultibodyLink_getJointPos(btMultibodyLink* obj) +{ + return obj->m_jointPos; +} + +btScalar* btMultibodyLink_getJointPosInterpolate(btMultibodyLink* obj) +{ + return obj->m_jointPos_interpolate; +} + +btScalar* btMultibodyLink_getJointTorque(btMultibodyLink* obj) +{ + return obj->m_jointTorque; +} + +btMultibodyLink::eFeatherstoneJointType btMultibodyLink_getJointType(btMultibodyLink* obj) +{ + return obj->m_jointType; +} + +const char* btMultibodyLink_getLinkName(btMultibodyLink* obj) +{ + return obj->m_linkName; +} + +btScalar btMultibodyLink_getMass(btMultibodyLink* obj) +{ + return obj->m_mass; +} + +int btMultibodyLink_getParent(btMultibodyLink* obj) +{ + return obj->m_parent; +} + +int btMultibodyLink_getPosVarCount(btMultibodyLink* obj) +{ + return obj->m_posVarCount; +} + +void btMultibodyLink_getZeroRotParentToThis(btMultibodyLink* obj, btQuaternion* value) +{ + BTQUATERNION_SET(value, obj->m_zeroRotParentToThis); +} + +const void* btMultibodyLink_getUserPtr(btMultibodyLink* obj) +{ + return obj->m_userPtr; +} + +void btMultibodyLink_setAppliedConstraintForce(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedConstraintForce, value); +} + +void btMultibodyLink_setAppliedConstraintTorque(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedConstraintTorque, value); +} + +void btMultibodyLink_setAppliedForce(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedForce, value); +} + +void btMultibodyLink_setAppliedTorque(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedTorque, value); +} + +void btMultibodyLink_setAxisBottom(btMultibodyLink* obj, int dof, btScalar x, btScalar y, + btScalar z) +{ + obj->setAxisBottom(dof, x, y, z); +} + +void btMultibodyLink_setAxisBottom2(btMultibodyLink* obj, int dof, const btVector3* axis) +{ + BTVECTOR3_IN(axis); + obj->setAxisBottom(dof, BTVECTOR3_USE(axis)); +} + +void btMultibodyLink_setAxisTop(btMultibodyLink* obj, int dof, btScalar x, btScalar y, + btScalar z) +{ + obj->setAxisTop(dof, x, y, z); +} + +void btMultibodyLink_setAxisTop2(btMultibodyLink* obj, int dof, const btVector3* axis) +{ + BTVECTOR3_IN(axis); + obj->setAxisTop(dof, BTVECTOR3_USE(axis)); +} + +void btMultibodyLink_setCachedRotParentToThis(btMultibodyLink* obj, const btQuaternion* value) +{ + BTQUATERNION_COPY(&obj->m_cachedRotParentToThis, value); +} + +void btMultibodyLink_setCachedRotParentToThisInterpolate(btMultibodyLink* obj, const btQuaternion* value) +{ + BTQUATERNION_COPY(&obj->m_cachedRotParentToThis_interpolate, value); +} + +void btMultibodyLink_setCachedRVector(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_cachedRVector, value); +} + +void btMultibodyLink_setCachedRVectorInterpolate(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_cachedRVector_interpolate, value); +} + +void btMultibodyLink_setCachedWorldTransform(btMultibodyLink* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_cachedWorldTransform, value); +} + +void btMultibodyLink_setCfgOffset(btMultibodyLink* obj, int value) +{ + obj->m_cfgOffset = value; +} + +void btMultibodyLink_setCollider(btMultibodyLink* obj, btMultiBodyLinkCollider* value) +{ + obj->m_collider = value; +} + +void btMultibodyLink_setDofCount(btMultibodyLink* obj, int value) +{ + obj->m_dofCount = value; +} + +void btMultibodyLink_setDofOffset(btMultibodyLink* obj, int value) +{ + obj->m_dofOffset = value; +} + +void btMultibodyLink_setDVector(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_dVector, value); +} + +void btMultibodyLink_setEVector(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_eVector, value); +} + +void btMultibodyLink_setFlags(btMultibodyLink* obj, int value) +{ + obj->m_flags = value; +} + +void btMultibodyLink_setInertiaLocal(btMultibodyLink* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_inertiaLocal, value); +} + +void btMultibodyLink_setJointDamping(btMultibodyLink* obj, btScalar value) +{ + obj->m_jointDamping = value; +} + +void btMultibodyLink_setJointFeedback(btMultibodyLink* obj, btMultiBodyJointFeedback* value) +{ + obj->m_jointFeedback = value; +} + +void btMultibodyLink_setJointFriction(btMultibodyLink* obj, btScalar value) +{ + obj->m_jointFriction = value; +} + +void btMultibodyLink_setJointName(btMultibodyLink* obj, const char* value) +{ + obj->m_jointName = value; +} + +void btMultibodyLink_setJointType(btMultibodyLink* obj, btMultibodyLink_eFeatherstoneJointType value) +{ + obj->m_jointType = value; +} + +void btMultibodyLink_setLinkName(btMultibodyLink* obj, const char* value) +{ + obj->m_linkName = value; +} + +void btMultibodyLink_setMass(btMultibodyLink* obj, btScalar value) +{ + obj->m_mass = value; +} + +void btMultibodyLink_setParent(btMultibodyLink* obj, int value) +{ + obj->m_parent = value; +} + +void btMultibodyLink_setPosVarCount(btMultibodyLink* obj, int value) +{ + obj->m_posVarCount = value; +} + +void btMultibodyLink_setZeroRotParentToThis(btMultibodyLink* obj, const btQuaternion* value) +{ + BTQUATERNION_COPY(&obj->m_zeroRotParentToThis, value); +} + +void btMultibodyLink_setUserPtr(btMultibodyLink* obj, const void* value) +{ + obj->m_userPtr = value; +} + +void btMultibodyLink_updateCacheMultiDof(btMultibodyLink* obj, btScalar* pq) +{ + obj->updateCacheMultiDof(pq); +} + +void btMultibodyLink_updateInterpolationCacheMultiDof(btMultibodyLink* obj) +{ + obj->updateInterpolationCacheMultiDof(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.h new file mode 100644 index 0000000..f34cc8a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyLink_wrap.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSpatialMotionVector* btMultibodyLink_getAbsFrameLocVelocity(btMultibodyLink* obj); + EXPORT btSpatialMotionVector* btMultibodyLink_getAbsFrameTotVelocity(btMultibodyLink* obj); + EXPORT void btMultibodyLink_getAppliedConstraintForce(btMultibodyLink* obj, btVector3* value); + EXPORT void btMultibodyLink_getAppliedConstraintTorque(btMultibodyLink* obj, btVector3* value); + EXPORT void btMultibodyLink_getAppliedForce(btMultibodyLink* obj, btVector3* value); + EXPORT void btMultibodyLink_getAppliedTorque(btMultibodyLink* obj, btVector3* value); + EXPORT btSpatialMotionVector* btMultibodyLink_getAxes(btMultibodyLink* obj); + EXPORT void btMultibodyLink_getAxisBottom(btMultibodyLink* obj, int dof, btVector3* value); + EXPORT void btMultibodyLink_getAxisTop(btMultibodyLink* obj, int dof, btVector3* value); + EXPORT void btMultibodyLink_getCachedRotParentToThis(btMultibodyLink* obj, btQuaternion* value); + EXPORT void btMultibodyLink_getCachedRotParentToThisInterpolate(btMultibodyLink* obj, btQuaternion* value); + EXPORT void btMultibodyLink_getCachedRVector(btMultibodyLink* obj, btVector3* value); + EXPORT void btMultibodyLink_getCachedRVectorInterpolate(btMultibodyLink* obj, btVector3* value); + EXPORT void btMultibodyLink_getCachedWorldTransform(btMultibodyLink* obj, btTransform* value); + EXPORT int btMultibodyLink_getCfgOffset(btMultibodyLink* obj); + EXPORT btMultiBodyLinkCollider* btMultibodyLink_getCollider(btMultibodyLink* obj); + EXPORT int btMultibodyLink_getDofCount(btMultibodyLink* obj); + EXPORT int btMultibodyLink_getDofOffset(btMultibodyLink* obj); + EXPORT void btMultibodyLink_getDVector(btMultibodyLink* obj, btVector3* value); + EXPORT void btMultibodyLink_getEVector(btMultibodyLink* obj, btVector3* value); + EXPORT int btMultibodyLink_getFlags(btMultibodyLink* obj); + EXPORT void btMultibodyLink_getInertiaLocal(btMultibodyLink* obj, btVector3* value); + EXPORT btScalar btMultibodyLink_getJointDamping(btMultibodyLink* obj); + EXPORT btMultiBodyJointFeedback* btMultibodyLink_getJointFeedback(btMultibodyLink* obj); + EXPORT btScalar btMultibodyLink_getJointFriction(btMultibodyLink* obj); + EXPORT const char* btMultibodyLink_getJointName(btMultibodyLink* obj); + EXPORT btScalar* btMultibodyLink_getJointPos(btMultibodyLink* obj); + EXPORT btScalar* btMultibodyLink_getJointPosInterpolate(btMultibodyLink* obj); + EXPORT btScalar* btMultibodyLink_getJointTorque(btMultibodyLink* obj); + EXPORT btMultibodyLink_eFeatherstoneJointType btMultibodyLink_getJointType(btMultibodyLink* obj); + EXPORT const char* btMultibodyLink_getLinkName(btMultibodyLink* obj); + EXPORT btScalar btMultibodyLink_getMass(btMultibodyLink* obj); + EXPORT int btMultibodyLink_getParent(btMultibodyLink* obj); + EXPORT int btMultibodyLink_getPosVarCount(btMultibodyLink* obj); + EXPORT void btMultibodyLink_getZeroRotParentToThis(btMultibodyLink* obj, btQuaternion* value); + EXPORT const void* btMultibodyLink_getUserPtr(btMultibodyLink* obj); + EXPORT void btMultibodyLink_setAppliedConstraintForce(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setAppliedConstraintTorque(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setAppliedForce(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setAppliedTorque(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setAxisBottom(btMultibodyLink* obj, int dof, btScalar x, btScalar y, btScalar z); + EXPORT void btMultibodyLink_setAxisBottom2(btMultibodyLink* obj, int dof, const btVector3* axis); + EXPORT void btMultibodyLink_setAxisTop(btMultibodyLink* obj, int dof, btScalar x, btScalar y, btScalar z); + EXPORT void btMultibodyLink_setAxisTop2(btMultibodyLink* obj, int dof, const btVector3* axis); + EXPORT void btMultibodyLink_setCachedRotParentToThis(btMultibodyLink* obj, const btQuaternion* value); + EXPORT void btMultibodyLink_setCachedRotParentToThisInterpolate(btMultibodyLink* obj, const btQuaternion* value); + EXPORT void btMultibodyLink_setCachedRVector(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setCachedRVectorInterpolate(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setCachedWorldTransform(btMultibodyLink* obj, const btTransform* value); + EXPORT void btMultibodyLink_setCfgOffset(btMultibodyLink* obj, int value); + EXPORT void btMultibodyLink_setCollider(btMultibodyLink* obj, btMultiBodyLinkCollider* value); + EXPORT void btMultibodyLink_setDofCount(btMultibodyLink* obj, int value); + EXPORT void btMultibodyLink_setDofOffset(btMultibodyLink* obj, int value); + EXPORT void btMultibodyLink_setDVector(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setEVector(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setFlags(btMultibodyLink* obj, int value); + EXPORT void btMultibodyLink_setInertiaLocal(btMultibodyLink* obj, const btVector3* value); + EXPORT void btMultibodyLink_setJointDamping(btMultibodyLink* obj, btScalar value); + EXPORT void btMultibodyLink_setJointFeedback(btMultibodyLink* obj, btMultiBodyJointFeedback* value); + EXPORT void btMultibodyLink_setJointFriction(btMultibodyLink* obj, btScalar value); + EXPORT void btMultibodyLink_setJointName(btMultibodyLink* obj, const char* value); + EXPORT void btMultibodyLink_setJointType(btMultibodyLink* obj, btMultibodyLink_eFeatherstoneJointType value); + EXPORT void btMultibodyLink_setLinkName(btMultibodyLink* obj, const char* value); + EXPORT void btMultibodyLink_setMass(btMultibodyLink* obj, btScalar value); + EXPORT void btMultibodyLink_setParent(btMultibodyLink* obj, int value); + EXPORT void btMultibodyLink_setPosVarCount(btMultibodyLink* obj, int value); + EXPORT void btMultibodyLink_setZeroRotParentToThis(btMultibodyLink* obj, const btQuaternion* value); + EXPORT void btMultibodyLink_setUserPtr(btMultibodyLink* obj, const void* value); + EXPORT void btMultibodyLink_updateCacheMultiDof(btMultibodyLink* obj, btScalar* pq); + EXPORT void btMultibodyLink_updateInterpolationCacheMultiDof(btMultibodyLink* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.cpp new file mode 100644 index 0000000..0e971cd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.cpp @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btMultiBodyPoint2Point_wrap.h" + +btMultiBodyPoint2Point* btMultiBodyPoint2Point_new(btMultiBody* body, int link, btRigidBody* bodyB, + const btVector3* pivotInA, const btVector3* pivotInB) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + return new btMultiBodyPoint2Point(body, link, bodyB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB)); +} + +btMultiBodyPoint2Point* btMultiBodyPoint2Point_new2(btMultiBody* bodyA, int linkA, + btMultiBody* bodyB, int linkB, const btVector3* pivotInA, const btVector3* pivotInB) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + return new btMultiBodyPoint2Point(bodyA, linkA, bodyB, linkB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB)); +} + +void btMultiBodyPoint2Point_getPivotInB(btMultiBodyPoint2Point* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInB()); +} + +void btMultiBodyPoint2Point_setPivotInB(btMultiBodyPoint2Point* obj, const btVector3* pivotInB) +{ + BTVECTOR3_IN(pivotInB); + obj->setPivotInB(BTVECTOR3_USE(pivotInB)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.h new file mode 100644 index 0000000..74de3f1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodyPoint2Point* btMultiBodyPoint2Point_new(btMultiBody* body, int link, btRigidBody* bodyB, const btVector3* pivotInA, const btVector3* pivotInB); + EXPORT btMultiBodyPoint2Point* btMultiBodyPoint2Point_new2(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int linkB, const btVector3* pivotInA, const btVector3* pivotInB); + EXPORT void btMultiBodyPoint2Point_getPivotInB(btMultiBodyPoint2Point* obj, btVector3* value); + EXPORT void btMultiBodyPoint2Point_setPivotInB(btMultiBodyPoint2Point* obj, const btVector3* pivotInB); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.cpp new file mode 100644 index 0000000..dcd015c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btMultiBodySliderConstraint_wrap.h" + +btMultiBodySliderConstraint* btMultiBodySliderConstraint_new(btMultiBody* body, int link, + btRigidBody* bodyB, const btVector3* pivotInA, const btVector3* pivotInB, const btMatrix3x3* frameInA, + const btMatrix3x3* frameInB, const btVector3* jointAxis) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + BTMATRIX3X3_IN(frameInA); + BTMATRIX3X3_IN(frameInB); + BTVECTOR3_IN(jointAxis); + return new btMultiBodySliderConstraint(body, link, bodyB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB), BTMATRIX3X3_USE(frameInA), BTMATRIX3X3_USE(frameInB), + BTVECTOR3_USE(jointAxis)); +} + +btMultiBodySliderConstraint* btMultiBodySliderConstraint_new2(btMultiBody* bodyA, + int linkA, btMultiBody* bodyB, int linkB, const btVector3* pivotInA, const btVector3* pivotInB, + const btMatrix3x3* frameInA, const btMatrix3x3* frameInB, const btVector3* jointAxis) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + BTMATRIX3X3_IN(frameInA); + BTMATRIX3X3_IN(frameInB); + BTVECTOR3_IN(jointAxis); + return new btMultiBodySliderConstraint(bodyA, linkA, bodyB, linkB, BTVECTOR3_USE(pivotInA), + BTVECTOR3_USE(pivotInB), BTMATRIX3X3_USE(frameInA), BTMATRIX3X3_USE(frameInB), + BTVECTOR3_USE(jointAxis)); +} + +void btMultiBodySliderConstraint_getFrameInA(btMultiBodySliderConstraint* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->getFrameInA()); +} + +void btMultiBodySliderConstraint_getFrameInB(btMultiBodySliderConstraint* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->getFrameInB()); +} + +void btMultiBodySliderConstraint_getJointAxis(btMultiBodySliderConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getJointAxis()); +} + +void btMultiBodySliderConstraint_getPivotInA(btMultiBodySliderConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInA()); +} + +void btMultiBodySliderConstraint_getPivotInB(btMultiBodySliderConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInB()); +} + +void btMultiBodySliderConstraint_setFrameInA(btMultiBodySliderConstraint* obj, const btMatrix3x3* frameInA) +{ + BTMATRIX3X3_IN(frameInA); + obj->setFrameInA(BTMATRIX3X3_USE(frameInA)); +} + +void btMultiBodySliderConstraint_setFrameInB(btMultiBodySliderConstraint* obj, const btMatrix3x3* frameInB) +{ + BTMATRIX3X3_IN(frameInB); + obj->setFrameInB(BTMATRIX3X3_USE(frameInB)); +} + +void btMultiBodySliderConstraint_setJointAxis(btMultiBodySliderConstraint* obj, const btVector3* jointAxis) +{ + BTVECTOR3_IN(jointAxis); + obj->setJointAxis(BTVECTOR3_USE(jointAxis)); +} + +void btMultiBodySliderConstraint_setPivotInA(btMultiBodySliderConstraint* obj, const btVector3* pivotInA) +{ + BTVECTOR3_IN(pivotInA); + obj->setPivotInA(BTVECTOR3_USE(pivotInA)); +} + +void btMultiBodySliderConstraint_setPivotInB(btMultiBodySliderConstraint* obj, const btVector3* pivotInB) +{ + BTVECTOR3_IN(pivotInB); + obj->setPivotInB(BTVECTOR3_USE(pivotInB)); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.h new file mode 100644 index 0000000..302ffc6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodySliderConstraint* btMultiBodySliderConstraint_new(btMultiBody* body, int link, btRigidBody* bodyB, const btVector3* pivotInA, const btVector3* pivotInB, const btMatrix3x3* frameInA, const btMatrix3x3* frameInB, const btVector3* jointAxis); + EXPORT btMultiBodySliderConstraint* btMultiBodySliderConstraint_new2(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int linkB, const btVector3* pivotInA, const btVector3* pivotInB, const btMatrix3x3* frameInA, const btMatrix3x3* frameInB, const btVector3* jointAxis); + EXPORT void btMultiBodySliderConstraint_getFrameInA(btMultiBodySliderConstraint* obj, btMatrix3x3* value); + EXPORT void btMultiBodySliderConstraint_getFrameInB(btMultiBodySliderConstraint* obj, btMatrix3x3* value); + EXPORT void btMultiBodySliderConstraint_getJointAxis(btMultiBodySliderConstraint* obj, btVector3* value); + EXPORT void btMultiBodySliderConstraint_getPivotInA(btMultiBodySliderConstraint* obj, btVector3* value); + EXPORT void btMultiBodySliderConstraint_getPivotInB(btMultiBodySliderConstraint* obj, btVector3* value); + EXPORT void btMultiBodySliderConstraint_setFrameInA(btMultiBodySliderConstraint* obj, const btMatrix3x3* frameInA); + EXPORT void btMultiBodySliderConstraint_setFrameInB(btMultiBodySliderConstraint* obj, const btMatrix3x3* frameInB); + EXPORT void btMultiBodySliderConstraint_setJointAxis(btMultiBodySliderConstraint* obj, const btVector3* jointAxis); + EXPORT void btMultiBodySliderConstraint_setPivotInA(btMultiBodySliderConstraint* obj, const btVector3* pivotInA); + EXPORT void btMultiBodySliderConstraint_setPivotInB(btMultiBodySliderConstraint* obj, const btVector3* pivotInB); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.cpp new file mode 100644 index 0000000..b1e724b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.cpp @@ -0,0 +1,370 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btMultiBodySolverConstraint_wrap.h" + +btMultiBodySolverConstraint* btMultiBodySolverConstraint_new() +{ + return new btMultiBodySolverConstraint(); +} + +void btMultiBodySolverConstraint_getAngularComponentA(btMultiBodySolverConstraint* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_angularComponentA); +} + +void btMultiBodySolverConstraint_getAngularComponentB(btMultiBodySolverConstraint* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_angularComponentB); +} + +btScalar btMultiBodySolverConstraint_getAppliedImpulse(btMultiBodySolverConstraint* obj) +{ + return obj->m_appliedImpulse; +} + +btScalar btMultiBodySolverConstraint_getAppliedPushImpulse(btMultiBodySolverConstraint* obj) +{ + return obj->m_appliedPushImpulse; +} + +btScalar btMultiBodySolverConstraint_getCfm(btMultiBodySolverConstraint* obj) +{ + return obj->m_cfm; +} + +void btMultiBodySolverConstraint_getContactNormal1(btMultiBodySolverConstraint* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_contactNormal1); +} + +void btMultiBodySolverConstraint_getContactNormal2(btMultiBodySolverConstraint* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_contactNormal2); +} + +int btMultiBodySolverConstraint_getDeltaVelAindex(btMultiBodySolverConstraint* obj) +{ + return obj->m_deltaVelAindex; +} + +int btMultiBodySolverConstraint_getDeltaVelBindex(btMultiBodySolverConstraint* obj) +{ + return obj->m_deltaVelBindex; +} + +btScalar btMultiBodySolverConstraint_getFriction(btMultiBodySolverConstraint* obj) +{ + return obj->m_friction; +} + +int btMultiBodySolverConstraint_getFrictionIndex(btMultiBodySolverConstraint* obj) +{ + return obj->m_frictionIndex; +} + +int btMultiBodySolverConstraint_getJacAindex(btMultiBodySolverConstraint* obj) +{ + return obj->m_jacAindex; +} + +int btMultiBodySolverConstraint_getJacBindex(btMultiBodySolverConstraint* obj) +{ + return obj->m_jacBindex; +} + +btScalar btMultiBodySolverConstraint_getJacDiagABInv(btMultiBodySolverConstraint* obj) +{ + return obj->m_jacDiagABInv; +} + +int btMultiBodySolverConstraint_getLinkA(btMultiBodySolverConstraint* obj) +{ + return obj->m_linkA; +} + +int btMultiBodySolverConstraint_getLinkB(btMultiBodySolverConstraint* obj) +{ + return obj->m_linkB; +} + +btScalar btMultiBodySolverConstraint_getLowerLimit(btMultiBodySolverConstraint* obj) +{ + return obj->m_lowerLimit; +} + +btMultiBody* btMultiBodySolverConstraint_getMultiBodyA(btMultiBodySolverConstraint* obj) +{ + return obj->m_multiBodyA; +} + +btMultiBody* btMultiBodySolverConstraint_getMultiBodyB(btMultiBodySolverConstraint* obj) +{ + return obj->m_multiBodyB; +} + +btMultiBodyConstraint* btMultiBodySolverConstraint_getOrgConstraint(btMultiBodySolverConstraint* obj) +{ + return obj->m_orgConstraint; +} + +int btMultiBodySolverConstraint_getOrgDofIndex(btMultiBodySolverConstraint* obj) +{ + return obj->m_orgDofIndex; +} + +void* btMultiBodySolverConstraint_getOriginalContactPoint(btMultiBodySolverConstraint* obj) +{ + return obj->m_originalContactPoint; +} + +int btMultiBodySolverConstraint_getOverrideNumSolverIterations(btMultiBodySolverConstraint* obj) +{ + return obj->m_overrideNumSolverIterations; +} + +void btMultiBodySolverConstraint_getRelpos1CrossNormal(btMultiBodySolverConstraint* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_relpos1CrossNormal); +} + +void btMultiBodySolverConstraint_getRelpos2CrossNormal(btMultiBodySolverConstraint* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_relpos2CrossNormal); +} + +btScalar btMultiBodySolverConstraint_getRhs(btMultiBodySolverConstraint* obj) +{ + return obj->m_rhs; +} + +btScalar btMultiBodySolverConstraint_getRhsPenetration(btMultiBodySolverConstraint* obj) +{ + return obj->m_rhsPenetration; +} + +int btMultiBodySolverConstraint_getSolverBodyIdA(btMultiBodySolverConstraint* obj) +{ + return obj->m_solverBodyIdA; +} + +int btMultiBodySolverConstraint_getSolverBodyIdB(btMultiBodySolverConstraint* obj) +{ + return obj->m_solverBodyIdB; +} + +btScalar btMultiBodySolverConstraint_getUnusedPadding4(btMultiBodySolverConstraint* obj) +{ + return obj->m_unusedPadding4; +} + +btScalar btMultiBodySolverConstraint_getUpperLimit(btMultiBodySolverConstraint* obj) +{ + return obj->m_upperLimit; +} + +void btMultiBodySolverConstraint_setAngularComponentA(btMultiBodySolverConstraint* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_angularComponentA, value); +} + +void btMultiBodySolverConstraint_setAngularComponentB(btMultiBodySolverConstraint* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_angularComponentB, value); +} + +void btMultiBodySolverConstraint_setAppliedImpulse(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_appliedImpulse = value; +} + +void btMultiBodySolverConstraint_setAppliedPushImpulse(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_appliedPushImpulse = value; +} + +void btMultiBodySolverConstraint_setCfm(btMultiBodySolverConstraint* obj, btScalar value) +{ + obj->m_cfm = value; +} + +void btMultiBodySolverConstraint_setContactNormal1(btMultiBodySolverConstraint* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_contactNormal1, value); +} + +void btMultiBodySolverConstraint_setContactNormal2(btMultiBodySolverConstraint* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_contactNormal2, value); +} + +void btMultiBodySolverConstraint_setDeltaVelAindex(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_deltaVelAindex = value; +} + +void btMultiBodySolverConstraint_setDeltaVelBindex(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_deltaVelBindex = value; +} + +void btMultiBodySolverConstraint_setFriction(btMultiBodySolverConstraint* obj, btScalar value) +{ + obj->m_friction = value; +} + +void btMultiBodySolverConstraint_setFrictionIndex(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_frictionIndex = value; +} + +void btMultiBodySolverConstraint_setJacAindex(btMultiBodySolverConstraint* obj, int value) +{ + obj->m_jacAindex = value; +} + +void btMultiBodySolverConstraint_setJacBindex(btMultiBodySolverConstraint* obj, int value) +{ + obj->m_jacBindex = value; +} + +void btMultiBodySolverConstraint_setJacDiagABInv(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_jacDiagABInv = value; +} + +void btMultiBodySolverConstraint_setLinkA(btMultiBodySolverConstraint* obj, int value) +{ + obj->m_linkA = value; +} + +void btMultiBodySolverConstraint_setLinkB(btMultiBodySolverConstraint* obj, int value) +{ + obj->m_linkB = value; +} + +void btMultiBodySolverConstraint_setLowerLimit(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_lowerLimit = value; +} + +void btMultiBodySolverConstraint_setMultiBodyA(btMultiBodySolverConstraint* obj, + btMultiBody* value) +{ + obj->m_multiBodyA = value; +} + +void btMultiBodySolverConstraint_setMultiBodyB(btMultiBodySolverConstraint* obj, + btMultiBody* value) +{ + obj->m_multiBodyB = value; +} + +void btMultiBodySolverConstraint_setOrgConstraint(btMultiBodySolverConstraint* obj, + btMultiBodyConstraint* value) +{ + obj->m_orgConstraint = value; +} + +void btMultiBodySolverConstraint_setOrgDofIndex(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_orgDofIndex = value; +} + +void btMultiBodySolverConstraint_setOriginalContactPoint(btMultiBodySolverConstraint* obj, + void* value) +{ + obj->m_originalContactPoint = value; +} + +void btMultiBodySolverConstraint_setOverrideNumSolverIterations(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_overrideNumSolverIterations = value; +} + +void btMultiBodySolverConstraint_setRelpos1CrossNormal(btMultiBodySolverConstraint* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_relpos1CrossNormal, value); +} + +void btMultiBodySolverConstraint_setRelpos2CrossNormal(btMultiBodySolverConstraint* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_relpos2CrossNormal, value); +} + +void btMultiBodySolverConstraint_setRhs(btMultiBodySolverConstraint* obj, btScalar value) +{ + obj->m_rhs = value; +} + +void btMultiBodySolverConstraint_setRhsPenetration(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_rhsPenetration = value; +} + +void btMultiBodySolverConstraint_setSolverBodyIdA(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_solverBodyIdA = value; +} + +void btMultiBodySolverConstraint_setSolverBodyIdB(btMultiBodySolverConstraint* obj, + int value) +{ + obj->m_solverBodyIdB = value; +} + +void btMultiBodySolverConstraint_setUnusedPadding4(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_unusedPadding4 = value; +} + +void btMultiBodySolverConstraint_setUpperLimit(btMultiBodySolverConstraint* obj, + btScalar value) +{ + obj->m_upperLimit = value; +} + +void btMultiBodySolverConstraint_delete(btMultiBodySolverConstraint* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.h new file mode 100644 index 0000000..ae16b6e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBodySolverConstraint* btMultiBodySolverConstraint_new(); + EXPORT void btMultiBodySolverConstraint_getAngularComponentA(btMultiBodySolverConstraint* obj, btVector3* value); + EXPORT void btMultiBodySolverConstraint_getAngularComponentB(btMultiBodySolverConstraint* obj, btVector3* value); + EXPORT btScalar btMultiBodySolverConstraint_getAppliedImpulse(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getAppliedPushImpulse(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getCfm(btMultiBodySolverConstraint* obj); + EXPORT void btMultiBodySolverConstraint_getContactNormal1(btMultiBodySolverConstraint* obj, btVector3* value); + EXPORT void btMultiBodySolverConstraint_getContactNormal2(btMultiBodySolverConstraint* obj, btVector3* value); + EXPORT int btMultiBodySolverConstraint_getDeltaVelAindex(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getDeltaVelBindex(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getFriction(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getFrictionIndex(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getJacAindex(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getJacBindex(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getJacDiagABInv(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getLinkA(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getLinkB(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getLowerLimit(btMultiBodySolverConstraint* obj); + EXPORT btMultiBody* btMultiBodySolverConstraint_getMultiBodyA(btMultiBodySolverConstraint* obj); + EXPORT btMultiBody* btMultiBodySolverConstraint_getMultiBodyB(btMultiBodySolverConstraint* obj); + EXPORT btMultiBodyConstraint* btMultiBodySolverConstraint_getOrgConstraint(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getOrgDofIndex(btMultiBodySolverConstraint* obj); + EXPORT void* btMultiBodySolverConstraint_getOriginalContactPoint(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getOverrideNumSolverIterations(btMultiBodySolverConstraint* obj); + EXPORT void btMultiBodySolverConstraint_getRelpos1CrossNormal(btMultiBodySolverConstraint* obj, btVector3* value); + EXPORT void btMultiBodySolverConstraint_getRelpos2CrossNormal(btMultiBodySolverConstraint* obj, btVector3* value); + EXPORT btScalar btMultiBodySolverConstraint_getRhs(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getRhsPenetration(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getSolverBodyIdA(btMultiBodySolverConstraint* obj); + EXPORT int btMultiBodySolverConstraint_getSolverBodyIdB(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getUnusedPadding4(btMultiBodySolverConstraint* obj); + EXPORT btScalar btMultiBodySolverConstraint_getUpperLimit(btMultiBodySolverConstraint* obj); + EXPORT void btMultiBodySolverConstraint_setAngularComponentA(btMultiBodySolverConstraint* obj, const btVector3* value); + EXPORT void btMultiBodySolverConstraint_setAngularComponentB(btMultiBodySolverConstraint* obj, const btVector3* value); + EXPORT void btMultiBodySolverConstraint_setAppliedImpulse(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setAppliedPushImpulse(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setCfm(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setContactNormal1(btMultiBodySolverConstraint* obj, const btVector3* value); + EXPORT void btMultiBodySolverConstraint_setContactNormal2(btMultiBodySolverConstraint* obj, const btVector3* value); + EXPORT void btMultiBodySolverConstraint_setDeltaVelAindex(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setDeltaVelBindex(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setFriction(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setFrictionIndex(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setJacAindex(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setJacBindex(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setJacDiagABInv(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setLinkA(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setLinkB(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setLowerLimit(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setMultiBodyA(btMultiBodySolverConstraint* obj, btMultiBody* value); + EXPORT void btMultiBodySolverConstraint_setMultiBodyB(btMultiBodySolverConstraint* obj, btMultiBody* value); + EXPORT void btMultiBodySolverConstraint_setOrgConstraint(btMultiBodySolverConstraint* obj, btMultiBodyConstraint* value); + EXPORT void btMultiBodySolverConstraint_setOrgDofIndex(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setOriginalContactPoint(btMultiBodySolverConstraint* obj, void* value); + EXPORT void btMultiBodySolverConstraint_setOverrideNumSolverIterations(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setRelpos1CrossNormal(btMultiBodySolverConstraint* obj, const btVector3* value); + EXPORT void btMultiBodySolverConstraint_setRelpos2CrossNormal(btMultiBodySolverConstraint* obj, const btVector3* value); + EXPORT void btMultiBodySolverConstraint_setRhs(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setRhsPenetration(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setSolverBodyIdA(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setSolverBodyIdB(btMultiBodySolverConstraint* obj, int value); + EXPORT void btMultiBodySolverConstraint_setUnusedPadding4(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_setUpperLimit(btMultiBodySolverConstraint* obj, btScalar value); + EXPORT void btMultiBodySolverConstraint_delete(btMultiBodySolverConstraint* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.cpp new file mode 100644 index 0000000..8c4b34e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.cpp @@ -0,0 +1,743 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btMultiBody_wrap.h" + +btMultiBody* btMultiBody_new(int n_links, btScalar mass, const btVector3* inertia, + bool fixedBase, bool canSleep) +{ + BTVECTOR3_IN(inertia); + return new btMultiBody(n_links, mass, BTVECTOR3_USE(inertia), fixedBase, canSleep); +} + +btMultiBody* btMultiBody_new2(int n_links, btScalar mass, const btVector3* inertia, + bool fixedBase, bool canSleep, bool deprecatedMultiDof) +{ + BTVECTOR3_IN(inertia); + return new btMultiBody(n_links, mass, BTVECTOR3_USE(inertia), fixedBase, canSleep, + deprecatedMultiDof); +} + +void btMultiBody_addBaseConstraintForce(btMultiBody* obj, const btVector3* f) +{ + BTVECTOR3_IN(f); + obj->addBaseConstraintForce(BTVECTOR3_USE(f)); +} + +void btMultiBody_addBaseConstraintTorque(btMultiBody* obj, const btVector3* t) +{ + BTVECTOR3_IN(t); + obj->addBaseConstraintTorque(BTVECTOR3_USE(t)); +} + +void btMultiBody_addBaseForce(btMultiBody* obj, const btVector3* f) +{ + BTVECTOR3_IN(f); + obj->addBaseForce(BTVECTOR3_USE(f)); +} + +void btMultiBody_addBaseTorque(btMultiBody* obj, const btVector3* t) +{ + BTVECTOR3_IN(t); + obj->addBaseTorque(BTVECTOR3_USE(t)); +} + +void btMultiBody_addJointTorque(btMultiBody* obj, int i, btScalar Q) +{ + obj->addJointTorque(i, Q); +} + +void btMultiBody_addJointTorqueMultiDof(btMultiBody* obj, int i, const btScalar* Q) +{ + obj->addJointTorqueMultiDof(i, Q); +} + +void btMultiBody_addJointTorqueMultiDof2(btMultiBody* obj, int i, int dof, btScalar Q) +{ + obj->addJointTorqueMultiDof(i, dof, Q); +} + +void btMultiBody_addLinkConstraintForce(btMultiBody* obj, int i, const btVector3* f) +{ + BTVECTOR3_IN(f); + obj->addLinkConstraintForce(i, BTVECTOR3_USE(f)); +} + +void btMultiBody_addLinkConstraintTorque(btMultiBody* obj, int i, const btVector3* t) +{ + BTVECTOR3_IN(t); + obj->addLinkConstraintTorque(i, BTVECTOR3_USE(t)); +} + +void btMultiBody_addLinkForce(btMultiBody* obj, int i, const btVector3* f) +{ + BTVECTOR3_IN(f); + obj->addLinkForce(i, BTVECTOR3_USE(f)); +} + +void btMultiBody_addLinkTorque(btMultiBody* obj, int i, const btVector3* t) +{ + BTVECTOR3_IN(t); + obj->addLinkTorque(i, BTVECTOR3_USE(t)); +} + +void btMultiBody_applyDeltaVeeMultiDof(btMultiBody* obj, const btScalar* delta_vee, + btScalar multiplier) +{ + obj->applyDeltaVeeMultiDof(delta_vee, multiplier); +} + +void btMultiBody_applyDeltaVeeMultiDof2(btMultiBody* obj, const btScalar* delta_vee, + btScalar multiplier) +{ + obj->applyDeltaVeeMultiDof2(delta_vee, multiplier); +} + +void btMultiBody_calcAccelerationDeltasMultiDof(btMultiBody* obj, const btScalar* force, + btScalar* output, btAlignedObjectArray_btScalar* scratch_r, btAlignedObjectArray_btVector3* scratch_v) +{ + obj->calcAccelerationDeltasMultiDof(force, output, *scratch_r, *scratch_v); +} + +int btMultiBody_calculateSerializeBufferSize(btMultiBody* obj) +{ + return obj->calculateSerializeBufferSize(); +} + +void btMultiBody_checkMotionAndSleepIfRequired(btMultiBody* obj, btScalar timestep) +{ + obj->checkMotionAndSleepIfRequired(timestep); +} + +void btMultiBody_clearConstraintForces(btMultiBody* obj) +{ + obj->clearConstraintForces(); +} + +void btMultiBody_clearForcesAndTorques(btMultiBody* obj) +{ + obj->clearForcesAndTorques(); +} + +void btMultiBody_clearVelocities(btMultiBody* obj) +{ + obj->clearVelocities(); +} + +void btMultiBody_computeAccelerationsArticulatedBodyAlgorithmMultiDof(btMultiBody* obj, + btScalar dt, btAlignedObjectArray_btScalar* scratch_r, btAlignedObjectArray_btVector3* scratch_v, + btAlignedObjectArray_btMatrix3x3* scratch_m, bool isConstraintPass, bool jointFeedbackInWorldSpace, + bool jointFeedbackInJointFrame) +{ + obj->computeAccelerationsArticulatedBodyAlgorithmMultiDof(dt, *scratch_r, *scratch_v, + *scratch_m, isConstraintPass, jointFeedbackInWorldSpace, jointFeedbackInJointFrame); +} + +void btMultiBody_fillConstraintJacobianMultiDof(btMultiBody* obj, int link, const btVector3* contact_point, + const btVector3* normal_ang, const btVector3* normal_lin, btScalar* jac, btAlignedObjectArray_btScalar* scratch_r, + btAlignedObjectArray_btVector3* scratch_v, btAlignedObjectArray_btMatrix3x3* scratch_m) +{ + BTVECTOR3_IN(contact_point); + BTVECTOR3_IN(normal_ang); + BTVECTOR3_IN(normal_lin); + obj->fillConstraintJacobianMultiDof(link, BTVECTOR3_USE(contact_point), BTVECTOR3_USE(normal_ang), + BTVECTOR3_USE(normal_lin), jac, *scratch_r, *scratch_v, *scratch_m); +} + +void btMultiBody_fillContactJacobianMultiDof(btMultiBody* obj, int link, const btVector3* contact_point, + const btVector3* normal, btScalar* jac, btAlignedObjectArray_btScalar* scratch_r, + btAlignedObjectArray_btVector3* scratch_v, btAlignedObjectArray_btMatrix3x3* scratch_m) +{ + BTVECTOR3_IN(contact_point); + BTVECTOR3_IN(normal); + obj->fillContactJacobianMultiDof(link, BTVECTOR3_USE(contact_point), BTVECTOR3_USE(normal), + jac, *scratch_r, *scratch_v, *scratch_m); +} + +void btMultiBody_finalizeMultiDof(btMultiBody* obj) +{ + obj->finalizeMultiDof(); +} + +void btMultiBody_forwardKinematics(btMultiBody* obj, btAlignedObjectArray_btQuaternion* scratch_q, + btAlignedObjectArray_btVector3* scratch_m) +{ + obj->forwardKinematics(*scratch_q, *scratch_m); +} + +btScalar btMultiBody_getAngularDamping(btMultiBody* obj) +{ + return obj->getAngularDamping(); +} + +btMultiBodyLinkCollider* btMultiBody_getBaseCollider(btMultiBody* obj) +{ + return obj->getBaseCollider(); +} + +void btMultiBody_getBaseForce(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getBaseForce(); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getBaseInertia(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getBaseInertia(); + BTVECTOR3_SET(value, temp); +} + +btScalar btMultiBody_getBaseMass(btMultiBody* obj) +{ + return obj->getBaseMass(); +} + +const char* btMultiBody_getBaseName(btMultiBody* obj) +{ + return obj->getBaseName(); +} + +void btMultiBody_getBaseOmega(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getBaseOmega(); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getBasePos(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getBasePos(); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getBaseTorque(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getBaseTorque(); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getBaseVel(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getBaseVel(); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getBaseWorldTransform(btMultiBody* obj, btTransform* value) +{ + ATTRIBUTE_ALIGNED16(btTransform) temp = obj->getBaseWorldTransform(); + BTTRANSFORM_SET(value, temp); +} + +bool btMultiBody_getCanSleep(btMultiBody* obj) +{ + return obj->getCanSleep(); +} + +int btMultiBody_getCompanionId(btMultiBody* obj) +{ + return obj->getCompanionId(); +} + +void btMultiBody_getInterpolateBasePos(btMultiBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getInterpolateBasePos(); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getInterpolateParentToLocalRot(btMultiBody* obj, int i, btQuaternion* value) +{ + BTQUATERNION_COPY(value, &obj->getInterpolateParentToLocalRot(i)); +} + +void btMultiBody_getInterpolateRVector(btMultiBody* obj, int i, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getInterpolateRVector(i); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_getInterpolateWorldToBaseRot(btMultiBody* obj, btQuaternion* value) +{ + BTQUATERNION_COPY(value, &obj->getInterpolateWorldToBaseRot()); +} + +btScalar btMultiBody_getJointPos(btMultiBody* obj, int i) +{ + return obj->getJointPos(i); +} + +btScalar* btMultiBody_getJointPosMultiDof(btMultiBody* obj, int i) +{ + return obj->getJointPosMultiDof(i); +} + +btScalar btMultiBody_getJointTorque(btMultiBody* obj, int i) +{ + return obj->getJointTorque(i); +} + +btScalar* btMultiBody_getJointTorqueMultiDof(btMultiBody* obj, int i) +{ + return obj->getJointTorqueMultiDof(i); +} + +btScalar btMultiBody_getJointVel(btMultiBody* obj, int i) +{ + return obj->getJointVel(i); +} + +btScalar* btMultiBody_getJointVelMultiDof(btMultiBody* obj, int i) +{ + return obj->getJointVelMultiDof(i); +} + +btScalar btMultiBody_getLinearDamping(btMultiBody* obj) +{ + return obj->getLinearDamping(); +} + +btMultibodyLink* btMultiBody_getLink(btMultiBody* obj, int index) +{ + return &obj->getLink(index); +} + +void btMultiBody_getLinkForce(btMultiBody* obj, int i, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLinkForce(i)); +} + +void btMultiBody_getLinkInertia(btMultiBody* obj, int i, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLinkInertia(i)); +} + +btScalar btMultiBody_getLinkMass(btMultiBody* obj, int i) +{ + return obj->getLinkMass(i); +} + +void btMultiBody_getLinkTorque(btMultiBody* obj, int i, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLinkTorque(i)); +} + +btScalar btMultiBody_getMaxAppliedImpulse(btMultiBody* obj) +{ + return obj->getMaxAppliedImpulse(); +} + +btScalar btMultiBody_getMaxCoordinateVelocity(btMultiBody* obj) +{ + return obj->getMaxCoordinateVelocity(); +} + +int btMultiBody_getNumDofs(btMultiBody* obj) +{ + return obj->getNumDofs(); +} + +int btMultiBody_getNumLinks(btMultiBody* obj) +{ + return obj->getNumLinks(); +} + +int btMultiBody_getNumPosVars(btMultiBody* obj) +{ + return obj->getNumPosVars(); +} + +int btMultiBody_getParent(btMultiBody* obj, int link_num) +{ + return obj->getParent(link_num); +} + +void btMultiBody_getParentToLocalRot(btMultiBody* obj, int i, btQuaternion* value) +{ + BTQUATERNION_COPY(value, &obj->getParentToLocalRot(i)); +} + +void btMultiBody_getRVector(btMultiBody* obj, int i, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getRVector(i)); +} + +bool btMultiBody_getUseGyroTerm(btMultiBody* obj) +{ + return obj->getUseGyroTerm(); +} + +int btMultiBody_getUserIndex(btMultiBody* obj) +{ + return obj->getUserIndex(); +} + +int btMultiBody_getUserIndex2(btMultiBody* obj) +{ + return obj->getUserIndex2(); +} + +void* btMultiBody_getUserPointer(btMultiBody* obj) +{ + return obj->getUserPointer(); +} + +const btScalar* btMultiBody_getVelocityVector(btMultiBody* obj) +{ + return obj->getVelocityVector(); +} + +void btMultiBody_getWorldToBaseRot(btMultiBody* obj, btQuaternion* value) +{ + BTQUATERNION_COPY(value, &obj->getWorldToBaseRot()); +} + +void btMultiBody_goToSleep(btMultiBody* obj) +{ + obj->goToSleep(); +} + +bool btMultiBody_hasFixedBase(btMultiBody* obj) +{ + return obj->hasFixedBase(); +} + +bool btMultiBody_hasSelfCollision(btMultiBody* obj) +{ + return obj->hasSelfCollision(); +} + +bool btMultiBody_internalNeedsJointFeedback(btMultiBody* obj) +{ + return obj->internalNeedsJointFeedback(); +} + +bool btMultiBody_isAwake(btMultiBody* obj) +{ + return obj->isAwake(); +} + +bool btMultiBody_isPosUpdated(btMultiBody* obj) +{ + return obj->isPosUpdated(); +} + +bool btMultiBody_isUsingGlobalVelocities(btMultiBody* obj) +{ + return obj->isUsingGlobalVelocities(); +} + +bool btMultiBody_isUsingRK4Integration(btMultiBody* obj) +{ + return obj->isUsingRK4Integration(); +} + +void btMultiBody_localDirToWorld(btMultiBody* obj, int i, const btVector3* vec, btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localDirToWorld(i, BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_localFrameToWorld(btMultiBody* obj, int i, const btMatrix3x3* mat, + btMatrix3x3* value) +{ + BTMATRIX3X3_IN(mat); + ATTRIBUTE_ALIGNED16(btMatrix3x3) temp = obj->localFrameToWorld(i, BTMATRIX3X3_USE(mat)); + BTMATRIX3X3_OUT(value, &temp); +} + +void btMultiBody_localPosToWorld(btMultiBody* obj, int i, const btVector3* vec, btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localPosToWorld(i, BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_predictPositionsMultiDof(btMultiBody* obj, btScalar dt) +{ + obj->predictPositionsMultiDof(dt); +} + +void btMultiBody_processDeltaVeeMultiDof2(btMultiBody* obj) +{ + obj->processDeltaVeeMultiDof2(); +} + +const char* btMultiBody_serialize(btMultiBody* obj, void* dataBuffer, btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btMultiBody_setAngularDamping(btMultiBody* obj, btScalar damp) +{ + obj->setAngularDamping(damp); +} + +void btMultiBody_setBaseCollider(btMultiBody* obj, btMultiBodyLinkCollider* collider) +{ + obj->setBaseCollider(collider); +} + +void btMultiBody_setBaseInertia(btMultiBody* obj, const btVector3* inertia) +{ + BTVECTOR3_IN(inertia); + obj->setBaseInertia(BTVECTOR3_USE(inertia)); +} + +void btMultiBody_setBaseMass(btMultiBody* obj, btScalar mass) +{ + obj->setBaseMass(mass); +} + +void btMultiBody_setBaseName(btMultiBody* obj, const char* name) +{ + obj->setBaseName(name); +} + +void btMultiBody_setBaseOmega(btMultiBody* obj, const btVector3* omega) +{ + BTVECTOR3_IN(omega); + obj->setBaseOmega(BTVECTOR3_USE(omega)); +} + +void btMultiBody_setBasePos(btMultiBody* obj, const btVector3* pos) +{ + BTVECTOR3_IN(pos); + obj->setBasePos(BTVECTOR3_USE(pos)); +} + +void btMultiBody_setBaseVel(btMultiBody* obj, const btVector3* vel) +{ + BTVECTOR3_IN(vel); + obj->setBaseVel(BTVECTOR3_USE(vel)); +} + +void btMultiBody_setBaseWorldTransform(btMultiBody* obj, const btTransform* tr) +{ + BTTRANSFORM_IN(tr); + obj->setBaseWorldTransform(BTTRANSFORM_USE(tr)); +} + +void btMultiBody_setCanSleep(btMultiBody* obj, bool canSleep) +{ + obj->setCanSleep(canSleep); +} + +void btMultiBody_setCompanionId(btMultiBody* obj, int id) +{ + obj->setCompanionId(id); +} + +void btMultiBody_setFixedBase(btMultiBody* obj, bool fixedBase) +{ + return obj->setFixedBase(fixedBase); +} + +void btMultiBody_setHasSelfCollision(btMultiBody* obj, bool hasSelfCollision) +{ + obj->setHasSelfCollision(hasSelfCollision); +} + +void btMultiBody_setJointPos(btMultiBody* obj, int i, btScalar q) +{ + obj->setJointPos(i, q); +} + +void btMultiBody_setJointPosMultiDof(btMultiBody* obj, int i, btScalar* q) +{ + obj->setJointPosMultiDof(i, q); +} + +void btMultiBody_setJointVel(btMultiBody* obj, int i, btScalar qdot) +{ + obj->setJointVel(i, qdot); +} + +void btMultiBody_setJointVelMultiDof(btMultiBody* obj, int i, btScalar* qdot) +{ + obj->setJointVelMultiDof(i, qdot); +} + +void btMultiBody_setLinearDamping(btMultiBody* obj, btScalar damp) +{ + obj->setLinearDamping(damp); +} + +void btMultiBody_setMaxAppliedImpulse(btMultiBody* obj, btScalar maxImp) +{ + obj->setMaxAppliedImpulse(maxImp); +} + +void btMultiBody_setMaxCoordinateVelocity(btMultiBody* obj, btScalar maxVel) +{ + obj->setMaxCoordinateVelocity(maxVel); +} + +void btMultiBody_setNumLinks(btMultiBody* obj, int numLinks) +{ + obj->setNumLinks(numLinks); +} + +void btMultiBody_setPosUpdated(btMultiBody* obj, bool updated) +{ + obj->setPosUpdated(updated); +} + +void btMultiBody_setupFixed(btMultiBody* obj, int linkIndex, btScalar mass, const btVector3* inertia, + int parent, const btQuaternion* rotParentToThis, const btVector3* parentComToThisPivotOffset, + const btVector3* thisPivotToThisComOffset, bool deprecatedDisableParentCollision) +{ + BTVECTOR3_IN(inertia); + BTQUATERNION_IN(rotParentToThis); + BTVECTOR3_IN(parentComToThisPivotOffset); + BTVECTOR3_IN(thisPivotToThisComOffset); + obj->setupFixed(linkIndex, mass, BTVECTOR3_USE(inertia), parent, BTQUATERNION_USE(rotParentToThis), + BTVECTOR3_USE(parentComToThisPivotOffset), BTVECTOR3_USE(thisPivotToThisComOffset), + deprecatedDisableParentCollision); +} + +void btMultiBody_setupPlanar(btMultiBody* obj, int i, btScalar mass, const btVector3* inertia, + int parent, const btQuaternion* rotParentToThis, const btVector3* rotationAxis, + const btVector3* parentComToThisComOffset, bool disableParentCollision) +{ + BTVECTOR3_IN(inertia); + BTQUATERNION_IN(rotParentToThis); + BTVECTOR3_IN(rotationAxis); + BTVECTOR3_IN(parentComToThisComOffset); + obj->setupPlanar(i, mass, BTVECTOR3_USE(inertia), parent, BTQUATERNION_USE(rotParentToThis), + BTVECTOR3_USE(rotationAxis), BTVECTOR3_USE(parentComToThisComOffset), disableParentCollision); +} + +void btMultiBody_setupPrismatic(btMultiBody* obj, int i, btScalar mass, const btVector3* inertia, + int parent, const btQuaternion* rotParentToThis, const btVector3* jointAxis, const btVector3* parentComToThisPivotOffset, + const btVector3* thisPivotToThisComOffset, bool disableParentCollision) +{ + BTVECTOR3_IN(inertia); + BTQUATERNION_IN(rotParentToThis); + BTVECTOR3_IN(jointAxis); + BTVECTOR3_IN(parentComToThisPivotOffset); + BTVECTOR3_IN(thisPivotToThisComOffset); + obj->setupPrismatic(i, mass, BTVECTOR3_USE(inertia), parent, BTQUATERNION_USE(rotParentToThis), + BTVECTOR3_USE(jointAxis), BTVECTOR3_USE(parentComToThisPivotOffset), BTVECTOR3_USE(thisPivotToThisComOffset), + disableParentCollision); +} + +void btMultiBody_setupRevolute(btMultiBody* obj, int linkIndex, btScalar mass, const btVector3* inertia, + int parentIndex, const btQuaternion* rotParentToThis, const btVector3* jointAxis, + const btVector3* parentComToThisPivotOffset, const btVector3* thisPivotToThisComOffset, + bool disableParentCollision) +{ + BTVECTOR3_IN(inertia); + BTQUATERNION_IN(rotParentToThis); + BTVECTOR3_IN(jointAxis); + BTVECTOR3_IN(parentComToThisPivotOffset); + BTVECTOR3_IN(thisPivotToThisComOffset); + obj->setupRevolute(linkIndex, mass, BTVECTOR3_USE(inertia), parentIndex, BTQUATERNION_USE(rotParentToThis), + BTVECTOR3_USE(jointAxis), BTVECTOR3_USE(parentComToThisPivotOffset), BTVECTOR3_USE(thisPivotToThisComOffset), + disableParentCollision); +} + +void btMultiBody_setupSpherical(btMultiBody* obj, int linkIndex, btScalar mass, + const btVector3* inertia, int parent, const btQuaternion* rotParentToThis, const btVector3* parentComToThisPivotOffset, + const btVector3* thisPivotToThisComOffset, bool disableParentCollision) +{ + BTVECTOR3_IN(inertia); + BTQUATERNION_IN(rotParentToThis); + BTVECTOR3_IN(parentComToThisPivotOffset); + BTVECTOR3_IN(thisPivotToThisComOffset); + obj->setupSpherical(linkIndex, mass, BTVECTOR3_USE(inertia), parent, BTQUATERNION_USE(rotParentToThis), + BTVECTOR3_USE(parentComToThisPivotOffset), BTVECTOR3_USE(thisPivotToThisComOffset), + disableParentCollision); +} + +void btMultiBody_setUseGyroTerm(btMultiBody* obj, bool useGyro) +{ + obj->setUseGyroTerm(useGyro); +} + +void btMultiBody_setUserIndex(btMultiBody* obj, int index) +{ + obj->setUserIndex(index); +} + +void btMultiBody_setUserIndex2(btMultiBody* obj, int index) +{ + obj->setUserIndex2(index); +} + +void btMultiBody_setUserPointer(btMultiBody* obj, void* userPointer) +{ + obj->setUserPointer(userPointer); +} + +void btMultiBody_setWorldToBaseRot(btMultiBody* obj, const btQuaternion* rot) +{ + BTQUATERNION_IN(rot); + obj->setWorldToBaseRot(BTQUATERNION_USE(rot)); +} + +void btMultiBody_stepPositionsMultiDof(btMultiBody* obj, btScalar dt, btScalar* pq, + btScalar* pqd) +{ + obj->stepPositionsMultiDof(dt, pq, pqd); +} + +void btMultiBody_updateCollisionObjectWorldTransforms(btMultiBody* obj, btAlignedObjectArray_btQuaternion* scratch_q, + btAlignedObjectArray_btVector3* scratch_m) +{ + obj->updateCollisionObjectWorldTransforms(*scratch_q, *scratch_m); +} + +void btMultiBody_updateCollisionObjectInterpolationWorldTransforms2(btMultiBody* obj, btAlignedObjectArray_btQuaternion* world_to_local, + btAlignedObjectArray_btVector3* local_origin) +{ + obj->updateCollisionObjectInterpolationWorldTransforms(*world_to_local, *local_origin); +} + +void btMultiBody_useGlobalVelocities(btMultiBody* obj, bool use) +{ + obj->useGlobalVelocities(use); +} + +void btMultiBody_useRK4Integration(btMultiBody* obj, bool use) +{ + obj->useRK4Integration(use); +} + +void btMultiBody_wakeUp(btMultiBody* obj) +{ + obj->wakeUp(); +} + +void btMultiBody_worldDirToLocal(btMultiBody* obj, int i, const btVector3* vec, btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->worldDirToLocal(i, BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_worldPosToLocal(btMultiBody* obj, int i, const btVector3* vec, btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->worldPosToLocal(i, BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btMultiBody_delete(btMultiBody* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.h new file mode 100644 index 0000000..252e397 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiBody_wrap.h @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiBody* btMultiBody_new(int n_links, btScalar mass, const btVector3* inertia, bool fixedBase, bool canSleep); + EXPORT void btMultiBody_addBaseConstraintForce(btMultiBody* obj, const btVector3* f); + EXPORT void btMultiBody_addBaseConstraintTorque(btMultiBody* obj, const btVector3* t); + EXPORT void btMultiBody_addBaseForce(btMultiBody* obj, const btVector3* f); + EXPORT void btMultiBody_addBaseTorque(btMultiBody* obj, const btVector3* t); + EXPORT void btMultiBody_addJointTorque(btMultiBody* obj, int i, btScalar Q); + EXPORT void btMultiBody_addJointTorqueMultiDof(btMultiBody* obj, int i, const btScalar* Q); + EXPORT void btMultiBody_addJointTorqueMultiDof2(btMultiBody* obj, int i, int dof, btScalar Q); + EXPORT void btMultiBody_addLinkConstraintForce(btMultiBody* obj, int i, const btVector3* f); + EXPORT void btMultiBody_addLinkConstraintTorque(btMultiBody* obj, int i, const btVector3* t); + EXPORT void btMultiBody_addLinkForce(btMultiBody* obj, int i, const btVector3* f); + EXPORT void btMultiBody_addLinkTorque(btMultiBody* obj, int i, const btVector3* t); + EXPORT void btMultiBody_applyDeltaVeeMultiDof(btMultiBody* obj, const btScalar* delta_vee, btScalar multiplier); + EXPORT void btMultiBody_applyDeltaVeeMultiDof2(btMultiBody* obj, const btScalar* delta_vee, btScalar multiplier); + EXPORT void btMultiBody_calcAccelerationDeltasMultiDof(btMultiBody* obj, const btScalar* force, btScalar* output, btAlignedObjectArray_btScalar* scratch_r, btAlignedObjectArray_btVector3* scratch_v); + EXPORT int btMultiBody_calculateSerializeBufferSize(btMultiBody* obj); + EXPORT void btMultiBody_checkMotionAndSleepIfRequired(btMultiBody* obj, btScalar timestep); + EXPORT void btMultiBody_clearConstraintForces(btMultiBody* obj); + EXPORT void btMultiBody_clearForcesAndTorques(btMultiBody* obj); + EXPORT void btMultiBody_clearVelocities(btMultiBody* obj); + EXPORT void btMultiBody_computeAccelerationsArticulatedBodyAlgorithmMultiDof(btMultiBody* obj, btScalar dt, btAlignedObjectArray_btScalar* scratch_r, btAlignedObjectArray_btVector3* scratch_v, btAlignedObjectArray_btMatrix3x3* scratch_m, bool isConstraintPass, bool jointFeedbackInWorldSpace, bool jointFeedbackInJointFrame); + EXPORT void btMultiBody_fillConstraintJacobianMultiDof(btMultiBody* obj, int link, const btVector3* contact_point, const btVector3* normal_ang, const btVector3* normal_lin, btScalar* jac, btAlignedObjectArray_btScalar* scratch_r, btAlignedObjectArray_btVector3* scratch_v, btAlignedObjectArray_btMatrix3x3* scratch_m); + EXPORT void btMultiBody_fillContactJacobianMultiDof(btMultiBody* obj, int link, const btVector3* contact_point, const btVector3* normal, btScalar* jac, btAlignedObjectArray_btScalar* scratch_r, btAlignedObjectArray_btVector3* scratch_v, btAlignedObjectArray_btMatrix3x3* scratch_m); + EXPORT void btMultiBody_finalizeMultiDof(btMultiBody* obj); + EXPORT void btMultiBody_forwardKinematics(btMultiBody* obj, btAlignedObjectArray_btQuaternion* scratch_q, btAlignedObjectArray_btVector3* scratch_m); + EXPORT btScalar btMultiBody_getAngularDamping(btMultiBody* obj); + EXPORT btMultiBodyLinkCollider* btMultiBody_getBaseCollider(btMultiBody* obj); + EXPORT void btMultiBody_getBaseForce(btMultiBody* obj, btVector3* value); + EXPORT void btMultiBody_getBaseInertia(btMultiBody* obj, btVector3* value); + EXPORT btScalar btMultiBody_getBaseMass(btMultiBody* obj); + EXPORT const char* btMultiBody_getBaseName(btMultiBody* obj); + EXPORT void btMultiBody_getBaseOmega(btMultiBody* obj, btVector3* value); + EXPORT void btMultiBody_getBasePos(btMultiBody* obj, btVector3* value); + EXPORT void btMultiBody_getBaseTorque(btMultiBody* obj, btVector3* value); + EXPORT void btMultiBody_getBaseVel(btMultiBody* obj, btVector3* value); + EXPORT void btMultiBody_getBaseWorldTransform(btMultiBody* obj, btTransform* value); + EXPORT bool btMultiBody_getCanSleep(btMultiBody* obj); + EXPORT int btMultiBody_getCompanionId(btMultiBody* obj); + EXPORT void btMultiBody_getInterpolateBasePos(btMultiBody* obj, btVector3* value); + EXPORT void btMultiBody_getInterpolateParentToLocalRot(btMultiBody* obj, int i, btQuaternion* value); + EXPORT void btMultiBody_getInterpolateRVector(btMultiBody* obj, int i, btVector3* value); + EXPORT void btMultiBody_getInterpolateWorldToBaseRot(btMultiBody* obj, btQuaternion* value); + EXPORT btScalar btMultiBody_getJointPos(btMultiBody* obj, int i); + EXPORT btScalar* btMultiBody_getJointPosMultiDof(btMultiBody* obj, int i); + EXPORT btScalar btMultiBody_getJointTorque(btMultiBody* obj, int i); + EXPORT btScalar* btMultiBody_getJointTorqueMultiDof(btMultiBody* obj, int i); + EXPORT btScalar btMultiBody_getJointVel(btMultiBody* obj, int i); + EXPORT btScalar* btMultiBody_getJointVelMultiDof(btMultiBody* obj, int i); + EXPORT btScalar btMultiBody_getLinearDamping(btMultiBody* obj); + EXPORT btMultibodyLink* btMultiBody_getLink(btMultiBody* obj, int index); + EXPORT void btMultiBody_getLinkForce(btMultiBody* obj, int i, btVector3* value); + EXPORT void btMultiBody_getLinkInertia(btMultiBody* obj, int i, btVector3* value); + EXPORT btScalar btMultiBody_getLinkMass(btMultiBody* obj, int i); + EXPORT void btMultiBody_getLinkTorque(btMultiBody* obj, int i, btVector3* value); + EXPORT btScalar btMultiBody_getMaxAppliedImpulse(btMultiBody* obj); + EXPORT btScalar btMultiBody_getMaxCoordinateVelocity(btMultiBody* obj); + EXPORT int btMultiBody_getNumDofs(btMultiBody* obj); + EXPORT int btMultiBody_getNumLinks(btMultiBody* obj); + EXPORT int btMultiBody_getNumPosVars(btMultiBody* obj); + EXPORT int btMultiBody_getParent(btMultiBody* obj, int link_num); + EXPORT void btMultiBody_getParentToLocalRot(btMultiBody* obj, int i, btQuaternion* value); + EXPORT void btMultiBody_getRVector(btMultiBody* obj, int i, btVector3* value); + EXPORT bool btMultiBody_getUseGyroTerm(btMultiBody* obj); + EXPORT int btMultiBody_getUserIndex(btMultiBody* obj); + EXPORT int btMultiBody_getUserIndex2(btMultiBody* obj); + EXPORT void* btMultiBody_getUserPointer(btMultiBody* obj); + EXPORT const btScalar* btMultiBody_getVelocityVector(btMultiBody* obj); + EXPORT void btMultiBody_getWorldToBaseRot(btMultiBody* obj, btQuaternion* value); + EXPORT void btMultiBody_goToSleep(btMultiBody* obj); + EXPORT bool btMultiBody_hasFixedBase(btMultiBody* obj); + EXPORT bool btMultiBody_hasSelfCollision(btMultiBody* obj); + EXPORT bool btMultiBody_internalNeedsJointFeedback(btMultiBody* obj); + EXPORT bool btMultiBody_isAwake(btMultiBody* obj); + EXPORT bool btMultiBody_isPosUpdated(btMultiBody* obj); + EXPORT bool btMultiBody_isUsingGlobalVelocities(btMultiBody* obj); + EXPORT bool btMultiBody_isUsingRK4Integration(btMultiBody* obj); + EXPORT void btMultiBody_localDirToWorld(btMultiBody* obj, int i, const btVector3* vec, btVector3* value); + EXPORT void btMultiBody_localFrameToWorld(btMultiBody* obj, int i, const btMatrix3x3* mat, btMatrix3x3* value); + EXPORT void btMultiBody_localPosToWorld(btMultiBody* obj, int i, const btVector3* vec, btVector3* value); + EXPORT void btMultiBody_predictPositionsMultiDof(btMultiBody* obj, btScalar dt); + EXPORT void btMultiBody_processDeltaVeeMultiDof2(btMultiBody* obj); + EXPORT const char* btMultiBody_serialize(btMultiBody* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btMultiBody_setAngularDamping(btMultiBody* obj, btScalar damp); + EXPORT void btMultiBody_setBaseCollider(btMultiBody* obj, btMultiBodyLinkCollider* collider); + EXPORT void btMultiBody_setBaseInertia(btMultiBody* obj, const btVector3* inertia); + EXPORT void btMultiBody_setBaseMass(btMultiBody* obj, btScalar mass); + EXPORT void btMultiBody_setBaseName(btMultiBody* obj, const char* name); + EXPORT void btMultiBody_setBaseOmega(btMultiBody* obj, const btVector3* omega); + EXPORT void btMultiBody_setBasePos(btMultiBody* obj, const btVector3* pos); + EXPORT void btMultiBody_setBaseVel(btMultiBody* obj, const btVector3* vel); + EXPORT void btMultiBody_setBaseWorldTransform(btMultiBody* obj, const btTransform* tr); + EXPORT void btMultiBody_setCanSleep(btMultiBody* obj, bool canSleep); + EXPORT void btMultiBody_setCompanionId(btMultiBody* obj, int id); + EXPORT void btMultiBody_setFixedBase(btMultiBody* obj, bool fixedBase); + EXPORT void btMultiBody_setHasSelfCollision(btMultiBody* obj, bool hasSelfCollision); + EXPORT void btMultiBody_setJointPos(btMultiBody* obj, int i, btScalar q); + EXPORT void btMultiBody_setJointPosMultiDof(btMultiBody* obj, int i, btScalar* q); + EXPORT void btMultiBody_setJointVel(btMultiBody* obj, int i, btScalar qdot); + EXPORT void btMultiBody_setJointVelMultiDof(btMultiBody* obj, int i, btScalar* qdot); + EXPORT void btMultiBody_setLinearDamping(btMultiBody* obj, btScalar damp); + EXPORT void btMultiBody_setMaxAppliedImpulse(btMultiBody* obj, btScalar maxImp); + EXPORT void btMultiBody_setMaxCoordinateVelocity(btMultiBody* obj, btScalar maxVel); + EXPORT void btMultiBody_setNumLinks(btMultiBody* obj, int numLinks); + EXPORT void btMultiBody_setPosUpdated(btMultiBody* obj, bool updated); + EXPORT void btMultiBody_setupFixed(btMultiBody* obj, int linkIndex, btScalar mass, const btVector3* inertia, int parent, const btQuaternion* rotParentToThis, const btVector3* parentComToThisPivotOffset, const btVector3* thisPivotToThisComOffset, bool deprecatedDisableParentCollision); + EXPORT void btMultiBody_setupPlanar(btMultiBody* obj, int i, btScalar mass, const btVector3* inertia, int parent, const btQuaternion* rotParentToThis, const btVector3* rotationAxis, const btVector3* parentComToThisComOffset, bool disableParentCollision); + EXPORT void btMultiBody_setupPrismatic(btMultiBody* obj, int i, btScalar mass, const btVector3* inertia, int parent, const btQuaternion* rotParentToThis, const btVector3* jointAxis, const btVector3* parentComToThisPivotOffset, const btVector3* thisPivotToThisComOffset, bool disableParentCollision); + EXPORT void btMultiBody_setupRevolute(btMultiBody* obj, int linkIndex, btScalar mass, const btVector3* inertia, int parentIndex, const btQuaternion* rotParentToThis, const btVector3* jointAxis, const btVector3* parentComToThisPivotOffset, const btVector3* thisPivotToThisComOffset, bool disableParentCollision); + EXPORT void btMultiBody_setupSpherical(btMultiBody* obj, int linkIndex, btScalar mass, const btVector3* inertia, int parent, const btQuaternion* rotParentToThis, const btVector3* parentComToThisPivotOffset, const btVector3* thisPivotToThisComOffset, bool disableParentCollision); + EXPORT void btMultiBody_setUseGyroTerm(btMultiBody* obj, bool useGyro); + EXPORT void btMultiBody_setUserIndex(btMultiBody* obj, int index); + EXPORT void btMultiBody_setUserIndex2(btMultiBody* obj, int index); + EXPORT void btMultiBody_setUserPointer(btMultiBody* obj, void* userPointer); + EXPORT void btMultiBody_setWorldToBaseRot(btMultiBody* obj, const btQuaternion* rot); + EXPORT void btMultiBody_stepPositionsMultiDof(btMultiBody* obj, btScalar dt, btScalar* pq, btScalar* pqd); + EXPORT void btMultiBody_updateCollisionObjectWorldTransforms(btMultiBody* obj, btAlignedObjectArray_btQuaternion* scratch_q, btAlignedObjectArray_btVector3* scratch_m); + EXPORT void btMultiBody_updateCollisionObjectInterpolationWorldTransforms2(btMultiBody* obj, btAlignedObjectArray_btQuaternion* world_to_local, btAlignedObjectArray_btVector3* local_origin); + EXPORT void btMultiBody_useGlobalVelocities(btMultiBody* obj, bool use); + EXPORT void btMultiBody_useRK4Integration(btMultiBody* obj, bool use); + EXPORT void btMultiBody_wakeUp(btMultiBody* obj); + EXPORT void btMultiBody_worldDirToLocal(btMultiBody* obj, int i, const btVector3* vec, btVector3* value); + EXPORT void btMultiBody_worldPosToLocal(btMultiBody* obj, int i, const btVector3* vec, btVector3* value); + EXPORT void btMultiBody_delete(btMultiBody* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.cpp new file mode 100644 index 0000000..72095e0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.cpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btMultiSphereShape_wrap.h" + +btMultiSphereShape* btMultiSphereShape_new(const btScalar* positions, const btScalar* radi, + int numSpheres) +{ + btVector3* positionsTemp = new btVector3[numSpheres]; + for (int i = 0; i < numSpheres; i++) + { + Vector3TobtVector3(&positions[i*3], &positionsTemp[i]); + } + btMultiSphereShape* shape = new btMultiSphereShape(positionsTemp, radi, numSpheres); + delete[] positionsTemp; + return shape; +} + +btMultiSphereShape* btMultiSphereShape_new2(const btVector3* positions, const btScalar* radi, int numSpheres) +{ + return new btMultiSphereShape(positions, radi, numSpheres); +} + +int btMultiSphereShape_getSphereCount(btMultiSphereShape* obj) +{ + return obj->getSphereCount(); +} + +void btMultiSphereShape_getSpherePosition(btMultiSphereShape* obj, int index, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getSpherePosition(index)); +} + +btScalar btMultiSphereShape_getSphereRadius(btMultiSphereShape* obj, int index) +{ + return obj->getSphereRadius(index); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.h new file mode 100644 index 0000000..a05f3ce --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultiSphereShape_wrap.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultiSphereShape* btMultiSphereShape_new(const btScalar* positions, const btScalar* radi, int numSpheres); + EXPORT btMultiSphereShape* btMultiSphereShape_new2(const btVector3* positions, const btScalar* radi, int numSpheres); + EXPORT int btMultiSphereShape_getSphereCount(btMultiSphereShape* obj); + EXPORT void btMultiSphereShape_getSpherePosition(btMultiSphereShape* obj, int index, btVector3* value); + EXPORT btScalar btMultiSphereShape_getSphereRadius(btMultiSphereShape* obj, int index); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.cpp new file mode 100644 index 0000000..a5f74e7 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btMultimaterialTriangleMeshShape_wrap.h" + +btMultimaterialTriangleMeshShape* btMultimaterialTriangleMeshShape_new(btStridingMeshInterface* meshInterface, + bool useQuantizedAabbCompression, bool buildBvh) +{ + return new btMultimaterialTriangleMeshShape(meshInterface, useQuantizedAabbCompression, + buildBvh); +} + +btMultimaterialTriangleMeshShape* btMultimaterialTriangleMeshShape_new2(btStridingMeshInterface* meshInterface, + bool useQuantizedAabbCompression, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax, + bool buildBvh) +{ + BTVECTOR3_IN(bvhAabbMin); + BTVECTOR3_IN(bvhAabbMax); + return new btMultimaterialTriangleMeshShape(meshInterface, useQuantizedAabbCompression, + BTVECTOR3_USE(bvhAabbMin), BTVECTOR3_USE(bvhAabbMax), buildBvh); +} + +const btMaterial* btMultimaterialTriangleMeshShape_getMaterialProperties(btMultimaterialTriangleMeshShape* obj, + int partID, int triIndex) +{ + return obj->getMaterialProperties(partID, triIndex); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.h new file mode 100644 index 0000000..9a4173a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMultimaterialTriangleMeshShape* btMultimaterialTriangleMeshShape_new(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh); + EXPORT btMultimaterialTriangleMeshShape* btMultimaterialTriangleMeshShape_new2(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax, bool buildBvh); + EXPORT const btMaterial* btMultimaterialTriangleMeshShape_getMaterialProperties(btMultimaterialTriangleMeshShape* obj, int partID, int triIndex); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.cpp new file mode 100644 index 0000000..65a3b01 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btNNCGConstraintSolver_wrap.h" + +btNNCGConstraintSolver* btNNCGConstraintSolver_new() +{ + return new btNNCGConstraintSolver(); +} + +bool btNNCGConstraintSolver_getOnlyForNoneContact(btNNCGConstraintSolver* obj) +{ + return obj->m_onlyForNoneContact; +} + +void btNNCGConstraintSolver_setOnlyForNoneContact(btNNCGConstraintSolver* obj, bool value) +{ + obj->m_onlyForNoneContact = value; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.h new file mode 100644 index 0000000..5c34d5d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btNNCGConstraintSolver* btNNCGConstraintSolver_new(); + EXPORT bool btNNCGConstraintSolver_getOnlyForNoneContact(btNNCGConstraintSolver* obj); + EXPORT void btNNCGConstraintSolver_setOnlyForNoneContact(btNNCGConstraintSolver* obj, bool value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.cpp new file mode 100644 index 0000000..9e963d3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btOptimizedBvh_wrap.h" + +btOptimizedBvh* btOptimizedBvh_new() +{ + return new btOptimizedBvh(); +} + +void btOptimizedBvh_build(btOptimizedBvh* obj, btStridingMeshInterface* triangles, + bool useQuantizedAabbCompression, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax) +{ + BTVECTOR3_IN(bvhAabbMin); + BTVECTOR3_IN(bvhAabbMax); + obj->build(triangles, useQuantizedAabbCompression, BTVECTOR3_USE(bvhAabbMin), + BTVECTOR3_USE(bvhAabbMax)); +} + +btOptimizedBvh* btOptimizedBvh_deSerializeInPlace(void* i_alignedDataBuffer, unsigned int i_dataBufferSize, + bool i_swapEndian) +{ + return btOptimizedBvh::deSerializeInPlace(i_alignedDataBuffer, i_dataBufferSize, + i_swapEndian); +} + +void btOptimizedBvh_refit(btOptimizedBvh* obj, btStridingMeshInterface* triangles, + const btVector3* aabbMin, const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->refit(triangles, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btOptimizedBvh_refitPartial(btOptimizedBvh* obj, btStridingMeshInterface* triangles, + const btVector3* aabbMin, const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->refitPartial(triangles, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +bool btOptimizedBvh_serializeInPlace(btOptimizedBvh* obj, void* o_alignedDataBuffer, + unsigned int i_dataBufferSize, bool i_swapEndian) +{ + return obj->serializeInPlace(o_alignedDataBuffer, i_dataBufferSize, i_swapEndian); +} + +void btOptimizedBvh_updateBvhNodes(btOptimizedBvh* obj, btStridingMeshInterface* meshInterface, + int firstNode, int endNode, int index) +{ + obj->updateBvhNodes(meshInterface, firstNode, endNode, index); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.h new file mode 100644 index 0000000..333053b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btOptimizedBvh_wrap.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btOptimizedBvh* btOptimizedBvh_new(); + EXPORT void btOptimizedBvh_build(btOptimizedBvh* obj, btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax); + EXPORT btOptimizedBvh* btOptimizedBvh_deSerializeInPlace(void* i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian); + EXPORT void btOptimizedBvh_refit(btOptimizedBvh* obj, btStridingMeshInterface* triangles, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btOptimizedBvh_refitPartial(btOptimizedBvh* obj, btStridingMeshInterface* triangles, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT bool btOptimizedBvh_serializeInPlace(btOptimizedBvh* obj, void* o_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian); + EXPORT void btOptimizedBvh_updateBvhNodes(btOptimizedBvh* obj, btStridingMeshInterface* meshInterface, int firstNode, int endNode, int index); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.cpp new file mode 100644 index 0000000..795fb5e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.cpp @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btOverlappingPairCache_wrap.h" + +bool btOverlapCallback_processOverlap(btOverlapCallback* obj, btBroadphasePair* pair) +{ + return obj->processOverlap(*pair); +} + +void btOverlapCallback_delete(btOverlapCallback* obj) +{ + delete obj; +} + + +bool btOverlapFilterCallback_needBroadphaseCollision(btOverlapFilterCallback* obj, + btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + return obj->needBroadphaseCollision(proxy0, proxy1); +} + +void btOverlapFilterCallback_delete(btOverlapFilterCallback* obj) +{ + delete obj; +} + + +void btOverlappingPairCache_cleanOverlappingPair(btOverlappingPairCache* obj, btBroadphasePair* pair, + btDispatcher* dispatcher) +{ + obj->cleanOverlappingPair(*pair, dispatcher); +} + +void btOverlappingPairCache_cleanProxyFromPairs(btOverlappingPairCache* obj, btBroadphaseProxy* proxy, + btDispatcher* dispatcher) +{ + obj->cleanProxyFromPairs(proxy, dispatcher); +} + +btBroadphasePair* btOverlappingPairCache_findPair(btOverlappingPairCache* obj, btBroadphaseProxy* proxy0, + btBroadphaseProxy* proxy1) +{ + return obj->findPair(proxy0, proxy1); +} + +int btOverlappingPairCache_getNumOverlappingPairs(btOverlappingPairCache* obj) +{ + return obj->getNumOverlappingPairs(); +} + +btAlignedObjectArray_btBroadphasePair* btOverlappingPairCache_getOverlappingPairArray( + btOverlappingPairCache* obj) +{ + return &obj->getOverlappingPairArray(); +} + +btBroadphasePair* btOverlappingPairCache_getOverlappingPairArrayPtr(btOverlappingPairCache* obj) +{ + return obj->getOverlappingPairArrayPtr(); +} + +bool btOverlappingPairCache_hasDeferredRemoval(btOverlappingPairCache* obj) +{ + return obj->hasDeferredRemoval(); +} + +void btOverlappingPairCache_processAllOverlappingPairs(btOverlappingPairCache* obj, + btOverlapCallback* __unnamed0, btDispatcher* dispatcher) +{ + obj->processAllOverlappingPairs(__unnamed0, dispatcher); +} + +void btOverlappingPairCache_processAllOverlappingPairs2(btOverlappingPairCache* obj, + btOverlapCallback* callback, btDispatcher* dispatcher, const btDispatcherInfo* dispatchInfo) +{ + obj->processAllOverlappingPairs(callback, dispatcher, *dispatchInfo); +} + +void btOverlappingPairCache_setInternalGhostPairCallback(btOverlappingPairCache* obj, + btOverlappingPairCallback* ghostPairCallback) +{ + obj->setInternalGhostPairCallback(ghostPairCallback); +} + +void btOverlappingPairCache_setOverlapFilterCallback(btOverlappingPairCache* obj, + btOverlapFilterCallback* callback) +{ + obj->setOverlapFilterCallback(callback); +} + +void btOverlappingPairCache_sortOverlappingPairs(btOverlappingPairCache* obj, btDispatcher* dispatcher) +{ + obj->sortOverlappingPairs(dispatcher); +} + + +btOverlapFilterCallbackWrapper * btOverlapFilterCallbackWrapper_new(p_btOverlapFilterCallback_needBroadphaseCollision needBroadphaseCollision) +{ + return new btOverlapFilterCallbackWrapper(needBroadphaseCollision); +} + + +btHashedOverlappingPairCache* btHashedOverlappingPairCache_new() +{ + return new btHashedOverlappingPairCache(); +} + +int btHashedOverlappingPairCache_GetCount(btHashedOverlappingPairCache* obj) +{ + return obj->GetCount(); +} + +btOverlapFilterCallback* btHashedOverlappingPairCache_getOverlapFilterCallback(btHashedOverlappingPairCache* obj) +{ + return obj->getOverlapFilterCallback(); +} + +bool btHashedOverlappingPairCache_needsBroadphaseCollision(btHashedOverlappingPairCache* obj, + btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + return obj->needsBroadphaseCollision(proxy0, proxy1); +} + + +btSortedOverlappingPairCache* btSortedOverlappingPairCache_new() +{ + return new btSortedOverlappingPairCache(); +} + +btOverlapFilterCallback* btSortedOverlappingPairCache_getOverlapFilterCallback(btSortedOverlappingPairCache* obj) +{ + return obj->getOverlapFilterCallback(); +} + +bool btSortedOverlappingPairCache_needsBroadphaseCollision(btSortedOverlappingPairCache* obj, + btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + return obj->needsBroadphaseCollision(proxy0, proxy1); +} + + +btNullPairCache* btNullPairCache_new() +{ + return new btNullPairCache(); +} + + +btOverlapFilterCallbackWrapper::btOverlapFilterCallbackWrapper(p_btOverlapFilterCallback_needBroadphaseCollision needBroadphaseCollision) +{ + _needBroadphaseCollision = needBroadphaseCollision; +} + +bool btOverlapFilterCallbackWrapper::needBroadphaseCollision(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) const +{ + return _needBroadphaseCollision(proxy0, proxy1); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.h new file mode 100644 index 0000000..f3f1001 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCache_wrap.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_OVERLAPPING_PAIR_CACHE_H +#define p_btOverlapFilterCallback_needBroadphaseCollision void* +#define btOverlapFilterCallbackWrapper void +#else +typedef bool(*p_btOverlapFilterCallback_needBroadphaseCollision)(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + +class btOverlapFilterCallbackWrapper : public btOverlapFilterCallback +{ +private: + p_btOverlapFilterCallback_needBroadphaseCollision _needBroadphaseCollision; + +public: + btOverlapFilterCallbackWrapper(p_btOverlapFilterCallback_needBroadphaseCollision needBroadphaseCollision); + + virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) const; +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT bool btOverlapCallback_processOverlap(btOverlapCallback* obj, btBroadphasePair* pair); + EXPORT void btOverlapCallback_delete(btOverlapCallback* obj); + + EXPORT bool btOverlapFilterCallback_needBroadphaseCollision(btOverlapFilterCallback* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + EXPORT void btOverlapFilterCallback_delete(btOverlapFilterCallback* obj); + + EXPORT void btOverlappingPairCache_cleanOverlappingPair(btOverlappingPairCache* obj, btBroadphasePair* pair, btDispatcher* dispatcher); + EXPORT void btOverlappingPairCache_cleanProxyFromPairs(btOverlappingPairCache* obj, btBroadphaseProxy* proxy, btDispatcher* dispatcher); + EXPORT btBroadphasePair* btOverlappingPairCache_findPair(btOverlappingPairCache* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + EXPORT int btOverlappingPairCache_getNumOverlappingPairs(btOverlappingPairCache* obj); + EXPORT btAlignedObjectArray_btBroadphasePair* btOverlappingPairCache_getOverlappingPairArray(btOverlappingPairCache* obj); + EXPORT btBroadphasePair* btOverlappingPairCache_getOverlappingPairArrayPtr(btOverlappingPairCache* obj); + EXPORT bool btOverlappingPairCache_hasDeferredRemoval(btOverlappingPairCache* obj); + EXPORT void btOverlappingPairCache_processAllOverlappingPairs(btOverlappingPairCache* obj, btOverlapCallback* __unnamed0, btDispatcher* dispatcher); + EXPORT void btOverlappingPairCache_processAllOverlappingPairs2(btOverlappingPairCache* obj, btOverlapCallback* callback, btDispatcher* dispatcher, const btDispatcherInfo* dispatchInfo); + EXPORT void btOverlappingPairCache_setInternalGhostPairCallback(btOverlappingPairCache* obj, btOverlappingPairCallback* ghostPairCallback); + EXPORT void btOverlappingPairCache_setOverlapFilterCallback(btOverlappingPairCache* obj, btOverlapFilterCallback* callback); + EXPORT void btOverlappingPairCache_sortOverlappingPairs(btOverlappingPairCache* obj, btDispatcher* dispatcher); + + EXPORT btOverlapFilterCallbackWrapper* btOverlapFilterCallbackWrapper_new(p_btOverlapFilterCallback_needBroadphaseCollision needBroadphaseCollision); + + EXPORT btHashedOverlappingPairCache* btHashedOverlappingPairCache_new(); + EXPORT int btHashedOverlappingPairCache_GetCount(btHashedOverlappingPairCache* obj); + EXPORT btOverlapFilterCallback* btHashedOverlappingPairCache_getOverlapFilterCallback(btHashedOverlappingPairCache* obj); + EXPORT bool btHashedOverlappingPairCache_needsBroadphaseCollision(btHashedOverlappingPairCache* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + + EXPORT btSortedOverlappingPairCache* btSortedOverlappingPairCache_new(); + EXPORT btOverlapFilterCallback* btSortedOverlappingPairCache_getOverlapFilterCallback(btSortedOverlappingPairCache* obj); + EXPORT bool btSortedOverlappingPairCache_needsBroadphaseCollision(btSortedOverlappingPairCache* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + + EXPORT btNullPairCache* btNullPairCache_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.cpp new file mode 100644 index 0000000..063874e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btOverlappingPairCallback_wrap.h" + +btBroadphasePair* btOverlappingPairCallback_addOverlappingPair(btOverlappingPairCallback* obj, + btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + return obj->addOverlappingPair(proxy0, proxy1); +} + +void* btOverlappingPairCallback_removeOverlappingPair(btOverlappingPairCallback* obj, + btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, btDispatcher* dispatcher) +{ + return obj->removeOverlappingPair(proxy0, proxy1, dispatcher); +} + +void btOverlappingPairCallback_removeOverlappingPairsContainingProxy(btOverlappingPairCallback* obj, + btBroadphaseProxy* proxy0, btDispatcher* dispatcher) +{ + obj->removeOverlappingPairsContainingProxy(proxy0, dispatcher); +} + +void btOverlappingPairCallback_delete(btOverlappingPairCallback* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.h new file mode 100644 index 0000000..1204a51 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBroadphasePair* btOverlappingPairCallback_addOverlappingPair(btOverlappingPairCallback* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + EXPORT void* btOverlappingPairCallback_removeOverlappingPair(btOverlappingPairCallback* obj, btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, btDispatcher* dispatcher); + EXPORT void btOverlappingPairCallback_removeOverlappingPairsContainingProxy(btOverlappingPairCallback* obj, btBroadphaseProxy* proxy0, btDispatcher* dispatcher); + EXPORT void btOverlappingPairCallback_delete(btOverlappingPairCallback* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.cpp new file mode 100644 index 0000000..547734b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.cpp @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btPersistentManifold_wrap.h" + +btPersistentManifold* btPersistentManifold_new() +{ + return new btPersistentManifold(); +} + +btPersistentManifold* btPersistentManifold_new2(const btCollisionObject* body0, const btCollisionObject* body1, + int __unnamed2, btScalar contactBreakingThreshold, btScalar contactProcessingThreshold) +{ + return new btPersistentManifold(body0, body1, __unnamed2, contactBreakingThreshold, + contactProcessingThreshold); +} + +int btPersistentManifold_addManifoldPoint(btPersistentManifold* obj, const btManifoldPoint* newPoint, + bool isPredictive) +{ + return obj->addManifoldPoint(*newPoint, isPredictive); +} + +void btPersistentManifold_clearManifold(btPersistentManifold* obj) +{ + obj->clearManifold(); +} + +void btPersistentManifold_clearUserCache(btPersistentManifold* obj, btManifoldPoint* pt) +{ + obj->clearUserCache(*pt); +} + +const btCollisionObject* btPersistentManifold_getBody0(btPersistentManifold* obj) +{ + return obj->getBody0(); +} + +const btCollisionObject* btPersistentManifold_getBody1(btPersistentManifold* obj) +{ + return obj->getBody1(); +} + +int btPersistentManifold_getCacheEntry(btPersistentManifold* obj, const btManifoldPoint* newPoint) +{ + return obj->getCacheEntry(*newPoint); +} + +int btPersistentManifold_getCompanionIdA(btPersistentManifold* obj) +{ + return obj->m_companionIdA; +} + +int btPersistentManifold_getCompanionIdB(btPersistentManifold* obj) +{ + return obj->m_companionIdB; +} + +btScalar btPersistentManifold_getContactBreakingThreshold(btPersistentManifold* obj) +{ + return obj->getContactBreakingThreshold(); +} + +btManifoldPoint* btPersistentManifold_getContactPoint(btPersistentManifold* obj, + int index) +{ + return &obj->getContactPoint(index); +} + +btScalar btPersistentManifold_getContactProcessingThreshold(btPersistentManifold* obj) +{ + return obj->getContactProcessingThreshold(); +} + +int btPersistentManifold_getIndex1a(btPersistentManifold* obj) +{ + return obj->m_index1a; +} + +int btPersistentManifold_getNumContacts(btPersistentManifold* obj) +{ + return obj->getNumContacts(); +} + +void btPersistentManifold_refreshContactPoints(btPersistentManifold* obj, const btTransform* trA, + const btTransform* trB) +{ + BTTRANSFORM_IN(trA); + BTTRANSFORM_IN(trB); + obj->refreshContactPoints(BTTRANSFORM_USE(trA), BTTRANSFORM_USE(trB)); +} + +void btPersistentManifold_removeContactPoint(btPersistentManifold* obj, int index) +{ + obj->removeContactPoint(index); +} + +void btPersistentManifold_replaceContactPoint(btPersistentManifold* obj, const btManifoldPoint* newPoint, + int insertIndex) +{ + obj->replaceContactPoint(*newPoint, insertIndex); +} + +void btPersistentManifold_setBodies(btPersistentManifold* obj, const btCollisionObject* body0, + const btCollisionObject* body1) +{ + obj->setBodies(body0, body1); +} + +void btPersistentManifold_setCompanionIdA(btPersistentManifold* obj, int value) +{ + obj->m_companionIdA = value; +} + +void btPersistentManifold_setCompanionIdB(btPersistentManifold* obj, int value) +{ + obj->m_companionIdB = value; +} + +void btPersistentManifold_setContactBreakingThreshold(btPersistentManifold* obj, + btScalar contactBreakingThreshold) +{ + obj->setContactBreakingThreshold(contactBreakingThreshold); +} + +void btPersistentManifold_setContactProcessingThreshold(btPersistentManifold* obj, + btScalar contactProcessingThreshold) +{ + obj->setContactProcessingThreshold(contactProcessingThreshold); +} + +void btPersistentManifold_setIndex1a(btPersistentManifold* obj, int value) +{ + obj->m_index1a = value; +} + +void btPersistentManifold_setNumContacts(btPersistentManifold* obj, int cachedPoints) +{ + obj->setNumContacts(cachedPoints); +} + +bool btPersistentManifold_validContactDistance(btPersistentManifold* obj, const btManifoldPoint* pt) +{ + return obj->validContactDistance(*pt); +} + +void btPersistentManifold_delete(btPersistentManifold* obj) +{ + delete obj; +} + + +ContactDestroyedCallback getGContactDestroyedCallback() +{ + return gContactDestroyedCallback; +} + +ContactProcessedCallback getGContactProcessedCallback() +{ + return gContactProcessedCallback; +} + +void setGContactDestroyedCallback(ContactDestroyedCallback callback) +{ + gContactDestroyedCallback = callback; +} + +void setGContactProcessedCallback(ContactProcessedCallback callback) +{ + gContactProcessedCallback = callback; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.h new file mode 100644 index 0000000..f21f4c6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPersistentManifold_wrap.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btPersistentManifold* btPersistentManifold_new(); + EXPORT btPersistentManifold* btPersistentManifold_new2(const btCollisionObject* body0, const btCollisionObject* body1, int __unnamed2, btScalar contactBreakingThreshold, btScalar contactProcessingThreshold); + EXPORT int btPersistentManifold_addManifoldPoint(btPersistentManifold* obj, const btManifoldPoint* newPoint, bool isPredictive); + EXPORT void btPersistentManifold_clearManifold(btPersistentManifold* obj); + EXPORT void btPersistentManifold_clearUserCache(btPersistentManifold* obj, btManifoldPoint* pt); + EXPORT const btCollisionObject* btPersistentManifold_getBody0(btPersistentManifold* obj); + EXPORT const btCollisionObject* btPersistentManifold_getBody1(btPersistentManifold* obj); + EXPORT int btPersistentManifold_getCacheEntry(btPersistentManifold* obj, const btManifoldPoint* newPoint); + EXPORT int btPersistentManifold_getCompanionIdA(btPersistentManifold* obj); + EXPORT int btPersistentManifold_getCompanionIdB(btPersistentManifold* obj); + EXPORT btScalar btPersistentManifold_getContactBreakingThreshold(btPersistentManifold* obj); + EXPORT btManifoldPoint* btPersistentManifold_getContactPoint(btPersistentManifold* obj, int index); + EXPORT btScalar btPersistentManifold_getContactProcessingThreshold(btPersistentManifold* obj); + EXPORT int btPersistentManifold_getIndex1a(btPersistentManifold* obj); + EXPORT int btPersistentManifold_getNumContacts(btPersistentManifold* obj); + EXPORT void btPersistentManifold_refreshContactPoints(btPersistentManifold* obj, const btTransform* trA, const btTransform* trB); + EXPORT void btPersistentManifold_removeContactPoint(btPersistentManifold* obj, int index); + EXPORT void btPersistentManifold_replaceContactPoint(btPersistentManifold* obj, const btManifoldPoint* newPoint, int insertIndex); + EXPORT void btPersistentManifold_setBodies(btPersistentManifold* obj, const btCollisionObject* body0, const btCollisionObject* body1); + EXPORT void btPersistentManifold_setCompanionIdA(btPersistentManifold* obj, int value); + EXPORT void btPersistentManifold_setCompanionIdB(btPersistentManifold* obj, int value); + EXPORT void btPersistentManifold_setContactBreakingThreshold(btPersistentManifold* obj, btScalar contactBreakingThreshold); + EXPORT void btPersistentManifold_setContactProcessingThreshold(btPersistentManifold* obj, btScalar contactProcessingThreshold); + EXPORT void btPersistentManifold_setIndex1a(btPersistentManifold* obj, int value); + EXPORT void btPersistentManifold_setNumContacts(btPersistentManifold* obj, int cachedPoints); + EXPORT bool btPersistentManifold_validContactDistance(btPersistentManifold* obj, const btManifoldPoint* pt); + EXPORT void btPersistentManifold_delete(btPersistentManifold* obj); + + EXPORT ContactDestroyedCallback getGContactDestroyedCallback(); + EXPORT ContactProcessedCallback getGContactProcessedCallback(); + EXPORT void setGContactDestroyedCallback(ContactDestroyedCallback callback); + EXPORT void setGContactProcessedCallback(ContactProcessedCallback callback); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.cpp new file mode 100644 index 0000000..209beb0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.cpp @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btPoint2PointConstraint_wrap.h" + +btConstraintSetting* btConstraintSetting_new() +{ + return new btConstraintSetting(); +} + +btScalar btConstraintSetting_getDamping(btConstraintSetting* obj) +{ + return obj->m_damping; +} + +btScalar btConstraintSetting_getImpulseClamp(btConstraintSetting* obj) +{ + return obj->m_impulseClamp; +} + +btScalar btConstraintSetting_getTau(btConstraintSetting* obj) +{ + return obj->m_tau; +} + +void btConstraintSetting_setDamping(btConstraintSetting* obj, btScalar value) +{ + obj->m_damping = value; +} + +void btConstraintSetting_setImpulseClamp(btConstraintSetting* obj, btScalar value) +{ + obj->m_impulseClamp = value; +} + +void btConstraintSetting_setTau(btConstraintSetting* obj, btScalar value) +{ + obj->m_tau = value; +} + +void btConstraintSetting_delete(btConstraintSetting* obj) +{ + delete obj; +} + + +btPoint2PointConstraint* btPoint2PointConstraint_new(btRigidBody* rbA, btRigidBody* rbB, + const btVector3* pivotInA, const btVector3* pivotInB) +{ + BTVECTOR3_IN(pivotInA); + BTVECTOR3_IN(pivotInB); + return new btPoint2PointConstraint(*rbA, *rbB, BTVECTOR3_USE(pivotInA), BTVECTOR3_USE(pivotInB)); +} + +btPoint2PointConstraint* btPoint2PointConstraint_new2(btRigidBody* rbA, const btVector3* pivotInA) +{ + BTVECTOR3_IN(pivotInA); + return new btPoint2PointConstraint(*rbA, BTVECTOR3_USE(pivotInA)); +} + +int btPoint2PointConstraint_getFlags(btPoint2PointConstraint* obj) +{ + return obj->getFlags(); +} + +void btPoint2PointConstraint_getInfo1NonVirtual(btPoint2PointConstraint* obj, btTypedConstraint_btConstraintInfo1* info) +{ + obj->getInfo1NonVirtual(info); +} + +void btPoint2PointConstraint_getInfo2NonVirtual(btPoint2PointConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* body0_trans, const btTransform* body1_trans) +{ + BTTRANSFORM_IN(body0_trans); + BTTRANSFORM_IN(body1_trans); + obj->getInfo2NonVirtual(info, BTTRANSFORM_USE(body0_trans), BTTRANSFORM_USE(body1_trans)); +} + +void btPoint2PointConstraint_getPivotInA(btPoint2PointConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInA()); +} + +void btPoint2PointConstraint_getPivotInB(btPoint2PointConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPivotInB()); +} + +btConstraintSetting* btPoint2PointConstraint_getSetting(btPoint2PointConstraint* obj) +{ + return &obj->m_setting; +} + +bool btPoint2PointConstraint_getUseSolveConstraintObsolete(btPoint2PointConstraint* obj) +{ + return obj->m_useSolveConstraintObsolete; +} + +void btPoint2PointConstraint_setPivotA(btPoint2PointConstraint* obj, const btVector3* pivotA) +{ + BTVECTOR3_IN(pivotA); + obj->setPivotA(BTVECTOR3_USE(pivotA)); +} + +void btPoint2PointConstraint_setPivotB(btPoint2PointConstraint* obj, const btVector3* pivotB) +{ + BTVECTOR3_IN(pivotB); + obj->setPivotB(BTVECTOR3_USE(pivotB)); +} + +void btPoint2PointConstraint_setUseSolveConstraintObsolete(btPoint2PointConstraint* obj, + bool value) +{ + obj->m_useSolveConstraintObsolete = value; +} + +void btPoint2PointConstraint_updateRHS(btPoint2PointConstraint* obj, btScalar timeStep) +{ + obj->updateRHS(timeStep); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.h new file mode 100644 index 0000000..613581c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btConstraintSetting* btConstraintSetting_new(); + EXPORT btScalar btConstraintSetting_getDamping(btConstraintSetting* obj); + EXPORT btScalar btConstraintSetting_getImpulseClamp(btConstraintSetting* obj); + EXPORT btScalar btConstraintSetting_getTau(btConstraintSetting* obj); + EXPORT void btConstraintSetting_setDamping(btConstraintSetting* obj, btScalar value); + EXPORT void btConstraintSetting_setImpulseClamp(btConstraintSetting* obj, btScalar value); + EXPORT void btConstraintSetting_setTau(btConstraintSetting* obj, btScalar value); + EXPORT void btConstraintSetting_delete(btConstraintSetting* obj); + + EXPORT btPoint2PointConstraint* btPoint2PointConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* pivotInA, const btVector3* pivotInB); + EXPORT btPoint2PointConstraint* btPoint2PointConstraint_new2(btRigidBody* rbA, const btVector3* pivotInA); + EXPORT int btPoint2PointConstraint_getFlags(btPoint2PointConstraint* obj); + EXPORT void btPoint2PointConstraint_getInfo1NonVirtual(btPoint2PointConstraint* obj, btTypedConstraint_btConstraintInfo1* info); + EXPORT void btPoint2PointConstraint_getInfo2NonVirtual(btPoint2PointConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* body0_trans, const btTransform* body1_trans); + EXPORT void btPoint2PointConstraint_getPivotInA(btPoint2PointConstraint* obj, btVector3* value); + EXPORT void btPoint2PointConstraint_getPivotInB(btPoint2PointConstraint* obj, btVector3* value); + EXPORT btConstraintSetting* btPoint2PointConstraint_getSetting(btPoint2PointConstraint* obj); + EXPORT bool btPoint2PointConstraint_getUseSolveConstraintObsolete(btPoint2PointConstraint* obj); + EXPORT void btPoint2PointConstraint_setPivotA(btPoint2PointConstraint* obj, const btVector3* pivotA); + EXPORT void btPoint2PointConstraint_setPivotB(btPoint2PointConstraint* obj, const btVector3* pivotB); + EXPORT void btPoint2PointConstraint_setUseSolveConstraintObsolete(btPoint2PointConstraint* obj, bool value); + EXPORT void btPoint2PointConstraint_updateRHS(btPoint2PointConstraint* obj, btScalar timeStep); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.cpp new file mode 100644 index 0000000..da6b303 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.cpp @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btPointCollector_wrap.h" + +btPointCollector* btPointCollector_new() +{ + return new btPointCollector(); +} + +btScalar btPointCollector_getDistance(btPointCollector* obj) +{ + return obj->m_distance; +} + +bool btPointCollector_getHasResult(btPointCollector* obj) +{ + return obj->m_hasResult; +} + +void btPointCollector_getNormalOnBInWorld(btPointCollector* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normalOnBInWorld); +} + +void btPointCollector_getPointInWorld(btPointCollector* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_pointInWorld); +} + +void btPointCollector_setDistance(btPointCollector* obj, btScalar value) +{ + obj->m_distance = value; +} + +void btPointCollector_setHasResult(btPointCollector* obj, bool value) +{ + obj->m_hasResult = value; +} + +void btPointCollector_setNormalOnBInWorld(btPointCollector* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normalOnBInWorld, value); +} + +void btPointCollector_setPointInWorld(btPointCollector* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_pointInWorld, value); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.h new file mode 100644 index 0000000..a733de5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPointCollector_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btPointCollector* btPointCollector_new(); + EXPORT btScalar btPointCollector_getDistance(btPointCollector* obj); + EXPORT bool btPointCollector_getHasResult(btPointCollector* obj); + EXPORT void btPointCollector_getNormalOnBInWorld(btPointCollector* obj, btVector3* value); + EXPORT void btPointCollector_getPointInWorld(btPointCollector* obj, btVector3* value); + EXPORT void btPointCollector_setDistance(btPointCollector* obj, btScalar value); + EXPORT void btPointCollector_setHasResult(btPointCollector* obj, bool value); + EXPORT void btPointCollector_setNormalOnBInWorld(btPointCollector* obj, const btVector3* value); + EXPORT void btPointCollector_setPointInWorld(btPointCollector* obj, const btVector3* value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.cpp new file mode 100644 index 0000000..3dda12c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btPolarDecomposition_wrap.h" + +btPolarDecomposition* btPolarDecomposition_new(btScalar tolerance, unsigned int maxIterations) +{ + return new btPolarDecomposition(tolerance, maxIterations); +} + +unsigned int btPolarDecomposition_decompose(btPolarDecomposition* obj, const btMatrix3x3* a, + btMatrix3x3* u, btMatrix3x3* h) +{ + BTMATRIX3X3_IN(a); + BTMATRIX3X3_DEF(u); + BTMATRIX3X3_DEF(h); + unsigned int ret = obj->decompose(BTMATRIX3X3_USE(a), BTMATRIX3X3_USE(u), BTMATRIX3X3_USE(h)); + BTMATRIX3X3_DEF_OUT(u); + BTMATRIX3X3_DEF_OUT(h); + return ret; +} + +unsigned int btPolarDecomposition_maxIterations(btPolarDecomposition* obj) +{ + return obj->maxIterations(); +} + +void btPolarDecomposition_delete(btPolarDecomposition* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.h new file mode 100644 index 0000000..fbfd580 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPolarDecomposition_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btPolarDecomposition* btPolarDecomposition_new(btScalar tolerance, unsigned int maxIterations); + EXPORT unsigned int btPolarDecomposition_decompose(btPolarDecomposition* obj, const btMatrix3x3* a, btMatrix3x3* u, btMatrix3x3* h); + EXPORT unsigned int btPolarDecomposition_maxIterations(btPolarDecomposition* obj); + EXPORT void btPolarDecomposition_delete(btPolarDecomposition* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.cpp new file mode 100644 index 0000000..bd6742d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btPolyhedralConvexShape_wrap.h" + +const btConvexPolyhedron* btPolyhedralConvexShape_getConvexPolyhedron(btPolyhedralConvexShape* obj) +{ + return obj->getConvexPolyhedron(); +} + +void btPolyhedralConvexShape_getEdge(btPolyhedralConvexShape* obj, int i, btVector3* pa, + btVector3* pb) +{ + BTVECTOR3_DEF(pa); + BTVECTOR3_DEF(pb); + obj->getEdge(i, BTVECTOR3_USE(pa), BTVECTOR3_USE(pb)); + BTVECTOR3_DEF_OUT(pa); + BTVECTOR3_DEF_OUT(pb); +} + +int btPolyhedralConvexShape_getNumEdges(btPolyhedralConvexShape* obj) +{ + return obj->getNumEdges(); +} + +int btPolyhedralConvexShape_getNumPlanes(btPolyhedralConvexShape* obj) +{ + return obj->getNumPlanes(); +} + +int btPolyhedralConvexShape_getNumVertices(btPolyhedralConvexShape* obj) +{ + return obj->getNumVertices(); +} + +void btPolyhedralConvexShape_getPlane(btPolyhedralConvexShape* obj, btVector3* planeNormal, + btVector3* planeSupport, int i) +{ + BTVECTOR3_DEF(planeNormal); + BTVECTOR3_DEF(planeSupport); + obj->getPlane(BTVECTOR3_USE(planeNormal), BTVECTOR3_USE(planeSupport), i); + BTVECTOR3_DEF_OUT(planeNormal); + BTVECTOR3_DEF_OUT(planeSupport); +} + +void btPolyhedralConvexShape_getVertex(btPolyhedralConvexShape* obj, int i, btVector3* vtx) +{ + BTVECTOR3_DEF(vtx); + obj->getVertex(i, BTVECTOR3_USE(vtx)); + BTVECTOR3_DEF_OUT(vtx); +} + +bool btPolyhedralConvexShape_initializePolyhedralFeatures(btPolyhedralConvexShape* obj, + int shiftVerticesByMargin) +{ + return obj->initializePolyhedralFeatures(shiftVerticesByMargin); +} + +bool btPolyhedralConvexShape_isInside(btPolyhedralConvexShape* obj, const btVector3* pt, + btScalar tolerance) +{ + BTVECTOR3_IN(pt); + return obj->isInside(BTVECTOR3_USE(pt), tolerance); +} + +void btPolyhedralConvexShape_setPolyhedralFeatures(btPolyhedralConvexShape* obj, btConvexPolyhedron* polyhedron) +{ + obj->setPolyhedralFeatures(*polyhedron); +} + + +void btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(btPolyhedralConvexAabbCachingShape* obj, + const btTransform* trans, btVector3* aabbMin, btVector3* aabbMax, btScalar margin) +{ + BTTRANSFORM_IN(trans); + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getNonvirtualAabb(BTTRANSFORM_USE(trans), BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax), + margin); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +void btPolyhedralConvexAabbCachingShape_recalcLocalAabb(btPolyhedralConvexAabbCachingShape* obj) +{ + obj->recalcLocalAabb(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.h new file mode 100644 index 0000000..4b1d073 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT const btConvexPolyhedron* btPolyhedralConvexShape_getConvexPolyhedron(btPolyhedralConvexShape* obj); + EXPORT void btPolyhedralConvexShape_getEdge(btPolyhedralConvexShape* obj, int i, btVector3* pa, btVector3* pb); + EXPORT int btPolyhedralConvexShape_getNumEdges(btPolyhedralConvexShape* obj); + EXPORT int btPolyhedralConvexShape_getNumPlanes(btPolyhedralConvexShape* obj); + EXPORT int btPolyhedralConvexShape_getNumVertices(btPolyhedralConvexShape* obj); + EXPORT void btPolyhedralConvexShape_getPlane(btPolyhedralConvexShape* obj, btVector3* planeNormal, btVector3* planeSupport, int i); + EXPORT void btPolyhedralConvexShape_getVertex(btPolyhedralConvexShape* obj, int i, btVector3* vtx); + EXPORT bool btPolyhedralConvexShape_initializePolyhedralFeatures(btPolyhedralConvexShape* obj, int shiftVerticesByMargin); + EXPORT bool btPolyhedralConvexShape_isInside(btPolyhedralConvexShape* obj, const btVector3* pt, btScalar tolerance); + EXPORT void btPolyhedralConvexShape_setPolyhedralFeatures(btPolyhedralConvexShape* obj, btConvexPolyhedron* polyhedron); + + EXPORT void btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(btPolyhedralConvexAabbCachingShape* obj, const btTransform* trans, btVector3* aabbMin, btVector3* aabbMax, btScalar margin); + EXPORT void btPolyhedralConvexAabbCachingShape_recalcLocalAabb(btPolyhedralConvexAabbCachingShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.cpp new file mode 100644 index 0000000..fde1748 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btPoolAllocator_wrap.h" + +btPoolAllocator* btPoolAllocator_new(int elemSize, int maxElements) +{ + return new btPoolAllocator(elemSize, maxElements); +} + +void* btPoolAllocator_allocate(btPoolAllocator* obj, int size) +{ + return obj->allocate(size); +} + +void btPoolAllocator_freeMemory(btPoolAllocator* obj, void* ptr) +{ + obj->freeMemory(ptr); +} + +int btPoolAllocator_getElementSize(btPoolAllocator* obj) +{ + return obj->getElementSize(); +} + +int btPoolAllocator_getFreeCount(btPoolAllocator* obj) +{ + return obj->getFreeCount(); +} + +int btPoolAllocator_getMaxCount(btPoolAllocator* obj) +{ + return obj->getMaxCount(); +} + +unsigned char* btPoolAllocator_getPoolAddress(btPoolAllocator* obj) +{ + return obj->getPoolAddress(); +} + +int btPoolAllocator_getUsedCount(btPoolAllocator* obj) +{ + return obj->getUsedCount(); +} + +bool btPoolAllocator_validPtr(btPoolAllocator* obj, void* ptr) +{ + return obj->validPtr(ptr); +} + +void btPoolAllocator_delete(btPoolAllocator* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.h new file mode 100644 index 0000000..dc0058a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btPoolAllocator_wrap.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btPoolAllocator* btPoolAllocator_new(int elemSize, int maxElements); + EXPORT void* btPoolAllocator_allocate(btPoolAllocator* obj, int size); + EXPORT void btPoolAllocator_freeMemory(btPoolAllocator* obj, void* ptr); + EXPORT int btPoolAllocator_getElementSize(btPoolAllocator* obj); + EXPORT int btPoolAllocator_getFreeCount(btPoolAllocator* obj); + EXPORT int btPoolAllocator_getMaxCount(btPoolAllocator* obj); + EXPORT unsigned char* btPoolAllocator_getPoolAddress(btPoolAllocator* obj); + EXPORT int btPoolAllocator_getUsedCount(btPoolAllocator* obj); + EXPORT bool btPoolAllocator_validPtr(btPoolAllocator* obj, void* ptr); + EXPORT void btPoolAllocator_delete(btPoolAllocator* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.cpp new file mode 100644 index 0000000..e559f8a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.cpp @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btQuantizedBvh_wrap.h" + +btQuantizedBvhNode* btQuantizedBvhNode_new() +{ + return new btQuantizedBvhNode(); +} + +int btQuantizedBvhNode_getEscapeIndex(btQuantizedBvhNode* obj) +{ + return obj->getEscapeIndex(); +} + +int btQuantizedBvhNode_getEscapeIndexOrTriangleIndex(btQuantizedBvhNode* obj) +{ + return obj->m_escapeIndexOrTriangleIndex; +} + +int btQuantizedBvhNode_getPartId(btQuantizedBvhNode* obj) +{ + return obj->getPartId(); +} + +unsigned short* btQuantizedBvhNode_getQuantizedAabbMax(btQuantizedBvhNode* obj) +{ + return obj->m_quantizedAabbMax; +} + +unsigned short* btQuantizedBvhNode_getQuantizedAabbMin(btQuantizedBvhNode* obj) +{ + return obj->m_quantizedAabbMin; +} + +int btQuantizedBvhNode_getTriangleIndex(btQuantizedBvhNode* obj) +{ + return obj->getTriangleIndex(); +} + +bool btQuantizedBvhNode_isLeafNode(btQuantizedBvhNode* obj) +{ + return obj->isLeafNode(); +} + +void btQuantizedBvhNode_setEscapeIndexOrTriangleIndex(btQuantizedBvhNode* obj, int value) +{ + obj->m_escapeIndexOrTriangleIndex = value; +} + +void btQuantizedBvhNode_delete(btQuantizedBvhNode* obj) +{ + delete obj; +} + + +btOptimizedBvhNode* btOptimizedBvhNode_new() +{ + return new btOptimizedBvhNode(); +} + +void btOptimizedBvhNode_getAabbMaxOrg(btOptimizedBvhNode* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_aabbMaxOrg); +} + +void btOptimizedBvhNode_getAabbMinOrg(btOptimizedBvhNode* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_aabbMinOrg); +} + +int btOptimizedBvhNode_getEscapeIndex(btOptimizedBvhNode* obj) +{ + return obj->m_escapeIndex; +} + +int btOptimizedBvhNode_getSubPart(btOptimizedBvhNode* obj) +{ + return obj->m_subPart; +} + +int btOptimizedBvhNode_getTriangleIndex(btOptimizedBvhNode* obj) +{ + return obj->m_triangleIndex; +} + +void btOptimizedBvhNode_setAabbMaxOrg(btOptimizedBvhNode* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_aabbMaxOrg, value); +} + +void btOptimizedBvhNode_setAabbMinOrg(btOptimizedBvhNode* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_aabbMinOrg, value); +} + +void btOptimizedBvhNode_setEscapeIndex(btOptimizedBvhNode* obj, int value) +{ + obj->m_escapeIndex = value; +} + +void btOptimizedBvhNode_setSubPart(btOptimizedBvhNode* obj, int value) +{ + obj->m_subPart = value; +} + +void btOptimizedBvhNode_setTriangleIndex(btOptimizedBvhNode* obj, int value) +{ + obj->m_triangleIndex = value; +} + +void btOptimizedBvhNode_delete(btOptimizedBvhNode* obj) +{ + delete obj; +} + + +void btNodeOverlapCallback_processNode(btNodeOverlapCallback* obj, int subPart, int triangleIndex) +{ + obj->processNode(subPart, triangleIndex); +} + +void btNodeOverlapCallback_delete(btNodeOverlapCallback* obj) +{ + delete obj; +} + + +btQuantizedBvh* btQuantizedBvh_new() +{ + return new btQuantizedBvh(); +} + +void btQuantizedBvh_buildInternal(btQuantizedBvh* obj) +{ + obj->buildInternal(); +} + +unsigned int btQuantizedBvh_calculateSerializeBufferSize(btQuantizedBvh* obj) +{ + return obj->calculateSerializeBufferSize(); +} + +int btQuantizedBvh_calculateSerializeBufferSizeNew(btQuantizedBvh* obj) +{ + return obj->calculateSerializeBufferSizeNew(); +} + +void btQuantizedBvh_deSerializeDouble(btQuantizedBvh* obj, btQuantizedBvhDoubleData* quantizedBvhDoubleData) +{ + obj->deSerializeDouble(*quantizedBvhDoubleData); +} + +void btQuantizedBvh_deSerializeFloat(btQuantizedBvh* obj, btQuantizedBvhFloatData* quantizedBvhFloatData) +{ + obj->deSerializeFloat(*quantizedBvhFloatData); +} + +btQuantizedBvh* btQuantizedBvh_deSerializeInPlace(void* i_alignedDataBuffer, unsigned int i_dataBufferSize, + bool i_swapEndian) +{ + return btQuantizedBvh::deSerializeInPlace(i_alignedDataBuffer, i_dataBufferSize, + i_swapEndian); +} + +unsigned int btQuantizedBvh_getAlignmentSerializationPadding() +{ + return btQuantizedBvh::getAlignmentSerializationPadding(); +} + +btAlignedObjectArray_btQuantizedBvhNode* btQuantizedBvh_getLeafNodeArray(btQuantizedBvh* obj) +{ + return &obj->getLeafNodeArray(); +} + +btAlignedObjectArray_btQuantizedBvhNode* btQuantizedBvh_getQuantizedNodeArray(btQuantizedBvh* obj) +{ + return &obj->getQuantizedNodeArray(); +} + +btAlignedObjectArray_btBvhSubtreeInfo* btQuantizedBvh_getSubtreeInfoArray(btQuantizedBvh* obj) +{ + return &obj->getSubtreeInfoArray(); +} + +bool btQuantizedBvh_isQuantized(btQuantizedBvh* obj) +{ + return obj->isQuantized(); +} + +void btQuantizedBvh_quantize(btQuantizedBvh* obj, unsigned short* out, const btVector3* point, + int isMax) +{ + BTVECTOR3_IN(point); + obj->quantize(out, BTVECTOR3_USE(point), isMax); +} + +void btQuantizedBvh_quantizeWithClamp(btQuantizedBvh* obj, unsigned short* out, const btVector3* point2, + int isMax) +{ + BTVECTOR3_IN(point2); + obj->quantizeWithClamp(out, BTVECTOR3_USE(point2), isMax); +} + +void btQuantizedBvh_reportAabbOverlappingNodex(btQuantizedBvh* obj, btNodeOverlapCallback* nodeCallback, + const btVector3* aabbMin, const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->reportAabbOverlappingNodex(nodeCallback, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btQuantizedBvh_reportBoxCastOverlappingNodex(btQuantizedBvh* obj, btNodeOverlapCallback* nodeCallback, + const btVector3* raySource, const btVector3* rayTarget, const btVector3* aabbMin, + const btVector3* aabbMax) +{ + BTVECTOR3_IN(raySource); + BTVECTOR3_IN(rayTarget); + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->reportBoxCastOverlappingNodex(nodeCallback, BTVECTOR3_USE(raySource), BTVECTOR3_USE(rayTarget), + BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btQuantizedBvh_reportRayOverlappingNodex(btQuantizedBvh* obj, btNodeOverlapCallback* nodeCallback, + const btVector3* raySource, const btVector3* rayTarget) +{ + BTVECTOR3_IN(raySource); + BTVECTOR3_IN(rayTarget); + obj->reportRayOverlappingNodex(nodeCallback, BTVECTOR3_USE(raySource), BTVECTOR3_USE(rayTarget)); +} + +bool btQuantizedBvh_serialize(btQuantizedBvh* obj, void* o_alignedDataBuffer, unsigned int i_dataBufferSize, + bool i_swapEndian) +{ + return obj->serialize(o_alignedDataBuffer, i_dataBufferSize, i_swapEndian); +} + +const char* btQuantizedBvh_serialize2(btQuantizedBvh* obj, void* dataBuffer, btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btQuantizedBvh_setQuantizationValues(btQuantizedBvh* obj, const btVector3* bvhAabbMin, + const btVector3* bvhAabbMax, btScalar quantizationMargin) +{ + BTVECTOR3_IN(bvhAabbMin); + BTVECTOR3_IN(bvhAabbMax); + obj->setQuantizationValues(BTVECTOR3_USE(bvhAabbMin), BTVECTOR3_USE(bvhAabbMax), + quantizationMargin); +} + +void btQuantizedBvh_setTraversalMode(btQuantizedBvh* obj, btQuantizedBvh::btTraversalMode traversalMode) +{ + obj->setTraversalMode(traversalMode); +} + +void btQuantizedBvh_unQuantize(btQuantizedBvh* obj, const unsigned short* vecIn, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->unQuantize(vecIn); + BTVECTOR3_SET(value, temp); +} + +void btQuantizedBvh_delete(btQuantizedBvh* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.h new file mode 100644 index 0000000..3ab7fca --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btQuantizedBvh_wrap.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btQuantizedBvhNode* btQuantizedBvhNode_new(); + EXPORT int btQuantizedBvhNode_getEscapeIndex(btQuantizedBvhNode* obj); + EXPORT int btQuantizedBvhNode_getEscapeIndexOrTriangleIndex(btQuantizedBvhNode* obj); + EXPORT int btQuantizedBvhNode_getPartId(btQuantizedBvhNode* obj); + EXPORT unsigned short* btQuantizedBvhNode_getQuantizedAabbMax(btQuantizedBvhNode* obj); + EXPORT unsigned short* btQuantizedBvhNode_getQuantizedAabbMin(btQuantizedBvhNode* obj); + EXPORT int btQuantizedBvhNode_getTriangleIndex(btQuantizedBvhNode* obj); + EXPORT bool btQuantizedBvhNode_isLeafNode(btQuantizedBvhNode* obj); + EXPORT void btQuantizedBvhNode_setEscapeIndexOrTriangleIndex(btQuantizedBvhNode* obj, int value); + EXPORT void btQuantizedBvhNode_delete(btQuantizedBvhNode* obj); + + EXPORT btOptimizedBvhNode* btOptimizedBvhNode_new(); + EXPORT void btOptimizedBvhNode_getAabbMaxOrg(btOptimizedBvhNode* obj, btVector3* value); + EXPORT void btOptimizedBvhNode_getAabbMinOrg(btOptimizedBvhNode* obj, btVector3* value); + EXPORT int btOptimizedBvhNode_getEscapeIndex(btOptimizedBvhNode* obj); + EXPORT int btOptimizedBvhNode_getSubPart(btOptimizedBvhNode* obj); + EXPORT int btOptimizedBvhNode_getTriangleIndex(btOptimizedBvhNode* obj); + EXPORT void btOptimizedBvhNode_setAabbMaxOrg(btOptimizedBvhNode* obj, const btVector3* value); + EXPORT void btOptimizedBvhNode_setAabbMinOrg(btOptimizedBvhNode* obj, const btVector3* value); + EXPORT void btOptimizedBvhNode_setEscapeIndex(btOptimizedBvhNode* obj, int value); + EXPORT void btOptimizedBvhNode_setSubPart(btOptimizedBvhNode* obj, int value); + EXPORT void btOptimizedBvhNode_setTriangleIndex(btOptimizedBvhNode* obj, int value); + EXPORT void btOptimizedBvhNode_delete(btOptimizedBvhNode* obj); + + EXPORT void btNodeOverlapCallback_processNode(btNodeOverlapCallback* obj, int subPart, int triangleIndex); + EXPORT void btNodeOverlapCallback_delete(btNodeOverlapCallback* obj); + + EXPORT btQuantizedBvh* btQuantizedBvh_new(); + EXPORT void btQuantizedBvh_buildInternal(btQuantizedBvh* obj); + EXPORT unsigned int btQuantizedBvh_calculateSerializeBufferSize(btQuantizedBvh* obj); + EXPORT int btQuantizedBvh_calculateSerializeBufferSizeNew(btQuantizedBvh* obj); + EXPORT void btQuantizedBvh_deSerializeDouble(btQuantizedBvh* obj, btQuantizedBvhDoubleData* quantizedBvhDoubleData); + EXPORT void btQuantizedBvh_deSerializeFloat(btQuantizedBvh* obj, btQuantizedBvhFloatData* quantizedBvhFloatData); + EXPORT btQuantizedBvh* btQuantizedBvh_deSerializeInPlace(void* i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian); + EXPORT unsigned int btQuantizedBvh_getAlignmentSerializationPadding(); + EXPORT btAlignedObjectArray_btQuantizedBvhNode* btQuantizedBvh_getLeafNodeArray(btQuantizedBvh* obj); + EXPORT btAlignedObjectArray_btQuantizedBvhNode* btQuantizedBvh_getQuantizedNodeArray(btQuantizedBvh* obj); + EXPORT btAlignedObjectArray_btBvhSubtreeInfo* btQuantizedBvh_getSubtreeInfoArray(btQuantizedBvh* obj); + EXPORT bool btQuantizedBvh_isQuantized(btQuantizedBvh* obj); + EXPORT void btQuantizedBvh_quantize(btQuantizedBvh* obj, unsigned short* out, const btVector3* point, int isMax); + EXPORT void btQuantizedBvh_quantizeWithClamp(btQuantizedBvh* obj, unsigned short* out, const btVector3* point2, int isMax); + EXPORT void btQuantizedBvh_reportAabbOverlappingNodex(btQuantizedBvh* obj, btNodeOverlapCallback* nodeCallback, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btQuantizedBvh_reportBoxCastOverlappingNodex(btQuantizedBvh* obj, btNodeOverlapCallback* nodeCallback, const btVector3* raySource, const btVector3* rayTarget, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btQuantizedBvh_reportRayOverlappingNodex(btQuantizedBvh* obj, btNodeOverlapCallback* nodeCallback, const btVector3* raySource, const btVector3* rayTarget); + EXPORT bool btQuantizedBvh_serialize(btQuantizedBvh* obj, void* o_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian); + EXPORT const char* btQuantizedBvh_serialize2(btQuantizedBvh* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btQuantizedBvh_setQuantizationValues(btQuantizedBvh* obj, const btVector3* bvhAabbMin, const btVector3* bvhAabbMax, btScalar quantizationMargin); + EXPORT void btQuantizedBvh_setTraversalMode(btQuantizedBvh* obj, btQuantizedBvh_btTraversalMode traversalMode); + EXPORT void btQuantizedBvh_unQuantize(btQuantizedBvh* obj, const unsigned short* vecIn, btVector3* value); + EXPORT void btQuantizedBvh_delete(btQuantizedBvh* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.cpp new file mode 100644 index 0000000..8e485c3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.cpp @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btRaycastVehicle_wrap.h" + +#ifndef BULLETC_DISABLE_IACTION_CLASSES + +#include "conversion.h" + +btRaycastVehicle_btVehicleTuning* btRaycastVehicle_btVehicleTuning_new() +{ + return new btRaycastVehicle::btVehicleTuning(); +} + +btScalar btRaycastVehicle_btVehicleTuning_getFrictionSlip(btRaycastVehicle_btVehicleTuning* obj) +{ + return obj->m_frictionSlip; +} + +btScalar btRaycastVehicle_btVehicleTuning_getMaxSuspensionForce(btRaycastVehicle_btVehicleTuning* obj) +{ + return obj->m_maxSuspensionForce; +} + +btScalar btRaycastVehicle_btVehicleTuning_getMaxSuspensionTravelCm(btRaycastVehicle_btVehicleTuning* obj) +{ + return obj->m_maxSuspensionTravelCm; +} + +btScalar btRaycastVehicle_btVehicleTuning_getSuspensionCompression(btRaycastVehicle_btVehicleTuning* obj) +{ + return obj->m_suspensionCompression; +} + +btScalar btRaycastVehicle_btVehicleTuning_getSuspensionDamping(btRaycastVehicle_btVehicleTuning* obj) +{ + return obj->m_suspensionDamping; +} + +btScalar btRaycastVehicle_btVehicleTuning_getSuspensionStiffness(btRaycastVehicle_btVehicleTuning* obj) +{ + return obj->m_suspensionStiffness; +} + +void btRaycastVehicle_btVehicleTuning_setFrictionSlip(btRaycastVehicle_btVehicleTuning* obj, + btScalar value) +{ + obj->m_frictionSlip = value; +} + +void btRaycastVehicle_btVehicleTuning_setMaxSuspensionForce(btRaycastVehicle_btVehicleTuning* obj, + btScalar value) +{ + obj->m_maxSuspensionForce = value; +} + +void btRaycastVehicle_btVehicleTuning_setMaxSuspensionTravelCm(btRaycastVehicle_btVehicleTuning* obj, + btScalar value) +{ + obj->m_maxSuspensionTravelCm = value; +} + +void btRaycastVehicle_btVehicleTuning_setSuspensionCompression(btRaycastVehicle_btVehicleTuning* obj, + btScalar value) +{ + obj->m_suspensionCompression = value; +} + +void btRaycastVehicle_btVehicleTuning_setSuspensionDamping(btRaycastVehicle_btVehicleTuning* obj, + btScalar value) +{ + obj->m_suspensionDamping = value; +} + +void btRaycastVehicle_btVehicleTuning_setSuspensionStiffness(btRaycastVehicle_btVehicleTuning* obj, + btScalar value) +{ + obj->m_suspensionStiffness = value; +} + +void btRaycastVehicle_btVehicleTuning_delete(btRaycastVehicle_btVehicleTuning* obj) +{ + delete obj; +} + + +btRaycastVehicle* btRaycastVehicle_new(const btRaycastVehicle_btVehicleTuning* tuning, + btRigidBody* chassis, btVehicleRaycaster* raycaster) +{ + return new btRaycastVehicle(*tuning, chassis, raycaster); +} + +btWheelInfo* btRaycastVehicle_addWheel(btRaycastVehicle* obj, const btVector3* connectionPointCS0, + const btVector3* wheelDirectionCS0, const btVector3* wheelAxleCS, btScalar suspensionRestLength, + btScalar wheelRadius, const btRaycastVehicle_btVehicleTuning* tuning, bool isFrontWheel) +{ + BTVECTOR3_IN(connectionPointCS0); + BTVECTOR3_IN(wheelDirectionCS0); + BTVECTOR3_IN(wheelAxleCS); + return &obj->addWheel(BTVECTOR3_USE(connectionPointCS0), BTVECTOR3_USE(wheelDirectionCS0), + BTVECTOR3_USE(wheelAxleCS), suspensionRestLength, wheelRadius, *tuning, isFrontWheel); +} + +void btRaycastVehicle_applyEngineForce(btRaycastVehicle* obj, btScalar force, int wheel) +{ + obj->applyEngineForce(force, wheel); +} + +void btRaycastVehicle_getChassisWorldTransform(btRaycastVehicle* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getChassisWorldTransform()); +} + +btScalar btRaycastVehicle_getCurrentSpeedKmHour(btRaycastVehicle* obj) +{ + return obj->getCurrentSpeedKmHour(); +} + +int btRaycastVehicle_getForwardAxis(btRaycastVehicle* obj) +{ + return obj->getForwardAxis(); +} + +void btRaycastVehicle_getForwardVector(btRaycastVehicle* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->getForwardVector()); +} + +int btRaycastVehicle_getNumWheels(btRaycastVehicle* obj) +{ + return obj->getNumWheels(); +} + +int btRaycastVehicle_getRightAxis(btRaycastVehicle* obj) +{ + return obj->getRightAxis(); +} + +btRigidBody* btRaycastVehicle_getRigidBody(btRaycastVehicle* obj) +{ + return obj->getRigidBody(); +} + +btScalar btRaycastVehicle_getSteeringValue(btRaycastVehicle* obj, int wheel) +{ + return obj->getSteeringValue(wheel); +} + +int btRaycastVehicle_getUpAxis(btRaycastVehicle* obj) +{ + return obj->getUpAxis(); +} + +int btRaycastVehicle_getUserConstraintId(btRaycastVehicle* obj) +{ + return obj->getUserConstraintId(); +} + +int btRaycastVehicle_getUserConstraintType(btRaycastVehicle* obj) +{ + return obj->getUserConstraintType(); +} + +btWheelInfo* btRaycastVehicle_getWheelInfo(btRaycastVehicle* obj, int index) +{ + return &obj->getWheelInfo(index); +} + +btAlignedObjectArray_btWheelInfo* btRaycastVehicle_getWheelInfo2(btRaycastVehicle* obj) +{ + return &obj->m_wheelInfo; +} + +void btRaycastVehicle_getWheelTransformWS(btRaycastVehicle* obj, int wheelIndex, + btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getWheelTransformWS(wheelIndex)); +} + +btScalar btRaycastVehicle_rayCast(btRaycastVehicle* obj, btWheelInfo* wheel) +{ + return obj->rayCast(*wheel); +} + +void btRaycastVehicle_resetSuspension(btRaycastVehicle* obj) +{ + obj->resetSuspension(); +} + +void btRaycastVehicle_setBrake(btRaycastVehicle* obj, btScalar brake, int wheelIndex) +{ + obj->setBrake(brake, wheelIndex); +} + +void btRaycastVehicle_setCoordinateSystem(btRaycastVehicle* obj, int rightIndex, + int upIndex, int forwardIndex) +{ + obj->setCoordinateSystem(rightIndex, upIndex, forwardIndex); +} + +void btRaycastVehicle_setPitchControl(btRaycastVehicle* obj, btScalar pitch) +{ + obj->setPitchControl(pitch); +} + +void btRaycastVehicle_setSteeringValue(btRaycastVehicle* obj, btScalar steering, + int wheel) +{ + obj->setSteeringValue(steering, wheel); +} + +void btRaycastVehicle_setUserConstraintId(btRaycastVehicle* obj, int uid) +{ + obj->setUserConstraintId(uid); +} + +void btRaycastVehicle_setUserConstraintType(btRaycastVehicle* obj, int userConstraintType) +{ + obj->setUserConstraintType(userConstraintType); +} + +void btRaycastVehicle_updateFriction(btRaycastVehicle* obj, btScalar timeStep) +{ + obj->updateFriction(timeStep); +} + +void btRaycastVehicle_updateSuspension(btRaycastVehicle* obj, btScalar deltaTime) +{ + obj->updateSuspension(deltaTime); +} + +void btRaycastVehicle_updateVehicle(btRaycastVehicle* obj, btScalar step) +{ + obj->updateVehicle(step); +} + +void btRaycastVehicle_updateWheelTransform(btRaycastVehicle* obj, int wheelIndex) +{ + obj->updateWheelTransform(wheelIndex); +} + +void btRaycastVehicle_updateWheelTransform2(btRaycastVehicle* obj, int wheelIndex, + bool interpolatedTransform) +{ + obj->updateWheelTransform(wheelIndex, interpolatedTransform); +} + +void btRaycastVehicle_updateWheelTransformsWS(btRaycastVehicle* obj, btWheelInfo* wheel) +{ + obj->updateWheelTransformsWS(*wheel); +} + +void btRaycastVehicle_updateWheelTransformsWS2(btRaycastVehicle* obj, btWheelInfo* wheel, + bool interpolatedTransform) +{ + obj->updateWheelTransformsWS(*wheel, interpolatedTransform); +} + + +btDefaultVehicleRaycaster* btDefaultVehicleRaycaster_new(btDynamicsWorld* world) +{ + return new btDefaultVehicleRaycaster(world); +} + +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.h new file mode 100644 index 0000000..be11042 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btRaycastVehicle_wrap.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btRaycastVehicle_btVehicleTuning* btRaycastVehicle_btVehicleTuning_new(); + EXPORT btScalar btRaycastVehicle_btVehicleTuning_getFrictionSlip(btRaycastVehicle_btVehicleTuning* obj); + EXPORT btScalar btRaycastVehicle_btVehicleTuning_getMaxSuspensionForce(btRaycastVehicle_btVehicleTuning* obj); + EXPORT btScalar btRaycastVehicle_btVehicleTuning_getMaxSuspensionTravelCm(btRaycastVehicle_btVehicleTuning* obj); + EXPORT btScalar btRaycastVehicle_btVehicleTuning_getSuspensionCompression(btRaycastVehicle_btVehicleTuning* obj); + EXPORT btScalar btRaycastVehicle_btVehicleTuning_getSuspensionDamping(btRaycastVehicle_btVehicleTuning* obj); + EXPORT btScalar btRaycastVehicle_btVehicleTuning_getSuspensionStiffness(btRaycastVehicle_btVehicleTuning* obj); + EXPORT void btRaycastVehicle_btVehicleTuning_setFrictionSlip(btRaycastVehicle_btVehicleTuning* obj, btScalar value); + EXPORT void btRaycastVehicle_btVehicleTuning_setMaxSuspensionForce(btRaycastVehicle_btVehicleTuning* obj, btScalar value); + EXPORT void btRaycastVehicle_btVehicleTuning_setMaxSuspensionTravelCm(btRaycastVehicle_btVehicleTuning* obj, btScalar value); + EXPORT void btRaycastVehicle_btVehicleTuning_setSuspensionCompression(btRaycastVehicle_btVehicleTuning* obj, btScalar value); + EXPORT void btRaycastVehicle_btVehicleTuning_setSuspensionDamping(btRaycastVehicle_btVehicleTuning* obj, btScalar value); + EXPORT void btRaycastVehicle_btVehicleTuning_setSuspensionStiffness(btRaycastVehicle_btVehicleTuning* obj, btScalar value); + EXPORT void btRaycastVehicle_btVehicleTuning_delete(btRaycastVehicle_btVehicleTuning* obj); + + EXPORT btRaycastVehicle* btRaycastVehicle_new(const btRaycastVehicle_btVehicleTuning* tuning, btRigidBody* chassis, btVehicleRaycaster* raycaster); + EXPORT btWheelInfo* btRaycastVehicle_addWheel(btRaycastVehicle* obj, const btVector3* connectionPointCS0, const btVector3* wheelDirectionCS0, const btVector3* wheelAxleCS, btScalar suspensionRestLength, btScalar wheelRadius, const btRaycastVehicle_btVehicleTuning* tuning, bool isFrontWheel); + EXPORT void btRaycastVehicle_applyEngineForce(btRaycastVehicle* obj, btScalar force, int wheel); + EXPORT void btRaycastVehicle_getChassisWorldTransform(btRaycastVehicle* obj, btTransform* value); + EXPORT btScalar btRaycastVehicle_getCurrentSpeedKmHour(btRaycastVehicle* obj); + EXPORT int btRaycastVehicle_getForwardAxis(btRaycastVehicle* obj); + EXPORT void btRaycastVehicle_getForwardVector(btRaycastVehicle* obj, btVector3* value); + EXPORT int btRaycastVehicle_getNumWheels(btRaycastVehicle* obj); + EXPORT int btRaycastVehicle_getRightAxis(btRaycastVehicle* obj); + EXPORT btRigidBody* btRaycastVehicle_getRigidBody(btRaycastVehicle* obj); + EXPORT btScalar btRaycastVehicle_getSteeringValue(btRaycastVehicle* obj, int wheel); + EXPORT int btRaycastVehicle_getUpAxis(btRaycastVehicle* obj); + EXPORT int btRaycastVehicle_getUserConstraintId(btRaycastVehicle* obj); + EXPORT int btRaycastVehicle_getUserConstraintType(btRaycastVehicle* obj); + EXPORT btWheelInfo* btRaycastVehicle_getWheelInfo(btRaycastVehicle* obj, int index); + EXPORT btAlignedObjectArray_btWheelInfo* btRaycastVehicle_getWheelInfo2(btRaycastVehicle* obj); + EXPORT void btRaycastVehicle_getWheelTransformWS(btRaycastVehicle* obj, int wheelIndex, btTransform* value); + EXPORT btScalar btRaycastVehicle_rayCast(btRaycastVehicle* obj, btWheelInfo* wheel); + EXPORT void btRaycastVehicle_resetSuspension(btRaycastVehicle* obj); + EXPORT void btRaycastVehicle_setBrake(btRaycastVehicle* obj, btScalar brake, int wheelIndex); + EXPORT void btRaycastVehicle_setCoordinateSystem(btRaycastVehicle* obj, int rightIndex, int upIndex, int forwardIndex); + EXPORT void btRaycastVehicle_setPitchControl(btRaycastVehicle* obj, btScalar pitch); + EXPORT void btRaycastVehicle_setSteeringValue(btRaycastVehicle* obj, btScalar steering, int wheel); + EXPORT void btRaycastVehicle_setUserConstraintId(btRaycastVehicle* obj, int uid); + EXPORT void btRaycastVehicle_setUserConstraintType(btRaycastVehicle* obj, int userConstraintType); + EXPORT void btRaycastVehicle_updateFriction(btRaycastVehicle* obj, btScalar timeStep); + EXPORT void btRaycastVehicle_updateSuspension(btRaycastVehicle* obj, btScalar deltaTime); + EXPORT void btRaycastVehicle_updateVehicle(btRaycastVehicle* obj, btScalar step); + EXPORT void btRaycastVehicle_updateWheelTransform(btRaycastVehicle* obj, int wheelIndex); + EXPORT void btRaycastVehicle_updateWheelTransform2(btRaycastVehicle* obj, int wheelIndex, bool interpolatedTransform); + EXPORT void btRaycastVehicle_updateWheelTransformsWS(btRaycastVehicle* obj, btWheelInfo* wheel); + EXPORT void btRaycastVehicle_updateWheelTransformsWS2(btRaycastVehicle* obj, btWheelInfo* wheel, bool interpolatedTransform); + + EXPORT btDefaultVehicleRaycaster* btDefaultVehicleRaycaster_new(btDynamicsWorld* world); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.cpp new file mode 100644 index 0000000..b76392b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.cpp @@ -0,0 +1,631 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "conversion.h" +#include "btRigidBody_wrap.h" + +btRigidBody_btRigidBodyConstructionInfo* btRigidBody_btRigidBodyConstructionInfo_new( + btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape) +{ + return ALIGNED_NEW(btRigidBody::btRigidBodyConstructionInfo)(mass, motionState, collisionShape); +} + +btRigidBody_btRigidBodyConstructionInfo* btRigidBody_btRigidBodyConstructionInfo_new2( + btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3* localInertia) +{ + BTVECTOR3_IN(localInertia); + return ALIGNED_NEW(btRigidBody::btRigidBodyConstructionInfo)(mass, motionState, collisionShape, + BTVECTOR3_USE(localInertia)); +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalAngularDampingFactor( + btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_additionalAngularDampingFactor; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalAngularDampingThresholdSqr( + btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_additionalAngularDampingThresholdSqr; +} + +bool btRigidBody_btRigidBodyConstructionInfo_getAdditionalDamping(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_additionalDamping; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_additionalDampingFactor; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalLinearDampingThresholdSqr( + btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_additionalLinearDampingThresholdSqr; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getAngularDamping(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_angularDamping; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getAngularSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_angularSleepingThreshold; +} + +btCollisionShape* btRigidBody_btRigidBodyConstructionInfo_getCollisionShape(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_collisionShape; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getFriction(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_friction; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getLinearDamping(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_linearDamping; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getLinearSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_linearSleepingThreshold; +} + +void btRigidBody_btRigidBodyConstructionInfo_getLocalInertia(btRigidBody_btRigidBodyConstructionInfo* obj, + btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->m_localInertia); +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getMass(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_mass; +} + +btMotionState* btRigidBody_btRigidBodyConstructionInfo_getMotionState(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_motionState; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getRestitution(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_restitution; +} + +btScalar btRigidBody_btRigidBodyConstructionInfo_getRollingFriction(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + return obj->m_rollingFriction; +} + +void btRigidBody_btRigidBodyConstructionInfo_getStartWorldTransform(btRigidBody_btRigidBodyConstructionInfo* obj, + btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_startWorldTransform); +} + +void btRigidBody_btRigidBodyConstructionInfo_setAdditionalAngularDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_additionalAngularDampingFactor = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setAdditionalAngularDampingThresholdSqr( + btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value) +{ + obj->m_additionalAngularDampingThresholdSqr = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setAdditionalDamping(btRigidBody_btRigidBodyConstructionInfo* obj, + bool value) +{ + obj->m_additionalDamping = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setAdditionalDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_additionalDampingFactor = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setAdditionalLinearDampingThresholdSqr( + btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value) +{ + obj->m_additionalLinearDampingThresholdSqr = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setAngularDamping(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_angularDamping = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setAngularSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_angularSleepingThreshold = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setCollisionShape(btRigidBody_btRigidBodyConstructionInfo* obj, + btCollisionShape* value) +{ + obj->m_collisionShape = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setFriction(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_friction = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setLinearDamping(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_linearDamping = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setLinearSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_linearSleepingThreshold = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setLocalInertia(btRigidBody_btRigidBodyConstructionInfo* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_localInertia, value); +} + +void btRigidBody_btRigidBodyConstructionInfo_setMass(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_mass = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setMotionState(btRigidBody_btRigidBodyConstructionInfo* obj, + btMotionState* value) +{ + obj->m_motionState = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setRestitution(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_restitution = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setRollingFriction(btRigidBody_btRigidBodyConstructionInfo* obj, + btScalar value) +{ + obj->m_rollingFriction = value; +} + +void btRigidBody_btRigidBodyConstructionInfo_setStartWorldTransform(btRigidBody_btRigidBodyConstructionInfo* obj, + const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_startWorldTransform, value); +} + +void btRigidBody_btRigidBodyConstructionInfo_delete(btRigidBody_btRigidBodyConstructionInfo* obj) +{ + ALIGNED_FREE(obj); +} + + +btRigidBody* btRigidBody_new(const btRigidBody_btRigidBodyConstructionInfo* constructionInfo) +{ + return new btRigidBody(*constructionInfo); +} + +void btRigidBody_addConstraintRef(btRigidBody* obj, btTypedConstraint* c) +{ + obj->addConstraintRef(c); +} + +void btRigidBody_applyCentralForce(btRigidBody* obj, const btVector3* force) +{ + BTVECTOR3_IN(force); + obj->applyCentralForce(BTVECTOR3_USE(force)); +} + +void btRigidBody_applyCentralImpulse(btRigidBody* obj, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + obj->applyCentralImpulse(BTVECTOR3_USE(impulse)); +} + +void btRigidBody_applyDamping(btRigidBody* obj, btScalar timeStep) +{ + obj->applyDamping(timeStep); +} + +void btRigidBody_applyForce(btRigidBody* obj, const btVector3* force, const btVector3* rel_pos) +{ + BTVECTOR3_IN(force); + BTVECTOR3_IN(rel_pos); + obj->applyForce(BTVECTOR3_USE(force), BTVECTOR3_USE(rel_pos)); +} + +void btRigidBody_applyGravity(btRigidBody* obj) +{ + obj->applyGravity(); +} + +void btRigidBody_applyImpulse(btRigidBody* obj, const btVector3* impulse, const btVector3* rel_pos) +{ + BTVECTOR3_IN(impulse); + BTVECTOR3_IN(rel_pos); + obj->applyImpulse(BTVECTOR3_USE(impulse), BTVECTOR3_USE(rel_pos)); +} + +void btRigidBody_applyTorque(btRigidBody* obj, const btVector3* torque) +{ + BTVECTOR3_IN(torque); + obj->applyTorque(BTVECTOR3_USE(torque)); +} + +void btRigidBody_applyTorqueImpulse(btRigidBody* obj, const btVector3* torque) +{ + BTVECTOR3_IN(torque); + obj->applyTorqueImpulse(BTVECTOR3_USE(torque)); +} + +void btRigidBody_clearForces(btRigidBody* obj) +{ + obj->clearForces(); +} + +void btRigidBody_clearGravity(btRigidBody* obj) +{ + obj->clearGravity(); +} + +btScalar btRigidBody_computeAngularImpulseDenominator(btRigidBody* obj, const btVector3* axis) +{ + BTVECTOR3_IN(axis); + return obj->computeAngularImpulseDenominator(BTVECTOR3_USE(axis)); +} + +void btRigidBody_computeGyroscopicForceExplicit(btRigidBody* obj, btScalar maxGyroscopicForce, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->computeGyroscopicForceExplicit(maxGyroscopicForce); + BTVECTOR3_SET(value, temp); +} + +void btRigidBody_computeGyroscopicImpulseImplicit_Body(btRigidBody* obj, btScalar step, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->computeGyroscopicImpulseImplicit_Body(step); + BTVECTOR3_SET(value, temp); +} + +void btRigidBody_computeGyroscopicImpulseImplicit_World(btRigidBody* obj, btScalar dt, + btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->computeGyroscopicImpulseImplicit_World(dt); + BTVECTOR3_SET(value, temp); +} + +btScalar btRigidBody_computeImpulseDenominator(btRigidBody* obj, const btVector3* pos, + const btVector3* normal) +{ + BTVECTOR3_IN(pos); + BTVECTOR3_IN(normal); + return obj->computeImpulseDenominator(BTVECTOR3_USE(pos), BTVECTOR3_USE(normal)); +} + +void btRigidBody_getAabb(btRigidBody* obj, btVector3* aabbMin, btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getAabb(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +btScalar btRigidBody_getAngularDamping(btRigidBody* obj) +{ + return obj->getAngularDamping(); +} + +void btRigidBody_getAngularFactor(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAngularFactor()); +} + +btScalar btRigidBody_getAngularSleepingThreshold(btRigidBody* obj) +{ + return obj->getAngularSleepingThreshold(); +} + +void btRigidBody_getAngularVelocity(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAngularVelocity()); +} + +btBroadphaseProxy* btRigidBody_getBroadphaseProxy(btRigidBody* obj) +{ + return obj->getBroadphaseProxy(); +} + +void btRigidBody_getCenterOfMassPosition(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getCenterOfMassPosition()); +} + +void btRigidBody_getCenterOfMassTransform(btRigidBody* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCenterOfMassTransform()); +} + +btTypedConstraint* btRigidBody_getConstraintRef(btRigidBody* obj, int index) +{ + return obj->getConstraintRef(index); +} + +int btRigidBody_getContactSolverType(btRigidBody* obj) +{ + return obj->m_contactSolverType; +} + +int btRigidBody_getFlags(btRigidBody* obj) +{ + return obj->getFlags(); +} + +int btRigidBody_getFrictionSolverType(btRigidBody* obj) +{ + return obj->m_frictionSolverType; +} + +void btRigidBody_getGravity(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getGravity()); +} + +void btRigidBody_getInvInertiaDiagLocal(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getInvInertiaDiagLocal()); +} + +void btRigidBody_getInvInertiaTensorWorld(btRigidBody* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->getInvInertiaTensorWorld()); +} + +btScalar btRigidBody_getInvMass(btRigidBody* obj) +{ + return obj->getInvMass(); +} + +btScalar btRigidBody_getLinearDamping(btRigidBody* obj) +{ + return obj->getLinearDamping(); +} + +void btRigidBody_getLinearFactor(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLinearFactor()); +} + +btScalar btRigidBody_getLinearSleepingThreshold(btRigidBody* obj) +{ + return obj->getLinearSleepingThreshold(); +} + +void btRigidBody_getLinearVelocity(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLinearVelocity()); +} + +void btRigidBody_getLocalInertia(btRigidBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getLocalInertia(); + BTVECTOR3_SET(value, temp); +} + +btScalar btRigidBody_getMass(btRigidBody* obj) +{ + return obj->getMass(); +} + +btMotionState* btRigidBody_getMotionState(btRigidBody* obj) +{ + return obj->getMotionState(); +} + +int btRigidBody_getNumConstraintRefs(btRigidBody* obj) +{ + return obj->getNumConstraintRefs(); +} + +void btRigidBody_getOrientation(btRigidBody* obj, btQuaternion* value) +{ + ATTRIBUTE_ALIGNED16(btQuaternion) temp = obj->getOrientation(); + BTQUATERNION_SET(value, temp); +} + +void btRigidBody_getTotalForce(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getTotalForce()); +} + +void btRigidBody_getTotalTorque(btRigidBody* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getTotalTorque()); +} + +void btRigidBody_getVelocityInLocalPoint(btRigidBody* obj, const btVector3* rel_pos, + btVector3* value) +{ + BTVECTOR3_IN(rel_pos); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getVelocityInLocalPoint(BTVECTOR3_USE(rel_pos)); + BTVECTOR3_SET(value, temp); +} + +void btRigidBody_integrateVelocities(btRigidBody* obj, btScalar step) +{ + obj->integrateVelocities(step); +} + +bool btRigidBody_isInWorld(btRigidBody* obj) +{ + return obj->isInWorld(); +} + +void btRigidBody_predictIntegratedTransform(btRigidBody* obj, btScalar step, btTransform* predictedTransform) +{ + BTTRANSFORM_DEF(predictedTransform); + obj->predictIntegratedTransform(step, BTTRANSFORM_USE(predictedTransform)); + BTTRANSFORM_DEF_OUT(predictedTransform); +} + +void btRigidBody_proceedToTransform(btRigidBody* obj, const btTransform* newTrans) +{ + BTTRANSFORM_IN(newTrans); + obj->proceedToTransform(BTTRANSFORM_USE(newTrans)); +} + +void btRigidBody_removeConstraintRef(btRigidBody* obj, btTypedConstraint* c) +{ + obj->removeConstraintRef(c); +} + +void btRigidBody_saveKinematicState(btRigidBody* obj, btScalar step) +{ + obj->saveKinematicState(step); +} + +void btRigidBody_setAngularFactor(btRigidBody* obj, const btVector3* angFac) +{ + BTVECTOR3_IN(angFac); + obj->setAngularFactor(BTVECTOR3_USE(angFac)); +} + +void btRigidBody_setAngularFactor2(btRigidBody* obj, btScalar angFac) +{ + obj->setAngularFactor(angFac); +} + +void btRigidBody_setAngularVelocity(btRigidBody* obj, const btVector3* ang_vel) +{ + BTVECTOR3_IN(ang_vel); + obj->setAngularVelocity(BTVECTOR3_USE(ang_vel)); +} + +void btRigidBody_setCenterOfMassTransform(btRigidBody* obj, const btTransform* xform) +{ + BTTRANSFORM_IN(xform); + obj->setCenterOfMassTransform(BTTRANSFORM_USE(xform)); +} + +void btRigidBody_setContactSolverType(btRigidBody* obj, int value) +{ + obj->m_contactSolverType = value; +} + +void btRigidBody_setDamping(btRigidBody* obj, btScalar lin_damping, btScalar ang_damping) +{ + obj->setDamping(lin_damping, ang_damping); +} + +void btRigidBody_setFlags(btRigidBody* obj, int flags) +{ + obj->setFlags(flags); +} + +void btRigidBody_setFrictionSolverType(btRigidBody* obj, int value) +{ + obj->m_frictionSolverType = value; +} + +void btRigidBody_setGravity(btRigidBody* obj, const btVector3* acceleration) +{ + BTVECTOR3_IN(acceleration); + obj->setGravity(BTVECTOR3_USE(acceleration)); +} + +void btRigidBody_setInvInertiaDiagLocal(btRigidBody* obj, const btVector3* diagInvInertia) +{ + BTVECTOR3_IN(diagInvInertia); + obj->setInvInertiaDiagLocal(BTVECTOR3_USE(diagInvInertia)); +} + +void btRigidBody_setLinearFactor(btRigidBody* obj, const btVector3* linearFactor) +{ + BTVECTOR3_IN(linearFactor); + obj->setLinearFactor(BTVECTOR3_USE(linearFactor)); +} + +void btRigidBody_setLinearVelocity(btRigidBody* obj, const btVector3* lin_vel) +{ + BTVECTOR3_IN(lin_vel); + obj->setLinearVelocity(BTVECTOR3_USE(lin_vel)); +} + +void btRigidBody_setMassProps(btRigidBody* obj, btScalar mass, const btVector3* inertia) +{ + BTVECTOR3_IN(inertia); + obj->setMassProps(mass, BTVECTOR3_USE(inertia)); +} + +void btRigidBody_setMotionState(btRigidBody* obj, btMotionState* motionState) +{ + obj->setMotionState(motionState); +} + +void btRigidBody_setNewBroadphaseProxy(btRigidBody* obj, btBroadphaseProxy* broadphaseProxy) +{ + obj->setNewBroadphaseProxy(broadphaseProxy); +} + +void btRigidBody_setSleepingThresholds(btRigidBody* obj, btScalar linear, btScalar angular) +{ + obj->setSleepingThresholds(linear, angular); +} + +void btRigidBody_translate(btRigidBody* obj, const btVector3* v) +{ + BTVECTOR3_IN(v); + obj->translate(BTVECTOR3_USE(v)); +} + +btRigidBody* btRigidBody_upcast(btCollisionObject* colObj) +{ + return btRigidBody::upcast(colObj); +} + +void btRigidBody_updateDeactivation(btRigidBody* obj, btScalar timeStep) +{ + obj->updateDeactivation(timeStep); +} + +void btRigidBody_updateInertiaTensor(btRigidBody* obj) +{ + obj->updateInertiaTensor(); +} + +bool btRigidBody_wantsSleeping(btRigidBody* obj) +{ + return obj->wantsSleeping(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.h new file mode 100644 index 0000000..b02a33b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btRigidBody_wrap.h @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btRigidBody_btRigidBodyConstructionInfo* btRigidBody_btRigidBodyConstructionInfo_new(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape); + EXPORT btRigidBody_btRigidBodyConstructionInfo* btRigidBody_btRigidBodyConstructionInfo_new2(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3* localInertia); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalAngularDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalAngularDampingThresholdSqr(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT bool btRigidBody_btRigidBodyConstructionInfo_getAdditionalDamping(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getAdditionalLinearDampingThresholdSqr(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getAngularDamping(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getAngularSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btCollisionShape* btRigidBody_btRigidBodyConstructionInfo_getCollisionShape(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getFriction(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getLinearDamping(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getLinearSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_getLocalInertia(btRigidBody_btRigidBodyConstructionInfo* obj, btVector3* value); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getMass(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btMotionState* btRigidBody_btRigidBodyConstructionInfo_getMotionState(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getRestitution(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT btScalar btRigidBody_btRigidBodyConstructionInfo_getRollingFriction(btRigidBody_btRigidBodyConstructionInfo* obj); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_getStartWorldTransform(btRigidBody_btRigidBodyConstructionInfo* obj, btTransform* value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAdditionalAngularDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAdditionalAngularDampingThresholdSqr(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAdditionalDamping(btRigidBody_btRigidBodyConstructionInfo* obj, bool value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAdditionalDampingFactor(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAdditionalLinearDampingThresholdSqr(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAngularDamping(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setAngularSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setCollisionShape(btRigidBody_btRigidBodyConstructionInfo* obj, btCollisionShape* value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setFriction(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setLinearDamping(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setLinearSleepingThreshold(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setLocalInertia(btRigidBody_btRigidBodyConstructionInfo* obj, const btVector3* value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setMass(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setMotionState(btRigidBody_btRigidBodyConstructionInfo* obj, btMotionState* value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setRestitution(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setRollingFriction(btRigidBody_btRigidBodyConstructionInfo* obj, btScalar value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_setStartWorldTransform(btRigidBody_btRigidBodyConstructionInfo* obj, const btTransform* value); + EXPORT void btRigidBody_btRigidBodyConstructionInfo_delete(btRigidBody_btRigidBodyConstructionInfo* obj); + + EXPORT btRigidBody* btRigidBody_new(const btRigidBody_btRigidBodyConstructionInfo* constructionInfo); + EXPORT void btRigidBody_addConstraintRef(btRigidBody* obj, btTypedConstraint* c); + EXPORT void btRigidBody_applyCentralForce(btRigidBody* obj, const btVector3* force); + EXPORT void btRigidBody_applyCentralImpulse(btRigidBody* obj, const btVector3* impulse); + EXPORT void btRigidBody_applyDamping(btRigidBody* obj, btScalar timeStep); + EXPORT void btRigidBody_applyForce(btRigidBody* obj, const btVector3* force, const btVector3* rel_pos); + EXPORT void btRigidBody_applyGravity(btRigidBody* obj); + EXPORT void btRigidBody_applyImpulse(btRigidBody* obj, const btVector3* impulse, const btVector3* rel_pos); + EXPORT void btRigidBody_applyTorque(btRigidBody* obj, const btVector3* torque); + EXPORT void btRigidBody_applyTorqueImpulse(btRigidBody* obj, const btVector3* torque); + EXPORT void btRigidBody_clearForces(btRigidBody* obj); + EXPORT void btRigidBody_clearGravity(btRigidBody* obj); + EXPORT btScalar btRigidBody_computeAngularImpulseDenominator(btRigidBody* obj, const btVector3* axis); + EXPORT void btRigidBody_computeGyroscopicForceExplicit(btRigidBody* obj, btScalar maxGyroscopicForce, btVector3* value); + EXPORT void btRigidBody_computeGyroscopicImpulseImplicit_Body(btRigidBody* obj, btScalar step, btVector3* value); + EXPORT void btRigidBody_computeGyroscopicImpulseImplicit_World(btRigidBody* obj, btScalar dt, btVector3* value); + EXPORT btScalar btRigidBody_computeImpulseDenominator(btRigidBody* obj, const btVector3* pos, const btVector3* normal); + EXPORT void btRigidBody_getAabb(btRigidBody* obj, btVector3* aabbMin, btVector3* aabbMax); + EXPORT btScalar btRigidBody_getAngularDamping(btRigidBody* obj); + EXPORT void btRigidBody_getAngularFactor(btRigidBody* obj, btVector3* value); + EXPORT btScalar btRigidBody_getAngularSleepingThreshold(btRigidBody* obj); + EXPORT void btRigidBody_getAngularVelocity(btRigidBody* obj, btVector3* value); + EXPORT btBroadphaseProxy* btRigidBody_getBroadphaseProxy(btRigidBody* obj); + EXPORT void btRigidBody_getCenterOfMassPosition(btRigidBody* obj, btVector3* value); + EXPORT void btRigidBody_getCenterOfMassTransform(btRigidBody* obj, btTransform* value); + EXPORT btTypedConstraint* btRigidBody_getConstraintRef(btRigidBody* obj, int index); + EXPORT int btRigidBody_getContactSolverType(btRigidBody* obj); + EXPORT int btRigidBody_getFlags(btRigidBody* obj); + EXPORT int btRigidBody_getFrictionSolverType(btRigidBody* obj); + EXPORT void btRigidBody_getGravity(btRigidBody* obj, btVector3* value); + EXPORT void btRigidBody_getInvInertiaDiagLocal(btRigidBody* obj, btVector3* value); + EXPORT void btRigidBody_getInvInertiaTensorWorld(btRigidBody* obj, btMatrix3x3* value); + EXPORT btScalar btRigidBody_getInvMass(btRigidBody* obj); + EXPORT btScalar btRigidBody_getLinearDamping(btRigidBody* obj); + EXPORT void btRigidBody_getLinearFactor(btRigidBody* obj, btVector3* value); + EXPORT btScalar btRigidBody_getLinearSleepingThreshold(btRigidBody* obj); + EXPORT void btRigidBody_getLinearVelocity(btRigidBody* obj, btVector3* value); + EXPORT void btRigidBody_getLocalInertia(btRigidBody* obj, btVector3* value); + EXPORT btScalar btRigidBody_getMass(btRigidBody* obj); + EXPORT btMotionState* btRigidBody_getMotionState(btRigidBody* obj); + EXPORT int btRigidBody_getNumConstraintRefs(btRigidBody* obj); + EXPORT void btRigidBody_getOrientation(btRigidBody* obj, btQuaternion* value); + EXPORT void btRigidBody_getTotalForce(btRigidBody* obj, btVector3* value); + EXPORT void btRigidBody_getTotalTorque(btRigidBody* obj, btVector3* value); + EXPORT void btRigidBody_getVelocityInLocalPoint(btRigidBody* obj, const btVector3* rel_pos, btVector3* value); + EXPORT void btRigidBody_integrateVelocities(btRigidBody* obj, btScalar step); + EXPORT bool btRigidBody_isInWorld(btRigidBody* obj); + EXPORT void btRigidBody_predictIntegratedTransform(btRigidBody* obj, btScalar step, btTransform* predictedTransform); + EXPORT void btRigidBody_proceedToTransform(btRigidBody* obj, const btTransform* newTrans); + EXPORT void btRigidBody_removeConstraintRef(btRigidBody* obj, btTypedConstraint* c); + EXPORT void btRigidBody_saveKinematicState(btRigidBody* obj, btScalar step); + EXPORT void btRigidBody_setAngularFactor(btRigidBody* obj, const btVector3* angFac); + EXPORT void btRigidBody_setAngularFactor2(btRigidBody* obj, btScalar angFac); + EXPORT void btRigidBody_setAngularVelocity(btRigidBody* obj, const btVector3* ang_vel); + EXPORT void btRigidBody_setCenterOfMassTransform(btRigidBody* obj, const btTransform* xform); + EXPORT void btRigidBody_setContactSolverType(btRigidBody* obj, int value); + EXPORT void btRigidBody_setDamping(btRigidBody* obj, btScalar lin_damping, btScalar ang_damping); + EXPORT void btRigidBody_setFlags(btRigidBody* obj, int flags); + EXPORT void btRigidBody_setFrictionSolverType(btRigidBody* obj, int value); + EXPORT void btRigidBody_setGravity(btRigidBody* obj, const btVector3* acceleration); + EXPORT void btRigidBody_setInvInertiaDiagLocal(btRigidBody* obj, const btVector3* diagInvInertia); + EXPORT void btRigidBody_setLinearFactor(btRigidBody* obj, const btVector3* linearFactor); + EXPORT void btRigidBody_setLinearVelocity(btRigidBody* obj, const btVector3* lin_vel); + EXPORT void btRigidBody_setMassProps(btRigidBody* obj, btScalar mass, const btVector3* inertia); + EXPORT void btRigidBody_setMotionState(btRigidBody* obj, btMotionState* motionState); + EXPORT void btRigidBody_setNewBroadphaseProxy(btRigidBody* obj, btBroadphaseProxy* broadphaseProxy); + EXPORT void btRigidBody_setSleepingThresholds(btRigidBody* obj, btScalar linear, btScalar angular); + EXPORT void btRigidBody_translate(btRigidBody* obj, const btVector3* v); + EXPORT btRigidBody* btRigidBody_upcast(btCollisionObject* colObj); + EXPORT void btRigidBody_updateDeactivation(btRigidBody* obj, btScalar timeStep); + EXPORT void btRigidBody_updateInertiaTensor(btRigidBody* obj); + EXPORT bool btRigidBody_wantsSleeping(btRigidBody* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.cpp new file mode 100644 index 0000000..6c5c127 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btScaledBvhTriangleMeshShape_wrap.h" + +btScaledBvhTriangleMeshShape* btScaledBvhTriangleMeshShape_new(btBvhTriangleMeshShape* childShape, + const btVector3* localScaling) +{ + BTVECTOR3_IN(localScaling); + return new btScaledBvhTriangleMeshShape(childShape, BTVECTOR3_USE(localScaling)); +} + +btBvhTriangleMeshShape* btScaledBvhTriangleMeshShape_getChildShape(btScaledBvhTriangleMeshShape* obj) +{ + return obj->getChildShape(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.h new file mode 100644 index 0000000..432f18b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btScaledBvhTriangleMeshShape* btScaledBvhTriangleMeshShape_new(btBvhTriangleMeshShape* childShape, const btVector3* localScaling); + EXPORT btBvhTriangleMeshShape* btScaledBvhTriangleMeshShape_getChildShape(btScaledBvhTriangleMeshShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.cpp new file mode 100644 index 0000000..bde043d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSequentialImpulseConstraintSolverMt_wrap.h" + +btSequentialImpulseConstraintSolverMt* btSequentialImpulseConstraintSolverMt_new() +{ + return ALIGNED_NEW(btSequentialImpulseConstraintSolverMt) (); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.h new file mode 100644 index 0000000..bdbcf00 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSequentialImpulseConstraintSolverMt* btSequentialImpulseConstraintSolverMt_new(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.cpp new file mode 100644 index 0000000..1994d7c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSequentialImpulseConstraintSolver_wrap.h" + +btSequentialImpulseConstraintSolver* btSequentialImpulseConstraintSolver_new() +{ + return ALIGNED_NEW(btSequentialImpulseConstraintSolver) (); +} + +unsigned long btSequentialImpulseConstraintSolver_btRand2(btSequentialImpulseConstraintSolver* obj) +{ + return obj->btRand2(); +} + +int btSequentialImpulseConstraintSolver_btRandInt2(btSequentialImpulseConstraintSolver* obj, + int n) +{ + return obj->btRandInt2(n); +} + +unsigned long btSequentialImpulseConstraintSolver_getRandSeed(btSequentialImpulseConstraintSolver* obj) +{ + return obj->getRandSeed(); +} + +void btSequentialImpulseConstraintSolver_setRandSeed(btSequentialImpulseConstraintSolver* obj, + unsigned long seed) +{ + obj->setRandSeed(seed); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.h new file mode 100644 index 0000000..1ab1e23 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSequentialImpulseConstraintSolver* btSequentialImpulseConstraintSolver_new(); + EXPORT unsigned long btSequentialImpulseConstraintSolver_btRand2(btSequentialImpulseConstraintSolver* obj); + EXPORT int btSequentialImpulseConstraintSolver_btRandInt2(btSequentialImpulseConstraintSolver* obj, int n); + EXPORT unsigned long btSequentialImpulseConstraintSolver_getRandSeed(btSequentialImpulseConstraintSolver* obj); + EXPORT void btSequentialImpulseConstraintSolver_setRandSeed(btSequentialImpulseConstraintSolver* obj, unsigned long seed); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.cpp new file mode 100644 index 0000000..5c24196 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.cpp @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSerializer_wrap.h" + +btSerializerWrapper::btSerializerWrapper(p_btSerializer_allocate allocateCallback, + p_btSerializer_finalizeChunk finalizeChunkCallback, p_btSerializer_findNameForPointer findNameForPointerCallback, + p_btSerializer_findPointer findPointerCallback, p_btSerializer_finishSerialization finishSerializationCallback, + p_btSerializer_getBufferPointer getBufferPointerCallback, p_btSerializer_getChunk getChunkCallback, + p_btSerializer_getCurrentBufferSize getCurrentBufferSizeCallback, p_btSerializer_getNumChunks getNumChunksCallback, + p_btSerializer_getSerializationFlags getSerializationFlagsCallback, p_btSerializer_getUniquePointer getUniquePointerCallback, + p_btSerializer_registerNameForPointer registerNameForPointerCallback, p_btSerializer_serializeName serializeNameCallback, + p_btSerializer_setSerializationFlags setSerializationFlagsCallback, p_btSerializer_startSerialization startSerializationCallback) +{ + _allocateCallback = allocateCallback; + _finalizeChunkCallback = finalizeChunkCallback; + _findNameForPointerCallback = findNameForPointerCallback; + _findPointerCallback = findPointerCallback; + _finishSerializationCallback = finishSerializationCallback; + _getBufferPointerCallback = getBufferPointerCallback; + _getChunkCallback = getChunkCallback; + _getCurrentBufferSizeCallback = getCurrentBufferSizeCallback; + _getNumChunksCallback = getNumChunksCallback; + _getSerializationFlagsCallback = getSerializationFlagsCallback; + _getUniquePointerCallback = getUniquePointerCallback; + _registerNameForPointerCallback = registerNameForPointerCallback; + _serializeNameCallback = serializeNameCallback; + _setSerializationFlagsCallback = setSerializationFlagsCallback; + _startSerializationCallback = startSerializationCallback; +} + +btChunk* btSerializerWrapper::allocate(size_t size, int numElements) +{ + return _allocateCallback(size, numElements); +} + +void btSerializerWrapper::finalizeChunk(btChunk* chunk, const char* structType, int chunkCode, + void* oldPtr) +{ + _finalizeChunkCallback(chunk, structType, chunkCode, oldPtr); +} + +const char* btSerializerWrapper::findNameForPointer(const void* ptr) const +{ + return _findNameForPointerCallback(ptr); +} + +void* btSerializerWrapper::findPointer(void* oldPtr) +{ + return _findPointerCallback(oldPtr); +} + +void btSerializerWrapper::finishSerialization() +{ + _finishSerializationCallback(); +} + +const unsigned char* btSerializerWrapper::getBufferPointer() const +{ + return _getBufferPointerCallback(); +} + +btChunk* btSerializerWrapper::getChunk(int chunkIndex) const +{ + return _getChunkCallback(chunkIndex); +} + +int btSerializerWrapper::getCurrentBufferSize() const +{ + return _getCurrentBufferSizeCallback(); +} + +int btSerializerWrapper::getNumChunks() const +{ + return _getNumChunksCallback(); +} + +int btSerializerWrapper::getSerializationFlags() const +{ + return _getSerializationFlagsCallback(); +} + +void* btSerializerWrapper::getUniquePointer(void* oldPtr) +{ + return _getUniquePointerCallback(oldPtr); +} + +void btSerializerWrapper::registerNameForPointer(const void* ptr, const char* name) +{ + _registerNameForPointerCallback(ptr, name); +} + +void btSerializerWrapper::serializeName(const char* ptr) +{ + _serializeNameCallback(ptr); +} + +void btSerializerWrapper::setSerializationFlags(int flags) +{ + _setSerializationFlagsCallback(flags); +} + +void btSerializerWrapper::startSerialization() +{ + _startSerializationCallback(); +} + + +btChunk* btChunk_new() +{ + return new btChunk(); +} + +int btChunk_getChunkCode(btChunk* obj) +{ + return obj->m_chunkCode; +} + +int btChunk_getDna_nr(btChunk* obj) +{ + return obj->m_dna_nr; +} + +int btChunk_getLength(btChunk* obj) +{ + return obj->m_length; +} + +int btChunk_getNumber(btChunk* obj) +{ + return obj->m_number; +} + +void* btChunk_getOldPtr(btChunk* obj) +{ + return obj->m_oldPtr; +} + +void btChunk_setChunkCode(btChunk* obj, int value) +{ + obj->m_chunkCode = value; +} + +void btChunk_setDna_nr(btChunk* obj, int value) +{ + obj->m_dna_nr = value; +} + +void btChunk_setLength(btChunk* obj, int value) +{ + obj->m_length = value; +} + +void btChunk_setNumber(btChunk* obj, int value) +{ + obj->m_number = value; +} + +void btChunk_setOldPtr(btChunk* obj, void* value) +{ + obj->m_oldPtr = value; +} + +void btChunk_delete(btChunk* obj) +{ + delete obj; +} + + +btSerializerWrapper* btSerializerWrapper_new(p_btSerializer_allocate allocateCallback, + p_btSerializer_finalizeChunk finalizeChunkCallback, p_btSerializer_findNameForPointer findNameForPointerCallback, + p_btSerializer_findPointer findPointerCallback, p_btSerializer_finishSerialization finishSerializationCallback, + p_btSerializer_getBufferPointer getBufferPointerCallback, p_btSerializer_getChunk getChunkCallback, + p_btSerializer_getCurrentBufferSize getCurrentBufferSizeCallback, p_btSerializer_getNumChunks getNumChunksCallback, + p_btSerializer_getSerializationFlags getSerializationFlagsCallback, p_btSerializer_getUniquePointer getUniquePointerCallback, + p_btSerializer_registerNameForPointer registerNameForPointerCallback, p_btSerializer_serializeName serializeNameCallback, + p_btSerializer_setSerializationFlags setSerializationFlagsCallback, p_btSerializer_startSerialization startSerializationCallback) +{ + return new btSerializerWrapper(allocateCallback, finalizeChunkCallback, findNameForPointerCallback, + findPointerCallback, finishSerializationCallback, getBufferPointerCallback, + getChunkCallback, getCurrentBufferSizeCallback, getNumChunksCallback, getSerializationFlagsCallback, + getUniquePointerCallback, registerNameForPointerCallback, serializeNameCallback, + setSerializationFlagsCallback, startSerializationCallback); +} + + +btChunk* btSerializer_allocate(btSerializer* obj, int size, int numElements) +{ + return obj->allocate(size, numElements); +} + +void btSerializer_finalizeChunk(btSerializer* obj, btChunk* chunk, const char* structType, + int chunkCode, void* oldPtr) +{ + obj->finalizeChunk(chunk, structType, chunkCode, oldPtr); +} + +const char* btSerializer_findNameForPointer(btSerializer* obj, const void* ptr) +{ + return obj->findNameForPointer(ptr); +} + +void* btSerializer_findPointer(btSerializer* obj, void* oldPtr) +{ + return obj->findPointer(oldPtr); +} + +void btSerializer_finishSerialization(btSerializer* obj) +{ + obj->finishSerialization(); +} + +const unsigned char* btSerializer_getBufferPointer(btSerializer* obj) +{ + return obj->getBufferPointer(); +} + +const btChunk* btSerializer_getChunk(btSerializer* obj, int chunkIndex) +{ + return obj->getChunk(chunkIndex); +} + +int btSerializer_getCurrentBufferSize(btSerializer* obj) +{ + return obj->getCurrentBufferSize(); +} + +int btSerializer_getNumChunks(btSerializer* obj) +{ + return obj->getNumChunks(); +} + +int btSerializer_getSerializationFlags(btSerializer* obj) +{ + return obj->getSerializationFlags(); +} + +void* btSerializer_getUniquePointer(btSerializer* obj, void* oldPtr) +{ + return obj->getUniquePointer(oldPtr); +} + +void btSerializer_registerNameForPointer(btSerializer* obj, const void* ptr, const char* name) +{ + obj->registerNameForPointer(ptr, name); +} + +void btSerializer_serializeName(btSerializer* obj, const char* ptr) +{ + obj->serializeName(ptr); +} + +void btSerializer_setSerializationFlags(btSerializer* obj, int flags) +{ + obj->setSerializationFlags(flags); +} + +void btSerializer_startSerialization(btSerializer* obj) +{ + obj->startSerialization(); +} + +void btSerializer_delete(btSerializer* obj) +{ + delete obj; +} + + +btDefaultSerializer* btDefaultSerializer_new() +{ + return new btDefaultSerializer(); +} + +btDefaultSerializer* btDefaultSerializer_new2(int totalSize) +{ + return new btDefaultSerializer(totalSize); +} + +unsigned char* btDefaultSerializer_internalAlloc(btDefaultSerializer* obj, size_t size) +{ + return obj->internalAlloc(size); +} + +void btDefaultSerializer_writeHeader(btDefaultSerializer* obj, unsigned char* buffer) +{ + obj->writeHeader(buffer); +} + + +char* getBulletDNAstr() +{ + return sBulletDNAstr; +} + +int getBulletDNAlen() +{ + return sBulletDNAlen; +} + +char* getBulletDNAstr64() +{ + return sBulletDNAstr64; +} + +int getBulletDNAlen64() +{ + return sBulletDNAlen64; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.h new file mode 100644 index 0000000..6915cca --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSerializer_wrap.h @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_SERIALIZER_H +#define p_btSerializer_allocate void* +#define p_btSerializer_finalizeChunk void* +#define p_btSerializer_findNameForPointer void* +#define p_btSerializer_findPointer void* +#define p_btSerializer_finishSerialization void* +#define p_btSerializer_getBufferPointer void* +#define p_btSerializer_getChunk void* +#define p_btSerializer_getCurrentBufferSize void* +#define p_btSerializer_getNumChunks void* +#define p_btSerializer_getSerializationFlags void* +#define p_btSerializer_getUniquePointer void* +#define p_btSerializer_registerNameForPointer void* +#define p_btSerializer_serializeName void* +#define p_btSerializer_setSerializationFlags void* +#define p_btSerializer_startSerialization void* +#define btSerializerWrapper void +#else +typedef btChunk* (*p_btSerializer_allocate)(size_t size, int numElements); +typedef void (*p_btSerializer_finalizeChunk)(btChunk* chunk, const char* structType, + int chunkCode, void* oldPtr); +typedef const char* (*p_btSerializer_findNameForPointer)(const void* ptr); +typedef void* (*p_btSerializer_findPointer)(void* oldPtr); +typedef void (*p_btSerializer_finishSerialization)(); +typedef const unsigned char* (*p_btSerializer_getBufferPointer)(); +typedef btChunk* (*p_btSerializer_getChunk)(int chunkIndex); +typedef int (*p_btSerializer_getCurrentBufferSize)(); +typedef int (*p_btSerializer_getNumChunks)(); +typedef int (*p_btSerializer_getSerializationFlags)(); +typedef void* (*p_btSerializer_getUniquePointer)(void* oldPtr); +typedef void (*p_btSerializer_registerNameForPointer)(const void* ptr, const char* name); +typedef void (*p_btSerializer_serializeName)(const char* ptr); +typedef void (*p_btSerializer_setSerializationFlags)(int flags); +typedef void (*p_btSerializer_startSerialization)(); + +class btSerializerWrapper : public btSerializer +{ +private: + p_btSerializer_allocate _allocateCallback; + p_btSerializer_finalizeChunk _finalizeChunkCallback; + p_btSerializer_findNameForPointer _findNameForPointerCallback; + p_btSerializer_findPointer _findPointerCallback; + p_btSerializer_finishSerialization _finishSerializationCallback; + p_btSerializer_getBufferPointer _getBufferPointerCallback; + p_btSerializer_getChunk _getChunkCallback; + p_btSerializer_getCurrentBufferSize _getCurrentBufferSizeCallback; + p_btSerializer_getNumChunks _getNumChunksCallback; + p_btSerializer_getSerializationFlags _getSerializationFlagsCallback; + p_btSerializer_getUniquePointer _getUniquePointerCallback; + p_btSerializer_registerNameForPointer _registerNameForPointerCallback; + p_btSerializer_serializeName _serializeNameCallback; + p_btSerializer_setSerializationFlags _setSerializationFlagsCallback; + p_btSerializer_startSerialization _startSerializationCallback; + +public: + btSerializerWrapper(p_btSerializer_allocate allocateCallback, p_btSerializer_finalizeChunk finalizeChunkCallback, + p_btSerializer_findNameForPointer findNameForPointerCallback, p_btSerializer_findPointer findPointerCallback, + p_btSerializer_finishSerialization finishSerializationCallback, p_btSerializer_getBufferPointer getBufferPointerCallback, + p_btSerializer_getChunk getChunkCallback, p_btSerializer_getCurrentBufferSize getCurrentBufferSizeCallback, + p_btSerializer_getNumChunks getNumChunksCallback, p_btSerializer_getSerializationFlags getSerializationFlagsCallback, + p_btSerializer_getUniquePointer getUniquePointerCallback, p_btSerializer_registerNameForPointer registerNameForPointerCallback, + p_btSerializer_serializeName serializeNameCallback, p_btSerializer_setSerializationFlags setSerializationFlagsCallback, + p_btSerializer_startSerialization startSerializationCallback); + + virtual btChunk* allocate(size_t size, int numElements); + virtual void finalizeChunk(btChunk* chunk, const char* structType, int chunkCode, + void* oldPtr); + virtual const char* findNameForPointer(const void* ptr) const; + virtual void* findPointer(void* oldPtr); + virtual void finishSerialization(); + virtual const unsigned char* getBufferPointer() const; + virtual btChunk* getChunk(int chunkIndex) const; + virtual int getCurrentBufferSize() const; + virtual int getNumChunks() const; + virtual int getSerializationFlags() const; + virtual void* getUniquePointer(void* oldPtr); + virtual void registerNameForPointer(const void* ptr, const char* name); + virtual void serializeName(const char* ptr); + virtual void setSerializationFlags(int flags); + virtual void startSerialization(); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btChunk* btChunk_new(); + EXPORT int btChunk_getChunkCode(btChunk* obj); + EXPORT int btChunk_getDna_nr(btChunk* obj); + EXPORT int btChunk_getLength(btChunk* obj); + EXPORT int btChunk_getNumber(btChunk* obj); + EXPORT void* btChunk_getOldPtr(btChunk* obj); + EXPORT void btChunk_setChunkCode(btChunk* obj, int value); + EXPORT void btChunk_setDna_nr(btChunk* obj, int value); + EXPORT void btChunk_setLength(btChunk* obj, int value); + EXPORT void btChunk_setNumber(btChunk* obj, int value); + EXPORT void btChunk_setOldPtr(btChunk* obj, void* value); + EXPORT void btChunk_delete(btChunk* obj); + + EXPORT btSerializerWrapper* btSerializerWrapper_new(p_btSerializer_allocate allocateCallback, + p_btSerializer_finalizeChunk finalizeChunkCallback, p_btSerializer_findNameForPointer findNameForPointerCallback, + p_btSerializer_findPointer findPointerCallback, p_btSerializer_finishSerialization finishSerializationCallback, + p_btSerializer_getBufferPointer getBufferPointerCallback, p_btSerializer_getChunk getChunkCallback, + p_btSerializer_getCurrentBufferSize getCurrentBufferSizeCallback, p_btSerializer_getNumChunks getNumChunksCallback, + p_btSerializer_getSerializationFlags getSerializationFlagsCallback, p_btSerializer_getUniquePointer getUniquePointerCallback, + p_btSerializer_registerNameForPointer registerNameForPointerCallback, p_btSerializer_serializeName serializeNameCallback, + p_btSerializer_setSerializationFlags setSerializationFlagsCallback, p_btSerializer_startSerialization startSerializationCallback); + + EXPORT void btSerializer_delete(btSerializer* obj); + + EXPORT btDefaultSerializer* btDefaultSerializer_new(); + EXPORT btDefaultSerializer* btDefaultSerializer_new2(int totalSize); + EXPORT unsigned char* btDefaultSerializer_internalAlloc(btDefaultSerializer* obj, size_t size); + EXPORT void btDefaultSerializer_writeHeader(btDefaultSerializer* obj, unsigned char* buffer); + + EXPORT char* getBulletDNAstr(); + EXPORT int getBulletDNAlen(); + EXPORT char* getBulletDNAstr64(); + EXPORT int getBulletDNAlen64(); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.cpp new file mode 100644 index 0000000..b11fbae --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btShapeHull_wrap.h" + +btShapeHull* btShapeHull_new(const btConvexShape* shape) +{ + return ALIGNED_NEW(btShapeHull)(shape); +} + +bool btShapeHull_buildHull(btShapeHull* obj, btScalar margin, int highRes) +{ + return obj->buildHull(margin, highRes); +} + +const unsigned int* btShapeHull_getIndexPointer(btShapeHull* obj) +{ + return obj->getIndexPointer(); +} + +const btVector3* btShapeHull_getVertexPointer(btShapeHull* obj) +{ + return obj->getVertexPointer(); +} + +int btShapeHull_numIndices(btShapeHull* obj) +{ + return obj->numIndices(); +} + +int btShapeHull_numTriangles(btShapeHull* obj) +{ + return obj->numTriangles(); +} + +int btShapeHull_numVertices(btShapeHull* obj) +{ + return obj->numVertices(); +} + +void btShapeHull_delete(btShapeHull* obj) +{ + ALIGNED_FREE(obj); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.h new file mode 100644 index 0000000..ce82044 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btShapeHull_wrap.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btShapeHull* btShapeHull_new(const btConvexShape* shape); + EXPORT bool btShapeHull_buildHull(btShapeHull* obj, btScalar margin, int highRes); + EXPORT const unsigned int* btShapeHull_getIndexPointer(btShapeHull* obj); + EXPORT const btVector3* btShapeHull_getVertexPointer(btShapeHull* obj); + EXPORT int btShapeHull_numIndices(btShapeHull* obj); + EXPORT int btShapeHull_numTriangles(btShapeHull* obj); + EXPORT int btShapeHull_numVertices(btShapeHull* obj); + EXPORT void btShapeHull_delete(btShapeHull* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.cpp new file mode 100644 index 0000000..ae92078 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.cpp @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "btSimulationIslandManager_wrap.h" + +void btSimulationIslandManager_IslandCallback_processIsland(btSimulationIslandManager_IslandCallback* obj, + btCollisionObject** bodies, int numBodies, btPersistentManifold** manifolds, int numManifolds, + int islandId) +{ + obj->processIsland(bodies, numBodies, manifolds, numManifolds, islandId); +} + +void btSimulationIslandManager_IslandCallback_delete(btSimulationIslandManager_IslandCallback* obj) +{ + delete obj; +} + + +btSimulationIslandManager* btSimulationIslandManager_new() +{ + return new btSimulationIslandManager(); +} + +void btSimulationIslandManager_buildAndProcessIslands(btSimulationIslandManager* obj, + btDispatcher* dispatcher, btCollisionWorld* collisionWorld, btSimulationIslandManager_IslandCallback* callback) +{ + obj->buildAndProcessIslands(dispatcher, collisionWorld, callback); +} + +void btSimulationIslandManager_buildIslands(btSimulationIslandManager* obj, btDispatcher* dispatcher, + btCollisionWorld* colWorld) +{ + obj->buildIslands(dispatcher, colWorld); +} + +void btSimulationIslandManager_findUnions(btSimulationIslandManager* obj, btDispatcher* dispatcher, + btCollisionWorld* colWorld) +{ + obj->findUnions(dispatcher, colWorld); +} + +bool btSimulationIslandManager_getSplitIslands(btSimulationIslandManager* obj) +{ + return obj->getSplitIslands(); +} + +btUnionFind* btSimulationIslandManager_getUnionFind(btSimulationIslandManager* obj) +{ + return &obj->getUnionFind(); +} + +void btSimulationIslandManager_initUnionFind(btSimulationIslandManager* obj, int n) +{ + obj->initUnionFind(n); +} + +void btSimulationIslandManager_setSplitIslands(btSimulationIslandManager* obj, bool doSplitIslands) +{ + obj->setSplitIslands(doSplitIslands); +} + +void btSimulationIslandManager_storeIslandActivationState(btSimulationIslandManager* obj, + btCollisionWorld* world) +{ + obj->storeIslandActivationState(world); +} + +void btSimulationIslandManager_updateActivationState(btSimulationIslandManager* obj, + btCollisionWorld* colWorld, btDispatcher* dispatcher) +{ + obj->updateActivationState(colWorld, dispatcher); +} + +void btSimulationIslandManager_delete(btSimulationIslandManager* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.h new file mode 100644 index 0000000..64bc25d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSimulationIslandManager_wrap.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btSimulationIslandManager_IslandCallback_processIsland(btSimulationIslandManager_IslandCallback* obj, btCollisionObject** bodies, int numBodies, btPersistentManifold** manifolds, int numManifolds, int islandId); + EXPORT void btSimulationIslandManager_IslandCallback_delete(btSimulationIslandManager_IslandCallback* obj); + + EXPORT btSimulationIslandManager* btSimulationIslandManager_new(); + EXPORT void btSimulationIslandManager_buildAndProcessIslands(btSimulationIslandManager* obj, btDispatcher* dispatcher, btCollisionWorld* collisionWorld, btSimulationIslandManager_IslandCallback* callback); + EXPORT void btSimulationIslandManager_buildIslands(btSimulationIslandManager* obj, btDispatcher* dispatcher, btCollisionWorld* colWorld); + EXPORT void btSimulationIslandManager_findUnions(btSimulationIslandManager* obj, btDispatcher* dispatcher, btCollisionWorld* colWorld); + EXPORT bool btSimulationIslandManager_getSplitIslands(btSimulationIslandManager* obj); + EXPORT btUnionFind* btSimulationIslandManager_getUnionFind(btSimulationIslandManager* obj); + EXPORT void btSimulationIslandManager_initUnionFind(btSimulationIslandManager* obj, int n); + EXPORT void btSimulationIslandManager_setSplitIslands(btSimulationIslandManager* obj, bool doSplitIslands); + EXPORT void btSimulationIslandManager_storeIslandActivationState(btSimulationIslandManager* obj, btCollisionWorld* world); + EXPORT void btSimulationIslandManager_updateActivationState(btSimulationIslandManager* obj, btCollisionWorld* colWorld, btDispatcher* dispatcher); + EXPORT void btSimulationIslandManager_delete(btSimulationIslandManager* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.cpp new file mode 100644 index 0000000..0626ec3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.cpp @@ -0,0 +1,439 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btSliderConstraint_wrap.h" + +btSliderConstraint* btSliderConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, + const btTransform* frameInB, bool useLinearReferenceFrameA) +{ + BTTRANSFORM_IN(frameInA); + BTTRANSFORM_IN(frameInB); + return new btSliderConstraint(*rbA, *rbB, BTTRANSFORM_USE(frameInA), BTTRANSFORM_USE(frameInB), + useLinearReferenceFrameA); +} + +btSliderConstraint* btSliderConstraint_new2(btRigidBody* rbB, const btTransform* frameInB, + bool useLinearReferenceFrameA) +{ + BTTRANSFORM_IN(frameInB); + return new btSliderConstraint(*rbB, BTTRANSFORM_USE(frameInB), useLinearReferenceFrameA); +} + +void btSliderConstraint_calculateTransforms(btSliderConstraint* obj, const btTransform* transA, + const btTransform* transB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + obj->calculateTransforms(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +void btSliderConstraint_getAncorInA(btSliderConstraint* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getAncorInA(); + BTVECTOR3_SET(value, temp); +} + +void btSliderConstraint_getAncorInB(btSliderConstraint* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->getAncorInB(); + BTVECTOR3_SET(value, temp); +} + +btScalar btSliderConstraint_getAngDepth(btSliderConstraint* obj) +{ + return obj->getAngDepth(); +} + +btScalar btSliderConstraint_getAngularPos(btSliderConstraint* obj) +{ + return obj->getAngularPos(); +} + +void btSliderConstraint_getCalculatedTransformA(btSliderConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCalculatedTransformA()); +} + +void btSliderConstraint_getCalculatedTransformB(btSliderConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getCalculatedTransformB()); +} + +btScalar btSliderConstraint_getDampingDirAng(btSliderConstraint* obj) +{ + return obj->getDampingDirAng(); +} + +btScalar btSliderConstraint_getDampingDirLin(btSliderConstraint* obj) +{ + return obj->getDampingDirLin(); +} + +btScalar btSliderConstraint_getDampingLimAng(btSliderConstraint* obj) +{ + return obj->getDampingLimAng(); +} + +btScalar btSliderConstraint_getDampingLimLin(btSliderConstraint* obj) +{ + return obj->getDampingLimLin(); +} + +btScalar btSliderConstraint_getDampingOrthoAng(btSliderConstraint* obj) +{ + return obj->getDampingOrthoAng(); +} + +btScalar btSliderConstraint_getDampingOrthoLin(btSliderConstraint* obj) +{ + return obj->getDampingOrthoLin(); +} + +int btSliderConstraint_getFlags(btSliderConstraint* obj) +{ + return obj->getFlags(); +} + +void btSliderConstraint_getFrameOffsetA(btSliderConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetA()); +} + +void btSliderConstraint_getFrameOffsetB(btSliderConstraint* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->getFrameOffsetB()); +} + +void btSliderConstraint_getInfo1NonVirtual(btSliderConstraint* obj, btTypedConstraint_btConstraintInfo1* info) +{ + obj->getInfo1NonVirtual(info); +} + +void btSliderConstraint_getInfo2NonVirtual(btSliderConstraint* obj, btTypedConstraint_btConstraintInfo2* info, + const btTransform* transA, const btTransform* transB, const btVector3* linVelA, + const btVector3* linVelB, btScalar rbAinvMass, btScalar rbBinvMass) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + BTVECTOR3_IN(linVelA); + BTVECTOR3_IN(linVelB); + obj->getInfo2NonVirtual(info, BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB), + BTVECTOR3_USE(linVelA), BTVECTOR3_USE(linVelB), rbAinvMass, rbBinvMass); +} + +btScalar btSliderConstraint_getLinDepth(btSliderConstraint* obj) +{ + return obj->getLinDepth(); +} + +btScalar btSliderConstraint_getLinearPos(btSliderConstraint* obj) +{ + return obj->getLinearPos(); +} + +btScalar btSliderConstraint_getLowerAngLimit(btSliderConstraint* obj) +{ + return obj->getLowerAngLimit(); +} + +btScalar btSliderConstraint_getLowerLinLimit(btSliderConstraint* obj) +{ + return obj->getLowerLinLimit(); +} + +btScalar btSliderConstraint_getMaxAngMotorForce(btSliderConstraint* obj) +{ + return obj->getMaxAngMotorForce(); +} + +btScalar btSliderConstraint_getMaxLinMotorForce(btSliderConstraint* obj) +{ + return obj->getMaxLinMotorForce(); +} + +bool btSliderConstraint_getPoweredAngMotor(btSliderConstraint* obj) +{ + return obj->getPoweredAngMotor(); +} + +bool btSliderConstraint_getPoweredLinMotor(btSliderConstraint* obj) +{ + return obj->getPoweredLinMotor(); +} + +btScalar btSliderConstraint_getRestitutionDirAng(btSliderConstraint* obj) +{ + return obj->getRestitutionDirAng(); +} + +btScalar btSliderConstraint_getRestitutionDirLin(btSliderConstraint* obj) +{ + return obj->getRestitutionDirLin(); +} + +btScalar btSliderConstraint_getRestitutionLimAng(btSliderConstraint* obj) +{ + return obj->getRestitutionLimAng(); +} + +btScalar btSliderConstraint_getRestitutionLimLin(btSliderConstraint* obj) +{ + return obj->getRestitutionLimLin(); +} + +btScalar btSliderConstraint_getRestitutionOrthoAng(btSliderConstraint* obj) +{ + return obj->getRestitutionOrthoAng(); +} + +btScalar btSliderConstraint_getRestitutionOrthoLin(btSliderConstraint* obj) +{ + return obj->getRestitutionOrthoLin(); +} + +btScalar btSliderConstraint_getSoftnessDirAng(btSliderConstraint* obj) +{ + return obj->getSoftnessDirAng(); +} + +btScalar btSliderConstraint_getSoftnessDirLin(btSliderConstraint* obj) +{ + return obj->getSoftnessDirLin(); +} + +btScalar btSliderConstraint_getSoftnessLimAng(btSliderConstraint* obj) +{ + return obj->getSoftnessLimAng(); +} + +btScalar btSliderConstraint_getSoftnessLimLin(btSliderConstraint* obj) +{ + return obj->getSoftnessLimLin(); +} + +btScalar btSliderConstraint_getSoftnessOrthoAng(btSliderConstraint* obj) +{ + return obj->getSoftnessOrthoAng(); +} + +btScalar btSliderConstraint_getSoftnessOrthoLin(btSliderConstraint* obj) +{ + return obj->getSoftnessOrthoLin(); +} + +bool btSliderConstraint_getSolveAngLimit(btSliderConstraint* obj) +{ + return obj->getSolveAngLimit(); +} + +bool btSliderConstraint_getSolveLinLimit(btSliderConstraint* obj) +{ + return obj->getSolveLinLimit(); +} + +btScalar btSliderConstraint_getTargetAngMotorVelocity(btSliderConstraint* obj) +{ + return obj->getTargetAngMotorVelocity(); +} + +btScalar btSliderConstraint_getTargetLinMotorVelocity(btSliderConstraint* obj) +{ + return obj->getTargetLinMotorVelocity(); +} + +btScalar btSliderConstraint_getUpperAngLimit(btSliderConstraint* obj) +{ + return obj->getUpperAngLimit(); +} + +btScalar btSliderConstraint_getUpperLinLimit(btSliderConstraint* obj) +{ + return obj->getUpperLinLimit(); +} + +bool btSliderConstraint_getUseFrameOffset(btSliderConstraint* obj) +{ + return obj->getUseFrameOffset(); +} + +bool btSliderConstraint_getUseLinearReferenceFrameA(btSliderConstraint* obj) +{ + return obj->getUseLinearReferenceFrameA(); +} + +void btSliderConstraint_setDampingDirAng(btSliderConstraint* obj, btScalar dampingDirAng) +{ + obj->setDampingDirAng(dampingDirAng); +} + +void btSliderConstraint_setDampingDirLin(btSliderConstraint* obj, btScalar dampingDirLin) +{ + obj->setDampingDirLin(dampingDirLin); +} + +void btSliderConstraint_setDampingLimAng(btSliderConstraint* obj, btScalar dampingLimAng) +{ + obj->setDampingLimAng(dampingLimAng); +} + +void btSliderConstraint_setDampingLimLin(btSliderConstraint* obj, btScalar dampingLimLin) +{ + obj->setDampingLimLin(dampingLimLin); +} + +void btSliderConstraint_setDampingOrthoAng(btSliderConstraint* obj, btScalar dampingOrthoAng) +{ + obj->setDampingOrthoAng(dampingOrthoAng); +} + +void btSliderConstraint_setDampingOrthoLin(btSliderConstraint* obj, btScalar dampingOrthoLin) +{ + obj->setDampingOrthoLin(dampingOrthoLin); +} + +void btSliderConstraint_setFrames(btSliderConstraint* obj, const btTransform* frameA, + const btTransform* frameB) +{ + BTTRANSFORM_IN(frameA); + BTTRANSFORM_IN(frameB); + obj->setFrames(BTTRANSFORM_USE(frameA), BTTRANSFORM_USE(frameB)); +} + +void btSliderConstraint_setLowerAngLimit(btSliderConstraint* obj, btScalar lowerLimit) +{ + obj->setLowerAngLimit(lowerLimit); +} + +void btSliderConstraint_setLowerLinLimit(btSliderConstraint* obj, btScalar lowerLimit) +{ + obj->setLowerLinLimit(lowerLimit); +} + +void btSliderConstraint_setMaxAngMotorForce(btSliderConstraint* obj, btScalar maxAngMotorForce) +{ + obj->setMaxAngMotorForce(maxAngMotorForce); +} + +void btSliderConstraint_setMaxLinMotorForce(btSliderConstraint* obj, btScalar maxLinMotorForce) +{ + obj->setMaxLinMotorForce(maxLinMotorForce); +} + +void btSliderConstraint_setPoweredAngMotor(btSliderConstraint* obj, bool onOff) +{ + obj->setPoweredAngMotor(onOff); +} + +void btSliderConstraint_setPoweredLinMotor(btSliderConstraint* obj, bool onOff) +{ + obj->setPoweredLinMotor(onOff); +} + +void btSliderConstraint_setRestitutionDirAng(btSliderConstraint* obj, btScalar restitutionDirAng) +{ + obj->setRestitutionDirAng(restitutionDirAng); +} + +void btSliderConstraint_setRestitutionDirLin(btSliderConstraint* obj, btScalar restitutionDirLin) +{ + obj->setRestitutionDirLin(restitutionDirLin); +} + +void btSliderConstraint_setRestitutionLimAng(btSliderConstraint* obj, btScalar restitutionLimAng) +{ + obj->setRestitutionLimAng(restitutionLimAng); +} + +void btSliderConstraint_setRestitutionLimLin(btSliderConstraint* obj, btScalar restitutionLimLin) +{ + obj->setRestitutionLimLin(restitutionLimLin); +} + +void btSliderConstraint_setRestitutionOrthoAng(btSliderConstraint* obj, btScalar restitutionOrthoAng) +{ + obj->setRestitutionOrthoAng(restitutionOrthoAng); +} + +void btSliderConstraint_setRestitutionOrthoLin(btSliderConstraint* obj, btScalar restitutionOrthoLin) +{ + obj->setRestitutionOrthoLin(restitutionOrthoLin); +} + +void btSliderConstraint_setSoftnessDirAng(btSliderConstraint* obj, btScalar softnessDirAng) +{ + obj->setSoftnessDirAng(softnessDirAng); +} + +void btSliderConstraint_setSoftnessDirLin(btSliderConstraint* obj, btScalar softnessDirLin) +{ + obj->setSoftnessDirLin(softnessDirLin); +} + +void btSliderConstraint_setSoftnessLimAng(btSliderConstraint* obj, btScalar softnessLimAng) +{ + obj->setSoftnessLimAng(softnessLimAng); +} + +void btSliderConstraint_setSoftnessLimLin(btSliderConstraint* obj, btScalar softnessLimLin) +{ + obj->setSoftnessLimLin(softnessLimLin); +} + +void btSliderConstraint_setSoftnessOrthoAng(btSliderConstraint* obj, btScalar softnessOrthoAng) +{ + obj->setSoftnessOrthoAng(softnessOrthoAng); +} + +void btSliderConstraint_setSoftnessOrthoLin(btSliderConstraint* obj, btScalar softnessOrthoLin) +{ + obj->setSoftnessOrthoLin(softnessOrthoLin); +} + +void btSliderConstraint_setTargetAngMotorVelocity(btSliderConstraint* obj, btScalar targetAngMotorVelocity) +{ + obj->setTargetAngMotorVelocity(targetAngMotorVelocity); +} + +void btSliderConstraint_setTargetLinMotorVelocity(btSliderConstraint* obj, btScalar targetLinMotorVelocity) +{ + obj->setTargetLinMotorVelocity(targetLinMotorVelocity); +} + +void btSliderConstraint_setUpperAngLimit(btSliderConstraint* obj, btScalar upperLimit) +{ + obj->setUpperAngLimit(upperLimit); +} + +void btSliderConstraint_setUpperLinLimit(btSliderConstraint* obj, btScalar upperLimit) +{ + obj->setUpperLinLimit(upperLimit); +} + +void btSliderConstraint_setUseFrameOffset(btSliderConstraint* obj, bool frameOffsetOnOff) +{ + obj->setUseFrameOffset(frameOffsetOnOff); +} + +void btSliderConstraint_testAngLimits(btSliderConstraint* obj) +{ + obj->testAngLimits(); +} + +void btSliderConstraint_testLinLimits(btSliderConstraint* obj) +{ + obj->testLinLimits(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.h new file mode 100644 index 0000000..827d1f7 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSliderConstraint_wrap.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSliderConstraint* btSliderConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btTransform* frameInA, const btTransform* frameInB, bool useLinearReferenceFrameA); + EXPORT btSliderConstraint* btSliderConstraint_new2(btRigidBody* rbB, const btTransform* frameInB, bool useLinearReferenceFrameA); + EXPORT void btSliderConstraint_calculateTransforms(btSliderConstraint* obj, const btTransform* transA, const btTransform* transB); + EXPORT void btSliderConstraint_getAncorInA(btSliderConstraint* obj, btVector3* value); + EXPORT void btSliderConstraint_getAncorInB(btSliderConstraint* obj, btVector3* value); + EXPORT btScalar btSliderConstraint_getAngDepth(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getAngularPos(btSliderConstraint* obj); + EXPORT void btSliderConstraint_getCalculatedTransformA(btSliderConstraint* obj, btTransform* value); + EXPORT void btSliderConstraint_getCalculatedTransformB(btSliderConstraint* obj, btTransform* value); + EXPORT btScalar btSliderConstraint_getDampingDirAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getDampingDirLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getDampingLimAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getDampingLimLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getDampingOrthoAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getDampingOrthoLin(btSliderConstraint* obj); + EXPORT int btSliderConstraint_getFlags(btSliderConstraint* obj); + EXPORT void btSliderConstraint_getFrameOffsetA(btSliderConstraint* obj, btTransform* value); + EXPORT void btSliderConstraint_getFrameOffsetB(btSliderConstraint* obj, btTransform* value); + EXPORT void btSliderConstraint_getInfo1NonVirtual(btSliderConstraint* obj, btTypedConstraint_btConstraintInfo1* info); + EXPORT void btSliderConstraint_getInfo2NonVirtual(btSliderConstraint* obj, btTypedConstraint_btConstraintInfo2* info, const btTransform* transA, const btTransform* transB, const btVector3* linVelA, const btVector3* linVelB, btScalar rbAinvMass, btScalar rbBinvMass); + EXPORT btScalar btSliderConstraint_getLinDepth(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getLinearPos(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getLowerAngLimit(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getLowerLinLimit(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getMaxAngMotorForce(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getMaxLinMotorForce(btSliderConstraint* obj); + EXPORT bool btSliderConstraint_getPoweredAngMotor(btSliderConstraint* obj); + EXPORT bool btSliderConstraint_getPoweredLinMotor(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getRestitutionDirAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getRestitutionDirLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getRestitutionLimAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getRestitutionLimLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getRestitutionOrthoAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getRestitutionOrthoLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getSoftnessDirAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getSoftnessDirLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getSoftnessLimAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getSoftnessLimLin(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getSoftnessOrthoAng(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getSoftnessOrthoLin(btSliderConstraint* obj); + EXPORT bool btSliderConstraint_getSolveAngLimit(btSliderConstraint* obj); + EXPORT bool btSliderConstraint_getSolveLinLimit(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getTargetAngMotorVelocity(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getTargetLinMotorVelocity(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getUpperAngLimit(btSliderConstraint* obj); + EXPORT btScalar btSliderConstraint_getUpperLinLimit(btSliderConstraint* obj); + EXPORT bool btSliderConstraint_getUseFrameOffset(btSliderConstraint* obj); + EXPORT bool btSliderConstraint_getUseLinearReferenceFrameA(btSliderConstraint* obj); + EXPORT void btSliderConstraint_setDampingDirAng(btSliderConstraint* obj, btScalar dampingDirAng); + EXPORT void btSliderConstraint_setDampingDirLin(btSliderConstraint* obj, btScalar dampingDirLin); + EXPORT void btSliderConstraint_setDampingLimAng(btSliderConstraint* obj, btScalar dampingLimAng); + EXPORT void btSliderConstraint_setDampingLimLin(btSliderConstraint* obj, btScalar dampingLimLin); + EXPORT void btSliderConstraint_setDampingOrthoAng(btSliderConstraint* obj, btScalar dampingOrthoAng); + EXPORT void btSliderConstraint_setDampingOrthoLin(btSliderConstraint* obj, btScalar dampingOrthoLin); + EXPORT void btSliderConstraint_setFrames(btSliderConstraint* obj, const btTransform* frameA, const btTransform* frameB); + EXPORT void btSliderConstraint_setLowerAngLimit(btSliderConstraint* obj, btScalar lowerLimit); + EXPORT void btSliderConstraint_setLowerLinLimit(btSliderConstraint* obj, btScalar lowerLimit); + EXPORT void btSliderConstraint_setMaxAngMotorForce(btSliderConstraint* obj, btScalar maxAngMotorForce); + EXPORT void btSliderConstraint_setMaxLinMotorForce(btSliderConstraint* obj, btScalar maxLinMotorForce); + EXPORT void btSliderConstraint_setPoweredAngMotor(btSliderConstraint* obj, bool onOff); + EXPORT void btSliderConstraint_setPoweredLinMotor(btSliderConstraint* obj, bool onOff); + EXPORT void btSliderConstraint_setRestitutionDirAng(btSliderConstraint* obj, btScalar restitutionDirAng); + EXPORT void btSliderConstraint_setRestitutionDirLin(btSliderConstraint* obj, btScalar restitutionDirLin); + EXPORT void btSliderConstraint_setRestitutionLimAng(btSliderConstraint* obj, btScalar restitutionLimAng); + EXPORT void btSliderConstraint_setRestitutionLimLin(btSliderConstraint* obj, btScalar restitutionLimLin); + EXPORT void btSliderConstraint_setRestitutionOrthoAng(btSliderConstraint* obj, btScalar restitutionOrthoAng); + EXPORT void btSliderConstraint_setRestitutionOrthoLin(btSliderConstraint* obj, btScalar restitutionOrthoLin); + EXPORT void btSliderConstraint_setSoftnessDirAng(btSliderConstraint* obj, btScalar softnessDirAng); + EXPORT void btSliderConstraint_setSoftnessDirLin(btSliderConstraint* obj, btScalar softnessDirLin); + EXPORT void btSliderConstraint_setSoftnessLimAng(btSliderConstraint* obj, btScalar softnessLimAng); + EXPORT void btSliderConstraint_setSoftnessLimLin(btSliderConstraint* obj, btScalar softnessLimLin); + EXPORT void btSliderConstraint_setSoftnessOrthoAng(btSliderConstraint* obj, btScalar softnessOrthoAng); + EXPORT void btSliderConstraint_setSoftnessOrthoLin(btSliderConstraint* obj, btScalar softnessOrthoLin); + EXPORT void btSliderConstraint_setTargetAngMotorVelocity(btSliderConstraint* obj, btScalar targetAngMotorVelocity); + EXPORT void btSliderConstraint_setTargetLinMotorVelocity(btSliderConstraint* obj, btScalar targetLinMotorVelocity); + EXPORT void btSliderConstraint_setUpperAngLimit(btSliderConstraint* obj, btScalar upperLimit); + EXPORT void btSliderConstraint_setUpperLinLimit(btSliderConstraint* obj, btScalar upperLimit); + EXPORT void btSliderConstraint_setUseFrameOffset(btSliderConstraint* obj, bool frameOffsetOnOff); + EXPORT void btSliderConstraint_testAngLimits(btSliderConstraint* obj); + EXPORT void btSliderConstraint_testLinLimits(btSliderConstraint* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..83c8c11 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btSoftBodyConcaveCollisionAlgorithm_wrap.h" + +btSoftBodyConcaveCollisionAlgorithm::CreateFunc* btSoftBodyConcaveCollisionAlgorithm_CreateFunc_new() +{ + return new btSoftBodyConcaveCollisionAlgorithm::CreateFunc(); +} + + +btSoftBodyConcaveCollisionAlgorithm_SwappedCreateFunc* btSoftBodyConcaveCollisionAlgorithm_SwappedCreateFunc_new() +{ + return new btSoftBodyConcaveCollisionAlgorithm::SwappedCreateFunc(); +} + + +btSoftBodyConcaveCollisionAlgorithm* btSoftBodyConcaveCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, + const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, + bool isSwapped) +{ + return new btSoftBodyConcaveCollisionAlgorithm(*ci, body0Wrap, body1Wrap, isSwapped); +} + +void btSoftBodyConcaveCollisionAlgorithm_clearCache(btSoftBodyConcaveCollisionAlgorithm* obj) +{ + obj->clearCache(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..1fc0f79 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSoftBodyConcaveCollisionAlgorithm_CreateFunc* btSoftBodyConcaveCollisionAlgorithm_CreateFunc_new(); + + EXPORT btSoftBodyConcaveCollisionAlgorithm_SwappedCreateFunc* btSoftBodyConcaveCollisionAlgorithm_SwappedCreateFunc_new(); + + EXPORT btSoftBodyConcaveCollisionAlgorithm* btSoftBodyConcaveCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped); + EXPORT void btSoftBodyConcaveCollisionAlgorithm_clearCache(btSoftBodyConcaveCollisionAlgorithm* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.cpp new file mode 100644 index 0000000..fd44427 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.cpp @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btSoftBodyHelpers_wrap.h" + +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS +float btSoftBodyHelpers_CalculateUV(int resx, int resy, int ix, int iy, int id) +{ + return btSoftBodyHelpers::CalculateUV(resx, resy, ix, iy, id); +} + +btSoftBody* btSoftBodyHelpers_CreateEllipsoid(btSoftBodyWorldInfo* worldInfo, const btVector3* center, + const btVector3* radius, int res) +{ + BTVECTOR3_IN(center); + BTVECTOR3_IN(radius); + return btSoftBodyHelpers::CreateEllipsoid(*worldInfo, BTVECTOR3_USE(center), + BTVECTOR3_USE(radius), res); +} +#endif +btSoftBody* btSoftBodyHelpers_CreateFromConvexHull(btSoftBodyWorldInfo* worldInfo, + const btScalar* vertices, int nvertices, bool randomizeConstraints) +{ + btVector3* verticesTemp = Vector3ArrayIn(vertices, nvertices); + btSoftBody* ret = btSoftBodyHelpers::CreateFromConvexHull(*worldInfo, verticesTemp, nvertices, randomizeConstraints); + delete[] verticesTemp; + return ret; +} +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS +btSoftBody* btSoftBodyHelpers_CreateFromTetGenData(btSoftBodyWorldInfo* worldInfo, + const char* ele, const char* face, const char* node, bool bfacelinks, bool btetralinks, + bool bfacesfromtetras) +{ + return btSoftBodyHelpers::CreateFromTetGenData(*worldInfo, ele, face, node, bfacelinks, + btetralinks, bfacesfromtetras); +} + +btSoftBody* btSoftBodyHelpers_CreateFromTriMesh(btSoftBodyWorldInfo* worldInfo, + const btScalar* vertices, const int* triangles, int ntriangles, bool randomizeConstraints) +{ + return btSoftBodyHelpers::CreateFromTriMesh(*worldInfo, vertices, triangles, + ntriangles, randomizeConstraints); +} + +btSoftBody* btSoftBodyHelpers_CreatePatch(btSoftBodyWorldInfo* worldInfo, const btVector3* corner00, + const btVector3* corner10, const btVector3* corner01, const btVector3* corner11, + int resx, int resy, int fixeds, bool gendiags) +{ + BTVECTOR3_IN(corner00); + BTVECTOR3_IN(corner10); + BTVECTOR3_IN(corner01); + BTVECTOR3_IN(corner11); + return btSoftBodyHelpers::CreatePatch(*worldInfo, BTVECTOR3_USE(corner00), BTVECTOR3_USE(corner10), + BTVECTOR3_USE(corner01), BTVECTOR3_USE(corner11), resx, resy, fixeds, gendiags); +} +#endif +btSoftBody* btSoftBodyHelpers_CreatePatchUV(btSoftBodyWorldInfo* worldInfo, const btVector3* corner00, + const btVector3* corner10, const btVector3* corner01, const btVector3* corner11, + int resx, int resy, int fixeds, bool gendiags, float* tex_coords) +{ + BTVECTOR3_IN(corner00); + BTVECTOR3_IN(corner10); + BTVECTOR3_IN(corner01); + BTVECTOR3_IN(corner11); + return btSoftBodyHelpers::CreatePatchUV(*worldInfo, BTVECTOR3_USE(corner00), + BTVECTOR3_USE(corner10), BTVECTOR3_USE(corner01), BTVECTOR3_USE(corner11), + resx, resy, fixeds, gendiags, tex_coords); +} +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS +btSoftBody* btSoftBodyHelpers_CreateRope(btSoftBodyWorldInfo* worldInfo, const btVector3* from, + const btVector3* to, int res, int fixeds) +{ + BTVECTOR3_IN(from); + BTVECTOR3_IN(to); + return btSoftBodyHelpers::CreateRope(*worldInfo, BTVECTOR3_USE(from), BTVECTOR3_USE(to), + res, fixeds); +} +#endif +void btSoftBodyHelpers_Draw(btSoftBody* psb, btIDebugDraw* idraw, int drawflags) +{ + btSoftBodyHelpers::Draw(psb, idraw, drawflags); +} + +void btSoftBodyHelpers_DrawClusterTree(btSoftBody* psb, btIDebugDraw* idraw, int mindepth, + int maxdepth) +{ + btSoftBodyHelpers::DrawClusterTree(psb, idraw, mindepth, maxdepth); +} + +void btSoftBodyHelpers_DrawFaceTree(btSoftBody* psb, btIDebugDraw* idraw, int mindepth, + int maxdepth) +{ + btSoftBodyHelpers::DrawFaceTree(psb, idraw, mindepth, maxdepth); +} + +void btSoftBodyHelpers_DrawFrame(btSoftBody* psb, btIDebugDraw* idraw) +{ + btSoftBodyHelpers::DrawFrame(psb, idraw); +} +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS +void btSoftBodyHelpers_DrawInfos(btSoftBody* psb, btIDebugDraw* idraw, bool masses, + bool areas, bool stress) +{ + btSoftBodyHelpers::DrawInfos(psb, idraw, masses, areas, stress); +} +#endif +void btSoftBodyHelpers_DrawNodeTree(btSoftBody* psb, btIDebugDraw* idraw, int mindepth, + int maxdepth) +{ + btSoftBodyHelpers::DrawNodeTree(psb, idraw, mindepth, maxdepth); +} +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS +void btSoftBodyHelpers_ReoptimizeLinkOrder(btSoftBody* psb) +{ + btSoftBodyHelpers::ReoptimizeLinkOrder(psb); +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.h new file mode 100644 index 0000000..4423c8b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS + EXPORT float btSoftBodyHelpers_CalculateUV(int resx, int resy, int ix, int iy, int id); + EXPORT btSoftBody* btSoftBodyHelpers_CreateEllipsoid(btSoftBodyWorldInfo* worldInfo, const btVector3* center, const btVector3* radius, int res); +#endif + EXPORT btSoftBody* btSoftBodyHelpers_CreateFromConvexHull(btSoftBodyWorldInfo* worldInfo, const btScalar* vertices, int nvertices, bool randomizeConstraints); +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS + EXPORT btSoftBody* btSoftBodyHelpers_CreateFromTetGenData(btSoftBodyWorldInfo* worldInfo, const char* ele, const char* face, const char* node, bool bfacelinks, bool btetralinks, bool bfacesfromtetras); + EXPORT btSoftBody* btSoftBodyHelpers_CreateFromTriMesh(btSoftBodyWorldInfo* worldInfo, const btScalar* vertices, const int* triangles, int ntriangles, bool randomizeConstraints); + EXPORT btSoftBody* btSoftBodyHelpers_CreatePatch(btSoftBodyWorldInfo* worldInfo, const btVector3* corner00, const btVector3* corner10, const btVector3* corner01, const btVector3* corner11, int resx, int resy, int fixeds, bool gendiags); +#endif + EXPORT btSoftBody* btSoftBodyHelpers_CreatePatchUV(btSoftBodyWorldInfo* worldInfo, const btVector3* corner00, const btVector3* corner10, const btVector3* corner01, const btVector3* corner11, int resx, int resy, int fixeds, bool gendiags, float* tex_coords); +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS + EXPORT btSoftBody* btSoftBodyHelpers_CreateRope(btSoftBodyWorldInfo* worldInfo, const btVector3* from, const btVector3* to, int res, int fixeds); +#endif + EXPORT void btSoftBodyHelpers_Draw(btSoftBody* psb, btIDebugDraw* idraw, int drawflags); + EXPORT void btSoftBodyHelpers_DrawClusterTree(btSoftBody* psb, btIDebugDraw* idraw, int mindepth, int maxdepth); + EXPORT void btSoftBodyHelpers_DrawFaceTree(btSoftBody* psb, btIDebugDraw* idraw, int mindepth, int maxdepth); + EXPORT void btSoftBodyHelpers_DrawFrame(btSoftBody* psb, btIDebugDraw* idraw); +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS + EXPORT void btSoftBodyHelpers_DrawInfos(btSoftBody* psb, btIDebugDraw* idraw, bool masses, bool areas, bool stress); +#endif + EXPORT void btSoftBodyHelpers_DrawNodeTree(btSoftBody* psb, btIDebugDraw* idraw, int mindepth, int maxdepth); +#ifndef BULLETC_DISABLE_SOFTBODY_HELPERS + EXPORT void btSoftBodyHelpers_ReoptimizeLinkOrder(btSoftBody* psb); +#endif +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.cpp new file mode 100644 index 0000000..6d67f1c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSoftBodyRigidBodyCollisionConfiguration_wrap.h" + +btSoftBodyRigidBodyCollisionConfiguration* btSoftBodyRigidBodyCollisionConfiguration_new() +{ + return new btSoftBodyRigidBodyCollisionConfiguration(); +} + +btSoftBodyRigidBodyCollisionConfiguration* btSoftBodyRigidBodyCollisionConfiguration_new2( + const btDefaultCollisionConstructionInfo* constructionInfo) +{ + return new btSoftBodyRigidBodyCollisionConfiguration(*constructionInfo); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.h new file mode 100644 index 0000000..2fa7e0e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSoftBodyRigidBodyCollisionConfiguration* btSoftBodyRigidBodyCollisionConfiguration_new(); + EXPORT btSoftBodyRigidBodyCollisionConfiguration* btSoftBodyRigidBodyCollisionConfiguration_new2(const btDefaultCollisionConstructionInfo* constructionInfo); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.cpp new file mode 100644 index 0000000..40fe1be --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.cpp @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btSoftBodySolvers_wrap.h" + +bool btSoftBodySolver_checkInitialized(btSoftBodySolver* obj) +{ + return obj->checkInitialized(); +} + +void btSoftBodySolver_copyBackToSoftBodies(btSoftBodySolver* obj, bool bMove) +{ + obj->copyBackToSoftBodies(bMove); +} + +int btSoftBodySolver_getNumberOfPositionIterations(btSoftBodySolver* obj) +{ + return obj->getNumberOfPositionIterations(); +} + +int btSoftBodySolver_getNumberOfVelocityIterations(btSoftBodySolver* obj) +{ + return obj->getNumberOfVelocityIterations(); +} +/* +SolverTypes btSoftBodySolver_getSolverType(btSoftBodySolver* obj) +{ + return obj->getSolverType(); +} +*/ +float btSoftBodySolver_getTimeScale(btSoftBodySolver* obj) +{ + return obj->getTimeScale(); +} + +void btSoftBodySolver_optimize(btSoftBodySolver* obj, btAlignedObjectArray_btSoftBodyPtr* softBodies, + bool forceUpdate) +{ + obj->optimize(*softBodies, forceUpdate); +} + +void btSoftBodySolver_predictMotion(btSoftBodySolver* obj, float solverdt) +{ + obj->predictMotion(solverdt); +} +/* +void btSoftBodySolver_processCollision(btSoftBodySolver* obj, btSoftBody* __unnamed0, + const btCollisionObjectWrapper* __unnamed1) +{ + obj->processCollision(__unnamed0, __unnamed1); +} + +void btSoftBodySolver_processCollision2(btSoftBodySolver* obj, btSoftBody* __unnamed0, + btSoftBody* __unnamed1) +{ + obj->processCollision(__unnamed0, __unnamed1); +} +*/ +void btSoftBodySolver_setNumberOfPositionIterations(btSoftBodySolver* obj, int iterations) +{ + obj->setNumberOfPositionIterations(iterations); +} + +void btSoftBodySolver_setNumberOfVelocityIterations(btSoftBodySolver* obj, int iterations) +{ + obj->setNumberOfVelocityIterations(iterations); +} + +void btSoftBodySolver_solveConstraints(btSoftBodySolver* obj, float solverdt) +{ + obj->solveConstraints(solverdt); +} + +void btSoftBodySolver_updateSoftBodies(btSoftBodySolver* obj) +{ + obj->updateSoftBodies(); +} + +void btSoftBodySolver_delete(btSoftBodySolver* obj) +{ + delete obj; +} + +/* +void btSoftBodySolverOutput_copySoftBodyToVertexBuffer(btSoftBodySolverOutput* obj, + const btSoftBody* softBody, btVertexBufferDescriptor* vertexBuffer) +{ + obj->copySoftBodyToVertexBuffer(softBody, vertexBuffer); +} +*/ +void btSoftBodySolverOutput_delete(btSoftBodySolverOutput* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.h new file mode 100644 index 0000000..08b2ea0 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBodySolvers_wrap.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT bool btSoftBodySolver_checkInitialized(btSoftBodySolver* obj); + EXPORT void btSoftBodySolver_copyBackToSoftBodies(btSoftBodySolver* obj, bool bMove); + EXPORT int btSoftBodySolver_getNumberOfPositionIterations(btSoftBodySolver* obj); + EXPORT int btSoftBodySolver_getNumberOfVelocityIterations(btSoftBodySolver* obj); + //EXPORT SolverTypes btSoftBodySolver_getSolverType(btSoftBodySolver* obj); + EXPORT float btSoftBodySolver_getTimeScale(btSoftBodySolver* obj); + EXPORT void btSoftBodySolver_optimize(btSoftBodySolver* obj, btAlignedObjectArray_btSoftBodyPtr* softBodies, bool forceUpdate); + EXPORT void btSoftBodySolver_predictMotion(btSoftBodySolver* obj, float solverdt); + //EXPORT void btSoftBodySolver_processCollision(btSoftBodySolver* obj, btSoftBody* __unnamed0, const btCollisionObjectWrapper* __unnamed1); + //EXPORT void btSoftBodySolver_processCollision2(btSoftBodySolver* obj, btSoftBody* __unnamed0, btSoftBody* __unnamed1); + EXPORT void btSoftBodySolver_setNumberOfPositionIterations(btSoftBodySolver* obj, int iterations); + EXPORT void btSoftBodySolver_setNumberOfVelocityIterations(btSoftBodySolver* obj, int iterations); + EXPORT void btSoftBodySolver_solveConstraints(btSoftBodySolver* obj, float solverdt); + EXPORT void btSoftBodySolver_updateSoftBodies(btSoftBodySolver* obj); + EXPORT void btSoftBodySolver_delete(btSoftBodySolver* obj); + + //EXPORT void btSoftBodySolverOutput_copySoftBodyToVertexBuffer(btSoftBodySolverOutput* obj, const btSoftBody* softBody, btVertexBufferDescriptor* vertexBuffer); + EXPORT void btSoftBodySolverOutput_delete(btSoftBodySolverOutput* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.cpp new file mode 100644 index 0000000..02d01dc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.cpp @@ -0,0 +1,3269 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include +#include + +#include "conversion.h" +#include "btSoftBody_wrap.h" + +btSoftBody_AJoint_IControlWrapper::btSoftBody_AJoint_IControlWrapper(p_btSoftBody_AJoint_IControl_Prepare PrepareCallback, + p_btSoftBody_AJoint_IControl_Speed SpeedCallback) +{ + _PrepareCallback = PrepareCallback; + _SpeedCallback = SpeedCallback; + _wrapperData = 0; +} + +void btSoftBody_AJoint_IControlWrapper::Prepare(btSoftBody_AJoint* aJoint) +{ + _PrepareCallback(aJoint); +} + +btScalar btSoftBody_AJoint_IControlWrapper::Speed(btSoftBody_AJoint* aJoint, + btScalar current) +{ + return _SpeedCallback(aJoint, current); +} + +void* btSoftBody_AJoint_IControlWrapper::getWrapperData() const +{ + return _wrapperData; +} + +void btSoftBody_AJoint_IControlWrapper::setWrapperData(void* data) +{ + _wrapperData = data; +} + + +btSoftBody_ImplicitFnWrapper::btSoftBody_ImplicitFnWrapper(p_btSoftBody_ImplicitFn_Eval EvalCallback) +{ + _EvalCallback = EvalCallback; +} + +btScalar btSoftBody_ImplicitFnWrapper::Eval(const btVector3& x) +{ + return _EvalCallback(&x); +} + + +btSoftBodyWorldInfo* btSoftBodyWorldInfo_new() +{ + return new btSoftBodyWorldInfo(); +} + +btScalar btSoftBodyWorldInfo_getAir_density(btSoftBodyWorldInfo* obj) +{ + return obj->air_density; +} + +btBroadphaseInterface* btSoftBodyWorldInfo_getBroadphase(btSoftBodyWorldInfo* obj) +{ + return obj->m_broadphase; +} + +btDispatcher* btSoftBodyWorldInfo_getDispatcher(btSoftBodyWorldInfo* obj) +{ + return obj->m_dispatcher; +} + +void btSoftBodyWorldInfo_getGravity(btSoftBodyWorldInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_gravity); +} + +btScalar btSoftBodyWorldInfo_getMaxDisplacement(btSoftBodyWorldInfo* obj) +{ + return obj->m_maxDisplacement; +} + +btSparseSdf_3* btSoftBodyWorldInfo_getSparsesdf(btSoftBodyWorldInfo* obj) +{ + return &obj->m_sparsesdf; +} + +btScalar btSoftBodyWorldInfo_getWater_density(btSoftBodyWorldInfo* obj) +{ + return obj->water_density; +} + +void btSoftBodyWorldInfo_getWater_normal(btSoftBodyWorldInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->water_normal); +} + +btScalar btSoftBodyWorldInfo_getWater_offset(btSoftBodyWorldInfo* obj) +{ + return obj->water_offset; +} + +void btSoftBodyWorldInfo_setAir_density(btSoftBodyWorldInfo* obj, btScalar value) +{ + obj->air_density = value; +} + +void btSoftBodyWorldInfo_setBroadphase(btSoftBodyWorldInfo* obj, btBroadphaseInterface* value) +{ + obj->m_broadphase = value; +} + +void btSoftBodyWorldInfo_setDispatcher(btSoftBodyWorldInfo* obj, btDispatcher* value) +{ + obj->m_dispatcher = value; +} + +void btSoftBodyWorldInfo_setGravity(btSoftBodyWorldInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_gravity, value); +} + +void btSoftBodyWorldInfo_setMaxDisplacement(btSoftBodyWorldInfo* obj, btScalar value) +{ + obj->m_maxDisplacement = value; +} + +void btSoftBodyWorldInfo_setWater_density(btSoftBodyWorldInfo* obj, btScalar value) +{ + obj->water_density = value; +} + +void btSoftBodyWorldInfo_setWater_normal(btSoftBodyWorldInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->water_normal, value); +} + +void btSoftBodyWorldInfo_setWater_offset(btSoftBodyWorldInfo* obj, btScalar value) +{ + obj->water_offset = value; +} + +void btSoftBodyWorldInfo_delete(btSoftBodyWorldInfo* obj) +{ + delete obj; +} + + +btSoftBody_AJoint_IControlWrapper* btSoftBody_AJoint_IControlWrapper_new(p_btSoftBody_AJoint_IControl_Prepare PrepareCallback, + p_btSoftBody_AJoint_IControl_Speed SpeedCallback) +{ + return ALIGNED_NEW(btSoftBody_AJoint_IControlWrapper)(PrepareCallback, SpeedCallback); +} + +void* btSoftBody_AJoint_IControlWrapper_getWrapperData(btSoftBody_AJoint_IControlWrapper* obj) +{ + return obj->getWrapperData(); +} + +void btSoftBody_AJoint_IControlWrapper_setWrapperData(btSoftBody_AJoint_IControlWrapper* obj, void* data) +{ + obj->setWrapperData(data); +} + + +btSoftBody_AJoint_IControl* btSoftBody_AJoint_IControl_new() +{ + return ALIGNED_NEW(btSoftBody_AJoint_IControl)(); +} + +btSoftBody_AJoint_IControl* btSoftBody_AJoint_IControl_Default() +{ + return btSoftBody_AJoint_IControl::Default(); +} + +void btSoftBody_AJoint_IControl_Prepare(btSoftBody_AJoint_IControl* obj, btSoftBody_AJoint* __unnamed0) +{ + obj->Prepare(__unnamed0); +} + +btScalar btSoftBody_AJoint_IControl_Speed(btSoftBody_AJoint_IControl* obj, btSoftBody_AJoint* __unnamed0, + btScalar current) +{ + return obj->Speed(__unnamed0, current); +} + +void btSoftBody_AJoint_IControl_delete(btSoftBody_AJoint_IControl* obj) +{ + ALIGNED_FREE(obj); +} + + +btSoftBody_AJoint_Specs* btSoftBody_AJoint_Specs_new() +{ + return new btSoftBody::AJoint::Specs(); +} + +void btSoftBody_AJoint_Specs_getAxis(btSoftBody_AJoint_Specs* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->axis); +} + +btSoftBody_AJoint_IControl* btSoftBody_AJoint_Specs_getIcontrol(btSoftBody_AJoint_Specs* obj) +{ + return obj->icontrol; +} + +void btSoftBody_AJoint_Specs_setAxis(btSoftBody_AJoint_Specs* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->axis, value); +} + +void btSoftBody_AJoint_Specs_setIcontrol(btSoftBody_AJoint_Specs* obj, btSoftBody_AJoint_IControl* value) +{ + obj->icontrol = value; +} + + +btVector3* btSoftBody_AJoint_getAxis(btSoftBody_AJoint* obj) +{ + return obj->m_axis; +} + +btSoftBody_AJoint_IControl* btSoftBody_AJoint_getIcontrol(btSoftBody_AJoint* obj) +{ + return obj->m_icontrol; +} + +void btSoftBody_AJoint_setIcontrol(btSoftBody_AJoint* obj, btSoftBody_AJoint_IControl* value) +{ + obj->m_icontrol = value; +} + + +btRigidBody* btSoftBody_Anchor_getBody(btSoftBody_Anchor* obj) +{ + return obj->m_body; +} + +void btSoftBody_Anchor_getC0(btSoftBody_Anchor* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->m_c0); +} + +void btSoftBody_Anchor_getC1(btSoftBody_Anchor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_c1); +} + +btScalar btSoftBody_Anchor_getC2(btSoftBody_Anchor* obj) +{ + return obj->m_c2; +} + +btScalar btSoftBody_Anchor_getInfluence(btSoftBody_Anchor* obj) +{ + return obj->m_influence; +} + +void btSoftBody_Anchor_getLocal(btSoftBody_Anchor* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_local); +} + +btSoftBody_Node* btSoftBody_Anchor_getNode(btSoftBody_Anchor* obj) +{ + return obj->m_node; +} + +void btSoftBody_Anchor_setBody(btSoftBody_Anchor* obj, btRigidBody* value) +{ + obj->m_body = value; +} + +void btSoftBody_Anchor_setC0(btSoftBody_Anchor* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_c0, (btScalar*)value); +} + +void btSoftBody_Anchor_setC1(btSoftBody_Anchor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_c1, value); +} + +void btSoftBody_Anchor_setC2(btSoftBody_Anchor* obj, btScalar value) +{ + obj->m_c2 = value; +} + +void btSoftBody_Anchor_setInfluence(btSoftBody_Anchor* obj, btScalar value) +{ + obj->m_influence = value; +} + +void btSoftBody_Anchor_setLocal(btSoftBody_Anchor* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_local, value); +} + +void btSoftBody_Anchor_setNode(btSoftBody_Anchor* obj, btSoftBody_Node* value) +{ + obj->m_node = value; +} + + +btSoftBody_Body* btSoftBody_Body_new() +{ + return new btSoftBody::Body(); +} + +btSoftBody_Body* btSoftBody_Body_new2(const btCollisionObject* colObj) +{ + return new btSoftBody::Body(colObj); +} + +btSoftBody_Body* btSoftBody_Body_new3(btSoftBody_Cluster* p) +{ + return new btSoftBody::Body(p); +} + +void btSoftBody_Body_activate(btSoftBody_Body* obj) +{ + obj->activate(); +} + +void btSoftBody_Body_angularVelocity(btSoftBody_Body* obj, const btVector3* rpos, + btVector3* value) +{ + BTVECTOR3_IN(rpos); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->angularVelocity(BTVECTOR3_USE(rpos)); + BTVECTOR3_SET(value, temp); +} + +void btSoftBody_Body_angularVelocity2(btSoftBody_Body* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->angularVelocity(); + BTVECTOR3_SET(value, temp); +} + +void btSoftBody_Body_applyAImpulse(btSoftBody_Body* obj, const btSoftBody_Impulse* impulse) +{ + obj->applyAImpulse(*impulse); +} + +void btSoftBody_Body_applyDAImpulse(btSoftBody_Body* obj, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + obj->applyDAImpulse(BTVECTOR3_USE(impulse)); +} + +void btSoftBody_Body_applyDCImpulse(btSoftBody_Body* obj, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + obj->applyDCImpulse(BTVECTOR3_USE(impulse)); +} + +void btSoftBody_Body_applyDImpulse(btSoftBody_Body* obj, const btVector3* impulse, + const btVector3* rpos) +{ + BTVECTOR3_IN(impulse); + BTVECTOR3_IN(rpos); + obj->applyDImpulse(BTVECTOR3_USE(impulse), BTVECTOR3_USE(rpos)); +} + +void btSoftBody_Body_applyImpulse(btSoftBody_Body* obj, const btSoftBody_Impulse* impulse, + const btVector3* rpos) +{ + BTVECTOR3_IN(rpos); + obj->applyImpulse(*impulse, BTVECTOR3_USE(rpos)); +} + +void btSoftBody_Body_applyVAImpulse(btSoftBody_Body* obj, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + obj->applyVAImpulse(BTVECTOR3_USE(impulse)); +} + +void btSoftBody_Body_applyVImpulse(btSoftBody_Body* obj, const btVector3* impulse, + const btVector3* rpos) +{ + BTVECTOR3_IN(impulse); + BTVECTOR3_IN(rpos); + obj->applyVImpulse(BTVECTOR3_USE(impulse), BTVECTOR3_USE(rpos)); +} + +const btCollisionObject* btSoftBody_Body_getCollisionObject(btSoftBody_Body* obj) +{ + return obj->m_collisionObject; +} + +btRigidBody* btSoftBody_Body_getRigid(btSoftBody_Body* obj) +{ + return obj->m_rigid; +} + +btSoftBody_Cluster* btSoftBody_Body_getSoft(btSoftBody_Body* obj) +{ + return obj->m_soft; +} + +btScalar btSoftBody_Body_invMass(btSoftBody_Body* obj) +{ + return obj->invMass(); +} + +void btSoftBody_Body_invWorldInertia(btSoftBody_Body* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(&obj->invWorldInertia(), value); +} + +void btSoftBody_Body_linearVelocity(btSoftBody_Body* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->linearVelocity(); + BTVECTOR3_SET(value, temp); +} + +void btSoftBody_Body_setCollisionObject(btSoftBody_Body* obj, const btCollisionObject* value) +{ + obj->m_collisionObject = value; +} + +void btSoftBody_Body_setRigid(btSoftBody_Body* obj, btRigidBody* value) +{ + obj->m_rigid = value; +} + +void btSoftBody_Body_setSoft(btSoftBody_Body* obj, btSoftBody_Cluster* value) +{ + obj->m_soft = value; +} + +void btSoftBody_Body_velocity(btSoftBody_Body* obj, const btVector3* rpos, btVector3* value) +{ + BTVECTOR3_IN(rpos); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->velocity(BTVECTOR3_USE(rpos)); + BTVECTOR3_SET(value, temp); +} + +void btSoftBody_Body_xform(btSoftBody_Body* obj, btTransform* value) +{ + BTTRANSFORM_COPY(value, &obj->xform()); +} + +void btSoftBody_Body_delete(btSoftBody_Body* obj) +{ + delete obj; +} + + +btSoftBody_Body* btSoftBody_Body_array_at(btSoftBody_Body* obj, int index) +{ + return &obj[index]; +} + + +btScalar btSoftBody_CJoint_getFriction(btSoftBody_CJoint* obj) +{ + return obj->m_friction; +} + +int btSoftBody_CJoint_getLife(btSoftBody_CJoint* obj) +{ + return obj->m_life; +} + +int btSoftBody_CJoint_getMaxlife(btSoftBody_CJoint* obj) +{ + return obj->m_maxlife; +} + +void btSoftBody_CJoint_getNormal(btSoftBody_CJoint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normal); +} + +btVector3* btSoftBody_CJoint_getRpos(btSoftBody_CJoint* obj) +{ + return obj->m_rpos; +} + +void btSoftBody_CJoint_setFriction(btSoftBody_CJoint* obj, btScalar value) +{ + obj->m_friction = value; +} + +void btSoftBody_CJoint_setLife(btSoftBody_CJoint* obj, int value) +{ + obj->m_life = value; +} + +void btSoftBody_CJoint_setMaxlife(btSoftBody_CJoint* obj, int value) +{ + obj->m_maxlife = value; +} + +void btSoftBody_CJoint_setNormal(btSoftBody_CJoint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normal, value); +} + + +btScalar btSoftBody_Cluster_getAdamping(btSoftBody_Cluster* obj) +{ + return obj->m_adamping; +} + +void btSoftBody_Cluster_getAv(btSoftBody_Cluster* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_av); +} + +int btSoftBody_Cluster_getClusterIndex(btSoftBody_Cluster* obj) +{ + return obj->m_clusterIndex; +} + +bool btSoftBody_Cluster_getCollide(btSoftBody_Cluster* obj) +{ + return obj->m_collide; +} + +void btSoftBody_Cluster_getCom(btSoftBody_Cluster* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_com); +} + +bool btSoftBody_Cluster_getContainsAnchor(btSoftBody_Cluster* obj) +{ + return obj->m_containsAnchor; +} + +btVector3* btSoftBody_Cluster_getDimpulses(btSoftBody_Cluster* obj) +{ + return obj->m_dimpulses; +} + +btAlignedObjectArray_btVector3* btSoftBody_Cluster_getFramerefs(btSoftBody_Cluster* obj) +{ + return &obj->m_framerefs; +} + +void btSoftBody_Cluster_getFramexform(btSoftBody_Cluster* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_framexform); +} + +btScalar btSoftBody_Cluster_getIdmass(btSoftBody_Cluster* obj) +{ + return obj->m_idmass; +} + +btScalar btSoftBody_Cluster_getImass(btSoftBody_Cluster* obj) +{ + return obj->m_imass; +} + +void btSoftBody_Cluster_getInvwi(btSoftBody_Cluster* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_invwi); +} + +btScalar btSoftBody_Cluster_getLdamping(btSoftBody_Cluster* obj) +{ + return obj->m_ldamping; +} + +btDbvtNode* btSoftBody_Cluster_getLeaf(btSoftBody_Cluster* obj) +{ + return obj->m_leaf; +} + +void btSoftBody_Cluster_getLocii(btSoftBody_Cluster* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_locii); +} + +void btSoftBody_Cluster_getLv(btSoftBody_Cluster* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_lv); +} + +btAlignedObjectArray_btScalar* btSoftBody_Cluster_getMasses(btSoftBody_Cluster* obj) +{ + return &obj->m_masses; +} + +btScalar btSoftBody_Cluster_getMatching(btSoftBody_Cluster* obj) +{ + return obj->m_matching; +} + +btScalar btSoftBody_Cluster_getMaxSelfCollisionImpulse(btSoftBody_Cluster* obj) +{ + return obj->m_maxSelfCollisionImpulse; +} + +btScalar btSoftBody_Cluster_getNdamping(btSoftBody_Cluster* obj) +{ + return obj->m_ndamping; +} + +int btSoftBody_Cluster_getNdimpulses(btSoftBody_Cluster* obj) +{ + return obj->m_ndimpulses; +} + +btAlignedObjectArray_btSoftBody_NodePtr* btSoftBody_Cluster_getNodes(btSoftBody_Cluster* obj) +{ + return &obj->m_nodes; +} + +int btSoftBody_Cluster_getNvimpulses(btSoftBody_Cluster* obj) +{ + return obj->m_nvimpulses; +} + +btScalar btSoftBody_Cluster_getSelfCollisionImpulseFactor(btSoftBody_Cluster* obj) +{ + return obj->m_selfCollisionImpulseFactor; +} + +btVector3* btSoftBody_Cluster_getVimpulses(btSoftBody_Cluster* obj) +{ + return obj->m_vimpulses; +} + +void btSoftBody_Cluster_setAdamping(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_adamping = value; +} + +void btSoftBody_Cluster_setAv(btSoftBody_Cluster* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_av, value); +} + +void btSoftBody_Cluster_setClusterIndex(btSoftBody_Cluster* obj, int value) +{ + obj->m_clusterIndex = value; +} + +void btSoftBody_Cluster_setCollide(btSoftBody_Cluster* obj, bool value) +{ + obj->m_collide = value; +} + +void btSoftBody_Cluster_setCom(btSoftBody_Cluster* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_com, value); +} + +void btSoftBody_Cluster_setContainsAnchor(btSoftBody_Cluster* obj, bool value) +{ + obj->m_containsAnchor = value; +} + +void btSoftBody_Cluster_setFramexform(btSoftBody_Cluster* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_framexform, value); +} + +void btSoftBody_Cluster_setIdmass(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_idmass = value; +} + +void btSoftBody_Cluster_setImass(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_imass = value; +} + +void btSoftBody_Cluster_setInvwi(btSoftBody_Cluster* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_invwi, (btScalar*)value); +} + +void btSoftBody_Cluster_setLdamping(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_ldamping = value; +} + +void btSoftBody_Cluster_setLeaf(btSoftBody_Cluster* obj, btDbvtNode* value) +{ + obj->m_leaf = value; +} + +void btSoftBody_Cluster_setLocii(btSoftBody_Cluster* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_locii, (btScalar*)value); +} + +void btSoftBody_Cluster_setLv(btSoftBody_Cluster* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_lv, value); +} + +void btSoftBody_Cluster_setMatching(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_matching = value; +} + +void btSoftBody_Cluster_setMaxSelfCollisionImpulse(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_maxSelfCollisionImpulse = value; +} + +void btSoftBody_Cluster_setNdamping(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_ndamping = value; +} + +void btSoftBody_Cluster_setNdimpulses(btSoftBody_Cluster* obj, int value) +{ + obj->m_ndimpulses = value; +} + +void btSoftBody_Cluster_setNvimpulses(btSoftBody_Cluster* obj, int value) +{ + obj->m_nvimpulses = value; +} + +void btSoftBody_Cluster_setSelfCollisionImpulseFactor(btSoftBody_Cluster* obj, btScalar value) +{ + obj->m_selfCollisionImpulseFactor = value; +} + + +btSoftBody_eAeroModel btSoftBody_Config_getAeromodel(btSoftBody_Config* obj) +{ + return obj->aeromodel; +} + +int btSoftBody_Config_getCiterations(btSoftBody_Config* obj) +{ + return obj->citerations; +} + +int btSoftBody_Config_getCollisions(btSoftBody_Config* obj) +{ + return obj->collisions; +} + +int btSoftBody_Config_getDiterations(btSoftBody_Config* obj) +{ + return obj->diterations; +} + +btAlignedObjectArray_btSoftBody_ePSolver__* btSoftBody_Config_getDsequence(btSoftBody_Config* obj) +{ + return &obj->m_dsequence; +} + +btScalar btSoftBody_Config_getKAHR(btSoftBody_Config* obj) +{ + return obj->kAHR; +} + +btScalar btSoftBody_Config_getKCHR(btSoftBody_Config* obj) +{ + return obj->kCHR; +} + +btScalar btSoftBody_Config_getKDF(btSoftBody_Config* obj) +{ + return obj->kDF; +} + +btScalar btSoftBody_Config_getKDG(btSoftBody_Config* obj) +{ + return obj->kDG; +} + +btScalar btSoftBody_Config_getKDP(btSoftBody_Config* obj) +{ + return obj->kDP; +} + +btScalar btSoftBody_Config_getKKHR(btSoftBody_Config* obj) +{ + return obj->kKHR; +} + +btScalar btSoftBody_Config_getKLF(btSoftBody_Config* obj) +{ + return obj->kLF; +} + +btScalar btSoftBody_Config_getKMT(btSoftBody_Config* obj) +{ + return obj->kMT; +} + +btScalar btSoftBody_Config_getKPR(btSoftBody_Config* obj) +{ + return obj->kPR; +} + +btScalar btSoftBody_Config_getKSHR(btSoftBody_Config* obj) +{ + return obj->kSHR; +} + +btScalar btSoftBody_Config_getKSK_SPLT_CL(btSoftBody_Config* obj) +{ + return obj->kSK_SPLT_CL; +} + +btScalar btSoftBody_Config_getKSKHR_CL(btSoftBody_Config* obj) +{ + return obj->kSKHR_CL; +} + +btScalar btSoftBody_Config_getKSR_SPLT_CL(btSoftBody_Config* obj) +{ + return obj->kSR_SPLT_CL; +} + +btScalar btSoftBody_Config_getKSRHR_CL(btSoftBody_Config* obj) +{ + return obj->kSRHR_CL; +} + +btScalar btSoftBody_Config_getKSS_SPLT_CL(btSoftBody_Config* obj) +{ + return obj->kSS_SPLT_CL; +} + +btScalar btSoftBody_Config_getKSSHR_CL(btSoftBody_Config* obj) +{ + return obj->kSSHR_CL; +} + +btScalar btSoftBody_Config_getKVC(btSoftBody_Config* obj) +{ + return obj->kVC; +} + +btScalar btSoftBody_Config_getKVCF(btSoftBody_Config* obj) +{ + return obj->kVCF; +} + +btScalar btSoftBody_Config_getMaxvolume(btSoftBody_Config* obj) +{ + return obj->maxvolume; +} + +int btSoftBody_Config_getPiterations(btSoftBody_Config* obj) +{ + return obj->piterations; +} + +btAlignedObjectArray_btSoftBody_ePSolver__* btSoftBody_Config_getPsequence(btSoftBody_Config* obj) +{ + return &obj->m_psequence; +} + +btScalar btSoftBody_Config_getTimescale(btSoftBody_Config* obj) +{ + return obj->timescale; +} + +int btSoftBody_Config_getViterations(btSoftBody_Config* obj) +{ + return obj->viterations; +} + +btAlignedObjectArray_btSoftBody_eVSolver__* btSoftBody_Config_getVsequence(btSoftBody_Config* obj) +{ + return &obj->m_vsequence; +} + +void btSoftBody_Config_setAeromodel(btSoftBody_Config* obj, btSoftBody_eAeroModel value) +{ + obj->aeromodel = value; +} + +void btSoftBody_Config_setCiterations(btSoftBody_Config* obj, int value) +{ + obj->citerations = value; +} + +void btSoftBody_Config_setCollisions(btSoftBody_Config* obj, int value) +{ + obj->collisions = value; +} + +void btSoftBody_Config_setDiterations(btSoftBody_Config* obj, int value) +{ + obj->diterations = value; +} + +void btSoftBody_Config_setKAHR(btSoftBody_Config* obj, btScalar value) +{ + obj->kAHR = value; +} + +void btSoftBody_Config_setKCHR(btSoftBody_Config* obj, btScalar value) +{ + obj->kCHR = value; +} + +void btSoftBody_Config_setKDF(btSoftBody_Config* obj, btScalar value) +{ + obj->kDF = value; +} + +void btSoftBody_Config_setKDG(btSoftBody_Config* obj, btScalar value) +{ + obj->kDG = value; +} + +void btSoftBody_Config_setKDP(btSoftBody_Config* obj, btScalar value) +{ + obj->kDP = value; +} + +void btSoftBody_Config_setKKHR(btSoftBody_Config* obj, btScalar value) +{ + obj->kKHR = value; +} + +void btSoftBody_Config_setKLF(btSoftBody_Config* obj, btScalar value) +{ + obj->kLF = value; +} + +void btSoftBody_Config_setKMT(btSoftBody_Config* obj, btScalar value) +{ + obj->kMT = value; +} + +void btSoftBody_Config_setKPR(btSoftBody_Config* obj, btScalar value) +{ + obj->kPR = value; +} + +void btSoftBody_Config_setKSHR(btSoftBody_Config* obj, btScalar value) +{ + obj->kSHR = value; +} + +void btSoftBody_Config_setKSK_SPLT_CL(btSoftBody_Config* obj, btScalar value) +{ + obj->kSK_SPLT_CL = value; +} + +void btSoftBody_Config_setKSKHR_CL(btSoftBody_Config* obj, btScalar value) +{ + obj->kSKHR_CL = value; +} + +void btSoftBody_Config_setKSR_SPLT_CL(btSoftBody_Config* obj, btScalar value) +{ + obj->kSR_SPLT_CL = value; +} + +void btSoftBody_Config_setKSRHR_CL(btSoftBody_Config* obj, btScalar value) +{ + obj->kSRHR_CL = value; +} + +void btSoftBody_Config_setKSS_SPLT_CL(btSoftBody_Config* obj, btScalar value) +{ + obj->kSS_SPLT_CL = value; +} + +void btSoftBody_Config_setKSSHR_CL(btSoftBody_Config* obj, btScalar value) +{ + obj->kSSHR_CL = value; +} + +void btSoftBody_Config_setKVC(btSoftBody_Config* obj, btScalar value) +{ + obj->kVC = value; +} + +void btSoftBody_Config_setKVCF(btSoftBody_Config* obj, btScalar value) +{ + obj->kVCF = value; +} + +void btSoftBody_Config_setMaxvolume(btSoftBody_Config* obj, btScalar value) +{ + obj->maxvolume = value; +} + +void btSoftBody_Config_setPiterations(btSoftBody_Config* obj, int value) +{ + obj->piterations = value; +} + +void btSoftBody_Config_setTimescale(btSoftBody_Config* obj, btScalar value) +{ + obj->timescale = value; +} + +void btSoftBody_Config_setViterations(btSoftBody_Config* obj, int value) +{ + obj->viterations = value; +} + + +void* btSoftBody_Element_getTag(btSoftBody_Element* obj) +{ + return obj->m_tag; +} + +void btSoftBody_Element_setTag(btSoftBody_Element* obj, void* value) +{ + obj->m_tag = value; +} + +void btSoftBody_Element_delete(btSoftBody_Element* obj) +{ + delete obj; +} + + +btDbvtNode* btSoftBody_Face_getLeaf(btSoftBody_Face* obj) +{ + return obj->m_leaf; +} + +btSoftBody_Node** btSoftBody_Face_getN(btSoftBody_Face* obj) +{ + return obj->m_n; +} + +void btSoftBody_Face_getNormal(btSoftBody_Face* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normal); +} + +btScalar btSoftBody_Face_getRa(btSoftBody_Face* obj) +{ + return obj->m_ra; +} + +void btSoftBody_Face_setLeaf(btSoftBody_Face* obj, btDbvtNode* value) +{ + obj->m_leaf = value; +} + +void btSoftBody_Face_setNormal(btSoftBody_Face* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normal, value); +} + +void btSoftBody_Face_setRa(btSoftBody_Face* obj, btScalar value) +{ + obj->m_ra = value; +} + + +btSoftBody_Material* btSoftBody_Feature_getMaterial(btSoftBody_Feature* obj) +{ + return obj->m_material; +} + +void btSoftBody_Feature_setMaterial(btSoftBody_Feature* obj, btSoftBody_Material* value) +{ + obj->m_material = value; +} + + +btSoftBody_ImplicitFnWrapper* btSoftBody_ImplicitFnWrapper_new(p_btSoftBody_ImplicitFn_Eval EvalCallback) +{ + return new btSoftBody_ImplicitFnWrapper(EvalCallback); +} + + +btScalar btSoftBody_ImplicitFn_Eval(btSoftBody_ImplicitFn* obj, const btVector3* x) +{ + BTVECTOR3_IN(x); + return obj->Eval(BTVECTOR3_USE(x)); +} + +void btSoftBody_ImplicitFn_delete(btSoftBody_ImplicitFn* obj) +{ + delete obj; +} + + +btSoftBody_Impulse* btSoftBody_Impulse_new() +{ + return new btSoftBody::Impulse(); +} + +int btSoftBody_Impulse_getAsDrift(btSoftBody_Impulse* obj) +{ + return obj->m_asDrift; +} + +int btSoftBody_Impulse_getAsVelocity(btSoftBody_Impulse* obj) +{ + return obj->m_asVelocity; +} + +void btSoftBody_Impulse_getDrift(btSoftBody_Impulse* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_drift); +} + +void btSoftBody_Impulse_getVelocity(btSoftBody_Impulse* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_velocity); +} + +btSoftBody_Impulse* btSoftBody_Impulse_operator_n(btSoftBody_Impulse* obj) +{ + btSoftBody_Impulse* ret = new btSoftBody_Impulse; + *ret = obj->operator-(); + return ret; +} + +btSoftBody_Impulse* btSoftBody_Impulse_operator_m(btSoftBody_Impulse* obj, btScalar x) +{ + btSoftBody_Impulse* ret = new btSoftBody_Impulse; + *ret = obj->operator*(x); + return ret; +} + +void btSoftBody_Impulse_setAsDrift(btSoftBody_Impulse* obj, int value) +{ + obj->m_asDrift = value; +} + +void btSoftBody_Impulse_setAsVelocity(btSoftBody_Impulse* obj, int value) +{ + obj->m_asVelocity = value; +} + +void btSoftBody_Impulse_setDrift(btSoftBody_Impulse* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_drift, value); +} + +void btSoftBody_Impulse_setVelocity(btSoftBody_Impulse* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_velocity, value); +} + +void btSoftBody_Impulse_delete(btSoftBody_Impulse* obj) +{ + delete obj; +} + + +btSoftBody::Joint::Specs* btSoftBody_Joint_Specs_new() +{ + return new btSoftBody::Joint::Specs(); +} + +btScalar btSoftBody_Joint_Specs_getCfm(btSoftBody_Joint_Specs* obj) +{ + return obj->cfm; +} + +btScalar btSoftBody_Joint_Specs_getErp(btSoftBody_Joint_Specs* obj) +{ + return obj->erp; +} + +btScalar btSoftBody_Joint_Specs_getSplit(btSoftBody_Joint_Specs* obj) +{ + return obj->split; +} + +void btSoftBody_Joint_Specs_setCfm(btSoftBody_Joint_Specs* obj, btScalar value) +{ + obj->cfm = value; +} + +void btSoftBody_Joint_Specs_setErp(btSoftBody_Joint_Specs* obj, btScalar value) +{ + obj->erp = value; +} + +void btSoftBody_Joint_Specs_setSplit(btSoftBody_Joint_Specs* obj, btScalar value) +{ + obj->split = value; +} + +void btSoftBody_Joint_Specs_delete(btSoftBody_Joint_Specs* obj) +{ + delete obj; +} + + +btSoftBody_Body* btSoftBody_Joint_getBodies(btSoftBody_Joint* obj) +{ + return obj->m_bodies; +} + +btScalar btSoftBody_Joint_getCfm(btSoftBody_Joint* obj) +{ + return obj->m_cfm; +} + +bool btSoftBody_Joint_getDelete(btSoftBody_Joint* obj) +{ + return obj->m_delete; +} + +void btSoftBody_Joint_getDrift(btSoftBody_Joint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_drift); +} + +btScalar btSoftBody_Joint_getErp(btSoftBody_Joint* obj) +{ + return obj->m_erp; +} + +void btSoftBody_Joint_getMassmatrix(btSoftBody_Joint* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_massmatrix); +} + +btVector3* btSoftBody_Joint_getRefs(btSoftBody_Joint* obj) +{ + return obj->m_refs; +} + +void btSoftBody_Joint_getSdrift(btSoftBody_Joint* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_sdrift); +} + +btScalar btSoftBody_Joint_getSplit(btSoftBody_Joint* obj) +{ + return obj->m_split; +} + +void btSoftBody_Joint_Prepare(btSoftBody_Joint* obj, btScalar dt, int iterations) +{ + obj->Prepare(dt, iterations); +} + +void btSoftBody_Joint_setCfm(btSoftBody_Joint* obj, btScalar value) +{ + obj->m_cfm = value; +} + +void btSoftBody_Joint_setDelete(btSoftBody_Joint* obj, bool value) +{ + obj->m_delete = value; +} + +void btSoftBody_Joint_setDrift(btSoftBody_Joint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_drift, value); +} + +void btSoftBody_Joint_setErp(btSoftBody_Joint* obj, btScalar value) +{ + obj->m_erp = value; +} + +void btSoftBody_Joint_setMassmatrix(btSoftBody_Joint* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_massmatrix, (btScalar*)value); +} + +void btSoftBody_Joint_setSdrift(btSoftBody_Joint* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_sdrift, value); +} + +void btSoftBody_Joint_setSplit(btSoftBody_Joint* obj, btScalar value) +{ + obj->m_split = value; +} + +void btSoftBody_Joint_Solve(btSoftBody_Joint* obj, btScalar dt, btScalar sor) +{ + obj->Solve(dt, sor); +} + +void btSoftBody_Joint_Terminate(btSoftBody_Joint* obj, btScalar dt) +{ + obj->Terminate(dt); +} + +btSoftBody_Joint_eType btSoftBody_Joint_Type(btSoftBody_Joint* obj) +{ + return obj->Type(); +} + +void btSoftBody_Joint_delete(btSoftBody_Joint* obj) +{ + delete obj; +} + + +btSoftBody_Link* btSoftBody_Link_new() +{ + return ALIGNED_NEW(btSoftBody::Link)(); +} + +btSoftBody_Link* btSoftBody_Link_new2(btSoftBody_Link* obj) +{ + return ALIGNED_NEW(btSoftBody::Link)(*obj); +} + +int btSoftBody_Link_getBbending(btSoftBody_Link* obj) +{ + return obj->m_bbending; +} + +btScalar btSoftBody_Link_getC0(btSoftBody_Link* obj) +{ + return obj->m_c0; +} + +btScalar btSoftBody_Link_getC1(btSoftBody_Link* obj) +{ + return obj->m_c1; +} + +btScalar btSoftBody_Link_getC2(btSoftBody_Link* obj) +{ + return obj->m_c2; +} + +void btSoftBody_Link_getC3(btSoftBody_Link* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_c3); +} + +btSoftBody_Node** btSoftBody_Link_getN(btSoftBody_Link* obj) +{ + return obj->m_n; +} + +btScalar btSoftBody_Link_getRl(btSoftBody_Link* obj) +{ + return obj->m_rl; +} + +void btSoftBody_Link_setBbending(btSoftBody_Link* obj, int value) +{ + obj->m_bbending = value; +} + +void btSoftBody_Link_setC0(btSoftBody_Link* obj, btScalar value) +{ + obj->m_c0 = value; +} + +void btSoftBody_Link_setC1(btSoftBody_Link* obj, btScalar value) +{ + obj->m_c1 = value; +} + +void btSoftBody_Link_setC2(btSoftBody_Link* obj, btScalar value) +{ + obj->m_c2 = value; +} + +void btSoftBody_Link_setC3(btSoftBody_Link* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_c3, value); +} + +void btSoftBody_Link_setRl(btSoftBody_Link* obj, btScalar value) +{ + obj->m_rl = value; +} + +void btSoftBody_Link_delete(btSoftBody_Link* obj) +{ + ALIGNED_FREE(obj); +} + + +btSoftBody_LJoint_Specs* btSoftBody_LJoint_Specs_new() +{ + return new btSoftBody::LJoint::Specs(); +} + +void btSoftBody_LJoint_Specs_getPosition(btSoftBody_LJoint_Specs* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->position); +} + +void btSoftBody_LJoint_Specs_setPosition(btSoftBody_LJoint_Specs* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->position, value); +} + + +btVector3* btSoftBody_LJoint_getRpos(btSoftBody_LJoint* obj) +{ + return obj->m_rpos; +} + + +int btSoftBody_Material_getFlags(btSoftBody_Material* obj) +{ + return obj->m_flags; +} + +btScalar btSoftBody_Material_getKAST(btSoftBody_Material* obj) +{ + return obj->m_kAST; +} + +btScalar btSoftBody_Material_getKLST(btSoftBody_Material* obj) +{ + return obj->m_kLST; +} + +btScalar btSoftBody_Material_getKVST(btSoftBody_Material* obj) +{ + return obj->m_kVST; +} + +void btSoftBody_Material_setFlags(btSoftBody_Material* obj, int value) +{ + obj->m_flags = value; +} + +void btSoftBody_Material_setKAST(btSoftBody_Material* obj, btScalar value) +{ + obj->m_kAST = value; +} + +void btSoftBody_Material_setKLST(btSoftBody_Material* obj, btScalar value) +{ + obj->m_kLST = value; +} + +void btSoftBody_Material_setKVST(btSoftBody_Material* obj, btScalar value) +{ + obj->m_kVST = value; +} + + +btScalar btSoftBody_Node_getArea(btSoftBody_Node* obj) +{ + return obj->m_area; +} + +int btSoftBody_Node_getBattach(btSoftBody_Node* obj) +{ + return obj->m_battach; +} + +void btSoftBody_Node_getF(btSoftBody_Node* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_f); +} + +btScalar btSoftBody_Node_getIm(btSoftBody_Node* obj) +{ + return obj->m_im; +} + +int btSoftBody_Node_getIndex(btSoftBody_Node* obj) +{ + return obj->index; +} + +btDbvtNode* btSoftBody_Node_getLeaf(btSoftBody_Node* obj) +{ + return obj->m_leaf; +} + +void btSoftBody_Node_getN(btSoftBody_Node* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_n); +} + +void btSoftBody_Node_getQ(btSoftBody_Node* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_q); +} + +void btSoftBody_Node_getV(btSoftBody_Node* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_v); +} + +void btSoftBody_Node_getVN(btSoftBody_Node* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_vn); +} + +void btSoftBody_Node_getX(btSoftBody_Node* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_x); +} + +void btSoftBody_Node_setArea(btSoftBody_Node* obj, btScalar value) +{ + obj->m_area = value; +} + +void btSoftBody_Node_setBattach(btSoftBody_Node* obj, int value) +{ + obj->m_battach = value; +} + +void btSoftBody_Node_setF(btSoftBody_Node* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_f, value); +} + +void btSoftBody_Node_setIm(btSoftBody_Node* obj, btScalar value) +{ + obj->m_im = value; +} + +void btSoftBody_Node_setIndex(btSoftBody_Node* obj, int value) +{ + obj->index = value; +} + +void btSoftBody_Node_setLeaf(btSoftBody_Node* obj, btDbvtNode* value) +{ + obj->m_leaf = value; +} + +void btSoftBody_Node_setN(btSoftBody_Node* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_n, value); +} + +void btSoftBody_Node_setQ(btSoftBody_Node* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_q, value); +} + +void btSoftBody_Node_setV(btSoftBody_Node* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_v, value); +} + +void btSoftBody_Node_setVN(btSoftBody_Node* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_vn, value); +} + +void btSoftBody_Node_setX(btSoftBody_Node* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_x, value); +} + + +btScalar* btSoftBody_Note_getCoords(btSoftBody_Note* obj) +{ + return obj->m_coords; +} + +btSoftBody_Node** btSoftBody_Note_getNodes(btSoftBody_Note* obj) +{ + return obj->m_nodes; +} + +void btSoftBody_Note_getOffset(btSoftBody_Note* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_offset); +} + +int btSoftBody_Note_getRank(btSoftBody_Note* obj) +{ + return obj->m_rank; +} + +const char* btSoftBody_Note_getText(btSoftBody_Note* obj) +{ + return obj->m_text; +} + +void btSoftBody_Note_setOffset(btSoftBody_Note* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_offset, value); +} + +void btSoftBody_Note_setRank(btSoftBody_Note* obj, int value) +{ + obj->m_rank = value; +} + +void btSoftBody_Note_setText(btSoftBody_Note* obj, const char* value) +{ + obj->m_text = value; +} + + +void btSoftBody_Pose_getAqq(btSoftBody_Pose* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_aqq); +} + +bool btSoftBody_Pose_getBframe(btSoftBody_Pose* obj) +{ + return obj->m_bframe; +} + +bool btSoftBody_Pose_getBvolume(btSoftBody_Pose* obj) +{ + return obj->m_bvolume; +} + +void btSoftBody_Pose_getCom(btSoftBody_Pose* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_com); +} + +btAlignedObjectArray_btVector3* btSoftBody_Pose_getPos(btSoftBody_Pose* obj) +{ + return &obj->m_pos; +} + +void btSoftBody_Pose_getRot(btSoftBody_Pose* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_rot); +} + +void btSoftBody_Pose_getScl(btSoftBody_Pose* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_scl); +} + +btAlignedObjectArray_btScalar* btSoftBody_Pose_getWgh(btSoftBody_Pose* obj) +{ + return &obj->m_wgh; +} + +btScalar btSoftBody_Pose_getVolume(btSoftBody_Pose* obj) +{ + return obj->m_volume; +} + +void btSoftBody_Pose_setAqq(btSoftBody_Pose* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_aqq, (btScalar*)value); +} + +void btSoftBody_Pose_setBframe(btSoftBody_Pose* obj, bool value) +{ + obj->m_bframe = value; +} + +void btSoftBody_Pose_setBvolume(btSoftBody_Pose* obj, bool value) +{ + obj->m_bvolume = value; +} + +void btSoftBody_Pose_setCom(btSoftBody_Pose* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_com, value); +} + +void btSoftBody_Pose_setRot(btSoftBody_Pose* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_rot, (btScalar*)value); +} + +void btSoftBody_Pose_setScl(btSoftBody_Pose* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_scl, (btScalar*)value); +} + +void btSoftBody_Pose_setVolume(btSoftBody_Pose* obj, btScalar value) +{ + obj->m_volume = value; +} + + +btSoftBody_RayFromToCaster* btSoftBody_RayFromToCaster_new(const btVector3* rayFrom, + const btVector3* rayTo, btScalar mxt) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + return new btSoftBody::RayFromToCaster(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), + mxt); +} + +btSoftBody_Face* btSoftBody_RayFromToCaster_getFace(btSoftBody_RayFromToCaster* obj) +{ + return obj->m_face; +} + +btScalar btSoftBody_RayFromToCaster_getMint(btSoftBody_RayFromToCaster* obj) +{ + return obj->m_mint; +} + +void btSoftBody_RayFromToCaster_getRayFrom(btSoftBody_RayFromToCaster* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayFrom); +} + +void btSoftBody_RayFromToCaster_getRayNormalizedDirection(btSoftBody_RayFromToCaster* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayNormalizedDirection); +} + +void btSoftBody_RayFromToCaster_getRayTo(btSoftBody_RayFromToCaster* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_rayTo); +} + +int btSoftBody_RayFromToCaster_getTests(btSoftBody_RayFromToCaster* obj) +{ + return obj->m_tests; +} + +btScalar btSoftBody_RayFromToCaster_rayFromToTriangle(const btVector3* rayFrom, const btVector3* rayTo, + const btVector3* rayNormalizedDirection, const btVector3* a, const btVector3* b, + const btVector3* c) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + BTVECTOR3_IN(rayNormalizedDirection); + BTVECTOR3_IN(a); + BTVECTOR3_IN(b); + BTVECTOR3_IN(c); + return btSoftBody::RayFromToCaster::rayFromToTriangle(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), + BTVECTOR3_USE(rayNormalizedDirection), BTVECTOR3_USE(a), BTVECTOR3_USE(b), + BTVECTOR3_USE(c)); +} + +btScalar btSoftBody_RayFromToCaster_rayFromToTriangle2(const btVector3* rayFrom, + const btVector3* rayTo, const btVector3* rayNormalizedDirection, const btVector3* a, + const btVector3* b, const btVector3* c, btScalar maxt) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + BTVECTOR3_IN(rayNormalizedDirection); + BTVECTOR3_IN(a); + BTVECTOR3_IN(b); + BTVECTOR3_IN(c); + return btSoftBody::RayFromToCaster::rayFromToTriangle(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), + BTVECTOR3_USE(rayNormalizedDirection), BTVECTOR3_USE(a), BTVECTOR3_USE(b), + BTVECTOR3_USE(c), maxt); +} + +void btSoftBody_RayFromToCaster_setFace(btSoftBody_RayFromToCaster* obj, btSoftBody_Face* value) +{ + obj->m_face = value; +} + +void btSoftBody_RayFromToCaster_setMint(btSoftBody_RayFromToCaster* obj, btScalar value) +{ + obj->m_mint = value; +} + +void btSoftBody_RayFromToCaster_setRayFrom(btSoftBody_RayFromToCaster* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayFrom, value); +} + +void btSoftBody_RayFromToCaster_setRayNormalizedDirection(btSoftBody_RayFromToCaster* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayNormalizedDirection, value); +} + +void btSoftBody_RayFromToCaster_setRayTo(btSoftBody_RayFromToCaster* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_rayTo, value); +} + +void btSoftBody_RayFromToCaster_setTests(btSoftBody_RayFromToCaster* obj, int value) +{ + obj->m_tests = value; +} + + +btSoftBody_RContact* btSoftBody_RContact_new() +{ + return new btSoftBody::RContact(); +} + +void btSoftBody_RContact_getC0(btSoftBody_RContact* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, obj->m_c0); +} + +void btSoftBody_RContact_getC1(btSoftBody_RContact* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_c1); +} + +btScalar btSoftBody_RContact_getC2(btSoftBody_RContact* obj) +{ + return obj->m_c2; +} + +btScalar btSoftBody_RContact_getC3(btSoftBody_RContact* obj) +{ + return obj->m_c3; +} + +btScalar btSoftBody_RContact_getC4(btSoftBody_RContact* obj) +{ + return obj->m_c4; +} + +btSoftBody_sCti* btSoftBody_RContact_getCti(btSoftBody_RContact* obj) +{ + return &obj->m_cti; +} + +btSoftBody_Node* btSoftBody_RContact_getNode(btSoftBody_RContact* obj) +{ + return obj->m_node; +} + +void btSoftBody_RContact_getT1(btSoftBody_RContact* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->t1); +} + +void btSoftBody_RContact_getT2(btSoftBody_RContact* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->t2); +} + +void btSoftBody_RContact_setC0(btSoftBody_RContact* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_c0, (btScalar*)value); +} + +void btSoftBody_RContact_setC1(btSoftBody_RContact* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_c1, value); +} + +void btSoftBody_RContact_setC2(btSoftBody_RContact* obj, btScalar value) +{ + obj->m_c2 = value; +} + +void btSoftBody_RContact_setC3(btSoftBody_RContact* obj, btScalar value) +{ + obj->m_c3 = value; +} + +void btSoftBody_RContact_setC4(btSoftBody_RContact* obj, btScalar value) +{ + obj->m_c4 = value; +} + +void btSoftBody_RContact_setNode(btSoftBody_RContact* obj, btSoftBody_Node* value) +{ + obj->m_node = value; +} + +void btSoftBody_RContact_setT1(btSoftBody_RContact* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->t1, value); +} + +void btSoftBody_RContact_setT2(btSoftBody_RContact* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->t2, value); +} + +void btSoftBody_RContact_delete(btSoftBody_RContact* obj) +{ + delete obj; +} + + +btSoftBody_SContact* btSoftBody_SContact_new() +{ + return new btSoftBody::SContact(); +} + +btScalar* btSoftBody_SContact_getCfm(btSoftBody_SContact* obj) +{ + return obj->m_cfm; +} + +btSoftBody_Face* btSoftBody_SContact_getFace(btSoftBody_SContact* obj) +{ + return obj->m_face; +} + +btScalar btSoftBody_SContact_getFriction(btSoftBody_SContact* obj) +{ + return obj->m_friction; +} + +btScalar btSoftBody_SContact_getMargin(btSoftBody_SContact* obj) +{ + return obj->m_margin; +} + +btSoftBody_Node* btSoftBody_SContact_getNode(btSoftBody_SContact* obj) +{ + return obj->m_node; +} + +void btSoftBody_SContact_getNormal(btSoftBody_SContact* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normal); +} + +void btSoftBody_SContact_getWeights(btSoftBody_SContact* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_weights); +} + +void btSoftBody_SContact_setFace(btSoftBody_SContact* obj, btSoftBody_Face* value) +{ + obj->m_face = value; +} + +void btSoftBody_SContact_setFriction(btSoftBody_SContact* obj, btScalar value) +{ + obj->m_friction = value; +} + +void btSoftBody_SContact_setMargin(btSoftBody_SContact* obj, btScalar value) +{ + obj->m_margin = value; +} + +void btSoftBody_SContact_setNode(btSoftBody_SContact* obj, btSoftBody_Node* value) +{ + obj->m_node = value; +} + +void btSoftBody_SContact_setNormal(btSoftBody_SContact* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normal, value); +} + +void btSoftBody_SContact_setWeights(btSoftBody_SContact* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_weights, value); +} + +void btSoftBody_SContact_delete(btSoftBody_SContact* obj) +{ + delete obj; +} + + +btSoftBody_sCti* btSoftBody_sCti_new() +{ + return new btSoftBody::sCti(); +} + +const btCollisionObject* btSoftBody_sCti_getColObj(btSoftBody_sCti* obj) +{ + return obj->m_colObj; +} + +void btSoftBody_sCti_getNormal(btSoftBody_sCti* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_normal); +} + +btScalar btSoftBody_sCti_getOffset(btSoftBody_sCti* obj) +{ + return obj->m_offset; +} + +void btSoftBody_sCti_setColObj(btSoftBody_sCti* obj, const btCollisionObject* value) +{ + obj->m_colObj = value; +} + +void btSoftBody_sCti_setNormal(btSoftBody_sCti* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_normal, value); +} + +void btSoftBody_sCti_setOffset(btSoftBody_sCti* obj, btScalar value) +{ + obj->m_offset = value; +} + +void btSoftBody_sCti_delete(btSoftBody_sCti* obj) +{ + delete obj; +} + + +btScalar btSoftBody_SolverState_getIsdt(btSoftBody_SolverState* obj) +{ + return obj->isdt; +} + +btScalar btSoftBody_SolverState_getRadmrg(btSoftBody_SolverState* obj) +{ + return obj->radmrg; +} + +btScalar btSoftBody_SolverState_getSdt(btSoftBody_SolverState* obj) +{ + return obj->sdt; +} + +btScalar btSoftBody_SolverState_getUpdmrg(btSoftBody_SolverState* obj) +{ + return obj->updmrg; +} + +btScalar btSoftBody_SolverState_getVelmrg(btSoftBody_SolverState* obj) +{ + return obj->velmrg; +} + +void btSoftBody_SolverState_setIsdt(btSoftBody_SolverState* obj, btScalar value) +{ + obj->isdt = value; +} + +void btSoftBody_SolverState_setRadmrg(btSoftBody_SolverState* obj, btScalar value) +{ + obj->radmrg = value; +} + +void btSoftBody_SolverState_setSdt(btSoftBody_SolverState* obj, btScalar value) +{ + obj->sdt = value; +} + +void btSoftBody_SolverState_setUpdmrg(btSoftBody_SolverState* obj, btScalar value) +{ + obj->updmrg = value; +} + +void btSoftBody_SolverState_setVelmrg(btSoftBody_SolverState* obj, btScalar value) +{ + obj->velmrg = value; +} + + +btSoftBody_sRayCast* btSoftBody_sRayCast_new() +{ + return new btSoftBody::sRayCast(); +} + +btSoftBody* btSoftBody_sRayCast_getBody(btSoftBody_sRayCast* obj) +{ + return obj->body; +} + +btSoftBody_eFeature btSoftBody_sRayCast_getFeature(btSoftBody_sRayCast* obj) +{ + return obj->feature; +} + +btScalar btSoftBody_sRayCast_getFraction(btSoftBody_sRayCast* obj) +{ + return obj->fraction; +} + +int btSoftBody_sRayCast_getIndex(btSoftBody_sRayCast* obj) +{ + return obj->index; +} + +void btSoftBody_sRayCast_setBody(btSoftBody_sRayCast* obj, btSoftBody* value) +{ + obj->body = value; +} + +void btSoftBody_sRayCast_setFeature(btSoftBody_sRayCast* obj, btSoftBody_eFeature value) +{ + obj->feature = value; +} + +void btSoftBody_sRayCast_setFraction(btSoftBody_sRayCast* obj, btScalar value) +{ + obj->fraction = value; +} + +void btSoftBody_sRayCast_setIndex(btSoftBody_sRayCast* obj, int value) +{ + obj->index = value; +} + +void btSoftBody_sRayCast_delete(btSoftBody_sRayCast* obj) +{ + delete obj; +} + + +btVector3* btSoftBody_Tetra_getC0(btSoftBody_Tetra* obj) +{ + return obj->m_c0; +} + +btScalar btSoftBody_Tetra_getC1(btSoftBody_Tetra* obj) +{ + return obj->m_c1; +} + +btScalar btSoftBody_Tetra_getC2(btSoftBody_Tetra* obj) +{ + return obj->m_c2; +} + +btDbvtNode* btSoftBody_Tetra_getLeaf(btSoftBody_Tetra* obj) +{ + return obj->m_leaf; +} + +btSoftBody_Node** btSoftBody_Tetra_getN(btSoftBody_Tetra* obj) +{ + return obj->m_n; +} + +btScalar btSoftBody_Tetra_getRv(btSoftBody_Tetra* obj) +{ + return obj->m_rv; +} + +void btSoftBody_Tetra_setC1(btSoftBody_Tetra* obj, btScalar value) +{ + obj->m_c1 = value; +} + +void btSoftBody_Tetra_setC2(btSoftBody_Tetra* obj, btScalar value) +{ + obj->m_c2 = value; +} + +void btSoftBody_Tetra_setLeaf(btSoftBody_Tetra* obj, btDbvtNode* value) +{ + obj->m_leaf = value; +} + +void btSoftBody_Tetra_setRv(btSoftBody_Tetra* obj, btScalar value) +{ + obj->m_rv = value; +} + + +void btSoftBody_TetraScratch_getF(btSoftBody_TetraScratch* obj, btMatrix3x3* value) +{ + BTMATRIX3X3_OUT(value, &obj->m_F); +} + +void btSoftBody_TetraScratch_setF(btSoftBody_TetraScratch* obj, const btMatrix3x3* value) +{ + BTMATRIX3X3_SET(&obj->m_F, (btScalar*)value); +} + + +btSoftBody* btSoftBody_new(btSoftBodyWorldInfo* worldInfo, int node_count, const btScalar* x, + const btScalar* m) +{ + btVector3* xTemp = Vector3ArrayIn(x, node_count); + btSoftBody* ret = new btSoftBody(worldInfo, node_count, xTemp, m); + delete[] xTemp; + return ret; +} + +btSoftBody* btSoftBody_new2(btSoftBodyWorldInfo* worldInfo) +{ + return new btSoftBody(worldInfo); +} + +void btSoftBody_addAeroForceToFace(btSoftBody* obj, const btVector3* windVelocity, + int faceIndex) +{ + BTVECTOR3_IN(windVelocity); + obj->addAeroForceToFace(BTVECTOR3_USE(windVelocity), faceIndex); +} + +void btSoftBody_addAeroForceToNode(btSoftBody* obj, const btVector3* windVelocity, + int nodeIndex) +{ + BTVECTOR3_IN(windVelocity); + obj->addAeroForceToNode(BTVECTOR3_USE(windVelocity), nodeIndex); +} + +void btSoftBody_addForce(btSoftBody* obj, const btVector3* force) +{ + BTVECTOR3_IN(force); + obj->addForce(BTVECTOR3_USE(force)); +} + +void btSoftBody_addForce2(btSoftBody* obj, const btVector3* force, int node) +{ + BTVECTOR3_IN(force); + obj->addForce(BTVECTOR3_USE(force), node); +} + +void btSoftBody_addVelocity(btSoftBody* obj, const btVector3* velocity) +{ + BTVECTOR3_IN(velocity); + obj->addVelocity(BTVECTOR3_USE(velocity)); +} + +void btSoftBody_addVelocity2(btSoftBody* obj, const btVector3* velocity, int node) +{ + BTVECTOR3_IN(velocity); + obj->addVelocity(BTVECTOR3_USE(velocity), node); +} + +void btSoftBody_appendAnchor(btSoftBody* obj, int node, btRigidBody* body, const btVector3* localPivot, + bool disableCollisionBetweenLinkedBodies, btScalar influence) +{ + BTVECTOR3_IN(localPivot); + obj->appendAnchor(node, body, BTVECTOR3_USE(localPivot), disableCollisionBetweenLinkedBodies, + influence); +} + +void btSoftBody_appendAnchor2(btSoftBody* obj, int node, btRigidBody* body, bool disableCollisionBetweenLinkedBodies, + btScalar influence) +{ + obj->appendAnchor(node, body, disableCollisionBetweenLinkedBodies, influence); +} + +void btSoftBody_appendAngularJoint(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs) +{ + obj->appendAngularJoint(*specs); +} + +void btSoftBody_appendAngularJoint2(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs, + btSoftBody_Body* body) +{ + obj->appendAngularJoint(*specs, *body); +} + +void btSoftBody_appendAngularJoint3(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs, + btSoftBody* body) +{ + obj->appendAngularJoint(*specs, body); +} + +void btSoftBody_appendAngularJoint4(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs, + btSoftBody_Cluster* body0, btSoftBody_Body* body1) +{ + obj->appendAngularJoint(*specs, body0, *body1); +} + +void btSoftBody_appendFace(btSoftBody* obj, int model, btSoftBody_Material* mat) +{ + obj->appendFace(model, mat); +} + +void btSoftBody_appendFace2(btSoftBody* obj, int node0, int node1, int node2, btSoftBody_Material* mat) +{ + obj->appendFace(node0, node1, node2, mat); +} + +void btSoftBody_appendLinearJoint(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs, + btSoftBody* body) +{ + obj->appendLinearJoint(*specs, body); +} + +void btSoftBody_appendLinearJoint2(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs) +{ + obj->appendLinearJoint(*specs); +} + +void btSoftBody_appendLinearJoint3(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs, + btSoftBody_Body* body) +{ + obj->appendLinearJoint(*specs, *body); +} + +void btSoftBody_appendLinearJoint4(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs, + btSoftBody_Cluster* body0, btSoftBody_Body* body1) +{ + obj->appendLinearJoint(*specs, body0, *body1); +} + +void btSoftBody_appendLink(btSoftBody* obj, int node0, int node1, btSoftBody_Material* mat, + bool bcheckexist) +{ + obj->appendLink(node0, node1, mat, bcheckexist); +} + +void btSoftBody_appendLink2(btSoftBody* obj, int model, btSoftBody_Material* mat) +{ + obj->appendLink(model, mat); +} + +void btSoftBody_appendLink3(btSoftBody* obj, btSoftBody_Node* node0, btSoftBody_Node* node1, + btSoftBody_Material* mat, bool bcheckexist) +{ + obj->appendLink(node0, node1, mat, bcheckexist); +} + +btSoftBody_Material* btSoftBody_appendMaterial(btSoftBody* obj) +{ + return obj->appendMaterial(); +} + +void btSoftBody_appendNode(btSoftBody* obj, const btVector3* x, btScalar m) +{ + BTVECTOR3_IN(x); + obj->appendNode(BTVECTOR3_USE(x), m); +} + +void btSoftBody_appendNote(btSoftBody* obj, const char* text, const btVector3* o, + btSoftBody_Face* feature) +{ + BTVECTOR3_IN(o); + obj->appendNote(text, BTVECTOR3_USE(o), feature); +} + +void btSoftBody_appendNote2(btSoftBody* obj, const char* text, const btVector3* o, + btSoftBody_Link* feature) +{ + BTVECTOR3_IN(o); + obj->appendNote(text, BTVECTOR3_USE(o), feature); +} + +void btSoftBody_appendNote3(btSoftBody* obj, const char* text, const btVector3* o, + btSoftBody_Node* feature) +{ + BTVECTOR3_IN(o); + obj->appendNote(text, BTVECTOR3_USE(o), feature); +} + +void btSoftBody_appendNote4(btSoftBody* obj, const char* text, const btVector3* o) +{ + BTVECTOR3_IN(o); + obj->appendNote(text, BTVECTOR3_USE(o)); +} + +void btSoftBody_appendNote5(btSoftBody* obj, const char* text, const btVector3* o, + const btVector4* c, btSoftBody_Node* n0, btSoftBody_Node* n1, btSoftBody_Node* n2, + btSoftBody_Node* n3) +{ + BTVECTOR3_IN(o); + BTVECTOR4_IN(c); + obj->appendNote(text, BTVECTOR3_USE(o), BTVECTOR4_USE(c), n0, n1, n2, n3); +} + +void btSoftBody_appendTetra(btSoftBody* obj, int model, btSoftBody_Material* mat) +{ + obj->appendTetra(model, mat); +} + +void btSoftBody_appendTetra2(btSoftBody* obj, int node0, int node1, int node2, int node3, + btSoftBody_Material* mat) +{ + obj->appendTetra(node0, node1, node2, node3, mat); +} + +void btSoftBody_applyClusters(btSoftBody* obj, bool drift) +{ + obj->applyClusters(drift); +} + +void btSoftBody_applyForces(btSoftBody* obj) +{ + obj->applyForces(); +} + +bool btSoftBody_checkContact(btSoftBody* obj, const btCollisionObjectWrapper* colObjWrap, + const btVector3* x, btScalar margin, btSoftBody_sCti* cti) +{ + BTVECTOR3_IN(x); + return obj->checkContact(colObjWrap, BTVECTOR3_USE(x), margin, *cti); +} + +bool btSoftBody_checkDeformableContact(btSoftBody* obj, const btCollisionObjectWrapper* colObjWrap, + const btVector3* x, btScalar margin, btSoftBody_sCti* cti, bool predict) +{ + BTVECTOR3_IN(x); + return obj->checkDeformableContact(colObjWrap, BTVECTOR3_USE(x), margin, *cti, predict); +} + +bool btSoftBody_checkFace(btSoftBody* obj, int node0, int node1, int node2) +{ + return obj->checkFace(node0, node1, node2); +} + +bool btSoftBody_checkLink(btSoftBody* obj, const btSoftBody_Node* node0, const btSoftBody_Node* node1) +{ + return obj->checkLink(node0, node1); +} + +bool btSoftBody_checkLink2(btSoftBody* obj, int node0, int node1) +{ + return obj->checkLink(node0, node1); +} + +void btSoftBody_cleanupClusters(btSoftBody* obj) +{ + obj->cleanupClusters(); +} + +void btSoftBody_clusterAImpulse(btSoftBody_Cluster* cluster, const btSoftBody_Impulse* impulse) +{ + btSoftBody::clusterAImpulse(cluster, *impulse); +} + +void btSoftBody_clusterCom(btSoftBody* obj, int cluster, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->clusterCom(cluster); + BTVECTOR3_SET(value, temp); +} + +void btSoftBody_clusterCom2(const btSoftBody_Cluster* cluster, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = btSoftBody::clusterCom(cluster); + BTVECTOR3_SET(value, temp); +} + +int btSoftBody_clusterCount(btSoftBody* obj) +{ + return obj->clusterCount(); +} + +void btSoftBody_clusterDAImpulse(btSoftBody_Cluster* cluster, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + btSoftBody::clusterDAImpulse(cluster, BTVECTOR3_USE(impulse)); +} + +void btSoftBody_clusterDCImpulse(btSoftBody_Cluster* cluster, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + btSoftBody::clusterDCImpulse(cluster, BTVECTOR3_USE(impulse)); +} + +void btSoftBody_clusterDImpulse(btSoftBody_Cluster* cluster, const btVector3* rpos, + const btVector3* impulse) +{ + BTVECTOR3_IN(rpos); + BTVECTOR3_IN(impulse); + btSoftBody::clusterDImpulse(cluster, BTVECTOR3_USE(rpos), BTVECTOR3_USE(impulse)); +} + +void btSoftBody_clusterImpulse(btSoftBody_Cluster* cluster, const btVector3* rpos, + const btSoftBody_Impulse* impulse) +{ + BTVECTOR3_IN(rpos); + btSoftBody::clusterImpulse(cluster, BTVECTOR3_USE(rpos), *impulse); +} + +void btSoftBody_clusterVAImpulse(btSoftBody_Cluster* cluster, const btVector3* impulse) +{ + BTVECTOR3_IN(impulse); + btSoftBody::clusterVAImpulse(cluster, BTVECTOR3_USE(impulse)); +} + +void btSoftBody_clusterVelocity(const btSoftBody_Cluster* cluster, const btVector3* rpos, + btVector3* value) +{ + BTVECTOR3_IN(rpos); + ATTRIBUTE_ALIGNED16(btVector3) temp = btSoftBody::clusterVelocity(cluster, BTVECTOR3_USE(rpos)); + BTVECTOR3_SET(value, temp); +} + +void btSoftBody_clusterVImpulse(btSoftBody_Cluster* cluster, const btVector3* rpos, + const btVector3* impulse) +{ + BTVECTOR3_IN(rpos); + BTVECTOR3_IN(impulse); + btSoftBody::clusterVImpulse(cluster, BTVECTOR3_USE(rpos), BTVECTOR3_USE(impulse)); +} + +bool btSoftBody_cutLink(btSoftBody* obj, const btSoftBody_Node* node0, const btSoftBody_Node* node1, + btScalar position) +{ + return obj->cutLink(node0, node1, position); +} + +bool btSoftBody_cutLink2(btSoftBody* obj, int node0, int node1, btScalar position) +{ + return obj->cutLink(node0, node1, position); +} + +void btSoftBody_dampClusters(btSoftBody* obj) +{ + obj->dampClusters(); +} + +void btSoftBody_defaultCollisionHandler(btSoftBody* obj, const btCollisionObjectWrapper* pcoWrap) +{ + obj->defaultCollisionHandler(pcoWrap); +} + +void btSoftBody_defaultCollisionHandler2(btSoftBody* obj, btSoftBody* psb) +{ + obj->defaultCollisionHandler(psb); +} + +void btSoftBody_evaluateCom(btSoftBody* obj, btVector3* value) +{ + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->evaluateCom(); + BTVECTOR3_SET(value, temp); +} + +int btSoftBody_generateBendingConstraints(btSoftBody* obj, int distance, btSoftBody_Material* mat) +{ + return obj->generateBendingConstraints(distance, mat); +} + +int btSoftBody_generateClusters(btSoftBody* obj, int k) +{ + return obj->generateClusters(k); +} + +int btSoftBody_generateClusters2(btSoftBody* obj, int k, int maxiterations) +{ + return obj->generateClusters(k, maxiterations); +} + +void btSoftBody_getAabb(btSoftBody* obj, btVector3* aabbMin, btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getAabb(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +btAlignedObjectArray_btSoftBody_Anchor* btSoftBody_getAnchors(btSoftBody* obj) +{ + return &obj->m_anchors; +} + +btVector3* btSoftBody_getBounds(btSoftBody* obj) +{ + return obj->m_bounds; +} + +bool btSoftBody_getBUpdateRtCst(btSoftBody* obj) +{ + return obj->m_bUpdateRtCst; +} + +btDbvt* btSoftBody_getCdbvt(btSoftBody* obj) +{ + return &obj->m_cdbvt; +} + +btSoftBody_Config* btSoftBody_getCfg(btSoftBody* obj) +{ + return &obj->m_cfg; +} + +btAlignedObjectArray_bool* btSoftBody_getClusterConnectivity(btSoftBody* obj) +{ + return &obj->m_clusterConnectivity; +} + +btAlignedObjectArray_btSoftBody_ClusterPtr* btSoftBody_getClusters(btSoftBody* obj) +{ + return &obj->m_clusters; +} + +btAlignedObjectArray_const_btCollisionObjectPtr* btSoftBody_getCollisionDisabledObjects( + btSoftBody* obj) +{ + return &obj->m_collisionDisabledObjects; +} + +btAlignedObjectArray_btSoftBody_Face* btSoftBody_getFaces(btSoftBody* obj) +{ + return &obj->m_faces; +} + +btDbvt* btSoftBody_getFdbvt(btSoftBody* obj) +{ + return &obj->m_fdbvt; +} + +btAlignedObjectArray_btSoftBody_JointPtr* btSoftBody_getJoints(btSoftBody* obj) +{ + return &obj->m_joints; +} + +btAlignedObjectArray_btSoftBody_Link* btSoftBody_getLinks(btSoftBody* obj) +{ + return &obj->m_links; +} + +btScalar btSoftBody_getMass(btSoftBody* obj, int node) +{ + return obj->getMass(node); +} + +btAlignedObjectArray_btSoftBody_MaterialPtr* btSoftBody_getMaterials(btSoftBody* obj) +{ + return &obj->m_materials; +} + +btDbvt* btSoftBody_getNdbvt(btSoftBody* obj) +{ + return &obj->m_ndbvt; +} + +btAlignedObjectArray_btSoftBody_Node* btSoftBody_getNodes(btSoftBody* obj) +{ + return &obj->m_nodes; +} + +btAlignedObjectArray_btSoftBody_Note* btSoftBody_getNotes(btSoftBody* obj) +{ + return &obj->m_notes; +} + +btSoftBody_Pose* btSoftBody_getPose(btSoftBody* obj) +{ + return &obj->m_pose; +} + +btAlignedObjectArray_btSoftBody_RContact* btSoftBody_getRcontacts(btSoftBody* obj) +{ + return &obj->m_rcontacts; +} + +btScalar btSoftBody_getRestLengthScale(btSoftBody* obj) +{ + return obj->getRestLengthScale(); +} + +btAlignedObjectArray_btSoftBody_SContact* btSoftBody_getScontacts(btSoftBody* obj) +{ + return &obj->m_scontacts; +} + +btSoftBodySolver* btSoftBody_getSoftBodySolver(btSoftBody* obj) +{ + return obj->getSoftBodySolver(); +} +/* +** btSoftBody_getSolver(btSoftBody_ePSolver solver) +{ + return &btSoftBody_getSolver(*solver); +} + +** btSoftBody_getSolver2(btSoftBody_eVSolver solver) +{ + return &btSoftBody_getSolver(*solver); +} +*/ +btSoftBody_SolverState* btSoftBody_getSst(btSoftBody* obj) +{ + return &obj->m_sst; +} + +void* btSoftBody_getTag(btSoftBody* obj) +{ + return obj->m_tag; +} + +btAlignedObjectArray_btSoftBody_Tetra* btSoftBody_getTetras(btSoftBody* obj) +{ + return &obj->m_tetras; +} + +btAlignedObjectArray_btSoftBody_TetraScratch* btSoftBody_getTetraScratches(btSoftBody* obj) +{ + return &obj->m_tetraScratches; +} + +btAlignedObjectArray_btSoftBody_TetraScratch* btSoftBody_getTetraScratchesTn(btSoftBody* obj) +{ + return &obj->m_tetraScratchesTn; +} + +btScalar btSoftBody_getTimeacc(btSoftBody* obj) +{ + return obj->m_timeacc; +} + +btScalar btSoftBody_getTotalMass(btSoftBody* obj) +{ + return obj->getTotalMass(); +} + +btAlignedObjectArray_int* btSoftBody_getUserIndexMapping(btSoftBody* obj) +{ + return &obj->m_userIndexMapping; +} + +void btSoftBody_getWindVelocity(btSoftBody* obj, btVector3* velocity) +{ + BTVECTOR3_COPY(velocity, &obj->getWindVelocity()); +} + +btScalar btSoftBody_getVolume(btSoftBody* obj) +{ + return obj->getVolume(); +} + +btSoftBodyWorldInfo* btSoftBody_getWorldInfo(btSoftBody* obj) +{ + return obj->getWorldInfo(); +} + +void btSoftBody_indicesToPointers(btSoftBody* obj, const int* map) +{ + obj->indicesToPointers(map); +} + +void btSoftBody_initDefaults(btSoftBody* obj) +{ + obj->initDefaults(); +} + +void btSoftBody_initializeClusters(btSoftBody* obj) +{ + obj->initializeClusters(); +} + +void btSoftBody_initializeFaceTree(btSoftBody* obj) +{ + obj->initializeFaceTree(); +} + +void btSoftBody_initializeDmInverse(btSoftBody* obj) +{ + obj->initializeDmInverse(); +} + +void btSoftBody_integrateMotion(btSoftBody* obj) +{ + obj->integrateMotion(); +} + +void btSoftBody_pointersToIndices(btSoftBody* obj) +{ + obj->pointersToIndices(); +} + +void btSoftBody_predictMotion(btSoftBody* obj, btScalar dt) +{ + obj->predictMotion(dt); +} + +void btSoftBody_prepareClusters(btSoftBody* obj, int iterations) +{ + obj->prepareClusters(iterations); +} + +void btSoftBody_PSolve_Anchors(btSoftBody* psb, btScalar kst, btScalar ti) +{ + btSoftBody::PSolve_Anchors(psb, kst, ti); +} + +void btSoftBody_PSolve_Links(btSoftBody* psb, btScalar kst, btScalar ti) +{ + btSoftBody::PSolve_Links(psb, kst, ti); +} + +void btSoftBody_PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti) +{ + btSoftBody::PSolve_RContacts(psb, kst, ti); +} + +void btSoftBody_PSolve_SContacts(btSoftBody* psb, btScalar __unnamed1, btScalar ti) +{ + btSoftBody::PSolve_SContacts(psb, __unnamed1, ti); +} + +void btSoftBody_randomizeConstraints(btSoftBody* obj) +{ + obj->randomizeConstraints(); +} + +bool btSoftBody_rayTest(btSoftBody* obj, const btVector3* rayFrom, const btVector3* rayTo, + btSoftBody_sRayCast* results) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + return obj->rayTest(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *results); +} + +int btSoftBody_rayTest2(btSoftBody* obj, const btVector3* rayFrom, const btVector3* rayTo, + btScalar* mint, btSoftBody_eFeature* feature, int* index, bool bcountonly) +{ + BTVECTOR3_IN(rayFrom); + BTVECTOR3_IN(rayTo); + return obj->rayTest(BTVECTOR3_USE(rayFrom), BTVECTOR3_USE(rayTo), *mint, *feature, + *index, bcountonly); +} + +void btSoftBody_refine(btSoftBody* obj, btSoftBody_ImplicitFn* ifn, btScalar accurary, + bool cut) +{ + obj->refine(ifn, accurary, cut); +} + +void btSoftBody_releaseCluster(btSoftBody* obj, int index) +{ + obj->releaseCluster(index); +} + +void btSoftBody_releaseClusters(btSoftBody* obj) +{ + obj->releaseClusters(); +} + +void btSoftBody_resetLinkRestLengths(btSoftBody* obj) +{ + obj->resetLinkRestLengths(); +} + +void btSoftBody_rotate(btSoftBody* obj, const btQuaternion* rot) +{ + BTQUATERNION_IN(rot); + obj->rotate(BTQUATERNION_USE(rot)); +} + +void btSoftBody_scale(btSoftBody* obj, const btVector3* scl) +{ + BTVECTOR3_IN(scl); + obj->scale(BTVECTOR3_USE(scl)); +} + +void btSoftBody_setBUpdateRtCst(btSoftBody* obj, bool value) +{ + obj->m_bUpdateRtCst = value; +} + +void btSoftBody_setDampingCoefficient(btSoftBody* obj, btScalar damping_coeff) +{ + obj->setDampingCoefficient(damping_coeff); +} + +void btSoftBody_setMass(btSoftBody* obj, int node, btScalar mass) +{ + obj->setMass(node, mass); +} + +void btSoftBody_setPose(btSoftBody* obj, bool bvolume, bool bframe) +{ + obj->setPose(bvolume, bframe); +} + +void btSoftBody_setRestLengthScale(btSoftBody* obj, btScalar restLength) +{ + obj->setRestLengthScale(restLength); +} + +void btSoftBody_setSelfCollision(btSoftBody* obj, bool useSelfCollision) +{ + obj->setSelfCollision(useSelfCollision); +} + +void btSoftBody_setSoftBodySolver(btSoftBody* obj, btSoftBodySolver* softBodySolver) +{ + obj->setSoftBodySolver(softBodySolver); +} + +void btSoftBody_setSolver(btSoftBody* obj, btSoftBody_eSolverPresets preset) +{ + obj->setSolver(preset); +} + +void btSoftBody_setTag(btSoftBody* obj, void* value) +{ + obj->m_tag = value; +} + +void btSoftBody_setTimeacc(btSoftBody* obj, btScalar value) +{ + obj->m_timeacc = value; +} + +void btSoftBody_setTotalDensity(btSoftBody* obj, btScalar density) +{ + obj->setTotalDensity(density); +} + +void btSoftBody_setTotalMass(btSoftBody* obj, btScalar mass, bool fromfaces) +{ + obj->setTotalMass(mass, fromfaces); +} + +void btSoftBody_setVelocity(btSoftBody* obj, const btVector3* velocity) +{ + BTVECTOR3_IN(velocity); + obj->setVelocity(BTVECTOR3_USE(velocity)); +} + +void btSoftBody_setWindVelocity(btSoftBody* obj, const btVector3* velocity) +{ + BTVECTOR3_IN(velocity); + obj->setWindVelocity(BTVECTOR3_USE(velocity)); +} + +void btSoftBody_setVolumeDensity(btSoftBody* obj, btScalar density) +{ + obj->setVolumeDensity(density); +} + +void btSoftBody_setVolumeMass(btSoftBody* obj, btScalar mass) +{ + obj->setVolumeMass(mass); +} + +void btSoftBody_setWorldInfo(btSoftBody* obj, btSoftBodyWorldInfo* value) +{ + obj->m_worldInfo = value; +} + +void btSoftBody_solveClusters(const btAlignedObjectArray_btSoftBodyPtr* bodies) +{ + btSoftBody::solveClusters(*bodies); +} + +void btSoftBody_solveClusters2(btSoftBody* obj, btScalar sor) +{ + obj->solveClusters(sor); +} + +void btSoftBody_solveCommonConstraints(btSoftBody** bodies, int count, int iterations) +{ + btSoftBody::solveCommonConstraints(bodies, count, iterations); +} + +void btSoftBody_solveConstraints(btSoftBody* obj) +{ + obj->solveConstraints(); +} + +void btSoftBody_staticSolve(btSoftBody* obj, int iterations) +{ + obj->staticSolve(iterations); +} + +void btSoftBody_transform(btSoftBody* obj, const btTransform* trs) +{ + BTTRANSFORM_IN(trs); + obj->transform(BTTRANSFORM_USE(trs)); +} + +void btSoftBody_translate(btSoftBody* obj, const btVector3* trs) +{ + BTVECTOR3_IN(trs); + obj->translate(BTVECTOR3_USE(trs)); +} + +btSoftBody* btSoftBody_upcast(btCollisionObject* colObj) +{ + return btSoftBody::upcast(colObj); +} + +void btSoftBody_updateArea(btSoftBody* obj, bool averageArea) +{ + obj->updateArea(averageArea); +} + +void btSoftBody_updateBounds(btSoftBody* obj) +{ + obj->updateBounds(); +} + +void btSoftBody_updateClusters(btSoftBody* obj) +{ + obj->updateClusters(); +} + +void btSoftBody_updateConstants(btSoftBody* obj) +{ + obj->updateConstants(); +} + +void btSoftBody_updateLinkConstants(btSoftBody* obj) +{ + obj->updateLinkConstants(); +} + +void btSoftBody_updateNormals(btSoftBody* obj) +{ + obj->updateNormals(); +} + +void btSoftBody_updatePose(btSoftBody* obj) +{ + obj->updatePose(); +} + +bool btSoftBody_useSelfCollision(btSoftBody* obj) +{ + return obj->useSelfCollision(); +} + +void btSoftBody_VSolve_Links(btSoftBody* psb, btScalar kst) +{ + btSoftBody::VSolve_Links(psb, kst); +} + +int btSoftBody_getFaceVertexData(btSoftBody* obj, btScalar* vertices) +{ + btAlignedObjectArray* faceArray = &obj->m_faces; + int faceCount = faceArray->size(); + if (faceCount == 0) { + return 0; + } + + int vertexCount = faceCount * 3; + + int i, j; + for (i = 0; i < faceCount; i++) { + for (j = 0; j < 3; j++) { + btSoftBody_Node* n = faceArray->at(i).m_n[j]; + btVector3_copy((btVector3*)vertices, &n->m_x); + vertices += 3; + } + } + + return vertexCount; +} + +int btSoftBody_getFaceVertexNormalData(btSoftBody* obj, btScalar* vertices) +{ + btAlignedObjectArray* faceArray = &obj->m_faces; + int faceCount = faceArray->size(); + if (faceCount == 0) { + return 0; + } + + int vertexCount = faceCount * 3; + + int i, j; + for (i = 0; i < faceCount; i++) { + for (j = 0; j < 3; j++) { + btSoftBody_Node* n = faceArray->at(i).m_n[j]; + btVector3_copy((btVector3*)vertices, &n->m_x); + vertices += 3; + btVector3_copy((btVector3*)vertices, &n->m_n); + vertices += 3; + } + } + + return vertexCount; +} + +int btSoftBody_getFaceVertexNormalData2(btSoftBody* obj, btScalar* vertices, btScalar* normals) +{ + btAlignedObjectArray* faceArray = &obj->m_faces; + int faceCount = faceArray->size(); + if (faceCount == 0) { + return 0; + } + + int vertexCount = faceCount * 3; + + int i, j; + for (i = 0; i < faceCount; i++) { + for (j = 0; j < 3; j++) { + btSoftBody_Node* n = faceArray->at(i).m_n[j]; + btVector3_copy((btVector3*)vertices, &n->m_x); + btVector3_copy((btVector3*)normals, &n->m_n); + vertices += 3; + normals += 3; + } + } + + return vertexCount; +} + +int btSoftBody_getLinkVertexData(btSoftBody* obj, btScalar* vertices) +{ + btAlignedObjectArray* linkArray = &obj->m_links; + int linkCount = linkArray->size(); + if (linkCount == 0) { + return 0; + } + + int vertexCount = linkCount * 2; + + int i; + for (i = 0; i < linkCount; i++) { + btSoftBody_Link* l = &linkArray->at(i); + btVector3_copy((btVector3*)vertices, &l->m_n[0]->m_x); + vertices += 3; + btVector3_copy((btVector3*)vertices, &l->m_n[1]->m_x); + vertices += 3; + } + + return vertexCount; +} + +int btSoftBody_getLinkVertexNormalData(btSoftBody* obj, btScalar* vertices) +{ + btAlignedObjectArray* linkArray = &obj->m_links; + int linkCount = linkArray->size(); + if (linkCount == 0) { + return 0; + } + + int vertexCount = linkCount * 2; + + int i; + for (i = 0; i < linkCount; i++) { + btSoftBody_Link* l = &linkArray->at(i); + btVector3_copy((btVector3*)vertices, &l->m_n[0]->m_x); + vertices += 6; + btVector3_copy((btVector3*)vertices, &l->m_n[1]->m_x); + vertices += 6; + } + + return vertexCount; +} + +int btSoftBody_getTetraVertexData(btSoftBody* obj, btScalar* vertices) +{ + btAlignedObjectArray* tetraArray = &obj->m_tetras; + int tetraCount = tetraArray->size(); + if (tetraCount == 0) { + return 0; + } + + int vertexCount = tetraCount * 12; + + int i; + for (i = 0; i < tetraCount; i++) { + btSoftBody_Tetra* t = &tetraArray->at(i); + btVector3_copy((btVector3*)&vertices[0], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&vertices[3], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&vertices[6], &t->m_n[2]->m_x); + + btVector3_copy((btVector3*)&vertices[9], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&vertices[12], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&vertices[15], &t->m_n[3]->m_x); + + btVector3_copy((btVector3*)&vertices[18], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&vertices[21], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&vertices[24], &t->m_n[3]->m_x); + + btVector3_copy((btVector3*)&vertices[27], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&vertices[30], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&vertices[33], &t->m_n[3]->m_x); + + vertices += 36; + } + + return vertexCount; +} + +int btSoftBody_getTetraVertexNormalData(btSoftBody* obj, btScalar* vertices) +{ + btAlignedObjectArray* tetraArray = &obj->m_tetras; + int tetraCount = tetraArray->size(); + if (tetraCount == 0) { + return 0; + } + + int vertexCount = tetraCount * 12; + + int i; + btVector3 c1, c2, c3, normal; + for (i = 0; i < tetraCount; i++) { + btSoftBody_Tetra* t = &tetraArray->at(i); + c1 = t->m_n[1]->m_x - t->m_n[0]->m_x; + c2 = t->m_n[0]->m_x - t->m_n[2]->m_x; + + normal = c1.cross(c2); + btVector3_copy((btVector3*)&vertices[0], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&vertices[3], &normal); + btVector3_copy((btVector3*)&vertices[6], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&vertices[9], &normal); + btVector3_copy((btVector3*)&vertices[12], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&vertices[15], &normal); + + c3 = t->m_n[3]->m_x - t->m_n[0]->m_x; + normal = c1.cross(c3); + btVector3_copy((btVector3*)&vertices[18], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&vertices[21], &normal); + btVector3_copy((btVector3*)&vertices[24], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&vertices[27], &normal); + btVector3_copy((btVector3*)&vertices[30], &t->m_n[3]->m_x); + btVector3_copy((btVector3*)&vertices[33], &normal); + + c1 = t->m_n[2]->m_x - t->m_n[1]->m_x; + c3 = t->m_n[3]->m_x - t->m_n[1]->m_x; + normal = c1.cross(c3); + btVector3_copy((btVector3*)&vertices[36], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&vertices[39], &normal); + btVector3_copy((btVector3*)&vertices[42], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&vertices[45], &normal); + btVector3_copy((btVector3*)&vertices[48], &t->m_n[3]->m_x); + btVector3_copy((btVector3*)&vertices[51], &normal); + + c3 = t->m_n[3]->m_x - t->m_n[2]->m_x; + normal = c2.cross(c3); + btVector3_copy((btVector3*)&vertices[54], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&vertices[57], &normal); + btVector3_copy((btVector3*)&vertices[60], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&vertices[63], &normal); + btVector3_copy((btVector3*)&vertices[66], &t->m_n[3]->m_x); + btVector3_copy((btVector3*)&vertices[69], &normal); + + vertices += 72; + } + + return vertexCount; +} + +int btSoftBody_getTetraVertexNormalData2(btSoftBody* obj, btScalar* vertices, btScalar* normals) +{ + btAlignedObjectArray* tetraArray = &obj->m_tetras; + int tetraCount = tetraArray->size(); + if (tetraCount == 0) { + return 0; + } + + int vertexCount = tetraCount * 12; + + int i; + btVector3 c1, c2, c3, normal; + for (i = 0; i < tetraCount; i++) { + btSoftBody_Tetra* t = &tetraArray->at(i); + c1 = t->m_n[1]->m_x - t->m_n[0]->m_x; + c2 = t->m_n[0]->m_x - t->m_n[2]->m_x; + + normal = c1.cross(c2); + btVector3_copy((btVector3*)&vertices[0], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&normals[0], &normal); + btVector3_copy((btVector3*)&vertices[3], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&normals[3], &normal); + btVector3_copy((btVector3*)&vertices[6], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&normals[6], &normal); + + c3 = t->m_n[3]->m_x - t->m_n[0]->m_x; + normal = c1.cross(c3); + btVector3_copy((btVector3*)&vertices[9], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&normals[9], &normal); + btVector3_copy((btVector3*)&vertices[12], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&normals[12], &normal); + btVector3_copy((btVector3*)&vertices[15], &t->m_n[3]->m_x); + btVector3_copy((btVector3*)&normals[15], &normal); + + c1 = t->m_n[2]->m_x - t->m_n[1]->m_x; + c3 = t->m_n[3]->m_x - t->m_n[1]->m_x; + normal = c1.cross(c3); + btVector3_copy((btVector3*)&vertices[18], &t->m_n[1]->m_x); + btVector3_copy((btVector3*)&normals[18], &normal); + btVector3_copy((btVector3*)&vertices[21], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&normals[21], &normal); + btVector3_copy((btVector3*)&vertices[24], &t->m_n[3]->m_x); + btVector3_copy((btVector3*)&normals[24], &normal); + + c3 = t->m_n[3]->m_x - t->m_n[2]->m_x; + normal = c2.cross(c3); + btVector3_copy((btVector3*)&vertices[27], &t->m_n[2]->m_x); + btVector3_copy((btVector3*)&normals[27], &normal); + btVector3_copy((btVector3*)&vertices[30], &t->m_n[0]->m_x); + btVector3_copy((btVector3*)&normals[30], &normal); + btVector3_copy((btVector3*)&vertices[33], &t->m_n[3]->m_x); + btVector3_copy((btVector3*)&normals[33], &normal); + + vertices += 36; + normals += 36; + } + + return vertexCount; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.h new file mode 100644 index 0000000..dc846e6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftBody_wrap.h @@ -0,0 +1,663 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef _BT_SOFT_BODY_H +#define p_btSoftBody_AJoint_IControl_Prepare void* +#define p_btSoftBody_AJoint_IControl_Speed void* +#define p_btSoftBody_ImplicitFn_Eval void* +#define btSoftBody_AJoint_IControlWrapper void +#define btSoftBody_ImplicitFnWrapper void +#else +typedef void (*p_btSoftBody_AJoint_IControl_Prepare)(btSoftBody_AJoint* aJoint); +typedef btScalar (*p_btSoftBody_AJoint_IControl_Speed)(btSoftBody_AJoint* aJoint, + btScalar current); + +class btSoftBody_AJoint_IControlWrapper : public btSoftBody_AJoint_IControl +{ +private: + p_btSoftBody_AJoint_IControl_Prepare _PrepareCallback; + p_btSoftBody_AJoint_IControl_Speed _SpeedCallback; + void* _wrapperData; + +public: + btSoftBody_AJoint_IControlWrapper(p_btSoftBody_AJoint_IControl_Prepare PrepareCallback, + p_btSoftBody_AJoint_IControl_Speed SpeedCallback); + + virtual void Prepare(btSoftBody_AJoint* aJoint); + virtual btScalar Speed(btSoftBody_AJoint* aJoint, btScalar current); + void* getWrapperData() const; + void setWrapperData(void* data); +}; + +typedef btScalar (*p_btSoftBody_ImplicitFn_Eval)(const btVector3* x); + +class btSoftBody_ImplicitFnWrapper : public btSoftBody_ImplicitFn +{ +private: + p_btSoftBody_ImplicitFn_Eval _EvalCallback; + +public: + btSoftBody_ImplicitFnWrapper(p_btSoftBody_ImplicitFn_Eval EvalCallback); + + virtual btScalar Eval(const btVector3& x); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSoftBodyWorldInfo* btSoftBodyWorldInfo_new(); + EXPORT btScalar btSoftBodyWorldInfo_getAir_density(btSoftBodyWorldInfo* obj); + EXPORT btBroadphaseInterface* btSoftBodyWorldInfo_getBroadphase(btSoftBodyWorldInfo* obj); + EXPORT btDispatcher* btSoftBodyWorldInfo_getDispatcher(btSoftBodyWorldInfo* obj); + EXPORT void btSoftBodyWorldInfo_getGravity(btSoftBodyWorldInfo* obj, btVector3* value); + EXPORT btScalar btSoftBodyWorldInfo_getMaxDisplacement(btSoftBodyWorldInfo* obj); + EXPORT btSparseSdf_3* btSoftBodyWorldInfo_getSparsesdf(btSoftBodyWorldInfo* obj); + EXPORT btScalar btSoftBodyWorldInfo_getWater_density(btSoftBodyWorldInfo* obj); + EXPORT void btSoftBodyWorldInfo_getWater_normal(btSoftBodyWorldInfo* obj, btVector3* value); + EXPORT btScalar btSoftBodyWorldInfo_getWater_offset(btSoftBodyWorldInfo* obj); + EXPORT void btSoftBodyWorldInfo_setAir_density(btSoftBodyWorldInfo* obj, btScalar value); + EXPORT void btSoftBodyWorldInfo_setBroadphase(btSoftBodyWorldInfo* obj, btBroadphaseInterface* value); + EXPORT void btSoftBodyWorldInfo_setDispatcher(btSoftBodyWorldInfo* obj, btDispatcher* value); + EXPORT void btSoftBodyWorldInfo_setGravity(btSoftBodyWorldInfo* obj, const btVector3* value); + EXPORT void btSoftBodyWorldInfo_setMaxDisplacement(btSoftBodyWorldInfo* obj, btScalar value); + EXPORT void btSoftBodyWorldInfo_setWater_density(btSoftBodyWorldInfo* obj, btScalar value); + EXPORT void btSoftBodyWorldInfo_setWater_normal(btSoftBodyWorldInfo* obj, const btVector3* value); + EXPORT void btSoftBodyWorldInfo_setWater_offset(btSoftBodyWorldInfo* obj, btScalar value); + EXPORT void btSoftBodyWorldInfo_delete(btSoftBodyWorldInfo* obj); + + EXPORT btSoftBody_AJoint_IControlWrapper* btSoftBody_AJoint_IControlWrapper_new( + p_btSoftBody_AJoint_IControl_Prepare PrepareCallback, p_btSoftBody_AJoint_IControl_Speed SpeedCallback); + EXPORT void* btSoftBody_AJoint_IControlWrapper_getWrapperData(btSoftBody_AJoint_IControlWrapper* obj); + EXPORT void btSoftBody_AJoint_IControlWrapper_setWrapperData(btSoftBody_AJoint_IControlWrapper* obj, void* data); + + EXPORT btSoftBody_AJoint_IControl* btSoftBody_AJoint_IControl_new(); + EXPORT btSoftBody_AJoint_IControl* btSoftBody_AJoint_IControl_Default(); + EXPORT void btSoftBody_AJoint_IControl_Prepare(btSoftBody_AJoint_IControl* obj, btSoftBody_AJoint* __unnamed0); + EXPORT btScalar btSoftBody_AJoint_IControl_Speed(btSoftBody_AJoint_IControl* obj, btSoftBody_AJoint* __unnamed0, btScalar current); + EXPORT void btSoftBody_AJoint_IControl_delete(btSoftBody_AJoint_IControl* obj); + + EXPORT btSoftBody_AJoint_Specs* btSoftBody_AJoint_Specs_new(); + EXPORT void btSoftBody_AJoint_Specs_getAxis(btSoftBody_AJoint_Specs* obj, btVector3* value); + EXPORT btSoftBody_AJoint_IControl* btSoftBody_AJoint_Specs_getIcontrol(btSoftBody_AJoint_Specs* obj); + EXPORT void btSoftBody_AJoint_Specs_setAxis(btSoftBody_AJoint_Specs* obj, const btVector3* value); + EXPORT void btSoftBody_AJoint_Specs_setIcontrol(btSoftBody_AJoint_Specs* obj, btSoftBody_AJoint_IControl* value); + + EXPORT btVector3* btSoftBody_AJoint_getAxis(btSoftBody_AJoint* obj); + EXPORT btSoftBody_AJoint_IControl* btSoftBody_AJoint_getIcontrol(btSoftBody_AJoint* obj); + EXPORT void btSoftBody_AJoint_setIcontrol(btSoftBody_AJoint* obj, btSoftBody_AJoint_IControl* value); + + EXPORT btRigidBody* btSoftBody_Anchor_getBody(btSoftBody_Anchor* obj); + EXPORT void btSoftBody_Anchor_getC0(btSoftBody_Anchor* obj, btMatrix3x3* value); + EXPORT void btSoftBody_Anchor_getC1(btSoftBody_Anchor* obj, btVector3* value); + EXPORT btScalar btSoftBody_Anchor_getC2(btSoftBody_Anchor* obj); + EXPORT btScalar btSoftBody_Anchor_getInfluence(btSoftBody_Anchor* obj); + EXPORT void btSoftBody_Anchor_getLocal(btSoftBody_Anchor* obj, btVector3* value); + EXPORT btSoftBody_Node* btSoftBody_Anchor_getNode(btSoftBody_Anchor* obj); + EXPORT void btSoftBody_Anchor_setBody(btSoftBody_Anchor* obj, btRigidBody* value); + EXPORT void btSoftBody_Anchor_setC0(btSoftBody_Anchor* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Anchor_setC1(btSoftBody_Anchor* obj, const btVector3* value); + EXPORT void btSoftBody_Anchor_setC2(btSoftBody_Anchor* obj, btScalar value); + EXPORT void btSoftBody_Anchor_setInfluence(btSoftBody_Anchor* obj, btScalar value); + EXPORT void btSoftBody_Anchor_setLocal(btSoftBody_Anchor* obj, const btVector3* value); + EXPORT void btSoftBody_Anchor_setNode(btSoftBody_Anchor* obj, btSoftBody_Node* value); + + EXPORT btSoftBody_Body* btSoftBody_Body_new(); + EXPORT btSoftBody_Body* btSoftBody_Body_new2(const btCollisionObject* colObj); + EXPORT btSoftBody_Body* btSoftBody_Body_new3(btSoftBody_Cluster* p); + EXPORT void btSoftBody_Body_activate(btSoftBody_Body* obj); + EXPORT void btSoftBody_Body_angularVelocity(btSoftBody_Body* obj, const btVector3* rpos, btVector3* value); + EXPORT void btSoftBody_Body_angularVelocity2(btSoftBody_Body* obj, btVector3* value); + EXPORT void btSoftBody_Body_applyAImpulse(btSoftBody_Body* obj, const btSoftBody_Impulse* impulse); + EXPORT void btSoftBody_Body_applyDAImpulse(btSoftBody_Body* obj, const btVector3* impulse); + EXPORT void btSoftBody_Body_applyDCImpulse(btSoftBody_Body* obj, const btVector3* impulse); + EXPORT void btSoftBody_Body_applyDImpulse(btSoftBody_Body* obj, const btVector3* impulse, const btVector3* rpos); + EXPORT void btSoftBody_Body_applyImpulse(btSoftBody_Body* obj, const btSoftBody_Impulse* impulse, const btVector3* rpos); + EXPORT void btSoftBody_Body_applyVAImpulse(btSoftBody_Body* obj, const btVector3* impulse); + EXPORT void btSoftBody_Body_applyVImpulse(btSoftBody_Body* obj, const btVector3* impulse, const btVector3* rpos); + EXPORT const btCollisionObject* btSoftBody_Body_getCollisionObject(btSoftBody_Body* obj); + EXPORT btRigidBody* btSoftBody_Body_getRigid(btSoftBody_Body* obj); + EXPORT btSoftBody_Cluster* btSoftBody_Body_getSoft(btSoftBody_Body* obj); + EXPORT btScalar btSoftBody_Body_invMass(btSoftBody_Body* obj); + EXPORT void btSoftBody_Body_invWorldInertia(btSoftBody_Body* obj, btMatrix3x3* value); + EXPORT void btSoftBody_Body_linearVelocity(btSoftBody_Body* obj, btVector3* value); + EXPORT void btSoftBody_Body_setCollisionObject(btSoftBody_Body* obj, const btCollisionObject* value); + EXPORT void btSoftBody_Body_setRigid(btSoftBody_Body* obj, btRigidBody* value); + EXPORT void btSoftBody_Body_setSoft(btSoftBody_Body* obj, btSoftBody_Cluster* value); + EXPORT void btSoftBody_Body_velocity(btSoftBody_Body* obj, const btVector3* rpos, btVector3* value); + EXPORT void btSoftBody_Body_xform(btSoftBody_Body* obj, btTransform* value); + EXPORT void btSoftBody_Body_delete(btSoftBody_Body* obj); + + EXPORT btSoftBody_Body* btSoftBody_Body_array_at(btSoftBody_Body* obj, int index); + + EXPORT btScalar btSoftBody_CJoint_getFriction(btSoftBody_CJoint* obj); + EXPORT int btSoftBody_CJoint_getLife(btSoftBody_CJoint* obj); + EXPORT int btSoftBody_CJoint_getMaxlife(btSoftBody_CJoint* obj); + EXPORT void btSoftBody_CJoint_getNormal(btSoftBody_CJoint* obj, btVector3* value); + EXPORT btVector3* btSoftBody_CJoint_getRpos(btSoftBody_CJoint* obj); + EXPORT void btSoftBody_CJoint_setFriction(btSoftBody_CJoint* obj, btScalar value); + EXPORT void btSoftBody_CJoint_setLife(btSoftBody_CJoint* obj, int value); + EXPORT void btSoftBody_CJoint_setMaxlife(btSoftBody_CJoint* obj, int value); + EXPORT void btSoftBody_CJoint_setNormal(btSoftBody_CJoint* obj, const btVector3* value); + + EXPORT btScalar btSoftBody_Cluster_getAdamping(btSoftBody_Cluster* obj); + EXPORT void btSoftBody_Cluster_getAv(btSoftBody_Cluster* obj, btVector3* value); + EXPORT int btSoftBody_Cluster_getClusterIndex(btSoftBody_Cluster* obj); + EXPORT bool btSoftBody_Cluster_getCollide(btSoftBody_Cluster* obj); + EXPORT void btSoftBody_Cluster_getCom(btSoftBody_Cluster* obj, btVector3* value); + EXPORT bool btSoftBody_Cluster_getContainsAnchor(btSoftBody_Cluster* obj); + EXPORT btVector3* btSoftBody_Cluster_getDimpulses(btSoftBody_Cluster* obj); + EXPORT btAlignedObjectArray_btVector3* btSoftBody_Cluster_getFramerefs(btSoftBody_Cluster* obj); + EXPORT void btSoftBody_Cluster_getFramexform(btSoftBody_Cluster* obj, btTransform* value); + EXPORT btScalar btSoftBody_Cluster_getIdmass(btSoftBody_Cluster* obj); + EXPORT btScalar btSoftBody_Cluster_getImass(btSoftBody_Cluster* obj); + EXPORT void btSoftBody_Cluster_getInvwi(btSoftBody_Cluster* obj, btMatrix3x3* value); + EXPORT btScalar btSoftBody_Cluster_getLdamping(btSoftBody_Cluster* obj); + EXPORT btDbvtNode* btSoftBody_Cluster_getLeaf(btSoftBody_Cluster* obj); + EXPORT void btSoftBody_Cluster_getLocii(btSoftBody_Cluster* obj, btMatrix3x3* value); + EXPORT void btSoftBody_Cluster_getLv(btSoftBody_Cluster* obj, btVector3* value); + EXPORT btAlignedObjectArray_btScalar* btSoftBody_Cluster_getMasses(btSoftBody_Cluster* obj); + EXPORT btScalar btSoftBody_Cluster_getMatching(btSoftBody_Cluster* obj); + EXPORT btScalar btSoftBody_Cluster_getMaxSelfCollisionImpulse(btSoftBody_Cluster* obj); + EXPORT btScalar btSoftBody_Cluster_getNdamping(btSoftBody_Cluster* obj); + EXPORT int btSoftBody_Cluster_getNdimpulses(btSoftBody_Cluster* obj); + EXPORT btAlignedObjectArray_btSoftBody_NodePtr* btSoftBody_Cluster_getNodes(btSoftBody_Cluster* obj); + EXPORT int btSoftBody_Cluster_getNvimpulses(btSoftBody_Cluster* obj); + EXPORT btScalar btSoftBody_Cluster_getSelfCollisionImpulseFactor(btSoftBody_Cluster* obj); + EXPORT btVector3* btSoftBody_Cluster_getVimpulses(btSoftBody_Cluster* obj); + EXPORT void btSoftBody_Cluster_setAdamping(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setAv(btSoftBody_Cluster* obj, const btVector3* value); + EXPORT void btSoftBody_Cluster_setClusterIndex(btSoftBody_Cluster* obj, int value); + EXPORT void btSoftBody_Cluster_setCollide(btSoftBody_Cluster* obj, bool value); + EXPORT void btSoftBody_Cluster_setCom(btSoftBody_Cluster* obj, const btVector3* value); + EXPORT void btSoftBody_Cluster_setContainsAnchor(btSoftBody_Cluster* obj, bool value); + EXPORT void btSoftBody_Cluster_setFramexform(btSoftBody_Cluster* obj, const btTransform* value); + EXPORT void btSoftBody_Cluster_setIdmass(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setImass(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setInvwi(btSoftBody_Cluster* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Cluster_setLdamping(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setLeaf(btSoftBody_Cluster* obj, btDbvtNode* value); + EXPORT void btSoftBody_Cluster_setLocii(btSoftBody_Cluster* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Cluster_setLv(btSoftBody_Cluster* obj, const btVector3* value); + EXPORT void btSoftBody_Cluster_setMatching(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setMaxSelfCollisionImpulse(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setNdamping(btSoftBody_Cluster* obj, btScalar value); + EXPORT void btSoftBody_Cluster_setNdimpulses(btSoftBody_Cluster* obj, int value); + EXPORT void btSoftBody_Cluster_setNvimpulses(btSoftBody_Cluster* obj, int value); + EXPORT void btSoftBody_Cluster_setSelfCollisionImpulseFactor(btSoftBody_Cluster* obj, btScalar value); + + EXPORT btSoftBody_eAeroModel btSoftBody_Config_getAeromodel(btSoftBody_Config* obj); + EXPORT int btSoftBody_Config_getCiterations(btSoftBody_Config* obj); + EXPORT int btSoftBody_Config_getCollisions(btSoftBody_Config* obj); + EXPORT int btSoftBody_Config_getDiterations(btSoftBody_Config* obj); + EXPORT btAlignedObjectArray_btSoftBody_ePSolver__* btSoftBody_Config_getDsequence(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKAHR(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKCHR(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKDF(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKDG(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKDP(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKKHR(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKLF(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKMT(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKPR(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSHR(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSK_SPLT_CL(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSKHR_CL(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSR_SPLT_CL(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSRHR_CL(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSS_SPLT_CL(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKSSHR_CL(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKVC(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getKVCF(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getMaxvolume(btSoftBody_Config* obj); + EXPORT int btSoftBody_Config_getPiterations(btSoftBody_Config* obj); + EXPORT btAlignedObjectArray_btSoftBody_ePSolver__* btSoftBody_Config_getPsequence(btSoftBody_Config* obj); + EXPORT btScalar btSoftBody_Config_getTimescale(btSoftBody_Config* obj); + EXPORT int btSoftBody_Config_getViterations(btSoftBody_Config* obj); + EXPORT btAlignedObjectArray_btSoftBody_eVSolver__* btSoftBody_Config_getVsequence(btSoftBody_Config* obj); + EXPORT void btSoftBody_Config_setAeromodel(btSoftBody_Config* obj, btSoftBody_eAeroModel value); + EXPORT void btSoftBody_Config_setCiterations(btSoftBody_Config* obj, int value); + EXPORT void btSoftBody_Config_setCollisions(btSoftBody_Config* obj, int value); + EXPORT void btSoftBody_Config_setDiterations(btSoftBody_Config* obj, int value); + EXPORT void btSoftBody_Config_setKAHR(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKCHR(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKDF(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKDG(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKDP(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKKHR(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKLF(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKMT(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKPR(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSHR(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSK_SPLT_CL(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSKHR_CL(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSR_SPLT_CL(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSRHR_CL(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSS_SPLT_CL(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKSSHR_CL(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKVC(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setKVCF(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setMaxvolume(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setPiterations(btSoftBody_Config* obj, int value); + EXPORT void btSoftBody_Config_setTimescale(btSoftBody_Config* obj, btScalar value); + EXPORT void btSoftBody_Config_setViterations(btSoftBody_Config* obj, int value); + + EXPORT void* btSoftBody_Element_getTag(btSoftBody_Element* obj); + EXPORT void btSoftBody_Element_setTag(btSoftBody_Element* obj, void* value); + EXPORT void btSoftBody_Element_delete(btSoftBody_Element* obj); + + EXPORT btDbvtNode* btSoftBody_Face_getLeaf(btSoftBody_Face* obj); + EXPORT btSoftBody_Node** btSoftBody_Face_getN(btSoftBody_Face* obj); + EXPORT void btSoftBody_Face_getNormal(btSoftBody_Face* obj, btVector3* value); + EXPORT btScalar btSoftBody_Face_getRa(btSoftBody_Face* obj); + EXPORT void btSoftBody_Face_setLeaf(btSoftBody_Face* obj, btDbvtNode* value); + EXPORT void btSoftBody_Face_setNormal(btSoftBody_Face* obj, const btVector3* value); + EXPORT void btSoftBody_Face_setRa(btSoftBody_Face* obj, btScalar value); + + EXPORT btSoftBody_Material* btSoftBody_Feature_getMaterial(btSoftBody_Feature* obj); + EXPORT void btSoftBody_Feature_setMaterial(btSoftBody_Feature* obj, btSoftBody_Material* value); + + EXPORT btSoftBody_ImplicitFnWrapper* btSoftBody_ImplicitFnWrapper_new(p_btSoftBody_ImplicitFn_Eval EvalCallback); + + EXPORT btScalar btSoftBody_ImplicitFn_Eval(btSoftBody_ImplicitFn* obj, const btVector3* x); + EXPORT void btSoftBody_ImplicitFn_delete(btSoftBody_ImplicitFn* obj); + + EXPORT btSoftBody_Impulse* btSoftBody_Impulse_new(); + EXPORT int btSoftBody_Impulse_getAsDrift(btSoftBody_Impulse* obj); + EXPORT int btSoftBody_Impulse_getAsVelocity(btSoftBody_Impulse* obj); + EXPORT void btSoftBody_Impulse_getDrift(btSoftBody_Impulse* obj, btVector3* value); + EXPORT void btSoftBody_Impulse_getVelocity(btSoftBody_Impulse* obj, btVector3* value); + EXPORT btSoftBody_Impulse* btSoftBody_Impulse_operator_n(btSoftBody_Impulse* obj); + EXPORT btSoftBody_Impulse* btSoftBody_Impulse_operator_m(btSoftBody_Impulse* obj, btScalar x); + EXPORT void btSoftBody_Impulse_setAsDrift(btSoftBody_Impulse* obj, int value); + EXPORT void btSoftBody_Impulse_setAsVelocity(btSoftBody_Impulse* obj, int value); + EXPORT void btSoftBody_Impulse_setDrift(btSoftBody_Impulse* obj, const btVector3* value); + EXPORT void btSoftBody_Impulse_setVelocity(btSoftBody_Impulse* obj, const btVector3* value); + EXPORT void btSoftBody_Impulse_delete(btSoftBody_Impulse* obj); + + EXPORT btSoftBody_Joint_Specs* btSoftBody_Joint_Specs_new(); + EXPORT btScalar btSoftBody_Joint_Specs_getCfm(btSoftBody_Joint_Specs* obj); + EXPORT btScalar btSoftBody_Joint_Specs_getErp(btSoftBody_Joint_Specs* obj); + EXPORT btScalar btSoftBody_Joint_Specs_getSplit(btSoftBody_Joint_Specs* obj); + EXPORT void btSoftBody_Joint_Specs_setCfm(btSoftBody_Joint_Specs* obj, btScalar value); + EXPORT void btSoftBody_Joint_Specs_setErp(btSoftBody_Joint_Specs* obj, btScalar value); + EXPORT void btSoftBody_Joint_Specs_setSplit(btSoftBody_Joint_Specs* obj, btScalar value); + EXPORT void btSoftBody_Joint_Specs_delete(btSoftBody_Joint_Specs* obj); + + EXPORT btSoftBody_Body* btSoftBody_Joint_getBodies(btSoftBody_Joint* obj); + EXPORT btScalar btSoftBody_Joint_getCfm(btSoftBody_Joint* obj); + EXPORT bool btSoftBody_Joint_getDelete(btSoftBody_Joint* obj); + EXPORT void btSoftBody_Joint_getDrift(btSoftBody_Joint* obj, btVector3* value); + EXPORT btScalar btSoftBody_Joint_getErp(btSoftBody_Joint* obj); + EXPORT void btSoftBody_Joint_getMassmatrix(btSoftBody_Joint* obj, btMatrix3x3* value); + EXPORT btVector3* btSoftBody_Joint_getRefs(btSoftBody_Joint* obj); + EXPORT void btSoftBody_Joint_getSdrift(btSoftBody_Joint* obj, btVector3* value); + EXPORT btScalar btSoftBody_Joint_getSplit(btSoftBody_Joint* obj); + EXPORT void btSoftBody_Joint_Prepare(btSoftBody_Joint* obj, btScalar dt, int iterations); + EXPORT void btSoftBody_Joint_setCfm(btSoftBody_Joint* obj, btScalar value); + EXPORT void btSoftBody_Joint_setDelete(btSoftBody_Joint* obj, bool value); + EXPORT void btSoftBody_Joint_setDrift(btSoftBody_Joint* obj, const btVector3* value); + EXPORT void btSoftBody_Joint_setErp(btSoftBody_Joint* obj, btScalar value); + EXPORT void btSoftBody_Joint_setMassmatrix(btSoftBody_Joint* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Joint_setSdrift(btSoftBody_Joint* obj, const btVector3* value); + EXPORT void btSoftBody_Joint_setSplit(btSoftBody_Joint* obj, btScalar value); + EXPORT void btSoftBody_Joint_Solve(btSoftBody_Joint* obj, btScalar dt, btScalar sor); + EXPORT void btSoftBody_Joint_Terminate(btSoftBody_Joint* obj, btScalar dt); + EXPORT btSoftBody_Joint_eType btSoftBody_Joint_Type(btSoftBody_Joint* obj); + EXPORT void btSoftBody_Joint_delete(btSoftBody_Joint* obj); + + EXPORT btSoftBody_Link* btSoftBody_Link_new(); + EXPORT btSoftBody_Link* btSoftBody_Link_new2(btSoftBody_Link* obj); + EXPORT int btSoftBody_Link_getBbending(btSoftBody_Link* obj); + EXPORT btScalar btSoftBody_Link_getC0(btSoftBody_Link* obj); + EXPORT btScalar btSoftBody_Link_getC1(btSoftBody_Link* obj); + EXPORT btScalar btSoftBody_Link_getC2(btSoftBody_Link* obj); + EXPORT void btSoftBody_Link_getC3(btSoftBody_Link* obj, btVector3* value); + EXPORT btSoftBody_Node** btSoftBody_Link_getN(btSoftBody_Link* obj); + EXPORT btScalar btSoftBody_Link_getRl(btSoftBody_Link* obj); + EXPORT void btSoftBody_Link_setBbending(btSoftBody_Link* obj, int value); + EXPORT void btSoftBody_Link_setC0(btSoftBody_Link* obj, btScalar value); + EXPORT void btSoftBody_Link_setC1(btSoftBody_Link* obj, btScalar value); + EXPORT void btSoftBody_Link_setC2(btSoftBody_Link* obj, btScalar value); + EXPORT void btSoftBody_Link_setC3(btSoftBody_Link* obj, const btVector3* value); + EXPORT void btSoftBody_Link_setRl(btSoftBody_Link* obj, btScalar value); + EXPORT void btSoftBody_Link_delete(btSoftBody_Link* obj); + + EXPORT btSoftBody_LJoint_Specs* btSoftBody_LJoint_Specs_new(); + EXPORT void btSoftBody_LJoint_Specs_getPosition(btSoftBody_LJoint_Specs* obj, btVector3* value); + EXPORT void btSoftBody_LJoint_Specs_setPosition(btSoftBody_LJoint_Specs* obj, const btVector3* value); + + EXPORT btVector3* btSoftBody_LJoint_getRpos(btSoftBody_LJoint* obj); + + EXPORT int btSoftBody_Material_getFlags(btSoftBody_Material* obj); + EXPORT btScalar btSoftBody_Material_getKAST(btSoftBody_Material* obj); + EXPORT btScalar btSoftBody_Material_getKLST(btSoftBody_Material* obj); + EXPORT btScalar btSoftBody_Material_getKVST(btSoftBody_Material* obj); + EXPORT void btSoftBody_Material_setFlags(btSoftBody_Material* obj, int value); + EXPORT void btSoftBody_Material_setKAST(btSoftBody_Material* obj, btScalar value); + EXPORT void btSoftBody_Material_setKLST(btSoftBody_Material* obj, btScalar value); + EXPORT void btSoftBody_Material_setKVST(btSoftBody_Material* obj, btScalar value); + + EXPORT btScalar btSoftBody_Node_getArea(btSoftBody_Node* obj); + EXPORT int btSoftBody_Node_getBattach(btSoftBody_Node* obj); + EXPORT void btSoftBody_Node_getF(btSoftBody_Node* obj, btVector3* value); + EXPORT btScalar btSoftBody_Node_getIm(btSoftBody_Node* obj); + EXPORT int btSoftBody_Node_getIndex(btSoftBody_Node* obj); + EXPORT btDbvtNode* btSoftBody_Node_getLeaf(btSoftBody_Node* obj); + EXPORT void btSoftBody_Node_getN(btSoftBody_Node* obj, btVector3* value); + EXPORT void btSoftBody_Node_getQ(btSoftBody_Node* obj, btVector3* value); + EXPORT void btSoftBody_Node_getV(btSoftBody_Node* obj, btVector3* value); + EXPORT void btSoftBody_Node_getVN(btSoftBody_Node* obj, btVector3* value); + EXPORT void btSoftBody_Node_getX(btSoftBody_Node* obj, btVector3* value); + EXPORT void btSoftBody_Node_setArea(btSoftBody_Node* obj, btScalar value); + EXPORT void btSoftBody_Node_setBattach(btSoftBody_Node* obj, int value); + EXPORT void btSoftBody_Node_setF(btSoftBody_Node* obj, const btVector3* value); + EXPORT void btSoftBody_Node_setIm(btSoftBody_Node* obj, btScalar value); + EXPORT void btSoftBody_Node_setIndex(btSoftBody_Node* obj, int value); + EXPORT void btSoftBody_Node_setLeaf(btSoftBody_Node* obj, btDbvtNode* value); + EXPORT void btSoftBody_Node_setN(btSoftBody_Node* obj, const btVector3* value); + EXPORT void btSoftBody_Node_setQ(btSoftBody_Node* obj, const btVector3* value); + EXPORT void btSoftBody_Node_setV(btSoftBody_Node* obj, const btVector3* value); + EXPORT void btSoftBody_Node_setVN(btSoftBody_Node* obj, const btVector3* value); + EXPORT void btSoftBody_Node_setX(btSoftBody_Node* obj, const btVector3* value); + + EXPORT btScalar* btSoftBody_Note_getCoords(btSoftBody_Note* obj); + EXPORT btSoftBody_Node** btSoftBody_Note_getNodes(btSoftBody_Note* obj); + EXPORT void btSoftBody_Note_getOffset(btSoftBody_Note* obj, btVector3* value); + EXPORT int btSoftBody_Note_getRank(btSoftBody_Note* obj); + EXPORT const char* btSoftBody_Note_getText(btSoftBody_Note* obj); + EXPORT void btSoftBody_Note_setOffset(btSoftBody_Note* obj, const btVector3* value); + EXPORT void btSoftBody_Note_setRank(btSoftBody_Note* obj, int value); + EXPORT void btSoftBody_Note_setText(btSoftBody_Note* obj, const char* value); + + EXPORT void btSoftBody_Pose_getAqq(btSoftBody_Pose* obj, btMatrix3x3* value); + EXPORT bool btSoftBody_Pose_getBframe(btSoftBody_Pose* obj); + EXPORT bool btSoftBody_Pose_getBvolume(btSoftBody_Pose* obj); + EXPORT void btSoftBody_Pose_getCom(btSoftBody_Pose* obj, btVector3* value); + EXPORT btAlignedObjectArray_btVector3* btSoftBody_Pose_getPos(btSoftBody_Pose* obj); + EXPORT void btSoftBody_Pose_getRot(btSoftBody_Pose* obj, btMatrix3x3* value); + EXPORT void btSoftBody_Pose_getScl(btSoftBody_Pose* obj, btMatrix3x3* value); + EXPORT btAlignedObjectArray_btScalar* btSoftBody_Pose_getWgh(btSoftBody_Pose* obj); + EXPORT btScalar btSoftBody_Pose_getVolume(btSoftBody_Pose* obj); + EXPORT void btSoftBody_Pose_setAqq(btSoftBody_Pose* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Pose_setBframe(btSoftBody_Pose* obj, bool value); + EXPORT void btSoftBody_Pose_setBvolume(btSoftBody_Pose* obj, bool value); + EXPORT void btSoftBody_Pose_setCom(btSoftBody_Pose* obj, const btVector3* value); + EXPORT void btSoftBody_Pose_setRot(btSoftBody_Pose* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Pose_setScl(btSoftBody_Pose* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_Pose_setVolume(btSoftBody_Pose* obj, btScalar value); + + EXPORT btSoftBody_RayFromToCaster* btSoftBody_RayFromToCaster_new(const btVector3* rayFrom, const btVector3* rayTo, btScalar mxt); + EXPORT btSoftBody_Face* btSoftBody_RayFromToCaster_getFace(btSoftBody_RayFromToCaster* obj); + EXPORT btScalar btSoftBody_RayFromToCaster_getMint(btSoftBody_RayFromToCaster* obj); + EXPORT void btSoftBody_RayFromToCaster_getRayFrom(btSoftBody_RayFromToCaster* obj, btVector3* value); + EXPORT void btSoftBody_RayFromToCaster_getRayNormalizedDirection(btSoftBody_RayFromToCaster* obj, btVector3* value); + EXPORT void btSoftBody_RayFromToCaster_getRayTo(btSoftBody_RayFromToCaster* obj, btVector3* value); + EXPORT int btSoftBody_RayFromToCaster_getTests(btSoftBody_RayFromToCaster* obj); + EXPORT btScalar btSoftBody_RayFromToCaster_rayFromToTriangle(const btVector3* rayFrom, const btVector3* rayTo, const btVector3* rayNormalizedDirection, const btVector3* a, const btVector3* b, const btVector3* c); + EXPORT btScalar btSoftBody_RayFromToCaster_rayFromToTriangle2(const btVector3* rayFrom, const btVector3* rayTo, const btVector3* rayNormalizedDirection, const btVector3* a, const btVector3* b, const btVector3* c, btScalar maxt); + EXPORT void btSoftBody_RayFromToCaster_setFace(btSoftBody_RayFromToCaster* obj, btSoftBody_Face* value); + EXPORT void btSoftBody_RayFromToCaster_setMint(btSoftBody_RayFromToCaster* obj, btScalar value); + EXPORT void btSoftBody_RayFromToCaster_setRayFrom(btSoftBody_RayFromToCaster* obj, const btVector3* value); + EXPORT void btSoftBody_RayFromToCaster_setRayNormalizedDirection(btSoftBody_RayFromToCaster* obj, const btVector3* value); + EXPORT void btSoftBody_RayFromToCaster_setRayTo(btSoftBody_RayFromToCaster* obj, const btVector3* value); + EXPORT void btSoftBody_RayFromToCaster_setTests(btSoftBody_RayFromToCaster* obj, int value); + + EXPORT btSoftBody_RContact* btSoftBody_RContact_new(); + EXPORT void btSoftBody_RContact_getC0(btSoftBody_RContact* obj, btMatrix3x3* value); + EXPORT void btSoftBody_RContact_getC1(btSoftBody_RContact* obj, btVector3* value); + EXPORT btScalar btSoftBody_RContact_getC2(btSoftBody_RContact* obj); + EXPORT btScalar btSoftBody_RContact_getC3(btSoftBody_RContact* obj); + EXPORT btScalar btSoftBody_RContact_getC4(btSoftBody_RContact* obj); + EXPORT btSoftBody_sCti* btSoftBody_RContact_getCti(btSoftBody_RContact* obj); + EXPORT btSoftBody_Node* btSoftBody_RContact_getNode(btSoftBody_RContact* obj); + EXPORT void btSoftBody_RContact_getT1(btSoftBody_RContact* obj, btVector3* value); + EXPORT void btSoftBody_RContact_getT2(btSoftBody_RContact* obj, btVector3* value); + EXPORT void btSoftBody_RContact_setC0(btSoftBody_RContact* obj, const btMatrix3x3* value); + EXPORT void btSoftBody_RContact_setC1(btSoftBody_RContact* obj, const btVector3* value); + EXPORT void btSoftBody_RContact_setC2(btSoftBody_RContact* obj, btScalar value); + EXPORT void btSoftBody_RContact_setC3(btSoftBody_RContact* obj, btScalar value); + EXPORT void btSoftBody_RContact_setC4(btSoftBody_RContact* obj, btScalar value); + EXPORT void btSoftBody_RContact_setNode(btSoftBody_RContact* obj, btSoftBody_Node* value); + EXPORT void btSoftBody_RContact_setT1(btSoftBody_RContact* obj, const btVector3* value); + EXPORT void btSoftBody_RContact_setT2(btSoftBody_RContact* obj, const btVector3* value); + EXPORT void btSoftBody_RContact_delete(btSoftBody_RContact* obj); + + EXPORT btSoftBody_SContact* btSoftBody_SContact_new(); + EXPORT btScalar* btSoftBody_SContact_getCfm(btSoftBody_SContact* obj); + EXPORT btSoftBody_Face* btSoftBody_SContact_getFace(btSoftBody_SContact* obj); + EXPORT btScalar btSoftBody_SContact_getFriction(btSoftBody_SContact* obj); + EXPORT btScalar btSoftBody_SContact_getMargin(btSoftBody_SContact* obj); + EXPORT btSoftBody_Node* btSoftBody_SContact_getNode(btSoftBody_SContact* obj); + EXPORT void btSoftBody_SContact_getNormal(btSoftBody_SContact* obj, btVector3* value); + EXPORT void btSoftBody_SContact_getWeights(btSoftBody_SContact* obj, btVector3* value); + EXPORT void btSoftBody_SContact_setFace(btSoftBody_SContact* obj, btSoftBody_Face* value); + EXPORT void btSoftBody_SContact_setFriction(btSoftBody_SContact* obj, btScalar value); + EXPORT void btSoftBody_SContact_setMargin(btSoftBody_SContact* obj, btScalar value); + EXPORT void btSoftBody_SContact_setNode(btSoftBody_SContact* obj, btSoftBody_Node* value); + EXPORT void btSoftBody_SContact_setNormal(btSoftBody_SContact* obj, const btVector3* value); + EXPORT void btSoftBody_SContact_setWeights(btSoftBody_SContact* obj, const btVector3* value); + EXPORT void btSoftBody_SContact_delete(btSoftBody_SContact* obj); + + EXPORT btSoftBody_sCti* btSoftBody_sCti_new(); + EXPORT const btCollisionObject* btSoftBody_sCti_getColObj(btSoftBody_sCti* obj); + EXPORT void btSoftBody_sCti_getNormal(btSoftBody_sCti* obj, btVector3* value); + EXPORT btScalar btSoftBody_sCti_getOffset(btSoftBody_sCti* obj); + EXPORT void btSoftBody_sCti_setColObj(btSoftBody_sCti* obj, const btCollisionObject* value); + EXPORT void btSoftBody_sCti_setNormal(btSoftBody_sCti* obj, const btVector3* value); + EXPORT void btSoftBody_sCti_setOffset(btSoftBody_sCti* obj, btScalar value); + EXPORT void btSoftBody_sCti_delete(btSoftBody_sCti* obj); + + EXPORT btScalar btSoftBody_SolverState_getIsdt(btSoftBody_SolverState* obj); + EXPORT btScalar btSoftBody_SolverState_getRadmrg(btSoftBody_SolverState* obj); + EXPORT btScalar btSoftBody_SolverState_getSdt(btSoftBody_SolverState* obj); + EXPORT btScalar btSoftBody_SolverState_getUpdmrg(btSoftBody_SolverState* obj); + EXPORT btScalar btSoftBody_SolverState_getVelmrg(btSoftBody_SolverState* obj); + EXPORT void btSoftBody_SolverState_setIsdt(btSoftBody_SolverState* obj, btScalar value); + EXPORT void btSoftBody_SolverState_setRadmrg(btSoftBody_SolverState* obj, btScalar value); + EXPORT void btSoftBody_SolverState_setSdt(btSoftBody_SolverState* obj, btScalar value); + EXPORT void btSoftBody_SolverState_setUpdmrg(btSoftBody_SolverState* obj, btScalar value); + EXPORT void btSoftBody_SolverState_setVelmrg(btSoftBody_SolverState* obj, btScalar value); + + EXPORT btSoftBody_sRayCast* btSoftBody_sRayCast_new(); + EXPORT btSoftBody* btSoftBody_sRayCast_getBody(btSoftBody_sRayCast* obj); + EXPORT btSoftBody_eFeature btSoftBody_sRayCast_getFeature(btSoftBody_sRayCast* obj); + EXPORT btScalar btSoftBody_sRayCast_getFraction(btSoftBody_sRayCast* obj); + EXPORT int btSoftBody_sRayCast_getIndex(btSoftBody_sRayCast* obj); + EXPORT void btSoftBody_sRayCast_setBody(btSoftBody_sRayCast* obj, btSoftBody* value); + EXPORT void btSoftBody_sRayCast_setFeature(btSoftBody_sRayCast* obj, btSoftBody_eFeature value); + EXPORT void btSoftBody_sRayCast_setFraction(btSoftBody_sRayCast* obj, btScalar value); + EXPORT void btSoftBody_sRayCast_setIndex(btSoftBody_sRayCast* obj, int value); + EXPORT void btSoftBody_sRayCast_delete(btSoftBody_sRayCast* obj); + + EXPORT btVector3* btSoftBody_Tetra_getC0(btSoftBody_Tetra* obj); + EXPORT btScalar btSoftBody_Tetra_getC1(btSoftBody_Tetra* obj); + EXPORT btScalar btSoftBody_Tetra_getC2(btSoftBody_Tetra* obj); + EXPORT btDbvtNode* btSoftBody_Tetra_getLeaf(btSoftBody_Tetra* obj); + EXPORT btSoftBody_Node** btSoftBody_Tetra_getN(btSoftBody_Tetra* obj); + EXPORT btScalar btSoftBody_Tetra_getRv(btSoftBody_Tetra* obj); + EXPORT void btSoftBody_Tetra_setC1(btSoftBody_Tetra* obj, btScalar value); + EXPORT void btSoftBody_Tetra_setC2(btSoftBody_Tetra* obj, btScalar value); + EXPORT void btSoftBody_Tetra_setLeaf(btSoftBody_Tetra* obj, btDbvtNode* value); + EXPORT void btSoftBody_Tetra_setRv(btSoftBody_Tetra* obj, btScalar value); + + EXPORT void btSoftBody_TetraScratch_getF(btSoftBody_TetraScratch* obj, btMatrix3x3* value); + EXPORT void btSoftBody_TetraScratch_setF(btSoftBody_TetraScratch* obj, const btMatrix3x3* value); + + EXPORT btSoftBody* btSoftBody_new(btSoftBodyWorldInfo* worldInfo, int node_count, const btScalar* x, const btScalar* m); + EXPORT btSoftBody* btSoftBody_new2(btSoftBodyWorldInfo* worldInfo); + EXPORT void btSoftBody_addAeroForceToFace(btSoftBody* obj, const btVector3* windVelocity, int faceIndex); + EXPORT void btSoftBody_addAeroForceToNode(btSoftBody* obj, const btVector3* windVelocity, int nodeIndex); + EXPORT void btSoftBody_addForce(btSoftBody* obj, const btVector3* force); + EXPORT void btSoftBody_addForce2(btSoftBody* obj, const btVector3* force, int node); + EXPORT void btSoftBody_addVelocity(btSoftBody* obj, const btVector3* velocity); + EXPORT void btSoftBody_addVelocity2(btSoftBody* obj, const btVector3* velocity, int node); + EXPORT void btSoftBody_appendAnchor(btSoftBody* obj, int node, btRigidBody* body, const btVector3* localPivot, bool disableCollisionBetweenLinkedBodies, btScalar influence); + EXPORT void btSoftBody_appendAnchor2(btSoftBody* obj, int node, btRigidBody* body, bool disableCollisionBetweenLinkedBodies, btScalar influence); + EXPORT void btSoftBody_appendAngularJoint(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs); + EXPORT void btSoftBody_appendAngularJoint2(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs, btSoftBody_Body* body); + EXPORT void btSoftBody_appendAngularJoint3(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs, btSoftBody* body); + EXPORT void btSoftBody_appendAngularJoint4(btSoftBody* obj, const btSoftBody_AJoint_Specs* specs, btSoftBody_Cluster* body0, btSoftBody_Body* body1); + EXPORT void btSoftBody_appendFace(btSoftBody* obj, int model, btSoftBody_Material* mat); + EXPORT void btSoftBody_appendFace2(btSoftBody* obj, int node0, int node1, int node2, btSoftBody_Material* mat); + EXPORT void btSoftBody_appendLinearJoint(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs, btSoftBody* body); + EXPORT void btSoftBody_appendLinearJoint2(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs); + EXPORT void btSoftBody_appendLinearJoint3(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs, btSoftBody_Body* body); + EXPORT void btSoftBody_appendLinearJoint4(btSoftBody* obj, const btSoftBody_LJoint_Specs* specs, btSoftBody_Cluster* body0, btSoftBody_Body* body1); + EXPORT void btSoftBody_appendLink(btSoftBody* obj, int node0, int node1, btSoftBody_Material* mat, bool bcheckexist); + EXPORT void btSoftBody_appendLink2(btSoftBody* obj, int model, btSoftBody_Material* mat); + EXPORT void btSoftBody_appendLink3(btSoftBody* obj, btSoftBody_Node* node0, btSoftBody_Node* node1, btSoftBody_Material* mat, bool bcheckexist); + EXPORT btSoftBody_Material* btSoftBody_appendMaterial(btSoftBody* obj); + EXPORT void btSoftBody_appendNode(btSoftBody* obj, const btVector3* x, btScalar m); + EXPORT void btSoftBody_appendNote(btSoftBody* obj, const char* text, const btVector3* o, btSoftBody_Face* feature); + EXPORT void btSoftBody_appendNote2(btSoftBody* obj, const char* text, const btVector3* o, btSoftBody_Link* feature); + EXPORT void btSoftBody_appendNote3(btSoftBody* obj, const char* text, const btVector3* o, btSoftBody_Node* feature); + EXPORT void btSoftBody_appendNote4(btSoftBody* obj, const char* text, const btVector3* o); + EXPORT void btSoftBody_appendNote5(btSoftBody* obj, const char* text, const btVector3* o, const btVector4* c, btSoftBody_Node* n0, btSoftBody_Node* n1, btSoftBody_Node* n2, btSoftBody_Node* n3); + EXPORT void btSoftBody_appendTetra(btSoftBody* obj, int model, btSoftBody_Material* mat); + EXPORT void btSoftBody_appendTetra2(btSoftBody* obj, int node0, int node1, int node2, int node3, btSoftBody_Material* mat); + EXPORT void btSoftBody_applyClusters(btSoftBody* obj, bool drift); + EXPORT void btSoftBody_applyForces(btSoftBody* obj); + EXPORT bool btSoftBody_checkContact(btSoftBody* obj, const btCollisionObjectWrapper* colObjWrap, const btVector3* x, btScalar margin, btSoftBody_sCti* cti); + EXPORT bool btSoftBody_checkDeformableContact(btSoftBody* obj, const btCollisionObjectWrapper* colObjWrap, const btVector3* x, btScalar margin, btSoftBody_sCti* cti, bool predict); + EXPORT bool btSoftBody_checkFace(btSoftBody* obj, int node0, int node1, int node2); + EXPORT bool btSoftBody_checkLink(btSoftBody* obj, const btSoftBody_Node* node0, const btSoftBody_Node* node1); + EXPORT bool btSoftBody_checkLink2(btSoftBody* obj, int node0, int node1); + EXPORT void btSoftBody_cleanupClusters(btSoftBody* obj); + EXPORT void btSoftBody_clusterAImpulse(btSoftBody_Cluster* cluster, const btSoftBody_Impulse* impulse); + EXPORT void btSoftBody_clusterCom(btSoftBody* obj, int cluster, btVector3* value); + EXPORT void btSoftBody_clusterCom2(const btSoftBody_Cluster* cluster, btVector3* value); + EXPORT int btSoftBody_clusterCount(btSoftBody* obj); + EXPORT void btSoftBody_clusterDAImpulse(btSoftBody_Cluster* cluster, const btVector3* impulse); + EXPORT void btSoftBody_clusterDCImpulse(btSoftBody_Cluster* cluster, const btVector3* impulse); + EXPORT void btSoftBody_clusterDImpulse(btSoftBody_Cluster* cluster, const btVector3* rpos, const btVector3* impulse); + EXPORT void btSoftBody_clusterImpulse(btSoftBody_Cluster* cluster, const btVector3* rpos, const btSoftBody_Impulse* impulse); + EXPORT void btSoftBody_clusterVAImpulse(btSoftBody_Cluster* cluster, const btVector3* impulse); + EXPORT void btSoftBody_clusterVelocity(const btSoftBody_Cluster* cluster, const btVector3* rpos, btVector3* value); + EXPORT void btSoftBody_clusterVImpulse(btSoftBody_Cluster* cluster, const btVector3* rpos, const btVector3* impulse); + EXPORT bool btSoftBody_cutLink(btSoftBody* obj, const btSoftBody_Node* node0, const btSoftBody_Node* node1, btScalar position); + EXPORT bool btSoftBody_cutLink2(btSoftBody* obj, int node0, int node1, btScalar position); + EXPORT void btSoftBody_dampClusters(btSoftBody* obj); + EXPORT void btSoftBody_defaultCollisionHandler(btSoftBody* obj, const btCollisionObjectWrapper* pcoWrap); + EXPORT void btSoftBody_defaultCollisionHandler2(btSoftBody* obj, btSoftBody* psb); + EXPORT void btSoftBody_evaluateCom(btSoftBody* obj, btVector3* value); + EXPORT int btSoftBody_generateBendingConstraints(btSoftBody* obj, int distance, btSoftBody_Material* mat); + EXPORT int btSoftBody_generateClusters(btSoftBody* obj, int k); + EXPORT int btSoftBody_generateClusters2(btSoftBody* obj, int k, int maxiterations); + EXPORT void btSoftBody_getAabb(btSoftBody* obj, btVector3* aabbMin, btVector3* aabbMax); + EXPORT btAlignedObjectArray_btSoftBody_Anchor* btSoftBody_getAnchors(btSoftBody* obj); + EXPORT btVector3* btSoftBody_getBounds(btSoftBody* obj); + EXPORT bool btSoftBody_getBUpdateRtCst(btSoftBody* obj); + EXPORT btDbvt* btSoftBody_getCdbvt(btSoftBody* obj); + EXPORT btSoftBody_Config* btSoftBody_getCfg(btSoftBody* obj); + EXPORT btAlignedObjectArray_bool* btSoftBody_getClusterConnectivity(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_ClusterPtr* btSoftBody_getClusters(btSoftBody* obj); + EXPORT btAlignedObjectArray_const_btCollisionObjectPtr* btSoftBody_getCollisionDisabledObjects(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_Face* btSoftBody_getFaces(btSoftBody* obj); + EXPORT btDbvt* btSoftBody_getFdbvt(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_JointPtr* btSoftBody_getJoints(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_Link* btSoftBody_getLinks(btSoftBody* obj); + EXPORT btScalar btSoftBody_getMass(btSoftBody* obj, int node); + EXPORT btAlignedObjectArray_btSoftBody_MaterialPtr* btSoftBody_getMaterials(btSoftBody* obj); + EXPORT btDbvt* btSoftBody_getNdbvt(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_Node* btSoftBody_getNodes(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_Note* btSoftBody_getNotes(btSoftBody* obj); + EXPORT btSoftBody_Pose* btSoftBody_getPose(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_RContact* btSoftBody_getRcontacts(btSoftBody* obj); + EXPORT btScalar btSoftBody_getRestLengthScale(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_SContact* btSoftBody_getScontacts(btSoftBody* obj); + EXPORT btSoftBodySolver* btSoftBody_getSoftBodySolver(btSoftBody* obj); + //EXPORT btSoftBody_psolver_t btSoftBody_getSolver(btSoftBody_ePSolver solver); + //EXPORT btSoftBody_vsolver_t btSoftBody_getSolver2(btSoftBody_eVSolver solver); + EXPORT btSoftBody_SolverState* btSoftBody_getSst(btSoftBody* obj); + EXPORT void* btSoftBody_getTag(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_Tetra* btSoftBody_getTetras(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_TetraScratch* btSoftBody_getTetraScratches(btSoftBody* obj); + EXPORT btAlignedObjectArray_btSoftBody_TetraScratch* btSoftBody_getTetraScratchesTn(btSoftBody* obj); + EXPORT btScalar btSoftBody_getTimeacc(btSoftBody* obj); + EXPORT btScalar btSoftBody_getTotalMass(btSoftBody* obj); + EXPORT btAlignedObjectArray_int* btSoftBody_getUserIndexMapping(btSoftBody* obj); + EXPORT void btSoftBody_getWindVelocity(btSoftBody* obj, btVector3* velocity); + EXPORT btScalar btSoftBody_getVolume(btSoftBody* obj); + EXPORT btSoftBodyWorldInfo* btSoftBody_getWorldInfo(btSoftBody* obj); + EXPORT void btSoftBody_indicesToPointers(btSoftBody* obj, const int* map); + EXPORT void btSoftBody_initDefaults(btSoftBody* obj); + EXPORT void btSoftBody_initializeClusters(btSoftBody* obj); + EXPORT void btSoftBody_initializeFaceTree(btSoftBody* obj); + EXPORT void btSoftBody_initializeDmInverse(btSoftBody* obj); + EXPORT void btSoftBody_integrateMotion(btSoftBody* obj); + EXPORT void btSoftBody_pointersToIndices(btSoftBody* obj); + EXPORT void btSoftBody_predictMotion(btSoftBody* obj, btScalar dt); + EXPORT void btSoftBody_prepareClusters(btSoftBody* obj, int iterations); + EXPORT void btSoftBody_PSolve_Anchors(btSoftBody* psb, btScalar kst, btScalar ti); + EXPORT void btSoftBody_PSolve_Links(btSoftBody* psb, btScalar kst, btScalar ti); + EXPORT void btSoftBody_PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti); + EXPORT void btSoftBody_PSolve_SContacts(btSoftBody* psb, btScalar __unnamed1, btScalar ti); + EXPORT void btSoftBody_randomizeConstraints(btSoftBody* obj); + EXPORT bool btSoftBody_rayTest(btSoftBody* obj, const btVector3* rayFrom, const btVector3* rayTo, btSoftBody_sRayCast* results); + EXPORT int btSoftBody_rayTest2(btSoftBody* obj, const btVector3* rayFrom, const btVector3* rayTo, btScalar* mint, btSoftBody_eFeature* feature, int* index, bool bcountonly); + EXPORT void btSoftBody_refine(btSoftBody* obj, btSoftBody_ImplicitFn* ifn, btScalar accurary, bool cut); + EXPORT void btSoftBody_releaseCluster(btSoftBody* obj, int index); + EXPORT void btSoftBody_releaseClusters(btSoftBody* obj); + EXPORT void btSoftBody_resetLinkRestLengths(btSoftBody* obj); + EXPORT void btSoftBody_rotate(btSoftBody* obj, const btQuaternion* rot); + EXPORT void btSoftBody_scale(btSoftBody* obj, const btVector3* scl); + EXPORT void btSoftBody_setBUpdateRtCst(btSoftBody* obj, bool value); + EXPORT void btSoftBody_setDampingCoefficient(btSoftBody* obj, btScalar damping_coeff); + EXPORT void btSoftBody_setMass(btSoftBody* obj, int node, btScalar mass); + EXPORT void btSoftBody_setPose(btSoftBody* obj, bool bvolume, bool bframe); + EXPORT void btSoftBody_setRestLengthScale(btSoftBody* obj, btScalar restLength); + EXPORT void btSoftBody_setSelfCollision(btSoftBody* obj, bool useSelfCollision); + EXPORT void btSoftBody_setSoftBodySolver(btSoftBody* obj, btSoftBodySolver* softBodySolver); + EXPORT void btSoftBody_setSolver(btSoftBody* obj, btSoftBody_eSolverPresets preset); + EXPORT void btSoftBody_setTag(btSoftBody* obj, void* value); + EXPORT void btSoftBody_setTimeacc(btSoftBody* obj, btScalar value); + EXPORT void btSoftBody_setTotalDensity(btSoftBody* obj, btScalar density); + EXPORT void btSoftBody_setTotalMass(btSoftBody* obj, btScalar mass, bool fromfaces); + EXPORT void btSoftBody_setVelocity(btSoftBody* obj, const btVector3* velocity); + EXPORT void btSoftBody_setWindVelocity(btSoftBody* obj, const btVector3* velocity); + EXPORT void btSoftBody_setVolumeDensity(btSoftBody* obj, btScalar density); + EXPORT void btSoftBody_setVolumeMass(btSoftBody* obj, btScalar mass); + EXPORT void btSoftBody_setWorldInfo(btSoftBody* obj, btSoftBodyWorldInfo* value); + EXPORT void btSoftBody_solveClusters(const btAlignedObjectArray_btSoftBodyPtr* bodies); + EXPORT void btSoftBody_solveClusters2(btSoftBody* obj, btScalar sor); + EXPORT void btSoftBody_solveCommonConstraints(btSoftBody** bodies, int count, int iterations); + EXPORT void btSoftBody_solveConstraints(btSoftBody* obj); + EXPORT void btSoftBody_staticSolve(btSoftBody* obj, int iterations); + EXPORT void btSoftBody_transform(btSoftBody* obj, const btTransform* trs); + EXPORT void btSoftBody_translate(btSoftBody* obj, const btVector3* trs); + EXPORT btSoftBody* btSoftBody_upcast(btCollisionObject* colObj); + EXPORT void btSoftBody_updateArea(btSoftBody* obj, bool averageArea); + EXPORT void btSoftBody_updateBounds(btSoftBody* obj); + EXPORT void btSoftBody_updateClusters(btSoftBody* obj); + EXPORT void btSoftBody_updateConstants(btSoftBody* obj); + EXPORT void btSoftBody_updateLinkConstants(btSoftBody* obj); + EXPORT void btSoftBody_updateNormals(btSoftBody* obj); + EXPORT void btSoftBody_updatePose(btSoftBody* obj); + EXPORT bool btSoftBody_useSelfCollision(btSoftBody* obj); + EXPORT void btSoftBody_VSolve_Links(btSoftBody* psb, btScalar kst); + + EXPORT int btSoftBody_getFaceVertexData(btSoftBody* obj, btScalar* vertices); + EXPORT int btSoftBody_getFaceVertexNormalData(btSoftBody* obj, btScalar* vertices); + EXPORT int btSoftBody_getFaceVertexNormalData2(btSoftBody* obj, btScalar* vertices, btScalar* normals); + EXPORT int btSoftBody_getLinkVertexData(btSoftBody* obj, btScalar* vertices); + EXPORT int btSoftBody_getLinkVertexNormalData(btSoftBody* obj, btScalar* vertices); + EXPORT int btSoftBody_getTetraVertexData(btSoftBody* obj, btScalar* vertices); + EXPORT int btSoftBody_getTetraVertexNormalData(btSoftBody* obj, btScalar* vertices); + EXPORT int btSoftBody_getTetraVertexNormalData2(btSoftBody* obj, btScalar* vertices, btScalar* normals); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..d4b1523 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSoftRigidCollisionAlgorithm_wrap.h" + +btSoftRigidCollisionAlgorithm_CreateFunc* btSoftRigidCollisionAlgorithm_CreateFunc_new() +{ + return new btSoftRigidCollisionAlgorithm::CreateFunc(); +} + + +btSoftRigidCollisionAlgorithm* btSoftRigidCollisionAlgorithm_new(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* col0, + const btCollisionObjectWrapper* col1Wrap, bool isSwapped) +{ + return new btSoftRigidCollisionAlgorithm(mf, *ci, col0, col1Wrap, isSwapped); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..f9c04ba --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSoftRigidCollisionAlgorithm_CreateFunc* btSoftRigidCollisionAlgorithm_CreateFunc_new(); + + EXPORT btSoftRigidCollisionAlgorithm* btSoftRigidCollisionAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* col0, const btCollisionObjectWrapper* col1Wrap, bool isSwapped); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.cpp new file mode 100644 index 0000000..6a3aecb --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include +#include + +#include "btSoftRigidDynamicsWorld_wrap.h" + +btSoftRigidDynamicsWorld* btSoftRigidDynamicsWorld_new(btDispatcher* dispatcher, + btBroadphaseInterface* pairCache, btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration, + btSoftBodySolver* softBodySolver) +{ + return new btSoftRigidDynamicsWorld(dispatcher, pairCache, constraintSolver, + collisionConfiguration, softBodySolver); +} + +void btSoftRigidDynamicsWorld_addSoftBody(btSoftRigidDynamicsWorld* obj, btSoftBody* body) +{ + obj->addSoftBody(body); +} + +void btSoftRigidDynamicsWorld_addSoftBody2(btSoftRigidDynamicsWorld* obj, btSoftBody* body, + int collisionFilterGroup) +{ + obj->addSoftBody(body, collisionFilterGroup); +} + +void btSoftRigidDynamicsWorld_addSoftBody3(btSoftRigidDynamicsWorld* obj, btSoftBody* body, + int collisionFilterGroup, int collisionFilterMask) +{ + obj->addSoftBody(body, collisionFilterGroup, collisionFilterMask); +} + +int btSoftRigidDynamicsWorld_getDrawFlags(btSoftRigidDynamicsWorld* obj) +{ + return obj->getDrawFlags(); +} + +btAlignedObjectArray_btSoftBodyPtr* btSoftRigidDynamicsWorld_getSoftBodyArray(btSoftRigidDynamicsWorld* obj) +{ + return &obj->getSoftBodyArray(); +} + +btSoftBodyWorldInfo* btSoftRigidDynamicsWorld_getWorldInfo(btSoftRigidDynamicsWorld* obj) +{ + return &obj->getWorldInfo(); +} + +void btSoftRigidDynamicsWorld_removeSoftBody(btSoftRigidDynamicsWorld* obj, btSoftBody* body) +{ + obj->removeSoftBody(body); +} + +void btSoftRigidDynamicsWorld_setDrawFlags(btSoftRigidDynamicsWorld* obj, int f) +{ + obj->setDrawFlags(f); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.h new file mode 100644 index 0000000..e663db3 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSoftRigidDynamicsWorld* btSoftRigidDynamicsWorld_new(btDispatcher* dispatcher, btBroadphaseInterface* pairCache, btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration, btSoftBodySolver* softBodySolver); + EXPORT void btSoftRigidDynamicsWorld_addSoftBody(btSoftRigidDynamicsWorld* obj, btSoftBody* body); + EXPORT void btSoftRigidDynamicsWorld_addSoftBody2(btSoftRigidDynamicsWorld* obj, btSoftBody* body, int collisionFilterGroup); + EXPORT void btSoftRigidDynamicsWorld_addSoftBody3(btSoftRigidDynamicsWorld* obj, btSoftBody* body, int collisionFilterGroup, int collisionFilterMask); + EXPORT int btSoftRigidDynamicsWorld_getDrawFlags(btSoftRigidDynamicsWorld* obj); + EXPORT btAlignedObjectArray_btSoftBodyPtr* btSoftRigidDynamicsWorld_getSoftBodyArray(btSoftRigidDynamicsWorld* obj); + EXPORT btSoftBodyWorldInfo* btSoftRigidDynamicsWorld_getWorldInfo(btSoftRigidDynamicsWorld* obj); + EXPORT void btSoftRigidDynamicsWorld_removeSoftBody(btSoftRigidDynamicsWorld* obj, btSoftBody* body); + EXPORT void btSoftRigidDynamicsWorld_setDrawFlags(btSoftRigidDynamicsWorld* obj, int f); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..e41c47a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include +#include + +#include "btSoftSoftCollisionAlgorithm_wrap.h" + +btSoftSoftCollisionAlgorithm_CreateFunc* btSoftSoftCollisionAlgorithm_CreateFunc_new() +{ + return new btSoftSoftCollisionAlgorithm::CreateFunc(); +} + + +btSoftSoftCollisionAlgorithm* btSoftSoftCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci) +{ + return new btSoftSoftCollisionAlgorithm(*ci); +} + +btSoftSoftCollisionAlgorithm* btSoftSoftCollisionAlgorithm_new2(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap) +{ + return new btSoftSoftCollisionAlgorithm(mf, *ci, body0Wrap, body1Wrap); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..137658d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSoftSoftCollisionAlgorithm_CreateFunc* btSoftSoftCollisionAlgorithm_CreateFunc_new(); + + EXPORT btSoftSoftCollisionAlgorithm* btSoftSoftCollisionAlgorithm_new(const btCollisionAlgorithmConstructionInfo* ci); + EXPORT btSoftSoftCollisionAlgorithm* btSoftSoftCollisionAlgorithm_new2(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.cpp new file mode 100644 index 0000000..aa80f13 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSparseSdf3_wrap.h" + +btSparseSdf_3* btSparseSdf_new() +{ + return new btSparseSdf_3(); +} + +void btSparseSdf3_GarbageCollect(btSparseSdf_3* obj, int lifetime) +{ + obj->GarbageCollect(lifetime); +} + +btScalar btSparseSdf3_getDefaultVoxelsz(btSparseSdf_3* obj) +{ + return obj->m_defaultVoxelsz; +} + +void btSparseSdf3_Initialize(btSparseSdf_3* obj, int hashsize, int clampCells) +{ + obj->Initialize(hashsize, clampCells); +} + +int btSparseSdf3_RemoveReferences(btSparseSdf_3* obj, btCollisionShape* pcs) +{ + return obj->RemoveReferences(pcs); +} + +void btSparseSdf3_Reset(btSparseSdf_3* obj) +{ + obj->Reset(); +} + +void btSparseSdf3_setDefaultVoxelsz(btSparseSdf_3* obj, btScalar sz) +{ + obj->setDefaultVoxelsz(sz); +} + +void btSparseSdf_delete(btSparseSdf_3* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.h new file mode 100644 index 0000000..88b3cdd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSparseSdf3_wrap.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSparseSdf_3* btSparseSdf_new(); + EXPORT void btSparseSdf3_GarbageCollect(btSparseSdf_3* obj, int lifetime); + EXPORT btScalar btSparseSdf3_getDefaultVoxelsz(btSparseSdf_3* obj); + EXPORT void btSparseSdf3_Initialize(btSparseSdf_3* obj, int hashsize, int clampCells); + EXPORT int btSparseSdf3_RemoveReferences(btSparseSdf_3* obj, btCollisionShape* pcs); + EXPORT void btSparseSdf3_Reset(btSparseSdf_3* obj); + EXPORT void btSparseSdf3_setDefaultVoxelsz(btSparseSdf_3* obj, btScalar sz); + EXPORT void btSparseSdf_delete(btSparseSdf_3* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..9018567 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btSphereBoxCollisionAlgorithm_wrap.h" + +btSphereBoxCollisionAlgorithm_CreateFunc* btSphereBoxCollisionAlgorithm_CreateFunc_new() +{ + return new btSphereBoxCollisionAlgorithm::CreateFunc(); +} + + +btSphereBoxCollisionAlgorithm* btSphereBoxCollisionAlgorithm_new(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap, bool isSwapped) +{ + return new btSphereBoxCollisionAlgorithm(mf, *ci, body0Wrap, body1Wrap, isSwapped); +} + +bool btSphereBoxCollisionAlgorithm_getSphereDistance(btSphereBoxCollisionAlgorithm* obj, + const btCollisionObjectWrapper* boxObjWrap, btVector3* v3PointOnBox, btVector3* normal, + btScalar* penetrationDepth, const btVector3* v3SphereCenter, btScalar fRadius, + btScalar maxContactDistance) +{ + BTVECTOR3_DEF(v3PointOnBox); + BTVECTOR3_DEF(normal); + BTVECTOR3_IN(v3SphereCenter); + bool ret = obj->getSphereDistance(boxObjWrap, BTVECTOR3_USE(v3PointOnBox), BTVECTOR3_USE(normal), + *penetrationDepth, BTVECTOR3_USE(v3SphereCenter), fRadius, maxContactDistance); + BTVECTOR3_DEF_OUT(v3PointOnBox); + BTVECTOR3_DEF_OUT(normal); + return ret; +} + +btScalar btSphereBoxCollisionAlgorithm_getSpherePenetration(btSphereBoxCollisionAlgorithm* obj, + const btVector3* boxHalfExtent, const btVector3* sphereRelPos, btVector3* closestPoint, + btVector3* normal) +{ + BTVECTOR3_IN(boxHalfExtent); + BTVECTOR3_IN(sphereRelPos); + BTVECTOR3_DEF(closestPoint); + BTVECTOR3_DEF(normal); + btScalar ret = obj->getSpherePenetration(BTVECTOR3_USE(boxHalfExtent), BTVECTOR3_USE(sphereRelPos), + BTVECTOR3_USE(closestPoint), BTVECTOR3_USE(normal)); + BTVECTOR3_DEF_OUT(closestPoint); + BTVECTOR3_DEF_OUT(normal); + return ret; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..d85343b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSphereBoxCollisionAlgorithm_CreateFunc* btSphereBoxCollisionAlgorithm_CreateFunc_new(); + + EXPORT btSphereBoxCollisionAlgorithm* btSphereBoxCollisionAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool isSwapped); + EXPORT bool btSphereBoxCollisionAlgorithm_getSphereDistance(btSphereBoxCollisionAlgorithm* obj, const btCollisionObjectWrapper* boxObjWrap, btVector3* v3PointOnBox, btVector3* normal, btScalar* penetrationDepth, const btVector3* v3SphereCenter, btScalar fRadius, btScalar maxContactDistance); + EXPORT btScalar btSphereBoxCollisionAlgorithm_getSpherePenetration(btSphereBoxCollisionAlgorithm* obj, const btVector3* boxHalfExtent, const btVector3* sphereRelPos, btVector3* closestPoint, btVector3* normal); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.cpp new file mode 100644 index 0000000..9104650 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSphereShape_wrap.h" + +btSphereShape* btSphereShape_new(btScalar radius) +{ + return new btSphereShape(radius); +} + +btScalar btSphereShape_getRadius(btSphereShape* obj) +{ + return obj->getRadius(); +} + +void btSphereShape_setUnscaledRadius(btSphereShape* obj, btScalar radius) +{ + obj->setUnscaledRadius(radius); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.h new file mode 100644 index 0000000..bf89e4e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereShape_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSphereShape* btSphereShape_new(btScalar radius); + EXPORT btScalar btSphereShape_getRadius(btSphereShape* obj); + EXPORT void btSphereShape_setUnscaledRadius(btSphereShape* obj, btScalar radius); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..e4c6c15 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSphereSphereCollisionAlgorithm_wrap.h" + +btSphereSphereCollisionAlgorithm_CreateFunc* btSphereSphereCollisionAlgorithm_CreateFunc_new() +{ + return new btSphereSphereCollisionAlgorithm::CreateFunc(); +} + + +btSphereSphereCollisionAlgorithm* btSphereSphereCollisionAlgorithm_new(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* col0Wrap, + const btCollisionObjectWrapper* col1Wrap) +{ + return new btSphereSphereCollisionAlgorithm(mf, *ci, col0Wrap, col1Wrap); +} + +btSphereSphereCollisionAlgorithm* btSphereSphereCollisionAlgorithm_new2(const btCollisionAlgorithmConstructionInfo* ci) +{ + return new btSphereSphereCollisionAlgorithm(*ci); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..39c85bf --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSphereSphereCollisionAlgorithm_CreateFunc* btSphereSphereCollisionAlgorithm_CreateFunc_new(); + + EXPORT btSphereSphereCollisionAlgorithm* btSphereSphereCollisionAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* col0Wrap, const btCollisionObjectWrapper* col1Wrap); + EXPORT btSphereSphereCollisionAlgorithm* btSphereSphereCollisionAlgorithm_new2(const btCollisionAlgorithmConstructionInfo* ci); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.cpp new file mode 100644 index 0000000..ba92f0d --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.cpp @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btSphereTriangleCollisionAlgorithm_wrap.h" + +btSphereTriangleCollisionAlgorithm_CreateFunc* btSphereTriangleCollisionAlgorithm_CreateFunc_new() +{ + return new btSphereTriangleCollisionAlgorithm::CreateFunc(); +} + + +btSphereTriangleCollisionAlgorithm* btSphereTriangleCollisionAlgorithm_new(btPersistentManifold* mf, + const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, + const btCollisionObjectWrapper* body1Wrap, bool swapped) +{ + return new btSphereTriangleCollisionAlgorithm(mf, *ci, body0Wrap, body1Wrap, + swapped); +} + +btSphereTriangleCollisionAlgorithm* btSphereTriangleCollisionAlgorithm_new2(const btCollisionAlgorithmConstructionInfo* ci) +{ + return new btSphereTriangleCollisionAlgorithm(*ci); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.h new file mode 100644 index 0000000..1fa46aa --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btSphereTriangleCollisionAlgorithm_CreateFunc* btSphereTriangleCollisionAlgorithm_CreateFunc_new(); + + EXPORT btSphereTriangleCollisionAlgorithm* btSphereTriangleCollisionAlgorithm_new(btPersistentManifold* mf, const btCollisionAlgorithmConstructionInfo* ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap, bool swapped); + EXPORT btSphereTriangleCollisionAlgorithm* btSphereTriangleCollisionAlgorithm_new2(const btCollisionAlgorithmConstructionInfo* ci); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.cpp new file mode 100644 index 0000000..0718abe --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btStaticPlaneShape_wrap.h" + +btStaticPlaneShape* btStaticPlaneShape_new(const btVector3* planeNormal, btScalar planeConstant) +{ + BTVECTOR3_IN(planeNormal); + return new btStaticPlaneShape(BTVECTOR3_USE(planeNormal), planeConstant); +} + +btScalar btStaticPlaneShape_getPlaneConstant(btStaticPlaneShape* obj) +{ + return obj->getPlaneConstant(); +} + +void btStaticPlaneShape_getPlaneNormal(btStaticPlaneShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getPlaneNormal()); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.h new file mode 100644 index 0000000..435bc1f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btStaticPlaneShape_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btStaticPlaneShape* btStaticPlaneShape_new(const btVector3* planeNormal, btScalar planeConstant); + EXPORT btScalar btStaticPlaneShape_getPlaneConstant(btStaticPlaneShape* obj); + EXPORT void btStaticPlaneShape_getPlaneNormal(btStaticPlaneShape* obj, btVector3* value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.cpp new file mode 100644 index 0000000..90a26d2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.cpp @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btStridingMeshInterface_wrap.h" + +void btStridingMeshInterface_calculateAabbBruteForce(btStridingMeshInterface* obj, + btVector3* aabbMin, btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->calculateAabbBruteForce(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +int btStridingMeshInterface_calculateSerializeBufferSize(btStridingMeshInterface* obj) +{ + return obj->calculateSerializeBufferSize(); +} + +void btStridingMeshInterface_getLockedReadOnlyVertexIndexBase(btStridingMeshInterface* obj, + const unsigned char** vertexbase, int* numverts, PHY_ScalarType* type, int* vertexStride, + const unsigned char** indexbase, int* indexstride, int* numfaces, PHY_ScalarType* indicestype, + int subpart) +{ + obj->getLockedReadOnlyVertexIndexBase(vertexbase, *numverts, *type, *vertexStride, + indexbase, *indexstride, *numfaces, *indicestype, subpart); +} + +void btStridingMeshInterface_getLockedVertexIndexBase(btStridingMeshInterface* obj, + unsigned char** vertexbase, int* numverts, PHY_ScalarType* type, int* vertexStride, + unsigned char** indexbase, int* indexstride, int* numfaces, PHY_ScalarType* indicestype, + int subpart) +{ + obj->getLockedVertexIndexBase(vertexbase, *numverts, *type, *vertexStride, indexbase, + *indexstride, *numfaces, *indicestype, subpart); +} + +int btStridingMeshInterface_getNumSubParts(btStridingMeshInterface* obj) +{ + return obj->getNumSubParts(); +} + +void btStridingMeshInterface_getPremadeAabb(btStridingMeshInterface* obj, btVector3* aabbMin, + btVector3* aabbMax) +{ + BTVECTOR3_DEF(aabbMin); + BTVECTOR3_DEF(aabbMax); + obj->getPremadeAabb(&BTVECTOR3_USE(aabbMin), &BTVECTOR3_USE(aabbMax)); + BTVECTOR3_DEF_OUT(aabbMin); + BTVECTOR3_DEF_OUT(aabbMax); +} + +void btStridingMeshInterface_getScaling(btStridingMeshInterface* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getScaling()); +} + +bool btStridingMeshInterface_hasPremadeAabb(btStridingMeshInterface* obj) +{ + return obj->hasPremadeAabb(); +} + +void btStridingMeshInterface_InternalProcessAllTriangles(btStridingMeshInterface* obj, + btInternalTriangleIndexCallback* callback, const btVector3* aabbMin, const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->InternalProcessAllTriangles(callback, BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btStridingMeshInterface_preallocateIndices(btStridingMeshInterface* obj, int numindices) +{ + obj->preallocateIndices(numindices); +} + +void btStridingMeshInterface_preallocateVertices(btStridingMeshInterface* obj, int numverts) +{ + obj->preallocateVertices(numverts); +} + +const char* btStridingMeshInterface_serialize(btStridingMeshInterface* obj, void* dataBuffer, + btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btStridingMeshInterface_setPremadeAabb(btStridingMeshInterface* obj, const btVector3* aabbMin, + const btVector3* aabbMax) +{ + BTVECTOR3_IN(aabbMin); + BTVECTOR3_IN(aabbMax); + obj->setPremadeAabb(BTVECTOR3_USE(aabbMin), BTVECTOR3_USE(aabbMax)); +} + +void btStridingMeshInterface_setScaling(btStridingMeshInterface* obj, const btVector3* scaling) +{ + BTVECTOR3_IN(scaling); + obj->setScaling(BTVECTOR3_USE(scaling)); +} + +void btStridingMeshInterface_unLockReadOnlyVertexBase(btStridingMeshInterface* obj, + int subpart) +{ + obj->unLockReadOnlyVertexBase(subpart); +} + +void btStridingMeshInterface_unLockVertexBase(btStridingMeshInterface* obj, int subpart) +{ + obj->unLockVertexBase(subpart); +} + +void btStridingMeshInterface_delete(btStridingMeshInterface* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.h new file mode 100644 index 0000000..794ea61 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btStridingMeshInterface_wrap.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btStridingMeshInterface_calculateAabbBruteForce(btStridingMeshInterface* obj, btVector3* aabbMin, btVector3* aabbMax); + EXPORT int btStridingMeshInterface_calculateSerializeBufferSize(btStridingMeshInterface* obj); + EXPORT void btStridingMeshInterface_getLockedReadOnlyVertexIndexBase(btStridingMeshInterface* obj, const unsigned char** vertexbase, int* numverts, PHY_ScalarType* type, int* vertexStride, const unsigned char** indexbase, int* indexstride, int* numfaces, PHY_ScalarType* indicestype, int subpart); + EXPORT void btStridingMeshInterface_getLockedVertexIndexBase(btStridingMeshInterface* obj, unsigned char** vertexbase, int* numverts, PHY_ScalarType* type, int* vertexStride, unsigned char** indexbase, int* indexstride, int* numfaces, PHY_ScalarType* indicestype, int subpart); + EXPORT int btStridingMeshInterface_getNumSubParts(btStridingMeshInterface* obj); + EXPORT void btStridingMeshInterface_getPremadeAabb(btStridingMeshInterface* obj, btVector3* aabbMin, btVector3* aabbMax); + EXPORT void btStridingMeshInterface_getScaling(btStridingMeshInterface* obj, btVector3* value); + EXPORT bool btStridingMeshInterface_hasPremadeAabb(btStridingMeshInterface* obj); + EXPORT void btStridingMeshInterface_InternalProcessAllTriangles(btStridingMeshInterface* obj, btInternalTriangleIndexCallback* callback, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btStridingMeshInterface_preallocateIndices(btStridingMeshInterface* obj, int numindices); + EXPORT void btStridingMeshInterface_preallocateVertices(btStridingMeshInterface* obj, int numverts); + EXPORT const char* btStridingMeshInterface_serialize(btStridingMeshInterface* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btStridingMeshInterface_setPremadeAabb(btStridingMeshInterface* obj, const btVector3* aabbMin, const btVector3* aabbMax); + EXPORT void btStridingMeshInterface_setScaling(btStridingMeshInterface* obj, const btVector3* scaling); + EXPORT void btStridingMeshInterface_unLockReadOnlyVertexBase(btStridingMeshInterface* obj, int subpart); + EXPORT void btStridingMeshInterface_unLockVertexBase(btStridingMeshInterface* obj, int subpart); + EXPORT void btStridingMeshInterface_delete(btStridingMeshInterface* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.cpp new file mode 100644 index 0000000..393668e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTetrahedronShape_wrap.h" + +btBU_Simplex1to4* btBU_Simplex1to4_new() +{ + return new btBU_Simplex1to4(); +} + +btBU_Simplex1to4* btBU_Simplex1to4_new2(const btVector3* pt0) +{ + BTVECTOR3_IN(pt0); + return new btBU_Simplex1to4(BTVECTOR3_USE(pt0)); +} + +btBU_Simplex1to4* btBU_Simplex1to4_new3(const btVector3* pt0, const btVector3* pt1) +{ + BTVECTOR3_IN(pt0); + BTVECTOR3_IN(pt1); + return new btBU_Simplex1to4(BTVECTOR3_USE(pt0), BTVECTOR3_USE(pt1)); +} + +btBU_Simplex1to4* btBU_Simplex1to4_new4(const btVector3* pt0, const btVector3* pt1, + const btVector3* pt2) +{ + BTVECTOR3_IN(pt0); + BTVECTOR3_IN(pt1); + BTVECTOR3_IN(pt2); + return new btBU_Simplex1to4(BTVECTOR3_USE(pt0), BTVECTOR3_USE(pt1), BTVECTOR3_USE(pt2)); +} + +btBU_Simplex1to4* btBU_Simplex1to4_new5(const btVector3* pt0, const btVector3* pt1, + const btVector3* pt2, const btVector3* pt3) +{ + BTVECTOR3_IN(pt0); + BTVECTOR3_IN(pt1); + BTVECTOR3_IN(pt2); + BTVECTOR3_IN(pt3); + return new btBU_Simplex1to4(BTVECTOR3_USE(pt0), BTVECTOR3_USE(pt1), BTVECTOR3_USE(pt2), + BTVECTOR3_USE(pt3)); +} + +void btBU_Simplex1to4_addVertex(btBU_Simplex1to4* obj, const btVector3* pt) +{ + BTVECTOR3_IN(pt); + obj->addVertex(BTVECTOR3_USE(pt)); +} + +int btBU_Simplex1to4_getIndex(btBU_Simplex1to4* obj, int i) +{ + return obj->getIndex(i); +} + +void btBU_Simplex1to4_reset(btBU_Simplex1to4* obj) +{ + obj->reset(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.h new file mode 100644 index 0000000..f59acbd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTetrahedronShape_wrap.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btBU_Simplex1to4* btBU_Simplex1to4_new(); + EXPORT btBU_Simplex1to4* btBU_Simplex1to4_new2(const btVector3* pt0); + EXPORT btBU_Simplex1to4* btBU_Simplex1to4_new3(const btVector3* pt0, const btVector3* pt1); + EXPORT btBU_Simplex1to4* btBU_Simplex1to4_new4(const btVector3* pt0, const btVector3* pt1, const btVector3* pt2); + EXPORT btBU_Simplex1to4* btBU_Simplex1to4_new5(const btVector3* pt0, const btVector3* pt1, const btVector3* pt2, const btVector3* pt3); + EXPORT void btBU_Simplex1to4_addVertex(btBU_Simplex1to4* obj, const btVector3* pt); + EXPORT int btBU_Simplex1to4_getIndex(btBU_Simplex1to4* obj, int i); + EXPORT void btBU_Simplex1to4_reset(btBU_Simplex1to4* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.cpp new file mode 100644 index 0000000..ac65843 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btThreads_wrap.h" + +int btITaskScheduler_getMaxNumThreads(btITaskScheduler* obj) +{ + return obj->getMaxNumThreads(); +} + +const char* btITaskScheduler_getName(btITaskScheduler* obj) +{ + return obj->getName(); +} + +int btITaskScheduler_getNumThreads(btITaskScheduler* obj) +{ + return obj->getNumThreads(); +} + +void btITaskScheduler_setNumThreads(btITaskScheduler* obj, int numThreads) +{ + obj->setNumThreads(numThreads); +} + +btITaskScheduler* btThreads_btGetSequentialTaskScheduler() +{ + return btGetSequentialTaskScheduler(); +} + +btITaskScheduler* btThreads_btGetOpenMPTaskScheduler() +{ + return btGetOpenMPTaskScheduler(); +} + +btITaskScheduler* btThreads_btGetPPLTaskScheduler() +{ + return btGetPPLTaskScheduler(); +} + +btITaskScheduler* btThreads_btGetTBBTaskScheduler() +{ + return btGetTBBTaskScheduler(); +} + +void btThreads_btSetTaskScheduler(btITaskScheduler* ts) +{ + btSetTaskScheduler(ts); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.h new file mode 100644 index 0000000..d1ee9bd --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btThreads_wrap.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT int btITaskScheduler_getMaxNumThreads(btITaskScheduler* obj); + EXPORT const char* btITaskScheduler_getName(btITaskScheduler* obj); + EXPORT int btITaskScheduler_getNumThreads(btITaskScheduler* obj); + EXPORT void btITaskScheduler_setNumThreads(btITaskScheduler* obj, int numThreads); + + EXPORT btITaskScheduler* btThreads_btGetSequentialTaskScheduler(); + EXPORT btITaskScheduler* btThreads_btGetOpenMPTaskScheduler(); + EXPORT btITaskScheduler* btThreads_btGetPPLTaskScheduler(); + EXPORT btITaskScheduler* btThreads_btGetTBBTaskScheduler(); + EXPORT void btThreads_btSetTaskScheduler(btITaskScheduler* ts); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.cpp new file mode 100644 index 0000000..af07c4c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.cpp @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTransformUtil_wrap.h" + +void btTransformUtil_calculateDiffAxisAngle(const btTransform* transform0, const btTransform* transform1, + btVector3* axis, btScalar* angle) +{ + BTTRANSFORM_IN(transform0); + BTTRANSFORM_IN(transform1); + BTVECTOR3_DEF(axis); + btTransformUtil::calculateDiffAxisAngle(BTTRANSFORM_USE(transform0), BTTRANSFORM_USE(transform1), + BTVECTOR3_USE(axis), *angle); + BTVECTOR3_DEF_OUT(axis); +} + +void btTransformUtil_calculateDiffAxisAngleQuaternion(const btQuaternion* orn0, const btQuaternion* orn1a, + btVector3* axis, btScalar* angle) +{ + BTQUATERNION_IN(orn0); + BTQUATERNION_IN(orn1a); + BTVECTOR3_DEF(axis); + btTransformUtil::calculateDiffAxisAngleQuaternion(BTQUATERNION_USE(orn0), BTQUATERNION_USE(orn1a), + BTVECTOR3_USE(axis), *angle); + BTVECTOR3_DEF_OUT(axis); +} + +void btTransformUtil_calculateVelocity(const btTransform* transform0, const btTransform* transform1, + btScalar timeStep, btVector3* linVel, btVector3* angVel) +{ + BTTRANSFORM_IN(transform0); + BTTRANSFORM_IN(transform1); + BTVECTOR3_DEF(linVel); + BTVECTOR3_DEF(angVel); + btTransformUtil::calculateVelocity(BTTRANSFORM_USE(transform0), BTTRANSFORM_USE(transform1), + timeStep, BTVECTOR3_USE(linVel), BTVECTOR3_USE(angVel)); + BTVECTOR3_DEF_OUT(linVel); + BTVECTOR3_DEF_OUT(angVel); +} + +void btTransformUtil_calculateVelocityQuaternion(const btVector3* pos0, const btVector3* pos1, + const btQuaternion* orn0, const btQuaternion* orn1, btScalar timeStep, btVector3* linVel, + btVector3* angVel) +{ + BTVECTOR3_IN(pos0); + BTVECTOR3_IN(pos1); + BTQUATERNION_IN(orn0); + BTQUATERNION_IN(orn1); + BTVECTOR3_DEF(linVel); + BTVECTOR3_DEF(angVel); + btTransformUtil::calculateVelocityQuaternion(BTVECTOR3_USE(pos0), BTVECTOR3_USE(pos1), + BTQUATERNION_USE(orn0), BTQUATERNION_USE(orn1), timeStep, BTVECTOR3_USE(linVel), + BTVECTOR3_USE(angVel)); + BTVECTOR3_DEF_OUT(linVel); + BTVECTOR3_DEF_OUT(angVel); +} + +void btTransformUtil_integrateTransform(const btTransform* curTrans, const btVector3* linvel, + const btVector3* angvel, btScalar timeStep, btTransform* predictedTransform) +{ + BTTRANSFORM_IN(curTrans); + BTVECTOR3_IN(linvel); + BTVECTOR3_IN(angvel); + BTTRANSFORM_DEF(predictedTransform); + btTransformUtil::integrateTransform(BTTRANSFORM_USE(curTrans), BTVECTOR3_USE(linvel), + BTVECTOR3_USE(angvel), timeStep, BTTRANSFORM_USE(predictedTransform)); + BTTRANSFORM_DEF_OUT(predictedTransform); +} + + +btConvexSeparatingDistanceUtil* btConvexSeparatingDistanceUtil_new(btScalar boundingRadiusA, + btScalar boundingRadiusB) +{ + return new btConvexSeparatingDistanceUtil(boundingRadiusA, boundingRadiusB); +} + +btScalar btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance(btConvexSeparatingDistanceUtil* obj) +{ + return obj->getConservativeSeparatingDistance(); +} + +void btConvexSeparatingDistanceUtil_initSeparatingDistance(btConvexSeparatingDistanceUtil* obj, + const btVector3* separatingVector, btScalar separatingDistance, const btTransform* transA, + const btTransform* transB) +{ + BTVECTOR3_IN(separatingVector); + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + obj->initSeparatingDistance(BTVECTOR3_USE(separatingVector), separatingDistance, + BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +void btConvexSeparatingDistanceUtil_updateSeparatingDistance(btConvexSeparatingDistanceUtil* obj, + const btTransform* transA, const btTransform* transB) +{ + BTTRANSFORM_IN(transA); + BTTRANSFORM_IN(transB); + obj->updateSeparatingDistance(BTTRANSFORM_USE(transA), BTTRANSFORM_USE(transB)); +} + +void btConvexSeparatingDistanceUtil_delete(btConvexSeparatingDistanceUtil* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.h new file mode 100644 index 0000000..71a48a9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTransformUtil_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btTransformUtil_calculateDiffAxisAngle(const btTransform* transform0, const btTransform* transform1, btVector3* axis, btScalar* angle); + EXPORT void btTransformUtil_calculateDiffAxisAngleQuaternion(const btQuaternion* orn0, const btQuaternion* orn1a, btVector3* axis, btScalar* angle); + EXPORT void btTransformUtil_calculateVelocity(const btTransform* transform0, const btTransform* transform1, btScalar timeStep, btVector3* linVel, btVector3* angVel); + EXPORT void btTransformUtil_calculateVelocityQuaternion(const btVector3* pos0, const btVector3* pos1, const btQuaternion* orn0, const btQuaternion* orn1, btScalar timeStep, btVector3* linVel, btVector3* angVel); + EXPORT void btTransformUtil_integrateTransform(const btTransform* curTrans, const btVector3* linvel, const btVector3* angvel, btScalar timeStep, btTransform* predictedTransform); + + EXPORT btConvexSeparatingDistanceUtil* btConvexSeparatingDistanceUtil_new(btScalar boundingRadiusA, btScalar boundingRadiusB); + EXPORT btScalar btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance(btConvexSeparatingDistanceUtil* obj); + EXPORT void btConvexSeparatingDistanceUtil_initSeparatingDistance(btConvexSeparatingDistanceUtil* obj, const btVector3* separatingVector, btScalar separatingDistance, const btTransform* transA, const btTransform* transB); + EXPORT void btConvexSeparatingDistanceUtil_updateSeparatingDistance(btConvexSeparatingDistanceUtil* obj, const btTransform* transA, const btTransform* transB); + EXPORT void btConvexSeparatingDistanceUtil_delete(btConvexSeparatingDistanceUtil* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.cpp new file mode 100644 index 0000000..cfe247a --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.cpp @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTriangleBuffer_wrap.h" + +btTriangle* btTriangle_new() +{ + return new btTriangle(); +} + +int btTriangle_getPartId(btTriangle* obj) +{ + return obj->m_partId; +} + +int btTriangle_getTriangleIndex(btTriangle* obj) +{ + return obj->m_triangleIndex; +} + +void btTriangle_getVertex0(btTriangle* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_vertex0); +} + +void btTriangle_getVertex1(btTriangle* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_vertex1); +} + +void btTriangle_getVertex2(btTriangle* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_vertex2); +} + +void btTriangle_setPartId(btTriangle* obj, int value) +{ + obj->m_partId = value; +} + +void btTriangle_setTriangleIndex(btTriangle* obj, int value) +{ + obj->m_triangleIndex = value; +} + +void btTriangle_setVertex0(btTriangle* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_vertex0, value); +} + +void btTriangle_setVertex1(btTriangle* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_vertex1, value); +} + +void btTriangle_setVertex2(btTriangle* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_vertex2, value); +} + +void btTriangle_delete(btTriangle* obj) +{ + delete obj; +} + + +btTriangleBuffer* btTriangleBuffer_new() +{ + return new btTriangleBuffer(); +} + +void btTriangleBuffer_clearBuffer(btTriangleBuffer* obj) +{ + obj->clearBuffer(); +} + +int btTriangleBuffer_getNumTriangles(btTriangleBuffer* obj) +{ + return obj->getNumTriangles(); +} + +const btTriangle* btTriangleBuffer_getTriangle(btTriangleBuffer* obj, int index) +{ + return &obj->getTriangle(index); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.h new file mode 100644 index 0000000..deb7c3e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleBuffer_wrap.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btTriangle* btTriangle_new(); + EXPORT int btTriangle_getPartId(btTriangle* obj); + EXPORT int btTriangle_getTriangleIndex(btTriangle* obj); + EXPORT void btTriangle_getVertex0(btTriangle* obj, btVector3* value); + EXPORT void btTriangle_getVertex1(btTriangle* obj, btVector3* value); + EXPORT void btTriangle_getVertex2(btTriangle* obj, btVector3* value); + EXPORT void btTriangle_setPartId(btTriangle* obj, int value); + EXPORT void btTriangle_setTriangleIndex(btTriangle* obj, int value); + EXPORT void btTriangle_setVertex0(btTriangle* obj, const btVector3* value); + EXPORT void btTriangle_setVertex1(btTriangle* obj, const btVector3* value); + EXPORT void btTriangle_setVertex2(btTriangle* obj, const btVector3* value); + EXPORT void btTriangle_delete(btTriangle* obj); + + EXPORT btTriangleBuffer* btTriangleBuffer_new(); + EXPORT void btTriangleBuffer_clearBuffer(btTriangleBuffer* obj); + EXPORT int btTriangleBuffer_getNumTriangles(btTriangleBuffer* obj); + EXPORT const btTriangle* btTriangleBuffer_getTriangle(btTriangleBuffer* obj, int index); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.cpp new file mode 100644 index 0000000..33fb24f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTriangleCallback_wrap.h" + +btInternalTriangleIndexCallbackWrapper::btInternalTriangleIndexCallbackWrapper(p_btInternalTriangleIndexCallback_internalProcessTriangleIndex internalProcessTriangleIndexCallback) +{ + _internalProcessTriangleIndexCallback = internalProcessTriangleIndexCallback; +} + +void btInternalTriangleIndexCallbackWrapper::internalProcessTriangleIndex(btVector3* triangle, + int partId, int triangleIndex) +{ + _internalProcessTriangleIndexCallback(triangle, partId, triangleIndex); +} + + +btTriangleCallbackWrapper::btTriangleCallbackWrapper(p_btTriangleCallback_processTriangle processTriangleCallback) +{ + _processTriangleCallback = processTriangleCallback; +} + +void btTriangleCallbackWrapper::processTriangle(btVector3* triangle, int partId, + int triangleIndex) +{ + _processTriangleCallback(triangle, partId, triangleIndex); +} + + +btTriangleCallbackWrapper* btTriangleCallbackWrapper_new(p_btTriangleCallback_processTriangle processTriangleCallback) +{ + return new btTriangleCallbackWrapper(processTriangleCallback); +} + +void btTriangleCallback_delete(btTriangleCallback* obj) +{ + delete obj; +} + + +btInternalTriangleIndexCallbackWrapper* btInternalTriangleIndexCallbackWrapper_new( + p_btInternalTriangleIndexCallback_internalProcessTriangleIndex internalProcessTriangleIndexCallback) +{ + return new btInternalTriangleIndexCallbackWrapper(internalProcessTriangleIndexCallback); +} + +void btInternalTriangleIndexCallback_delete(btInternalTriangleIndexCallback* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.h new file mode 100644 index 0000000..2a32439 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleCallback_wrap.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifndef BT_TRIANGLE_CALLBACK_H +#define p_btInternalTriangleIndexCallback_internalProcessTriangleIndex void* +#define p_btTriangleCallback_processTriangle void* +#define btInternalTriangleIndexCallbackWrapper void +#define btTriangleCallbackWrapper void +#else +typedef void (*p_btInternalTriangleIndexCallback_internalProcessTriangleIndex)(btVector3* triangle, + int partId, int triangleIndex); + +class btInternalTriangleIndexCallbackWrapper : public btInternalTriangleIndexCallback +{ +private: + p_btInternalTriangleIndexCallback_internalProcessTriangleIndex _internalProcessTriangleIndexCallback; + +public: + btInternalTriangleIndexCallbackWrapper(p_btInternalTriangleIndexCallback_internalProcessTriangleIndex internalProcessTriangleIndexCallback); + + virtual void internalProcessTriangleIndex(btVector3* triangle, int partId, int triangleIndex); +}; + +typedef void (*p_btTriangleCallback_processTriangle)(btVector3* triangle, int partId, + int triangleIndex); + +class btTriangleCallbackWrapper : public btTriangleCallback +{ +private: + p_btTriangleCallback_processTriangle _processTriangleCallback; + +public: + btTriangleCallbackWrapper(p_btTriangleCallback_processTriangle processTriangleCallback); + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); +}; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btTriangleCallbackWrapper* btTriangleCallbackWrapper_new(p_btTriangleCallback_processTriangle processTriangleCallback); + + EXPORT void btTriangleCallback_delete(btTriangleCallback* obj); + + EXPORT btInternalTriangleIndexCallbackWrapper* btInternalTriangleIndexCallbackWrapper_new( + p_btInternalTriangleIndexCallback_internalProcessTriangleIndex internalProcessTriangleIndexCallback); + + EXPORT void btInternalTriangleIndexCallback_delete(btInternalTriangleIndexCallback* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.cpp new file mode 100644 index 0000000..ea78829 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.cpp @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btTriangleIndexVertexArray_wrap.h" + +btIndexedMesh* btIndexedMesh_new() +{ + return new btIndexedMesh(); +} + +PHY_ScalarType btIndexedMesh_getIndexType(btIndexedMesh* obj) +{ + return obj->m_indexType; +} + +int btIndexedMesh_getNumTriangles(btIndexedMesh* obj) +{ + return obj->m_numTriangles; +} + +int btIndexedMesh_getNumVertices(btIndexedMesh* obj) +{ + return obj->m_numVertices; +} + +const unsigned char* btIndexedMesh_getTriangleIndexBase(btIndexedMesh* obj) +{ + return obj->m_triangleIndexBase; +} + +int btIndexedMesh_getTriangleIndexStride(btIndexedMesh* obj) +{ + return obj->m_triangleIndexStride; +} + +const unsigned char* btIndexedMesh_getVertexBase(btIndexedMesh* obj) +{ + return obj->m_vertexBase; +} + +int btIndexedMesh_getVertexStride(btIndexedMesh* obj) +{ + return obj->m_vertexStride; +} + +PHY_ScalarType btIndexedMesh_getVertexType(btIndexedMesh* obj) +{ + return obj->m_vertexType; +} + +void btIndexedMesh_setIndexType(btIndexedMesh* obj, PHY_ScalarType value) +{ + obj->m_indexType = value; +} + +void btIndexedMesh_setNumTriangles(btIndexedMesh* obj, int value) +{ + obj->m_numTriangles = value; +} + +void btIndexedMesh_setNumVertices(btIndexedMesh* obj, int value) +{ + obj->m_numVertices = value; +} + +void btIndexedMesh_setTriangleIndexBase(btIndexedMesh* obj, const unsigned char* value) +{ + obj->m_triangleIndexBase = value; +} + +void btIndexedMesh_setTriangleIndexStride(btIndexedMesh* obj, int value) +{ + obj->m_triangleIndexStride = value; +} + +void btIndexedMesh_setVertexBase(btIndexedMesh* obj, const unsigned char* value) +{ + obj->m_vertexBase = value; +} + +void btIndexedMesh_setVertexStride(btIndexedMesh* obj, int value) +{ + obj->m_vertexStride = value; +} + +void btIndexedMesh_setVertexType(btIndexedMesh* obj, PHY_ScalarType value) +{ + obj->m_vertexType = value; +} + +void btIndexedMesh_delete(btIndexedMesh* obj) +{ + delete obj; +} + + +btTriangleIndexVertexArray* btTriangleIndexVertexArray_new() +{ + return new btTriangleIndexVertexArray(); +} + +btTriangleIndexVertexArray* btTriangleIndexVertexArray_new2(int numTriangles, int* triangleIndexBase, + int triangleIndexStride, int numVertices, btScalar* vertexBase, int vertexStride) +{ + return new btTriangleIndexVertexArray(numTriangles, triangleIndexBase, triangleIndexStride, + numVertices, vertexBase, vertexStride); +} + +void btTriangleIndexVertexArray_addIndexedMesh(btTriangleIndexVertexArray* obj, + const btIndexedMesh* mesh, PHY_ScalarType indexType) +{ + obj->addIndexedMesh(*mesh, indexType); +} + +btAlignedObjectArray_btIndexedMesh* btTriangleIndexVertexArray_getIndexedMeshArray( + btTriangleIndexVertexArray* obj) +{ + return &obj->getIndexedMeshArray(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.h new file mode 100644 index 0000000..6ce573c --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btIndexedMesh* btIndexedMesh_new(); + EXPORT PHY_ScalarType btIndexedMesh_getIndexType(btIndexedMesh* obj); + EXPORT int btIndexedMesh_getNumTriangles(btIndexedMesh* obj); + EXPORT int btIndexedMesh_getNumVertices(btIndexedMesh* obj); + EXPORT const unsigned char* btIndexedMesh_getTriangleIndexBase(btIndexedMesh* obj); + EXPORT int btIndexedMesh_getTriangleIndexStride(btIndexedMesh* obj); + EXPORT const unsigned char* btIndexedMesh_getVertexBase(btIndexedMesh* obj); + EXPORT int btIndexedMesh_getVertexStride(btIndexedMesh* obj); + EXPORT PHY_ScalarType btIndexedMesh_getVertexType(btIndexedMesh* obj); + EXPORT void btIndexedMesh_setIndexType(btIndexedMesh* obj, PHY_ScalarType value); + EXPORT void btIndexedMesh_setNumTriangles(btIndexedMesh* obj, int value); + EXPORT void btIndexedMesh_setNumVertices(btIndexedMesh* obj, int value); + EXPORT void btIndexedMesh_setTriangleIndexBase(btIndexedMesh* obj, const unsigned char* value); + EXPORT void btIndexedMesh_setTriangleIndexStride(btIndexedMesh* obj, int value); + EXPORT void btIndexedMesh_setVertexBase(btIndexedMesh* obj, const unsigned char* value); + EXPORT void btIndexedMesh_setVertexStride(btIndexedMesh* obj, int value); + EXPORT void btIndexedMesh_setVertexType(btIndexedMesh* obj, PHY_ScalarType value); + EXPORT void btIndexedMesh_delete(btIndexedMesh* obj); + + EXPORT btTriangleIndexVertexArray* btTriangleIndexVertexArray_new(); + EXPORT btTriangleIndexVertexArray* btTriangleIndexVertexArray_new2(int numTriangles, int* triangleIndexBase, int triangleIndexStride, int numVertices, btScalar* vertexBase, int vertexStride); + EXPORT void btTriangleIndexVertexArray_addIndexedMesh(btTriangleIndexVertexArray* obj, const btIndexedMesh* mesh, PHY_ScalarType indexType); + EXPORT btAlignedObjectArray_btIndexedMesh* btTriangleIndexVertexArray_getIndexedMeshArray(btTriangleIndexVertexArray* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.cpp new file mode 100644 index 0000000..03de50f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.cpp @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btTriangleIndexVertexMaterialArray_wrap.h" + +btMaterialProperties* btMaterialProperties_new() +{ + return new btMaterialProperties(); +} + +const unsigned char* btMaterialProperties_getMaterialBase(btMaterialProperties* obj) +{ + return obj->m_materialBase; +} + +int btMaterialProperties_getMaterialStride(btMaterialProperties* obj) +{ + return obj->m_materialStride; +} + +PHY_ScalarType btMaterialProperties_getMaterialType(btMaterialProperties* obj) +{ + return obj->m_materialType; +} + +int btMaterialProperties_getNumMaterials(btMaterialProperties* obj) +{ + return obj->m_numMaterials; +} + +int btMaterialProperties_getNumTriangles(btMaterialProperties* obj) +{ + return obj->m_numTriangles; +} + +const unsigned char* btMaterialProperties_getTriangleMaterialsBase(btMaterialProperties* obj) +{ + return obj->m_triangleMaterialsBase; +} + +int btMaterialProperties_getTriangleMaterialStride(btMaterialProperties* obj) +{ + return obj->m_triangleMaterialStride; +} + +PHY_ScalarType btMaterialProperties_getTriangleType(btMaterialProperties* obj) +{ + return obj->m_triangleType; +} + +void btMaterialProperties_setMaterialBase(btMaterialProperties* obj, const unsigned char* value) +{ + obj->m_materialBase = value; +} + +void btMaterialProperties_setMaterialStride(btMaterialProperties* obj, int value) +{ + obj->m_materialStride = value; +} + +void btMaterialProperties_setMaterialType(btMaterialProperties* obj, PHY_ScalarType value) +{ + obj->m_materialType = value; +} + +void btMaterialProperties_setNumMaterials(btMaterialProperties* obj, int value) +{ + obj->m_numMaterials = value; +} + +void btMaterialProperties_setNumTriangles(btMaterialProperties* obj, int value) +{ + obj->m_numTriangles = value; +} + +void btMaterialProperties_setTriangleMaterialsBase(btMaterialProperties* obj, const unsigned char* value) +{ + obj->m_triangleMaterialsBase = value; +} + +void btMaterialProperties_setTriangleMaterialStride(btMaterialProperties* obj, int value) +{ + obj->m_triangleMaterialStride = value; +} + +void btMaterialProperties_setTriangleType(btMaterialProperties* obj, PHY_ScalarType value) +{ + obj->m_triangleType = value; +} + +void btMaterialProperties_delete(btMaterialProperties* obj) +{ + delete obj; +} + + +btTriangleIndexVertexMaterialArray* btTriangleIndexVertexMaterialArray_new() +{ + return new btTriangleIndexVertexMaterialArray(); +} + +btTriangleIndexVertexMaterialArray* btTriangleIndexVertexMaterialArray_new2(int numTriangles, + int* triangleIndexBase, int triangleIndexStride, int numVertices, btScalar* vertexBase, + int vertexStride, int numMaterials, unsigned char* materialBase, int materialStride, + int* triangleMaterialsBase, int materialIndexStride) +{ + return new btTriangleIndexVertexMaterialArray(numTriangles, triangleIndexBase, + triangleIndexStride, numVertices, vertexBase, vertexStride, numMaterials, materialBase, + materialStride, triangleMaterialsBase, materialIndexStride); +} + +void btTriangleIndexVertexMaterialArray_addMaterialProperties(btTriangleIndexVertexMaterialArray* obj, + const btMaterialProperties* mat, PHY_ScalarType triangleType) +{ + obj->addMaterialProperties(*mat, triangleType); +} + +void btTriangleIndexVertexMaterialArray_getLockedMaterialBase(btTriangleIndexVertexMaterialArray* obj, + unsigned char** materialBase, int* numMaterials, PHY_ScalarType* materialType, + int* materialStride, unsigned char** triangleMaterialBase, int* numTriangles, int* triangleMaterialStride, + PHY_ScalarType* triangleType, int subpart) +{ + obj->getLockedMaterialBase(materialBase, *numMaterials, *materialType, *materialStride, + triangleMaterialBase, *numTriangles, *triangleMaterialStride, *triangleType, + subpart); +} + +void btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase(btTriangleIndexVertexMaterialArray* obj, + const unsigned char** materialBase, int* numMaterials, PHY_ScalarType* materialType, + int* materialStride, const unsigned char** triangleMaterialBase, int* numTriangles, + int* triangleMaterialStride, PHY_ScalarType* triangleType, int subpart) +{ + obj->getLockedReadOnlyMaterialBase(materialBase, *numMaterials, *materialType, + *materialStride, triangleMaterialBase, *numTriangles, *triangleMaterialStride, + *triangleType, subpart); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.h new file mode 100644 index 0000000..390d5ea --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btMaterialProperties* btMaterialProperties_new(); + EXPORT const unsigned char* btMaterialProperties_getMaterialBase(btMaterialProperties* obj); + EXPORT int btMaterialProperties_getMaterialStride(btMaterialProperties* obj); + EXPORT PHY_ScalarType btMaterialProperties_getMaterialType(btMaterialProperties* obj); + EXPORT int btMaterialProperties_getNumMaterials(btMaterialProperties* obj); + EXPORT int btMaterialProperties_getNumTriangles(btMaterialProperties* obj); + EXPORT const unsigned char* btMaterialProperties_getTriangleMaterialsBase(btMaterialProperties* obj); + EXPORT int btMaterialProperties_getTriangleMaterialStride(btMaterialProperties* obj); + EXPORT PHY_ScalarType btMaterialProperties_getTriangleType(btMaterialProperties* obj); + EXPORT void btMaterialProperties_setMaterialBase(btMaterialProperties* obj, const unsigned char* value); + EXPORT void btMaterialProperties_setMaterialStride(btMaterialProperties* obj, int value); + EXPORT void btMaterialProperties_setMaterialType(btMaterialProperties* obj, PHY_ScalarType value); + EXPORT void btMaterialProperties_setNumMaterials(btMaterialProperties* obj, int value); + EXPORT void btMaterialProperties_setNumTriangles(btMaterialProperties* obj, int value); + EXPORT void btMaterialProperties_setTriangleMaterialsBase(btMaterialProperties* obj, const unsigned char* value); + EXPORT void btMaterialProperties_setTriangleMaterialStride(btMaterialProperties* obj, int value); + EXPORT void btMaterialProperties_setTriangleType(btMaterialProperties* obj, PHY_ScalarType value); + EXPORT void btMaterialProperties_delete(btMaterialProperties* obj); + + EXPORT btTriangleIndexVertexMaterialArray* btTriangleIndexVertexMaterialArray_new(); + EXPORT btTriangleIndexVertexMaterialArray* btTriangleIndexVertexMaterialArray_new2(int numTriangles, int* triangleIndexBase, int triangleIndexStride, int numVertices, btScalar* vertexBase, int vertexStride, int numMaterials, unsigned char* materialBase, int materialStride, int* triangleMaterialsBase, int materialIndexStride); + EXPORT void btTriangleIndexVertexMaterialArray_addMaterialProperties(btTriangleIndexVertexMaterialArray* obj, const btMaterialProperties* mat, PHY_ScalarType triangleType); + EXPORT void btTriangleIndexVertexMaterialArray_getLockedMaterialBase(btTriangleIndexVertexMaterialArray* obj, unsigned char** materialBase, int* numMaterials, PHY_ScalarType* materialType, int* materialStride, unsigned char** triangleMaterialBase, int* numTriangles, int* triangleMaterialStride, PHY_ScalarType* triangleType, int subpart); + EXPORT void btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase(btTriangleIndexVertexMaterialArray* obj, const unsigned char** materialBase, int* numMaterials, PHY_ScalarType* materialType, int* materialStride, const unsigned char** triangleMaterialBase, int* numTriangles, int* triangleMaterialStride, PHY_ScalarType* triangleType, int subpart); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.cpp new file mode 100644 index 0000000..1f3dba9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btTriangleInfoMap_wrap.h" + +btTriangleInfo* btTriangleInfo_new() +{ + return new btTriangleInfo(); +} + +btScalar btTriangleInfo_getEdgeV0V1Angle(btTriangleInfo* obj) +{ + return obj->m_edgeV0V1Angle; +} + +btScalar btTriangleInfo_getEdgeV1V2Angle(btTriangleInfo* obj) +{ + return obj->m_edgeV1V2Angle; +} + +btScalar btTriangleInfo_getEdgeV2V0Angle(btTriangleInfo* obj) +{ + return obj->m_edgeV2V0Angle; +} + +int btTriangleInfo_getFlags(btTriangleInfo* obj) +{ + return obj->m_flags; +} + +void btTriangleInfo_setEdgeV0V1Angle(btTriangleInfo* obj, btScalar value) +{ + obj->m_edgeV0V1Angle = value; +} + +void btTriangleInfo_setEdgeV1V2Angle(btTriangleInfo* obj, btScalar value) +{ + obj->m_edgeV1V2Angle = value; +} + +void btTriangleInfo_setEdgeV2V0Angle(btTriangleInfo* obj, btScalar value) +{ + obj->m_edgeV2V0Angle = value; +} + +void btTriangleInfo_setFlags(btTriangleInfo* obj, int value) +{ + obj->m_flags = value; +} + +void btTriangleInfo_delete(btTriangleInfo* obj) +{ + delete obj; +} + + +btTriangleInfoMap* btTriangleInfoMap_new() +{ + return new btTriangleInfoMap(); +} + +int btTriangleInfoMap_calculateSerializeBufferSize(btTriangleInfoMap* obj) +{ + return obj->calculateSerializeBufferSize(); +} +/* +void btTriangleInfoMap_deSerialize(btTriangleInfoMap* obj, btTriangleInfoMapData* data) +{ + obj->deSerialize(*data); +} +*/ +btScalar btTriangleInfoMap_getConvexEpsilon(btTriangleInfoMap* obj) +{ + return obj->m_convexEpsilon; +} + +btScalar btTriangleInfoMap_getEdgeDistanceThreshold(btTriangleInfoMap* obj) +{ + return obj->m_edgeDistanceThreshold; +} + +btScalar btTriangleInfoMap_getEqualVertexThreshold(btTriangleInfoMap* obj) +{ + return obj->m_equalVertexThreshold; +} + +btScalar btTriangleInfoMap_getMaxEdgeAngleThreshold(btTriangleInfoMap* obj) +{ + return obj->m_maxEdgeAngleThreshold; +} + +btScalar btTriangleInfoMap_getPlanarEpsilon(btTriangleInfoMap* obj) +{ + return obj->m_planarEpsilon; +} + +btScalar btTriangleInfoMap_getZeroAreaThreshold(btTriangleInfoMap* obj) +{ + return obj->m_zeroAreaThreshold; +} + +const char* btTriangleInfoMap_serialize(btTriangleInfoMap* obj, void* dataBuffer, + btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btTriangleInfoMap_setConvexEpsilon(btTriangleInfoMap* obj, btScalar value) +{ + obj->m_convexEpsilon = value; +} + +void btTriangleInfoMap_setEdgeDistanceThreshold(btTriangleInfoMap* obj, btScalar value) +{ + obj->m_edgeDistanceThreshold = value; +} + +void btTriangleInfoMap_setEqualVertexThreshold(btTriangleInfoMap* obj, btScalar value) +{ + obj->m_equalVertexThreshold = value; +} + +void btTriangleInfoMap_setMaxEdgeAngleThreshold(btTriangleInfoMap* obj, btScalar value) +{ + obj->m_maxEdgeAngleThreshold = value; +} + +void btTriangleInfoMap_setPlanarEpsilon(btTriangleInfoMap* obj, btScalar value) +{ + obj->m_planarEpsilon = value; +} + +void btTriangleInfoMap_setZeroAreaThreshold(btTriangleInfoMap* obj, btScalar value) +{ + obj->m_zeroAreaThreshold = value; +} + +void btTriangleInfoMap_delete(btTriangleInfoMap* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.h new file mode 100644 index 0000000..35c8760 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleInfoMap_wrap.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btTriangleInfo* btTriangleInfo_new(); + EXPORT btScalar btTriangleInfo_getEdgeV0V1Angle(btTriangleInfo* obj); + EXPORT btScalar btTriangleInfo_getEdgeV1V2Angle(btTriangleInfo* obj); + EXPORT btScalar btTriangleInfo_getEdgeV2V0Angle(btTriangleInfo* obj); + EXPORT int btTriangleInfo_getFlags(btTriangleInfo* obj); + EXPORT void btTriangleInfo_setEdgeV0V1Angle(btTriangleInfo* obj, btScalar value); + EXPORT void btTriangleInfo_setEdgeV1V2Angle(btTriangleInfo* obj, btScalar value); + EXPORT void btTriangleInfo_setEdgeV2V0Angle(btTriangleInfo* obj, btScalar value); + EXPORT void btTriangleInfo_setFlags(btTriangleInfo* obj, int value); + EXPORT void btTriangleInfo_delete(btTriangleInfo* obj); + + EXPORT btTriangleInfoMap* btTriangleInfoMap_new(); + EXPORT int btTriangleInfoMap_calculateSerializeBufferSize(btTriangleInfoMap* obj); + //EXPORT void btTriangleInfoMap_deSerialize(btTriangleInfoMap* obj, btTriangleInfoMapData* data); + EXPORT btScalar btTriangleInfoMap_getConvexEpsilon(btTriangleInfoMap* obj); + EXPORT btScalar btTriangleInfoMap_getEdgeDistanceThreshold(btTriangleInfoMap* obj); + EXPORT btScalar btTriangleInfoMap_getEqualVertexThreshold(btTriangleInfoMap* obj); + EXPORT btScalar btTriangleInfoMap_getMaxEdgeAngleThreshold(btTriangleInfoMap* obj); + EXPORT btScalar btTriangleInfoMap_getPlanarEpsilon(btTriangleInfoMap* obj); + EXPORT btScalar btTriangleInfoMap_getZeroAreaThreshold(btTriangleInfoMap* obj); + EXPORT const char* btTriangleInfoMap_serialize(btTriangleInfoMap* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btTriangleInfoMap_setConvexEpsilon(btTriangleInfoMap* obj, btScalar value); + EXPORT void btTriangleInfoMap_setEdgeDistanceThreshold(btTriangleInfoMap* obj, btScalar value); + EXPORT void btTriangleInfoMap_setEqualVertexThreshold(btTriangleInfoMap* obj, btScalar value); + EXPORT void btTriangleInfoMap_setMaxEdgeAngleThreshold(btTriangleInfoMap* obj, btScalar value); + EXPORT void btTriangleInfoMap_setPlanarEpsilon(btTriangleInfoMap* obj, btScalar value); + EXPORT void btTriangleInfoMap_setZeroAreaThreshold(btTriangleInfoMap* obj, btScalar value); + EXPORT void btTriangleInfoMap_delete(btTriangleInfoMap* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.cpp new file mode 100644 index 0000000..6127e1e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTriangleMeshShape_wrap.h" + +void btTriangleMeshShape_getLocalAabbMax(btTriangleMeshShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLocalAabbMax()); +} + +void btTriangleMeshShape_getLocalAabbMin(btTriangleMeshShape* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getLocalAabbMin()); +} + +btStridingMeshInterface* btTriangleMeshShape_getMeshInterface(btTriangleMeshShape* obj) +{ + return obj->getMeshInterface(); +} + +void btTriangleMeshShape_localGetSupportingVertex(btTriangleMeshShape* obj, const btVector3* vec, + btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localGetSupportingVertex(BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btTriangleMeshShape_localGetSupportingVertexWithoutMargin(btTriangleMeshShape* obj, + const btVector3* vec, btVector3* value) +{ + BTVECTOR3_IN(vec); + ATTRIBUTE_ALIGNED16(btVector3) temp = obj->localGetSupportingVertexWithoutMargin(BTVECTOR3_USE(vec)); + BTVECTOR3_SET(value, temp); +} + +void btTriangleMeshShape_recalcLocalAabb(btTriangleMeshShape* obj) +{ + obj->recalcLocalAabb(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.h new file mode 100644 index 0000000..e43f290 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMeshShape_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT void btTriangleMeshShape_getLocalAabbMax(btTriangleMeshShape* obj, btVector3* value); + EXPORT void btTriangleMeshShape_getLocalAabbMin(btTriangleMeshShape* obj, btVector3* value); + EXPORT btStridingMeshInterface* btTriangleMeshShape_getMeshInterface(btTriangleMeshShape* obj); + EXPORT void btTriangleMeshShape_localGetSupportingVertex(btTriangleMeshShape* obj, const btVector3* vec, btVector3* value); + EXPORT void btTriangleMeshShape_localGetSupportingVertexWithoutMargin(btTriangleMeshShape* obj, const btVector3* vec, btVector3* value); + EXPORT void btTriangleMeshShape_recalcLocalAabb(btTriangleMeshShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.cpp new file mode 100644 index 0000000..2a82d99 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTriangleMesh_wrap.h" + +btTriangleMesh* btTriangleMesh_new(bool use32bitIndices, bool use4componentVertices) +{ + return new btTriangleMesh(use32bitIndices, use4componentVertices); +} + +void btTriangleMesh_addIndex(btTriangleMesh* obj, int index) +{ + obj->addIndex(index); +} + +void btTriangleMesh_addTriangle(btTriangleMesh* obj, const btVector3* vertex0, const btVector3* vertex1, + const btVector3* vertex2, bool removeDuplicateVertices) +{ + BTVECTOR3_IN(vertex0); + BTVECTOR3_IN(vertex1); + BTVECTOR3_IN(vertex2); + obj->addTriangle(BTVECTOR3_USE(vertex0), BTVECTOR3_USE(vertex1), BTVECTOR3_USE(vertex2), + removeDuplicateVertices); +} + +void btTriangleMesh_addTriangleIndices(btTriangleMesh* obj, int index1, int index2, + int index3) +{ + obj->addTriangleIndices(index1, index2, index3); +} + +int btTriangleMesh_findOrAddVertex(btTriangleMesh* obj, const btVector3* vertex, + bool removeDuplicateVertices) +{ + BTVECTOR3_IN(vertex); + return obj->findOrAddVertex(BTVECTOR3_USE(vertex), removeDuplicateVertices); +} + +int btTriangleMesh_getNumTriangles(btTriangleMesh* obj) +{ + return obj->getNumTriangles(); +} + +bool btTriangleMesh_getUse32bitIndices(btTriangleMesh* obj) +{ + return obj->getUse32bitIndices(); +} + +bool btTriangleMesh_getUse4componentVertices(btTriangleMesh* obj) +{ + return obj->getUse4componentVertices(); +} + +btScalar btTriangleMesh_getWeldingThreshold(btTriangleMesh* obj) +{ + return obj->m_weldingThreshold; +} + +void btTriangleMesh_setWeldingThreshold(btTriangleMesh* obj, btScalar value) +{ + obj->m_weldingThreshold = value; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.h new file mode 100644 index 0000000..f5cb047 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleMesh_wrap.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btTriangleMesh* btTriangleMesh_new(bool use32bitIndices, bool use4componentVertices); + EXPORT void btTriangleMesh_addIndex(btTriangleMesh* obj, int index); + EXPORT void btTriangleMesh_addTriangle(btTriangleMesh* obj, const btVector3* vertex0, const btVector3* vertex1, const btVector3* vertex2, bool removeDuplicateVertices); + EXPORT void btTriangleMesh_addTriangleIndices(btTriangleMesh* obj, int index1, int index2, int index3); + EXPORT int btTriangleMesh_findOrAddVertex(btTriangleMesh* obj, const btVector3* vertex, bool removeDuplicateVertices); + EXPORT int btTriangleMesh_getNumTriangles(btTriangleMesh* obj); + EXPORT bool btTriangleMesh_getUse32bitIndices(btTriangleMesh* obj); + EXPORT bool btTriangleMesh_getUse4componentVertices(btTriangleMesh* obj); + EXPORT btScalar btTriangleMesh_getWeldingThreshold(btTriangleMesh* obj); + EXPORT void btTriangleMesh_setWeldingThreshold(btTriangleMesh* obj, btScalar value); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.cpp new file mode 100644 index 0000000..60743b2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.cpp @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTriangleShapeEx_wrap.h" + +GIM_TRIANGLE_CONTACT* GIM_TRIANGLE_CONTACT_new() +{ + return new GIM_TRIANGLE_CONTACT(); +} + +GIM_TRIANGLE_CONTACT* GIM_TRIANGLE_CONTACT_new2(const GIM_TRIANGLE_CONTACT* other) +{ + return new GIM_TRIANGLE_CONTACT(*other); +} + +void GIM_TRIANGLE_CONTACT_copy_from(GIM_TRIANGLE_CONTACT* obj, const GIM_TRIANGLE_CONTACT* other) +{ + obj->copy_from(*other); +} + +btScalar GIM_TRIANGLE_CONTACT_getPenetration_depth(GIM_TRIANGLE_CONTACT* obj) +{ + return obj->m_penetration_depth; +} + +int GIM_TRIANGLE_CONTACT_getPoint_count(GIM_TRIANGLE_CONTACT* obj) +{ + return obj->m_point_count; +} + +btVector3* GIM_TRIANGLE_CONTACT_getPoints(GIM_TRIANGLE_CONTACT* obj) +{ + return obj->m_points; +} + +void GIM_TRIANGLE_CONTACT_getSeparating_normal(GIM_TRIANGLE_CONTACT* obj, btVector4* value) +{ + BTVECTOR4_SET(value, obj->m_separating_normal); +} + +void GIM_TRIANGLE_CONTACT_merge_points(GIM_TRIANGLE_CONTACT* obj, const btVector4* plane, + btScalar margin, const btVector3* points, int point_count) +{ + BTVECTOR4_IN(plane); + obj->merge_points(BTVECTOR4_USE(plane), margin, points, point_count); +} + +void GIM_TRIANGLE_CONTACT_setPenetration_depth(GIM_TRIANGLE_CONTACT* obj, btScalar value) +{ + obj->m_penetration_depth = value; +} + +void GIM_TRIANGLE_CONTACT_setPoint_count(GIM_TRIANGLE_CONTACT* obj, int value) +{ + obj->m_point_count = value; +} + +void GIM_TRIANGLE_CONTACT_setSeparating_normal(GIM_TRIANGLE_CONTACT* obj, const btVector4* value) +{ + BTVECTOR4_COPY(&obj->m_separating_normal, value); +} + +void GIM_TRIANGLE_CONTACT_delete(GIM_TRIANGLE_CONTACT* obj) +{ + delete obj; +} + + +btPrimitiveTriangle* btPrimitiveTriangle_new() +{ + return new btPrimitiveTriangle(); +} + +void btPrimitiveTriangle_applyTransform(btPrimitiveTriangle* obj, const btTransform* t) +{ + BTTRANSFORM_IN(t); + obj->applyTransform(BTTRANSFORM_USE(t)); +} + +void btPrimitiveTriangle_buildTriPlane(btPrimitiveTriangle* obj) +{ + obj->buildTriPlane(); +} + +int btPrimitiveTriangle_clip_triangle(btPrimitiveTriangle* obj, btPrimitiveTriangle* other, + btVector3* clipped_points) +{ + return obj->clip_triangle(*other, clipped_points); +} + +bool btPrimitiveTriangle_find_triangle_collision_clip_method(btPrimitiveTriangle* obj, + btPrimitiveTriangle* other, GIM_TRIANGLE_CONTACT* contacts) +{ + return obj->find_triangle_collision_clip_method(*other, *contacts); +} + +void btPrimitiveTriangle_get_edge_plane(btPrimitiveTriangle* obj, int edge_index, + btVector4* plane) +{ + BTVECTOR4_DEF(plane); + obj->get_edge_plane(edge_index, BTVECTOR4_USE(plane)); + BTVECTOR4_DEF_OUT(plane); +} + +btScalar btPrimitiveTriangle_getDummy(btPrimitiveTriangle* obj) +{ + return obj->m_dummy; +} + +btScalar btPrimitiveTriangle_getMargin(btPrimitiveTriangle* obj) +{ + return obj->m_margin; +} + +void btPrimitiveTriangle_getPlane(btPrimitiveTriangle* obj, btVector4* value) +{ + BTVECTOR4_SET(value, obj->m_plane); +} + +btVector3* btPrimitiveTriangle_getVertices(btPrimitiveTriangle* obj) +{ + return obj->m_vertices; +} + +bool btPrimitiveTriangle_overlap_test_conservative(btPrimitiveTriangle* obj, const btPrimitiveTriangle* other) +{ + return obj->overlap_test_conservative(*other); +} + +void btPrimitiveTriangle_setDummy(btPrimitiveTriangle* obj, btScalar value) +{ + obj->m_dummy = value; +} + +void btPrimitiveTriangle_setMargin(btPrimitiveTriangle* obj, btScalar value) +{ + obj->m_margin = value; +} + +void btPrimitiveTriangle_setPlane(btPrimitiveTriangle* obj, const btVector4* value) +{ + BTVECTOR4_COPY(&obj->m_plane, value); +} + +void btPrimitiveTriangle_delete(btPrimitiveTriangle* obj) +{ + delete obj; +} + + +btTriangleShapeEx* btTriangleShapeEx_new() +{ + return new btTriangleShapeEx(); +} + +btTriangleShapeEx* btTriangleShapeEx_new2(const btVector3* p0, const btVector3* p1, + const btVector3* p2) +{ + BTVECTOR3_IN(p0); + BTVECTOR3_IN(p1); + BTVECTOR3_IN(p2); + return new btTriangleShapeEx(BTVECTOR3_USE(p0), BTVECTOR3_USE(p1), BTVECTOR3_USE(p2)); +} + +btTriangleShapeEx* btTriangleShapeEx_new3(const btTriangleShapeEx* other) +{ + return new btTriangleShapeEx(*other); +} + +void btTriangleShapeEx_applyTransform(btTriangleShapeEx* obj, const btTransform* t) +{ + BTTRANSFORM_IN(t); + obj->applyTransform(BTTRANSFORM_USE(t)); +} + +void btTriangleShapeEx_buildTriPlane(btTriangleShapeEx* obj, btVector4* plane) +{ + BTVECTOR4_DEF(plane); + obj->buildTriPlane(BTVECTOR4_USE(plane)); + BTVECTOR4_DEF_OUT(plane); +} + +bool btTriangleShapeEx_overlap_test_conservative(btTriangleShapeEx* obj, const btTriangleShapeEx* other) +{ + return obj->overlap_test_conservative(*other); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.h new file mode 100644 index 0000000..d549ef8 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShapeEx_wrap.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT GIM_TRIANGLE_CONTACT* GIM_TRIANGLE_CONTACT_new(); + EXPORT GIM_TRIANGLE_CONTACT* GIM_TRIANGLE_CONTACT_new2(const GIM_TRIANGLE_CONTACT* other); + EXPORT void GIM_TRIANGLE_CONTACT_copy_from(GIM_TRIANGLE_CONTACT* obj, const GIM_TRIANGLE_CONTACT* other); + EXPORT btScalar GIM_TRIANGLE_CONTACT_getPenetration_depth(GIM_TRIANGLE_CONTACT* obj); + EXPORT int GIM_TRIANGLE_CONTACT_getPoint_count(GIM_TRIANGLE_CONTACT* obj); + EXPORT btVector3* GIM_TRIANGLE_CONTACT_getPoints(GIM_TRIANGLE_CONTACT* obj); + EXPORT void GIM_TRIANGLE_CONTACT_getSeparating_normal(GIM_TRIANGLE_CONTACT* obj, btVector4* value); + EXPORT void GIM_TRIANGLE_CONTACT_merge_points(GIM_TRIANGLE_CONTACT* obj, const btVector4* plane, btScalar margin, const btVector3* points, int point_count); + EXPORT void GIM_TRIANGLE_CONTACT_setPenetration_depth(GIM_TRIANGLE_CONTACT* obj, btScalar value); + EXPORT void GIM_TRIANGLE_CONTACT_setPoint_count(GIM_TRIANGLE_CONTACT* obj, int value); + EXPORT void GIM_TRIANGLE_CONTACT_setSeparating_normal(GIM_TRIANGLE_CONTACT* obj, const btVector4* value); + EXPORT void GIM_TRIANGLE_CONTACT_delete(GIM_TRIANGLE_CONTACT* obj); + + EXPORT btPrimitiveTriangle* btPrimitiveTriangle_new(); + EXPORT void btPrimitiveTriangle_applyTransform(btPrimitiveTriangle* obj, const btTransform* t); + EXPORT void btPrimitiveTriangle_buildTriPlane(btPrimitiveTriangle* obj); + EXPORT int btPrimitiveTriangle_clip_triangle(btPrimitiveTriangle* obj, btPrimitiveTriangle* other, btVector3* clipped_points); + EXPORT bool btPrimitiveTriangle_find_triangle_collision_clip_method(btPrimitiveTriangle* obj, btPrimitiveTriangle* other, GIM_TRIANGLE_CONTACT* contacts); + EXPORT void btPrimitiveTriangle_get_edge_plane(btPrimitiveTriangle* obj, int edge_index, btVector4* plane); + EXPORT btScalar btPrimitiveTriangle_getDummy(btPrimitiveTriangle* obj); + EXPORT btScalar btPrimitiveTriangle_getMargin(btPrimitiveTriangle* obj); + EXPORT void btPrimitiveTriangle_getPlane(btPrimitiveTriangle* obj, btVector4* value); + EXPORT btVector3* btPrimitiveTriangle_getVertices(btPrimitiveTriangle* obj); + EXPORT bool btPrimitiveTriangle_overlap_test_conservative(btPrimitiveTriangle* obj, const btPrimitiveTriangle* other); + EXPORT void btPrimitiveTriangle_setDummy(btPrimitiveTriangle* obj, btScalar value); + EXPORT void btPrimitiveTriangle_setMargin(btPrimitiveTriangle* obj, btScalar value); + EXPORT void btPrimitiveTriangle_setPlane(btPrimitiveTriangle* obj, const btVector4* value); + EXPORT void btPrimitiveTriangle_delete(btPrimitiveTriangle* obj); + + EXPORT btTriangleShapeEx* btTriangleShapeEx_new(); + EXPORT btTriangleShapeEx* btTriangleShapeEx_new2(const btVector3* p0, const btVector3* p1, const btVector3* p2); + EXPORT btTriangleShapeEx* btTriangleShapeEx_new3(const btTriangleShapeEx* other); + EXPORT void btTriangleShapeEx_applyTransform(btTriangleShapeEx* obj, const btTransform* t); + EXPORT void btTriangleShapeEx_buildTriPlane(btTriangleShapeEx* obj, btVector4* plane); + EXPORT bool btTriangleShapeEx_overlap_test_conservative(btTriangleShapeEx* obj, const btTriangleShapeEx* other); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.cpp new file mode 100644 index 0000000..0443b47 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btTriangleShape_wrap.h" + +btTriangleShape* btTriangleShape_new() +{ + return new btTriangleShape(); +} + +btTriangleShape* btTriangleShape_new2(const btVector3* p0, const btVector3* p1, const btVector3* p2) +{ + BTVECTOR3_IN(p0); + BTVECTOR3_IN(p1); + BTVECTOR3_IN(p2); + return new btTriangleShape(BTVECTOR3_USE(p0), BTVECTOR3_USE(p1), BTVECTOR3_USE(p2)); +} + +void btTriangleShape_calcNormal(btTriangleShape* obj, btVector3* normal) +{ + BTVECTOR3_DEF(normal); + obj->calcNormal(BTVECTOR3_USE(normal)); + BTVECTOR3_DEF_OUT(normal); +} + +void btTriangleShape_getPlaneEquation(btTriangleShape* obj, int i, btVector3* planeNormal, + btVector3* planeSupport) +{ + BTVECTOR3_DEF(planeNormal); + BTVECTOR3_DEF(planeSupport); + obj->getPlaneEquation(i, BTVECTOR3_USE(planeNormal), BTVECTOR3_USE(planeSupport)); + BTVECTOR3_DEF_OUT(planeNormal); + BTVECTOR3_DEF_OUT(planeSupport); +} + +const btScalar* btTriangleShape_getVertexPtr(btTriangleShape* obj, int index) +{ + return obj->getVertexPtr(index); +} + +btVector3* btTriangleShape_getVertices1(btTriangleShape* obj) +{ + return obj->m_vertices1; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.h new file mode 100644 index 0000000..88c1b85 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTriangleShape_wrap.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btTriangleShape* btTriangleShape_new(); + EXPORT btTriangleShape* btTriangleShape_new2(const btVector3* p0, const btVector3* p1, const btVector3* p2); + EXPORT void btTriangleShape_calcNormal(btTriangleShape* obj, btVector3* normal); + EXPORT void btTriangleShape_getPlaneEquation(btTriangleShape* obj, int i, btVector3* planeNormal, btVector3* planeSupport); + EXPORT const btScalar* btTriangleShape_getVertexPtr(btTriangleShape* obj, int index); + EXPORT btVector3* btTriangleShape_getVertices1(btTriangleShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.cpp new file mode 100644 index 0000000..de5bebc --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.cpp @@ -0,0 +1,528 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "btTypedConstraint_wrap.h" + +btJointFeedback* btJointFeedback_new() +{ + return new btJointFeedback(); +} + +void btJointFeedback_getAppliedForceBodyA(btJointFeedback* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedForceBodyA); +} + +void btJointFeedback_getAppliedForceBodyB(btJointFeedback* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedForceBodyB); +} + +void btJointFeedback_getAppliedTorqueBodyA(btJointFeedback* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedTorqueBodyA); +} + +void btJointFeedback_getAppliedTorqueBodyB(btJointFeedback* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_appliedTorqueBodyB); +} + +void btJointFeedback_setAppliedForceBodyA(btJointFeedback* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedForceBodyA, value); +} + +void btJointFeedback_setAppliedForceBodyB(btJointFeedback* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedForceBodyB, value); +} + +void btJointFeedback_setAppliedTorqueBodyA(btJointFeedback* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedTorqueBodyA, value); +} + +void btJointFeedback_setAppliedTorqueBodyB(btJointFeedback* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_appliedTorqueBodyB, value); +} + +void btJointFeedback_delete(btJointFeedback* obj) +{ + delete obj; +} + + +btTypedConstraint_btConstraintInfo1* btTypedConstraint_btConstraintInfo1_new() +{ + return new btTypedConstraint::btConstraintInfo1(); +} + +int btTypedConstraint_btConstraintInfo1_getNub(btTypedConstraint_btConstraintInfo1* obj) +{ + return obj->nub; +} + +int btTypedConstraint_btConstraintInfo1_getNumConstraintRows(btTypedConstraint_btConstraintInfo1* obj) +{ + return obj->m_numConstraintRows; +} + +void btTypedConstraint_btConstraintInfo1_setNub(btTypedConstraint_btConstraintInfo1* obj, + int value) +{ + obj->nub = value; +} + +void btTypedConstraint_btConstraintInfo1_setNumConstraintRows(btTypedConstraint_btConstraintInfo1* obj, + int value) +{ + obj->m_numConstraintRows = value; +} + +void btTypedConstraint_btConstraintInfo1_delete(btTypedConstraint_btConstraintInfo1* obj) +{ + delete obj; +} + + +btTypedConstraint_btConstraintInfo2* btTypedConstraint_btConstraintInfo2_new() +{ + return new btTypedConstraint::btConstraintInfo2(); +} + +btScalar* btTypedConstraint_btConstraintInfo2_getCfm(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->cfm; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getConstraintError(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_constraintError; +} + +btScalar btTypedConstraint_btConstraintInfo2_getDamping(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_damping; +} + +btScalar btTypedConstraint_btConstraintInfo2_getErp(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->erp; +} + +btScalar btTypedConstraint_btConstraintInfo2_getFps(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->fps; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getJ1angularAxis(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_J1angularAxis; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getJ1linearAxis(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_J1linearAxis; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getJ2angularAxis(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_J2angularAxis; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getJ2linearAxis(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_J2linearAxis; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getLowerLimit(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_lowerLimit; +} + +int btTypedConstraint_btConstraintInfo2_getNumIterations(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_numIterations; +} + +int btTypedConstraint_btConstraintInfo2_getRowskip(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->rowskip; +} + +btScalar* btTypedConstraint_btConstraintInfo2_getUpperLimit(btTypedConstraint_btConstraintInfo2* obj) +{ + return obj->m_upperLimit; +} + +void btTypedConstraint_btConstraintInfo2_setCfm(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->cfm = value; +} + +void btTypedConstraint_btConstraintInfo2_setConstraintError(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_constraintError = value; +} + +void btTypedConstraint_btConstraintInfo2_setDamping(btTypedConstraint_btConstraintInfo2* obj, + btScalar value) +{ + obj->m_damping = value; +} + +void btTypedConstraint_btConstraintInfo2_setErp(btTypedConstraint_btConstraintInfo2* obj, + btScalar value) +{ + obj->erp = value; +} + +void btTypedConstraint_btConstraintInfo2_setFps(btTypedConstraint_btConstraintInfo2* obj, + btScalar value) +{ + obj->fps = value; +} + +void btTypedConstraint_btConstraintInfo2_setJ1angularAxis(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_J1angularAxis = value; +} + +void btTypedConstraint_btConstraintInfo2_setJ1linearAxis(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_J1linearAxis = value; +} + +void btTypedConstraint_btConstraintInfo2_setJ2angularAxis(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_J2angularAxis = value; +} + +void btTypedConstraint_btConstraintInfo2_setJ2linearAxis(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_J2linearAxis = value; +} + +void btTypedConstraint_btConstraintInfo2_setLowerLimit(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_lowerLimit = value; +} + +void btTypedConstraint_btConstraintInfo2_setNumIterations(btTypedConstraint_btConstraintInfo2* obj, + int value) +{ + obj->m_numIterations = value; +} + +void btTypedConstraint_btConstraintInfo2_setRowskip(btTypedConstraint_btConstraintInfo2* obj, + int value) +{ + obj->rowskip = value; +} + +void btTypedConstraint_btConstraintInfo2_setUpperLimit(btTypedConstraint_btConstraintInfo2* obj, + btScalar* value) +{ + obj->m_upperLimit = value; +} + +void btTypedConstraint_btConstraintInfo2_delete(btTypedConstraint_btConstraintInfo2* obj) +{ + delete obj; +} + + +void btTypedConstraint_buildJacobian(btTypedConstraint* obj) +{ + obj->buildJacobian(); +} + +int btTypedConstraint_calculateSerializeBufferSize(btTypedConstraint* obj) +{ + return obj->calculateSerializeBufferSize(); +} + +void btTypedConstraint_enableFeedback(btTypedConstraint* obj, bool needsFeedback) +{ + obj->enableFeedback(needsFeedback); +} + +btScalar btTypedConstraint_getAppliedImpulse(btTypedConstraint* obj) +{ + return obj->getAppliedImpulse(); +} + +btScalar btTypedConstraint_getBreakingImpulseThreshold(btTypedConstraint* obj) +{ + return obj->getBreakingImpulseThreshold(); +} + +btTypedConstraintType btTypedConstraint_getConstraintType(btTypedConstraint* obj) +{ + return obj->getConstraintType(); +} + +btScalar btTypedConstraint_getDbgDrawSize(btTypedConstraint* obj) +{ + return obj->getDbgDrawSize(); +} + +btRigidBody* btTypedConstraint_getFixedBody() +{ + return &btTypedConstraint::getFixedBody(); +} + +void btTypedConstraint_getInfo1(btTypedConstraint* obj, btTypedConstraint_btConstraintInfo1* info) +{ + obj->getInfo1(info); +} + +void btTypedConstraint_getInfo2(btTypedConstraint* obj, btTypedConstraint_btConstraintInfo2* info) +{ + obj->getInfo2(info); +} + +btJointFeedback* btTypedConstraint_getJointFeedback(btTypedConstraint* obj) +{ + return obj->getJointFeedback(); +} + +int btTypedConstraint_getOverrideNumSolverIterations(btTypedConstraint* obj) +{ + return obj->getOverrideNumSolverIterations(); +} + +btScalar btTypedConstraint_getParam(btTypedConstraint* obj, int num) +{ + return obj->getParam(num); +} + +btScalar btTypedConstraint_getParam2(btTypedConstraint* obj, int num, int axis) +{ + return obj->getParam(num, axis); +} + +btRigidBody* btTypedConstraint_getRigidBodyA(btTypedConstraint* obj) +{ + return &obj->getRigidBodyA(); +} + +btRigidBody* btTypedConstraint_getRigidBodyB(btTypedConstraint* obj) +{ + return &obj->getRigidBodyB(); +} + +int btTypedConstraint_getUid(btTypedConstraint* obj) +{ + return obj->getUid(); +} + +int btTypedConstraint_getUserConstraintId(btTypedConstraint* obj) +{ + return obj->getUserConstraintId(); +} + +void* btTypedConstraint_getUserConstraintPtr(btTypedConstraint* obj) +{ + return obj->getUserConstraintPtr(); +} + +int btTypedConstraint_getUserConstraintType(btTypedConstraint* obj) +{ + return obj->getUserConstraintType(); +} + +btScalar btTypedConstraint_internalGetAppliedImpulse(btTypedConstraint* obj) +{ + return obj->internalGetAppliedImpulse(); +} + +void btTypedConstraint_internalSetAppliedImpulse(btTypedConstraint* obj, btScalar appliedImpulse) +{ + obj->internalSetAppliedImpulse(appliedImpulse); +} + +bool btTypedConstraint_isEnabled(btTypedConstraint* obj) +{ + return obj->isEnabled(); +} + +bool btTypedConstraint_needsFeedback(btTypedConstraint* obj) +{ + return obj->needsFeedback(); +} + +const char* btTypedConstraint_serialize(btTypedConstraint* obj, void* dataBuffer, + btSerializer* serializer) +{ + return obj->serialize(dataBuffer, serializer); +} + +void btTypedConstraint_setBreakingImpulseThreshold(btTypedConstraint* obj, btScalar threshold) +{ + obj->setBreakingImpulseThreshold(threshold); +} + +void btTypedConstraint_setDbgDrawSize(btTypedConstraint* obj, btScalar dbgDrawSize) +{ + obj->setDbgDrawSize(dbgDrawSize); +} + +void btTypedConstraint_setEnabled(btTypedConstraint* obj, bool enabled) +{ + obj->setEnabled(enabled); +} + +void btTypedConstraint_setJointFeedback(btTypedConstraint* obj, btJointFeedback* jointFeedback) +{ + obj->setJointFeedback(jointFeedback); +} + +void btTypedConstraint_setOverrideNumSolverIterations(btTypedConstraint* obj, int overideNumIterations) +{ + obj->setOverrideNumSolverIterations(overideNumIterations); +} + +void btTypedConstraint_setParam(btTypedConstraint* obj, int num, btScalar value) +{ + obj->setParam(num, value); +} + +void btTypedConstraint_setParam2(btTypedConstraint* obj, int num, btScalar value, + int axis) +{ + obj->setParam(num, value, axis); +} + +void btTypedConstraint_setupSolverConstraint(btTypedConstraint* obj, btAlignedObjectArray_btSolverConstraint* ca, + int solverBodyA, int solverBodyB, btScalar timeStep) +{ + obj->setupSolverConstraint(*ca, solverBodyA, solverBodyB, timeStep); +} + +void btTypedConstraint_setUserConstraintId(btTypedConstraint* obj, int uid) +{ + obj->setUserConstraintId(uid); +} + +void btTypedConstraint_setUserConstraintPtr(btTypedConstraint* obj, void* ptr) +{ + obj->setUserConstraintPtr(ptr); +} + +void btTypedConstraint_setUserConstraintType(btTypedConstraint* obj, int userConstraintType) +{ + obj->setUserConstraintType(userConstraintType); +} + +void btTypedConstraint_solveConstraintObsolete(btTypedConstraint* obj, btSolverBody* __unnamed0, + btSolverBody* __unnamed1, btScalar __unnamed2) +{ + obj->solveConstraintObsolete(*__unnamed0, *__unnamed1, __unnamed2); +} + +void btTypedConstraint_delete(btTypedConstraint* obj) +{ + delete obj; +} + + +btAngularLimit* btAngularLimit_new() +{ + return new btAngularLimit(); +} + +void btAngularLimit_fit(btAngularLimit* obj, btScalar* angle) +{ + obj->fit(*angle); +} + +btScalar btAngularLimit_getBiasFactor(btAngularLimit* obj) +{ + return obj->getBiasFactor(); +} + +btScalar btAngularLimit_getCorrection(btAngularLimit* obj) +{ + return obj->getCorrection(); +} + +btScalar btAngularLimit_getError(btAngularLimit* obj) +{ + return obj->getError(); +} + +btScalar btAngularLimit_getHalfRange(btAngularLimit* obj) +{ + return obj->getHalfRange(); +} + +btScalar btAngularLimit_getHigh(btAngularLimit* obj) +{ + return obj->getHigh(); +} + +btScalar btAngularLimit_getLow(btAngularLimit* obj) +{ + return obj->getLow(); +} + +btScalar btAngularLimit_getRelaxationFactor(btAngularLimit* obj) +{ + return obj->getRelaxationFactor(); +} + +btScalar btAngularLimit_getSign(btAngularLimit* obj) +{ + return obj->getSign(); +} + +btScalar btAngularLimit_getSoftness(btAngularLimit* obj) +{ + return obj->getSoftness(); +} + +bool btAngularLimit_isLimit(btAngularLimit* obj) +{ + return obj->isLimit(); +} + +void btAngularLimit_set(btAngularLimit* obj, btScalar low, btScalar high, btScalar _softness, + btScalar _biasFactor, btScalar _relaxationFactor) +{ + obj->set(low, high, _softness, _biasFactor, _relaxationFactor); +} + +void btAngularLimit_test(btAngularLimit* obj, btScalar angle) +{ + obj->test(angle); +} + +void btAngularLimit_delete(btAngularLimit* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.h new file mode 100644 index 0000000..75a0b4e --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btTypedConstraint_wrap.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btJointFeedback* btJointFeedback_new(); + EXPORT void btJointFeedback_getAppliedForceBodyA(btJointFeedback* obj, btVector3* value); + EXPORT void btJointFeedback_getAppliedForceBodyB(btJointFeedback* obj, btVector3* value); + EXPORT void btJointFeedback_getAppliedTorqueBodyA(btJointFeedback* obj, btVector3* value); + EXPORT void btJointFeedback_getAppliedTorqueBodyB(btJointFeedback* obj, btVector3* value); + EXPORT void btJointFeedback_setAppliedForceBodyA(btJointFeedback* obj, const btVector3* value); + EXPORT void btJointFeedback_setAppliedForceBodyB(btJointFeedback* obj, const btVector3* value); + EXPORT void btJointFeedback_setAppliedTorqueBodyA(btJointFeedback* obj, const btVector3* value); + EXPORT void btJointFeedback_setAppliedTorqueBodyB(btJointFeedback* obj, const btVector3* value); + EXPORT void btJointFeedback_delete(btJointFeedback* obj); + + EXPORT btTypedConstraint_btConstraintInfo1* btTypedConstraint_btConstraintInfo1_new(); + EXPORT int btTypedConstraint_btConstraintInfo1_getNub(btTypedConstraint_btConstraintInfo1* obj); + EXPORT int btTypedConstraint_btConstraintInfo1_getNumConstraintRows(btTypedConstraint_btConstraintInfo1* obj); + EXPORT void btTypedConstraint_btConstraintInfo1_setNub(btTypedConstraint_btConstraintInfo1* obj, int value); + EXPORT void btTypedConstraint_btConstraintInfo1_setNumConstraintRows(btTypedConstraint_btConstraintInfo1* obj, int value); + EXPORT void btTypedConstraint_btConstraintInfo1_delete(btTypedConstraint_btConstraintInfo1* obj); + + EXPORT btTypedConstraint_btConstraintInfo2* btTypedConstraint_btConstraintInfo2_new(); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getCfm(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getConstraintError(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar btTypedConstraint_btConstraintInfo2_getDamping(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar btTypedConstraint_btConstraintInfo2_getErp(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar btTypedConstraint_btConstraintInfo2_getFps(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getJ1angularAxis(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getJ1linearAxis(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getJ2angularAxis(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getJ2linearAxis(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getLowerLimit(btTypedConstraint_btConstraintInfo2* obj); + EXPORT int btTypedConstraint_btConstraintInfo2_getNumIterations(btTypedConstraint_btConstraintInfo2* obj); + EXPORT int btTypedConstraint_btConstraintInfo2_getRowskip(btTypedConstraint_btConstraintInfo2* obj); + EXPORT btScalar* btTypedConstraint_btConstraintInfo2_getUpperLimit(btTypedConstraint_btConstraintInfo2* obj); + EXPORT void btTypedConstraint_btConstraintInfo2_setCfm(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setConstraintError(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setDamping(btTypedConstraint_btConstraintInfo2* obj, btScalar value); + EXPORT void btTypedConstraint_btConstraintInfo2_setErp(btTypedConstraint_btConstraintInfo2* obj, btScalar value); + EXPORT void btTypedConstraint_btConstraintInfo2_setFps(btTypedConstraint_btConstraintInfo2* obj, btScalar value); + EXPORT void btTypedConstraint_btConstraintInfo2_setJ1angularAxis(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setJ1linearAxis(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setJ2angularAxis(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setJ2linearAxis(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setLowerLimit(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_setNumIterations(btTypedConstraint_btConstraintInfo2* obj, int value); + EXPORT void btTypedConstraint_btConstraintInfo2_setRowskip(btTypedConstraint_btConstraintInfo2* obj, int value); + EXPORT void btTypedConstraint_btConstraintInfo2_setUpperLimit(btTypedConstraint_btConstraintInfo2* obj, btScalar* value); + EXPORT void btTypedConstraint_btConstraintInfo2_delete(btTypedConstraint_btConstraintInfo2* obj); + + EXPORT void btTypedConstraint_buildJacobian(btTypedConstraint* obj); + EXPORT int btTypedConstraint_calculateSerializeBufferSize(btTypedConstraint* obj); + EXPORT void btTypedConstraint_enableFeedback(btTypedConstraint* obj, bool needsFeedback); + EXPORT btScalar btTypedConstraint_getAppliedImpulse(btTypedConstraint* obj); + EXPORT btScalar btTypedConstraint_getBreakingImpulseThreshold(btTypedConstraint* obj); + EXPORT btTypedConstraintType btTypedConstraint_getConstraintType(btTypedConstraint* obj); + EXPORT btScalar btTypedConstraint_getDbgDrawSize(btTypedConstraint* obj); + EXPORT btRigidBody* btTypedConstraint_getFixedBody(); + EXPORT void btTypedConstraint_getInfo1(btTypedConstraint* obj, btTypedConstraint_btConstraintInfo1* info); + EXPORT void btTypedConstraint_getInfo2(btTypedConstraint* obj, btTypedConstraint_btConstraintInfo2* info); + EXPORT btJointFeedback* btTypedConstraint_getJointFeedback(btTypedConstraint* obj); + EXPORT int btTypedConstraint_getOverrideNumSolverIterations(btTypedConstraint* obj); + EXPORT btScalar btTypedConstraint_getParam(btTypedConstraint* obj, int num); + EXPORT btScalar btTypedConstraint_getParam2(btTypedConstraint* obj, int num, int axis); + EXPORT btRigidBody* btTypedConstraint_getRigidBodyA(btTypedConstraint* obj); + EXPORT btRigidBody* btTypedConstraint_getRigidBodyB(btTypedConstraint* obj); + EXPORT int btTypedConstraint_getUid(btTypedConstraint* obj); + EXPORT int btTypedConstraint_getUserConstraintId(btTypedConstraint* obj); + EXPORT void* btTypedConstraint_getUserConstraintPtr(btTypedConstraint* obj); + EXPORT int btTypedConstraint_getUserConstraintType(btTypedConstraint* obj); + EXPORT btScalar btTypedConstraint_internalGetAppliedImpulse(btTypedConstraint* obj); + EXPORT void btTypedConstraint_internalSetAppliedImpulse(btTypedConstraint* obj, btScalar appliedImpulse); + EXPORT bool btTypedConstraint_isEnabled(btTypedConstraint* obj); + EXPORT bool btTypedConstraint_needsFeedback(btTypedConstraint* obj); + EXPORT const char* btTypedConstraint_serialize(btTypedConstraint* obj, void* dataBuffer, btSerializer* serializer); + EXPORT void btTypedConstraint_setBreakingImpulseThreshold(btTypedConstraint* obj, btScalar threshold); + EXPORT void btTypedConstraint_setDbgDrawSize(btTypedConstraint* obj, btScalar dbgDrawSize); + EXPORT void btTypedConstraint_setEnabled(btTypedConstraint* obj, bool enabled); + EXPORT void btTypedConstraint_setJointFeedback(btTypedConstraint* obj, btJointFeedback* jointFeedback); + EXPORT void btTypedConstraint_setOverrideNumSolverIterations(btTypedConstraint* obj, int overideNumIterations); + EXPORT void btTypedConstraint_setParam(btTypedConstraint* obj, int num, btScalar value); + EXPORT void btTypedConstraint_setParam2(btTypedConstraint* obj, int num, btScalar value, int axis); + EXPORT void btTypedConstraint_setupSolverConstraint(btTypedConstraint* obj, btAlignedObjectArray_btSolverConstraint* ca, int solverBodyA, int solverBodyB, btScalar timeStep); + EXPORT void btTypedConstraint_setUserConstraintId(btTypedConstraint* obj, int uid); + EXPORT void btTypedConstraint_setUserConstraintPtr(btTypedConstraint* obj, void* ptr); + EXPORT void btTypedConstraint_setUserConstraintType(btTypedConstraint* obj, int userConstraintType); + EXPORT void btTypedConstraint_solveConstraintObsolete(btTypedConstraint* obj, btSolverBody* __unnamed0, btSolverBody* __unnamed1, btScalar __unnamed2); + EXPORT void btTypedConstraint_delete(btTypedConstraint* obj); + + EXPORT btAngularLimit* btAngularLimit_new(); + EXPORT void btAngularLimit_fit(btAngularLimit* obj, btScalar* angle); + EXPORT btScalar btAngularLimit_getBiasFactor(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getCorrection(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getError(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getHalfRange(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getHigh(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getLow(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getRelaxationFactor(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getSign(btAngularLimit* obj); + EXPORT btScalar btAngularLimit_getSoftness(btAngularLimit* obj); + EXPORT bool btAngularLimit_isLimit(btAngularLimit* obj); + EXPORT void btAngularLimit_set(btAngularLimit* obj, btScalar low, btScalar high, btScalar _softness, btScalar _biasFactor, btScalar _relaxationFactor); + EXPORT void btAngularLimit_test(btAngularLimit* obj, btScalar angle); + EXPORT void btAngularLimit_delete(btAngularLimit* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.cpp new file mode 100644 index 0000000..ce8f1c5 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btUniformScalingShape_wrap.h" + +btUniformScalingShape* btUniformScalingShape_new(btConvexShape* convexChildShape, + btScalar uniformScalingFactor) +{ + return new btUniformScalingShape(convexChildShape, uniformScalingFactor); +} + +btConvexShape* btUniformScalingShape_getChildShape(btUniformScalingShape* obj) +{ + return obj->getChildShape(); +} + +btScalar btUniformScalingShape_getUniformScalingFactor(btUniformScalingShape* obj) +{ + return obj->getUniformScalingFactor(); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.h new file mode 100644 index 0000000..a4adfd4 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btUniformScalingShape_wrap.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btUniformScalingShape* btUniformScalingShape_new(btConvexShape* convexChildShape, btScalar uniformScalingFactor); + EXPORT btConvexShape* btUniformScalingShape_getChildShape(btUniformScalingShape* obj); + EXPORT btScalar btUniformScalingShape_getUniformScalingFactor(btUniformScalingShape* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.cpp new file mode 100644 index 0000000..44957f9 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.cpp @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "btUnionFind_wrap.h" + +btElement* btElement_new() +{ + return new btElement(); +} + +int btElement_getId(btElement* obj) +{ + return obj->m_id; +} + +int btElement_getSz(btElement* obj) +{ + return obj->m_sz; +} + +void btElement_setId(btElement* obj, int value) +{ + obj->m_id = value; +} + +void btElement_setSz(btElement* obj, int value) +{ + obj->m_sz = value; +} + +void btElement_delete(btElement* obj) +{ + delete obj; +} + + +btUnionFind* btUnionFind_new() +{ + return new btUnionFind(); +} + +void btUnionFind_allocate(btUnionFind* obj, int N) +{ + obj->allocate(N); +} + +int btUnionFind_find(btUnionFind* obj, int p, int q) +{ + return obj->find(p, q); +} + +int btUnionFind_find2(btUnionFind* obj, int x) +{ + return obj->find(x); +} + +void btUnionFind_Free(btUnionFind* obj) +{ + obj->Free(); +} + +btElement* btUnionFind_getElement(btUnionFind* obj, int index) +{ + return &obj->getElement(index); +} + +int btUnionFind_getNumElements(btUnionFind* obj) +{ + return obj->getNumElements(); +} + +bool btUnionFind_isRoot(btUnionFind* obj, int x) +{ + return obj->isRoot(x); +} + +void btUnionFind_reset(btUnionFind* obj, int N) +{ + obj->reset(N); +} + +void btUnionFind_sortIslands(btUnionFind* obj) +{ + obj->sortIslands(); +} + +void btUnionFind_unite(btUnionFind* obj, int p, int q) +{ + obj->unite(p, q); +} + +void btUnionFind_delete(btUnionFind* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.h new file mode 100644 index 0000000..f7935ae --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btUnionFind_wrap.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btElement* btElement_new(); + EXPORT int btElement_getId(btElement* obj); + EXPORT int btElement_getSz(btElement* obj); + EXPORT void btElement_setId(btElement* obj, int value); + EXPORT void btElement_setSz(btElement* obj, int value); + EXPORT void btElement_delete(btElement* obj); + + EXPORT btUnionFind* btUnionFind_new(); + EXPORT void btUnionFind_allocate(btUnionFind* obj, int N); + EXPORT int btUnionFind_find(btUnionFind* obj, int p, int q); + EXPORT int btUnionFind_find2(btUnionFind* obj, int x); + EXPORT void btUnionFind_Free(btUnionFind* obj); + EXPORT btElement* btUnionFind_getElement(btUnionFind* obj, int index); + EXPORT int btUnionFind_getNumElements(btUnionFind* obj); + EXPORT bool btUnionFind_isRoot(btUnionFind* obj, int x); + EXPORT void btUnionFind_reset(btUnionFind* obj, int N); + EXPORT void btUnionFind_sortIslands(btUnionFind* obj); + EXPORT void btUnionFind_unite(btUnionFind* obj, int p, int q); + EXPORT void btUnionFind_delete(btUnionFind* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.cpp new file mode 100644 index 0000000..43a7b45 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btUniversalConstraint_wrap.h" + +btUniversalConstraint* btUniversalConstraint_new(btRigidBody* rbA, btRigidBody* rbB, + const btVector3* anchor, const btVector3* axis1, const btVector3* axis2) +{ + BTVECTOR3_IN(anchor); + BTVECTOR3_IN(axis1); + BTVECTOR3_IN(axis2); + return new btUniversalConstraint(*rbA, *rbB, BTVECTOR3_USE(anchor), BTVECTOR3_USE(axis1), + BTVECTOR3_USE(axis2)); +} + +void btUniversalConstraint_getAnchor(btUniversalConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAnchor()); +} + +void btUniversalConstraint_getAnchor2(btUniversalConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAnchor2()); +} + +btScalar btUniversalConstraint_getAngle1(btUniversalConstraint* obj) +{ + return obj->getAngle1(); +} + +btScalar btUniversalConstraint_getAngle2(btUniversalConstraint* obj) +{ + return obj->getAngle2(); +} + +void btUniversalConstraint_getAxis1(btUniversalConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxis1()); +} + +void btUniversalConstraint_getAxis2(btUniversalConstraint* obj, btVector3* value) +{ + BTVECTOR3_COPY(value, &obj->getAxis2()); +} + +void btUniversalConstraint_setLowerLimit(btUniversalConstraint* obj, btScalar ang1min, + btScalar ang2min) +{ + obj->setLowerLimit(ang1min, ang2min); +} + +void btUniversalConstraint_setUpperLimit(btUniversalConstraint* obj, btScalar ang1max, + btScalar ang2max) +{ + obj->setUpperLimit(ang1max, ang2max); +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.h new file mode 100644 index 0000000..ccd168f --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btUniversalConstraint_wrap.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btUniversalConstraint* btUniversalConstraint_new(btRigidBody* rbA, btRigidBody* rbB, const btVector3* anchor, const btVector3* axis1, const btVector3* axis2); + EXPORT void btUniversalConstraint_getAnchor(btUniversalConstraint* obj, btVector3* value); + EXPORT void btUniversalConstraint_getAnchor2(btUniversalConstraint* obj, btVector3* value); + EXPORT btScalar btUniversalConstraint_getAngle1(btUniversalConstraint* obj); + EXPORT btScalar btUniversalConstraint_getAngle2(btUniversalConstraint* obj); + EXPORT void btUniversalConstraint_getAxis1(btUniversalConstraint* obj, btVector3* value); + EXPORT void btUniversalConstraint_getAxis2(btUniversalConstraint* obj, btVector3* value); + EXPORT void btUniversalConstraint_setLowerLimit(btUniversalConstraint* obj, btScalar ang1min, btScalar ang2min); + EXPORT void btUniversalConstraint_setUpperLimit(btUniversalConstraint* obj, btScalar ang1max, btScalar ang2max); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.cpp new file mode 100644 index 0000000..78a0013 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.cpp @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btVehicleRaycaster_wrap.h" + +#ifndef BULLETC_DISABLE_IACTION_CLASSES + +btVehicleRaycaster_btVehicleRaycasterResult* btVehicleRaycaster_btVehicleRaycasterResult_new() +{ + return new btVehicleRaycaster::btVehicleRaycasterResult(); +} + +btScalar btVehicleRaycaster_btVehicleRaycasterResult_getDistFraction(btVehicleRaycaster_btVehicleRaycasterResult* obj) +{ + return obj->m_distFraction; +} + +void btVehicleRaycaster_btVehicleRaycasterResult_getHitNormalInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitNormalInWorld); +} + +void btVehicleRaycaster_btVehicleRaycasterResult_getHitPointInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hitPointInWorld); +} + +void btVehicleRaycaster_btVehicleRaycasterResult_setDistFraction(btVehicleRaycaster_btVehicleRaycasterResult* obj, + btScalar value) +{ + obj->m_distFraction = value; +} + +void btVehicleRaycaster_btVehicleRaycasterResult_setHitNormalInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitNormalInWorld, value); +} + +void btVehicleRaycaster_btVehicleRaycasterResult_setHitPointInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hitPointInWorld, value); +} + +void btVehicleRaycaster_btVehicleRaycasterResult_delete(btVehicleRaycaster_btVehicleRaycasterResult* obj) +{ + delete obj; +} + + +void* btVehicleRaycaster_castRay(btVehicleRaycaster* obj, const btVector3* from, + const btVector3* to, btVehicleRaycaster_btVehicleRaycasterResult* result) +{ + BTVECTOR3_IN(from); + BTVECTOR3_IN(to); + return obj->castRay(BTVECTOR3_USE(from), BTVECTOR3_USE(to), *result); +} + +void btVehicleRaycaster_delete(btVehicleRaycaster* obj) +{ + delete obj; +} + +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.h new file mode 100644 index 0000000..83658d1 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btVehicleRaycaster_wrap.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btVehicleRaycaster_btVehicleRaycasterResult* btVehicleRaycaster_btVehicleRaycasterResult_new(); + EXPORT btScalar btVehicleRaycaster_btVehicleRaycasterResult_getDistFraction(btVehicleRaycaster_btVehicleRaycasterResult* obj); + EXPORT void btVehicleRaycaster_btVehicleRaycasterResult_getHitNormalInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, btVector3* value); + EXPORT void btVehicleRaycaster_btVehicleRaycasterResult_getHitPointInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, btVector3* value); + EXPORT void btVehicleRaycaster_btVehicleRaycasterResult_setDistFraction(btVehicleRaycaster_btVehicleRaycasterResult* obj, btScalar value); + EXPORT void btVehicleRaycaster_btVehicleRaycasterResult_setHitNormalInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, const btVector3* value); + EXPORT void btVehicleRaycaster_btVehicleRaycasterResult_setHitPointInWorld(btVehicleRaycaster_btVehicleRaycasterResult* obj, const btVector3* value); + EXPORT void btVehicleRaycaster_btVehicleRaycasterResult_delete(btVehicleRaycaster_btVehicleRaycasterResult* obj); + + EXPORT void* btVehicleRaycaster_castRay(btVehicleRaycaster* obj, const btVector3* from, const btVector3* to, btVehicleRaycaster_btVehicleRaycasterResult* result); + EXPORT void btVehicleRaycaster_delete(btVehicleRaycaster* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.cpp new file mode 100644 index 0000000..7a67036 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.cpp @@ -0,0 +1,429 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include + +#include "conversion.h" +#include "btVoronoiSimplexSolver_wrap.h" + +bool btUsageBitfield_getUnused1(btUsageBitfield* obj) +{ + return obj->unused1; +} + +bool btUsageBitfield_getUnused2(btUsageBitfield* obj) +{ + return obj->unused2; +} + +bool btUsageBitfield_getUnused3(btUsageBitfield* obj) +{ + return obj->unused3; +} + +bool btUsageBitfield_getUnused4(btUsageBitfield* obj) +{ + return obj->unused4; +} + +bool btUsageBitfield_getUsedVertexA(btUsageBitfield* obj) +{ + return obj->usedVertexA; +} + +bool btUsageBitfield_getUsedVertexB(btUsageBitfield* obj) +{ + return obj->usedVertexB; +} + +bool btUsageBitfield_getUsedVertexC(btUsageBitfield* obj) +{ + return obj->usedVertexC; +} + +bool btUsageBitfield_getUsedVertexD(btUsageBitfield* obj) +{ + return obj->usedVertexD; +} + +void btUsageBitfield_reset(btUsageBitfield* obj) +{ + obj->reset(); +} + +void btUsageBitfield_setUnused1(btUsageBitfield* obj, bool value) +{ + obj->unused1 = value; +} + +void btUsageBitfield_setUnused2(btUsageBitfield* obj, bool value) +{ + obj->unused2 = value; +} + +void btUsageBitfield_setUnused3(btUsageBitfield* obj, bool value) +{ + obj->unused3 = value; +} + +void btUsageBitfield_setUnused4(btUsageBitfield* obj, bool value) +{ + obj->unused4 = value; +} + +void btUsageBitfield_setUsedVertexA(btUsageBitfield* obj, bool value) +{ + obj->usedVertexA = value; +} + +void btUsageBitfield_setUsedVertexB(btUsageBitfield* obj, bool value) +{ + obj->usedVertexB = value; +} + +void btUsageBitfield_setUsedVertexC(btUsageBitfield* obj, bool value) +{ + obj->usedVertexC = value; +} + +void btUsageBitfield_setUsedVertexD(btUsageBitfield* obj, bool value) +{ + obj->usedVertexD = value; +} + + +btSubSimplexClosestResult* btSubSimplexClosestResult_new() +{ + return new btSubSimplexClosestResult(); +} + +btScalar* btSubSimplexClosestResult_getBarycentricCoords(btSubSimplexClosestResult* obj) +{ + return obj->m_barycentricCoords; +} + +void btSubSimplexClosestResult_getClosestPointOnSimplex(btSubSimplexClosestResult* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_closestPointOnSimplex); +} + +bool btSubSimplexClosestResult_getDegenerate(btSubSimplexClosestResult* obj) +{ + return obj->m_degenerate; +} + +btUsageBitfield* btSubSimplexClosestResult_getUsedVertices(btSubSimplexClosestResult* obj) +{ + return &obj->m_usedVertices; +} + +bool btSubSimplexClosestResult_isValid(btSubSimplexClosestResult* obj) +{ + return obj->isValid(); +} + +void btSubSimplexClosestResult_reset(btSubSimplexClosestResult* obj) +{ + obj->reset(); +} + +void btSubSimplexClosestResult_setBarycentricCoordinates(btSubSimplexClosestResult* obj) +{ + obj->setBarycentricCoordinates(); +} + +void btSubSimplexClosestResult_setBarycentricCoordinates2(btSubSimplexClosestResult* obj, + btScalar a) +{ + obj->setBarycentricCoordinates(a); +} + +void btSubSimplexClosestResult_setBarycentricCoordinates3(btSubSimplexClosestResult* obj, + btScalar a, btScalar b) +{ + obj->setBarycentricCoordinates(a, b); +} + +void btSubSimplexClosestResult_setBarycentricCoordinates4(btSubSimplexClosestResult* obj, + btScalar a, btScalar b, btScalar c) +{ + obj->setBarycentricCoordinates(a, b, c); +} + +void btSubSimplexClosestResult_setBarycentricCoordinates5(btSubSimplexClosestResult* obj, + btScalar a, btScalar b, btScalar c, btScalar d) +{ + obj->setBarycentricCoordinates(a, b, c, d); +} + +void btSubSimplexClosestResult_setClosestPointOnSimplex(btSubSimplexClosestResult* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_closestPointOnSimplex, value); +} + +void btSubSimplexClosestResult_setDegenerate(btSubSimplexClosestResult* obj, bool value) +{ + obj->m_degenerate = value; +} + +void btSubSimplexClosestResult_setUsedVertices(btSubSimplexClosestResult* obj, const btUsageBitfield* value) +{ + obj->m_usedVertices = *value; +} + +void btSubSimplexClosestResult_delete(btSubSimplexClosestResult* obj) +{ + delete obj; +} + + +btVoronoiSimplexSolver* btVoronoiSimplexSolver_new() +{ + return new btVoronoiSimplexSolver(); +} + +void btVoronoiSimplexSolver_addVertex(btVoronoiSimplexSolver* obj, const btVector3* w, + const btVector3* p, const btVector3* q) +{ + BTVECTOR3_IN(w); + BTVECTOR3_IN(p); + BTVECTOR3_IN(q); + obj->addVertex(BTVECTOR3_USE(w), BTVECTOR3_USE(p), BTVECTOR3_USE(q)); +} + +void btVoronoiSimplexSolver_backup_closest(btVoronoiSimplexSolver* obj, btVector3* v) +{ + BTVECTOR3_DEF(v); + obj->backup_closest(BTVECTOR3_USE(v)); + BTVECTOR3_DEF_OUT(v); +} + +bool btVoronoiSimplexSolver_closest(btVoronoiSimplexSolver* obj, btVector3* v) +{ + BTVECTOR3_DEF(v); + bool ret = obj->closest(BTVECTOR3_USE(v)); + BTVECTOR3_DEF_OUT(v); + return ret; +} + +bool btVoronoiSimplexSolver_closestPtPointTetrahedron(btVoronoiSimplexSolver* obj, + const btVector3* p, const btVector3* a, const btVector3* b, const btVector3* c, + const btVector3* d, btSubSimplexClosestResult* finalResult) +{ + BTVECTOR3_IN(p); + BTVECTOR3_IN(a); + BTVECTOR3_IN(b); + BTVECTOR3_IN(c); + BTVECTOR3_IN(d); + return obj->closestPtPointTetrahedron(BTVECTOR3_USE(p), BTVECTOR3_USE(a), BTVECTOR3_USE(b), + BTVECTOR3_USE(c), BTVECTOR3_USE(d), *finalResult); +} + +bool btVoronoiSimplexSolver_closestPtPointTriangle(btVoronoiSimplexSolver* obj, const btVector3* p, + const btVector3* a, const btVector3* b, const btVector3* c, btSubSimplexClosestResult* result) +{ + BTVECTOR3_IN(p); + BTVECTOR3_IN(a); + BTVECTOR3_IN(b); + BTVECTOR3_IN(c); + return obj->closestPtPointTriangle(BTVECTOR3_USE(p), BTVECTOR3_USE(a), BTVECTOR3_USE(b), + BTVECTOR3_USE(c), *result); +} + +void btVoronoiSimplexSolver_compute_points(btVoronoiSimplexSolver* obj, btVector3* p1, + btVector3* p2) +{ + BTVECTOR3_DEF(p1); + BTVECTOR3_DEF(p2); + obj->compute_points(BTVECTOR3_USE(p1), BTVECTOR3_USE(p2)); + BTVECTOR3_DEF_OUT(p1); + BTVECTOR3_DEF_OUT(p2); +} + +bool btVoronoiSimplexSolver_emptySimplex(btVoronoiSimplexSolver* obj) +{ + return obj->emptySimplex(); +} + +bool btVoronoiSimplexSolver_fullSimplex(btVoronoiSimplexSolver* obj) +{ + return obj->fullSimplex(); +} + +btSubSimplexClosestResult* btVoronoiSimplexSolver_getCachedBC(btVoronoiSimplexSolver* obj) +{ + return &obj->m_cachedBC; +} + +void btVoronoiSimplexSolver_getCachedP1(btVoronoiSimplexSolver* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_cachedP1); +} + +void btVoronoiSimplexSolver_getCachedP2(btVoronoiSimplexSolver* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_cachedP2); +} + +void btVoronoiSimplexSolver_getCachedV(btVoronoiSimplexSolver* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_cachedV); +} + +bool btVoronoiSimplexSolver_getCachedValidClosest(btVoronoiSimplexSolver* obj) +{ + return obj->m_cachedValidClosest; +} + +btScalar btVoronoiSimplexSolver_getEqualVertexThreshold(btVoronoiSimplexSolver* obj) +{ + return obj->getEqualVertexThreshold(); +} + +void btVoronoiSimplexSolver_getLastW(btVoronoiSimplexSolver* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_lastW); +} + +bool btVoronoiSimplexSolver_getNeedsUpdate(btVoronoiSimplexSolver* obj) +{ + return obj->m_needsUpdate; +} + +int btVoronoiSimplexSolver_getNumVertices(btVoronoiSimplexSolver* obj) +{ + return obj->numVertices(); +} + +int btVoronoiSimplexSolver_getSimplex(btVoronoiSimplexSolver* obj, btVector3* pBuf, + btVector3* qBuf, btVector3* yBuf) +{ + return obj->getSimplex(pBuf, qBuf, yBuf); +} + +btVector3* btVoronoiSimplexSolver_getSimplexPointsP(btVoronoiSimplexSolver* obj) +{ + return obj->m_simplexPointsP; +} + +btVector3* btVoronoiSimplexSolver_getSimplexPointsQ(btVoronoiSimplexSolver* obj) +{ + return obj->m_simplexPointsQ; +} + +btVector3* btVoronoiSimplexSolver_getSimplexVectorW(btVoronoiSimplexSolver* obj) +{ + return obj->m_simplexVectorW; +} + +bool btVoronoiSimplexSolver_inSimplex(btVoronoiSimplexSolver* obj, const btVector3* w) +{ + BTVECTOR3_IN(w); + return obj->inSimplex(BTVECTOR3_USE(w)); +} + +btScalar btVoronoiSimplexSolver_maxVertex(btVoronoiSimplexSolver* obj) +{ + return obj->maxVertex(); +} + +int btVoronoiSimplexSolver_numVertices(btVoronoiSimplexSolver* obj) +{ + return obj->numVertices(); +} + +int btVoronoiSimplexSolver_pointOutsideOfPlane(btVoronoiSimplexSolver* obj, const btVector3* p, + const btVector3* a, const btVector3* b, const btVector3* c, const btVector3* d) +{ + BTVECTOR3_IN(p); + BTVECTOR3_IN(a); + BTVECTOR3_IN(b); + BTVECTOR3_IN(c); + BTVECTOR3_IN(d); + return obj->pointOutsideOfPlane(BTVECTOR3_USE(p), BTVECTOR3_USE(a), BTVECTOR3_USE(b), + BTVECTOR3_USE(c), BTVECTOR3_USE(d)); +} + +void btVoronoiSimplexSolver_reduceVertices(btVoronoiSimplexSolver* obj, const btUsageBitfield* usedVerts) +{ + obj->reduceVertices(*usedVerts); +} + +void btVoronoiSimplexSolver_removeVertex(btVoronoiSimplexSolver* obj, int index) +{ + obj->removeVertex(index); +} + +void btVoronoiSimplexSolver_reset(btVoronoiSimplexSolver* obj) +{ + obj->reset(); +} + +void btVoronoiSimplexSolver_setCachedBC(btVoronoiSimplexSolver* obj, const btSubSimplexClosestResult* value) +{ + obj->m_cachedBC = *value; +} + +void btVoronoiSimplexSolver_setCachedP1(btVoronoiSimplexSolver* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_cachedP1, value); +} + +void btVoronoiSimplexSolver_setCachedP2(btVoronoiSimplexSolver* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_cachedP2, value); +} + +void btVoronoiSimplexSolver_setCachedV(btVoronoiSimplexSolver* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_cachedV, value); +} + +void btVoronoiSimplexSolver_setCachedValidClosest(btVoronoiSimplexSolver* obj, bool value) +{ + obj->m_cachedValidClosest = value; +} + +void btVoronoiSimplexSolver_setEqualVertexThreshold(btVoronoiSimplexSolver* obj, + btScalar threshold) +{ + obj->setEqualVertexThreshold(threshold); +} + +void btVoronoiSimplexSolver_setLastW(btVoronoiSimplexSolver* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_lastW, value); +} + +void btVoronoiSimplexSolver_setNeedsUpdate(btVoronoiSimplexSolver* obj, bool value) +{ + obj->m_needsUpdate = value; +} + +void btVoronoiSimplexSolver_setNumVertices(btVoronoiSimplexSolver* obj, int value) +{ + obj->m_numVertices = value; +} + +bool btVoronoiSimplexSolver_updateClosestVectorAndPoints(btVoronoiSimplexSolver* obj) +{ + return obj->updateClosestVectorAndPoints(); +} + +void btVoronoiSimplexSolver_delete(btVoronoiSimplexSolver* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.h new file mode 100644 index 0000000..abde531 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT bool btUsageBitfield_getUnused1(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUnused2(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUnused3(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUnused4(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUsedVertexA(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUsedVertexB(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUsedVertexC(btUsageBitfield* obj); + EXPORT bool btUsageBitfield_getUsedVertexD(btUsageBitfield* obj); + EXPORT void btUsageBitfield_reset(btUsageBitfield* obj); + EXPORT void btUsageBitfield_setUnused1(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUnused2(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUnused3(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUnused4(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUsedVertexA(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUsedVertexB(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUsedVertexC(btUsageBitfield* obj, bool value); + EXPORT void btUsageBitfield_setUsedVertexD(btUsageBitfield* obj, bool value); + + EXPORT btSubSimplexClosestResult* btSubSimplexClosestResult_new(); + EXPORT btScalar* btSubSimplexClosestResult_getBarycentricCoords(btSubSimplexClosestResult* obj); + EXPORT void btSubSimplexClosestResult_getClosestPointOnSimplex(btSubSimplexClosestResult* obj, btVector3* value); + EXPORT bool btSubSimplexClosestResult_getDegenerate(btSubSimplexClosestResult* obj); + EXPORT btUsageBitfield* btSubSimplexClosestResult_getUsedVertices(btSubSimplexClosestResult* obj); + EXPORT bool btSubSimplexClosestResult_isValid(btSubSimplexClosestResult* obj); + EXPORT void btSubSimplexClosestResult_reset(btSubSimplexClosestResult* obj); + EXPORT void btSubSimplexClosestResult_setBarycentricCoordinates(btSubSimplexClosestResult* obj); + EXPORT void btSubSimplexClosestResult_setBarycentricCoordinates2(btSubSimplexClosestResult* obj, btScalar a); + EXPORT void btSubSimplexClosestResult_setBarycentricCoordinates3(btSubSimplexClosestResult* obj, btScalar a, btScalar b); + EXPORT void btSubSimplexClosestResult_setBarycentricCoordinates4(btSubSimplexClosestResult* obj, btScalar a, btScalar b, btScalar c); + EXPORT void btSubSimplexClosestResult_setBarycentricCoordinates5(btSubSimplexClosestResult* obj, btScalar a, btScalar b, btScalar c, btScalar d); + EXPORT void btSubSimplexClosestResult_setClosestPointOnSimplex(btSubSimplexClosestResult* obj, const btVector3* value); + EXPORT void btSubSimplexClosestResult_setDegenerate(btSubSimplexClosestResult* obj, bool value); + EXPORT void btSubSimplexClosestResult_setUsedVertices(btSubSimplexClosestResult* obj, const btUsageBitfield* value); + EXPORT void btSubSimplexClosestResult_delete(btSubSimplexClosestResult* obj); + + EXPORT btVoronoiSimplexSolver* btVoronoiSimplexSolver_new(); + EXPORT void btVoronoiSimplexSolver_addVertex(btVoronoiSimplexSolver* obj, const btVector3* w, const btVector3* p, const btVector3* q); + EXPORT void btVoronoiSimplexSolver_backup_closest(btVoronoiSimplexSolver* obj, btVector3* v); + EXPORT bool btVoronoiSimplexSolver_closest(btVoronoiSimplexSolver* obj, btVector3* v); + EXPORT bool btVoronoiSimplexSolver_closestPtPointTetrahedron(btVoronoiSimplexSolver* obj, const btVector3* p, const btVector3* a, const btVector3* b, const btVector3* c, const btVector3* d, btSubSimplexClosestResult* finalResult); + EXPORT bool btVoronoiSimplexSolver_closestPtPointTriangle(btVoronoiSimplexSolver* obj, const btVector3* p, const btVector3* a, const btVector3* b, const btVector3* c, btSubSimplexClosestResult* result); + EXPORT void btVoronoiSimplexSolver_compute_points(btVoronoiSimplexSolver* obj, btVector3* p1, btVector3* p2); + EXPORT bool btVoronoiSimplexSolver_emptySimplex(btVoronoiSimplexSolver* obj); + EXPORT bool btVoronoiSimplexSolver_fullSimplex(btVoronoiSimplexSolver* obj); + EXPORT btSubSimplexClosestResult* btVoronoiSimplexSolver_getCachedBC(btVoronoiSimplexSolver* obj); + EXPORT void btVoronoiSimplexSolver_getCachedP1(btVoronoiSimplexSolver* obj, btVector3* value); + EXPORT void btVoronoiSimplexSolver_getCachedP2(btVoronoiSimplexSolver* obj, btVector3* value); + EXPORT void btVoronoiSimplexSolver_getCachedV(btVoronoiSimplexSolver* obj, btVector3* value); + EXPORT bool btVoronoiSimplexSolver_getCachedValidClosest(btVoronoiSimplexSolver* obj); + EXPORT btScalar btVoronoiSimplexSolver_getEqualVertexThreshold(btVoronoiSimplexSolver* obj); + EXPORT void btVoronoiSimplexSolver_getLastW(btVoronoiSimplexSolver* obj, btVector3* value); + EXPORT bool btVoronoiSimplexSolver_getNeedsUpdate(btVoronoiSimplexSolver* obj); + EXPORT int btVoronoiSimplexSolver_getNumVertices(btVoronoiSimplexSolver* obj); + EXPORT int btVoronoiSimplexSolver_getSimplex(btVoronoiSimplexSolver* obj, btVector3* pBuf, btVector3* qBuf, btVector3* yBuf); + EXPORT btVector3* btVoronoiSimplexSolver_getSimplexPointsP(btVoronoiSimplexSolver* obj); + EXPORT btVector3* btVoronoiSimplexSolver_getSimplexPointsQ(btVoronoiSimplexSolver* obj); + EXPORT btVector3* btVoronoiSimplexSolver_getSimplexVectorW(btVoronoiSimplexSolver* obj); + EXPORT bool btVoronoiSimplexSolver_inSimplex(btVoronoiSimplexSolver* obj, const btVector3* w); + EXPORT btScalar btVoronoiSimplexSolver_maxVertex(btVoronoiSimplexSolver* obj); + EXPORT int btVoronoiSimplexSolver_numVertices(btVoronoiSimplexSolver* obj); + EXPORT int btVoronoiSimplexSolver_pointOutsideOfPlane(btVoronoiSimplexSolver* obj, const btVector3* p, const btVector3* a, const btVector3* b, const btVector3* c, const btVector3* d); + EXPORT void btVoronoiSimplexSolver_reduceVertices(btVoronoiSimplexSolver* obj, const btUsageBitfield* usedVerts); + EXPORT void btVoronoiSimplexSolver_removeVertex(btVoronoiSimplexSolver* obj, int index); + EXPORT void btVoronoiSimplexSolver_reset(btVoronoiSimplexSolver* obj); + EXPORT void btVoronoiSimplexSolver_setCachedBC(btVoronoiSimplexSolver* obj, const btSubSimplexClosestResult* value); + EXPORT void btVoronoiSimplexSolver_setCachedP1(btVoronoiSimplexSolver* obj, const btVector3* value); + EXPORT void btVoronoiSimplexSolver_setCachedP2(btVoronoiSimplexSolver* obj, const btVector3* value); + EXPORT void btVoronoiSimplexSolver_setCachedV(btVoronoiSimplexSolver* obj, const btVector3* value); + EXPORT void btVoronoiSimplexSolver_setCachedValidClosest(btVoronoiSimplexSolver* obj, bool value); + EXPORT void btVoronoiSimplexSolver_setEqualVertexThreshold(btVoronoiSimplexSolver* obj, btScalar threshold); + EXPORT void btVoronoiSimplexSolver_setLastW(btVoronoiSimplexSolver* obj, const btVector3* value); + EXPORT void btVoronoiSimplexSolver_setNeedsUpdate(btVoronoiSimplexSolver* obj, bool value); + EXPORT void btVoronoiSimplexSolver_setNumVertices(btVoronoiSimplexSolver* obj, int value); + EXPORT bool btVoronoiSimplexSolver_updateClosestVectorAndPoints(btVoronoiSimplexSolver* obj); + EXPORT void btVoronoiSimplexSolver_delete(btVoronoiSimplexSolver* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.cpp b/dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.cpp new file mode 100644 index 0000000..41c49e2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.cpp @@ -0,0 +1,526 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "btWheelInfo_wrap.h" + +#ifndef BULLETC_DISABLE_IACTION_CLASSES + +#include "conversion.h" + +btWheelInfoConstructionInfo* btWheelInfoConstructionInfo_new() +{ + return new btWheelInfoConstructionInfo(); +} + +bool btWheelInfoConstructionInfo_getBIsFrontWheel(btWheelInfoConstructionInfo* obj) +{ + return obj->m_bIsFrontWheel; +} + +void btWheelInfoConstructionInfo_getChassisConnectionCS(btWheelInfoConstructionInfo* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_chassisConnectionCS); +} + +btScalar btWheelInfoConstructionInfo_getFrictionSlip(btWheelInfoConstructionInfo* obj) +{ + return obj->m_frictionSlip; +} + +btScalar btWheelInfoConstructionInfo_getMaxSuspensionForce(btWheelInfoConstructionInfo* obj) +{ + return obj->m_maxSuspensionForce; +} + +btScalar btWheelInfoConstructionInfo_getMaxSuspensionTravelCm(btWheelInfoConstructionInfo* obj) +{ + return obj->m_maxSuspensionTravelCm; +} + +btScalar btWheelInfoConstructionInfo_getSuspensionRestLength(btWheelInfoConstructionInfo* obj) +{ + return obj->m_suspensionRestLength; +} + +btScalar btWheelInfoConstructionInfo_getSuspensionStiffness(btWheelInfoConstructionInfo* obj) +{ + return obj->m_suspensionStiffness; +} + +void btWheelInfoConstructionInfo_getWheelAxleCS(btWheelInfoConstructionInfo* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_wheelAxleCS); +} + +void btWheelInfoConstructionInfo_getWheelDirectionCS(btWheelInfoConstructionInfo* obj, + btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_wheelDirectionCS); +} + +btScalar btWheelInfoConstructionInfo_getWheelRadius(btWheelInfoConstructionInfo* obj) +{ + return obj->m_wheelRadius; +} + +btScalar btWheelInfoConstructionInfo_getWheelsDampingCompression(btWheelInfoConstructionInfo* obj) +{ + return obj->m_wheelsDampingCompression; +} + +btScalar btWheelInfoConstructionInfo_getWheelsDampingRelaxation(btWheelInfoConstructionInfo* obj) +{ + return obj->m_wheelsDampingRelaxation; +} + +void btWheelInfoConstructionInfo_setBIsFrontWheel(btWheelInfoConstructionInfo* obj, + bool value) +{ + obj->m_bIsFrontWheel = value; +} + +void btWheelInfoConstructionInfo_setChassisConnectionCS(btWheelInfoConstructionInfo* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_chassisConnectionCS, value); +} + +void btWheelInfoConstructionInfo_setFrictionSlip(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_frictionSlip = value; +} + +void btWheelInfoConstructionInfo_setMaxSuspensionForce(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_maxSuspensionForce = value; +} + +void btWheelInfoConstructionInfo_setMaxSuspensionTravelCm(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_maxSuspensionTravelCm = value; +} + +void btWheelInfoConstructionInfo_setSuspensionRestLength(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_suspensionRestLength = value; +} + +void btWheelInfoConstructionInfo_setSuspensionStiffness(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_suspensionStiffness = value; +} + +void btWheelInfoConstructionInfo_setWheelAxleCS(btWheelInfoConstructionInfo* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_wheelAxleCS, value); +} + +void btWheelInfoConstructionInfo_setWheelDirectionCS(btWheelInfoConstructionInfo* obj, + const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_wheelDirectionCS, value); +} + +void btWheelInfoConstructionInfo_setWheelRadius(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_wheelRadius = value; +} + +void btWheelInfoConstructionInfo_setWheelsDampingCompression(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_wheelsDampingCompression = value; +} + +void btWheelInfoConstructionInfo_setWheelsDampingRelaxation(btWheelInfoConstructionInfo* obj, + btScalar value) +{ + obj->m_wheelsDampingRelaxation = value; +} + +void btWheelInfoConstructionInfo_delete(btWheelInfoConstructionInfo* obj) +{ + delete obj; +} + + +btWheelInfo_RaycastInfo* btWheelInfo_RaycastInfo_new() +{ + return new btWheelInfo::RaycastInfo(); +} + +void btWheelInfo_RaycastInfo_getContactNormalWS(btWheelInfo_RaycastInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_contactNormalWS); +} + +void btWheelInfo_RaycastInfo_getContactPointWS(btWheelInfo_RaycastInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_contactPointWS); +} + +void* btWheelInfo_RaycastInfo_getGroundObject(btWheelInfo_RaycastInfo* obj) +{ + return obj->m_groundObject; +} + +void btWheelInfo_RaycastInfo_getHardPointWS(btWheelInfo_RaycastInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_hardPointWS); +} + +btScalar btWheelInfo_RaycastInfo_getSuspensionLength(btWheelInfo_RaycastInfo* obj) +{ + return obj->m_suspensionLength; +} + +void btWheelInfo_RaycastInfo_getWheelAxleWS(btWheelInfo_RaycastInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_wheelAxleWS); +} + +void btWheelInfo_RaycastInfo_getWheelDirectionWS(btWheelInfo_RaycastInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_wheelDirectionWS); +} + +bool btWheelInfo_RaycastInfo_getIsInContact(btWheelInfo_RaycastInfo* obj) +{ + return obj->m_isInContact; +} + +void btWheelInfo_RaycastInfo_setContactNormalWS(btWheelInfo_RaycastInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_contactNormalWS, value); +} + +void btWheelInfo_RaycastInfo_setContactPointWS(btWheelInfo_RaycastInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_contactPointWS, value); +} + +void btWheelInfo_RaycastInfo_setGroundObject(btWheelInfo_RaycastInfo* obj, void* value) +{ + obj->m_groundObject = value; +} + +void btWheelInfo_RaycastInfo_setHardPointWS(btWheelInfo_RaycastInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_hardPointWS, value); +} + +void btWheelInfo_RaycastInfo_setIsInContact(btWheelInfo_RaycastInfo* obj, bool value) +{ + obj->m_isInContact = value; +} + +void btWheelInfo_RaycastInfo_setSuspensionLength(btWheelInfo_RaycastInfo* obj, btScalar value) +{ + obj->m_suspensionLength = value; +} + +void btWheelInfo_RaycastInfo_setWheelAxleWS(btWheelInfo_RaycastInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_wheelAxleWS, value); +} + +void btWheelInfo_RaycastInfo_setWheelDirectionWS(btWheelInfo_RaycastInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_wheelDirectionWS, value); +} + +void btWheelInfo_RaycastInfo_delete(btWheelInfo_RaycastInfo* obj) +{ + delete obj; +} + + +btWheelInfo* btWheelInfo_new(btWheelInfoConstructionInfo* ci) +{ + return new btWheelInfo(*ci); +} + +bool btWheelInfo_getBIsFrontWheel(btWheelInfo* obj) +{ + return obj->m_bIsFrontWheel; +} + +btScalar btWheelInfo_getBrake(btWheelInfo* obj) +{ + return obj->m_brake; +} + +void btWheelInfo_getChassisConnectionPointCS(btWheelInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_chassisConnectionPointCS); +} + +void* btWheelInfo_getClientInfo(btWheelInfo* obj) +{ + return obj->m_clientInfo; +} + +btScalar btWheelInfo_getClippedInvContactDotSuspension(btWheelInfo* obj) +{ + return obj->m_clippedInvContactDotSuspension; +} + +btScalar btWheelInfo_getDeltaRotation(btWheelInfo* obj) +{ + return obj->m_deltaRotation; +} + +btScalar btWheelInfo_getEngineForce(btWheelInfo* obj) +{ + return obj->m_engineForce; +} + +btScalar btWheelInfo_getFrictionSlip(btWheelInfo* obj) +{ + return obj->m_frictionSlip; +} + +btScalar btWheelInfo_getMaxSuspensionForce(btWheelInfo* obj) +{ + return obj->m_maxSuspensionForce; +} + +btScalar btWheelInfo_getMaxSuspensionTravelCm(btWheelInfo* obj) +{ + return obj->m_maxSuspensionTravelCm; +} + +btWheelInfo_RaycastInfo* btWheelInfo_getRaycastInfo(btWheelInfo* obj) +{ + return &obj->m_raycastInfo; +} + +btScalar btWheelInfo_getRollInfluence(btWheelInfo* obj) +{ + return obj->m_rollInfluence; +} + +btScalar btWheelInfo_getRotation(btWheelInfo* obj) +{ + return obj->m_rotation; +} + +btScalar btWheelInfo_getSkidInfo(btWheelInfo* obj) +{ + return obj->m_skidInfo; +} + +btScalar btWheelInfo_getSteering(btWheelInfo* obj) +{ + return obj->m_steering; +} + +btScalar btWheelInfo_getSuspensionRelativeVelocity(btWheelInfo* obj) +{ + return obj->m_suspensionRelativeVelocity; +} + +btScalar btWheelInfo_getSuspensionRestLength(btWheelInfo* obj) +{ + return obj->getSuspensionRestLength(); +} + +btScalar btWheelInfo_getSuspensionRestLength1(btWheelInfo* obj) +{ + return obj->m_suspensionRestLength1; +} + +btScalar btWheelInfo_getSuspensionStiffness(btWheelInfo* obj) +{ + return obj->m_suspensionStiffness; +} + +void btWheelInfo_getWheelAxleCS(btWheelInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_wheelAxleCS); +} + +void btWheelInfo_getWheelDirectionCS(btWheelInfo* obj, btVector3* value) +{ + BTVECTOR3_SET(value, obj->m_wheelDirectionCS); +} + +btScalar btWheelInfo_getWheelsDampingCompression(btWheelInfo* obj) +{ + return obj->m_wheelsDampingCompression; +} + +btScalar btWheelInfo_getWheelsDampingRelaxation(btWheelInfo* obj) +{ + return obj->m_wheelsDampingRelaxation; +} + +btScalar btWheelInfo_getWheelsRadius(btWheelInfo* obj) +{ + return obj->m_wheelsRadius; +} + +btScalar btWheelInfo_getWheelsSuspensionForce(btWheelInfo* obj) +{ + return obj->m_wheelsSuspensionForce; +} + +void btWheelInfo_getWorldTransform(btWheelInfo* obj, btTransform* value) +{ + BTTRANSFORM_SET(value, obj->m_worldTransform); +} + +void btWheelInfo_setBIsFrontWheel(btWheelInfo* obj, bool value) +{ + obj->m_bIsFrontWheel = value; +} + +void btWheelInfo_setBrake(btWheelInfo* obj, btScalar value) +{ + obj->m_brake = value; +} + +void btWheelInfo_setChassisConnectionPointCS(btWheelInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_chassisConnectionPointCS, value); +} + +void btWheelInfo_setClientInfo(btWheelInfo* obj, void* value) +{ + obj->m_clientInfo = value; +} + +void btWheelInfo_setClippedInvContactDotSuspension(btWheelInfo* obj, btScalar value) +{ + obj->m_clippedInvContactDotSuspension = value; +} + +void btWheelInfo_setDeltaRotation(btWheelInfo* obj, btScalar value) +{ + obj->m_deltaRotation = value; +} + +void btWheelInfo_setEngineForce(btWheelInfo* obj, btScalar value) +{ + obj->m_engineForce = value; +} + +void btWheelInfo_setFrictionSlip(btWheelInfo* obj, btScalar value) +{ + obj->m_frictionSlip = value; +} + +void btWheelInfo_setMaxSuspensionForce(btWheelInfo* obj, btScalar value) +{ + obj->m_maxSuspensionForce = value; +} + +void btWheelInfo_setMaxSuspensionTravelCm(btWheelInfo* obj, btScalar value) +{ + obj->m_maxSuspensionTravelCm = value; +} + +void btWheelInfo_setRollInfluence(btWheelInfo* obj, btScalar value) +{ + obj->m_rollInfluence = value; +} + +void btWheelInfo_setRotation(btWheelInfo* obj, btScalar value) +{ + obj->m_rotation = value; +} + +void btWheelInfo_setSkidInfo(btWheelInfo* obj, btScalar value) +{ + obj->m_skidInfo = value; +} + +void btWheelInfo_setSteering(btWheelInfo* obj, btScalar value) +{ + obj->m_steering = value; +} + +void btWheelInfo_setSuspensionRelativeVelocity(btWheelInfo* obj, btScalar value) +{ + obj->m_suspensionRelativeVelocity = value; +} + +void btWheelInfo_setSuspensionRestLength1(btWheelInfo* obj, btScalar value) +{ + obj->m_suspensionRestLength1 = value; +} + +void btWheelInfo_setSuspensionStiffness(btWheelInfo* obj, btScalar value) +{ + obj->m_suspensionStiffness = value; +} + +void btWheelInfo_setWheelAxleCS(btWheelInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_wheelAxleCS, value); +} + +void btWheelInfo_setWheelDirectionCS(btWheelInfo* obj, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->m_wheelDirectionCS, value); +} + +void btWheelInfo_setWheelsDampingCompression(btWheelInfo* obj, btScalar value) +{ + obj->m_wheelsDampingCompression = value; +} + +void btWheelInfo_setWheelsDampingRelaxation(btWheelInfo* obj, btScalar value) +{ + obj->m_wheelsDampingRelaxation = value; +} + +void btWheelInfo_setWheelsRadius(btWheelInfo* obj, btScalar value) +{ + obj->m_wheelsRadius = value; +} + +void btWheelInfo_setWheelsSuspensionForce(btWheelInfo* obj, btScalar value) +{ + obj->m_wheelsSuspensionForce = value; +} + +void btWheelInfo_setWorldTransform(btWheelInfo* obj, const btTransform* value) +{ + BTTRANSFORM_COPY(&obj->m_worldTransform, value); +} + +void btWheelInfo_updateWheel(btWheelInfo* obj, const btRigidBody* chassis, btWheelInfo_RaycastInfo* raycastInfo) +{ + obj->updateWheel(*chassis, *raycastInfo); +} + +void btWheelInfo_delete(btWheelInfo* obj) +{ + delete obj; +} + +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.h b/dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.h new file mode 100644 index 0000000..8e5cb48 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/btWheelInfo_wrap.h @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btWheelInfoConstructionInfo* btWheelInfoConstructionInfo_new(); + EXPORT bool btWheelInfoConstructionInfo_getBIsFrontWheel(btWheelInfoConstructionInfo* obj); + EXPORT void btWheelInfoConstructionInfo_getChassisConnectionCS(btWheelInfoConstructionInfo* obj, btVector3* value); + EXPORT btScalar btWheelInfoConstructionInfo_getFrictionSlip(btWheelInfoConstructionInfo* obj); + EXPORT btScalar btWheelInfoConstructionInfo_getMaxSuspensionForce(btWheelInfoConstructionInfo* obj); + EXPORT btScalar btWheelInfoConstructionInfo_getMaxSuspensionTravelCm(btWheelInfoConstructionInfo* obj); + EXPORT btScalar btWheelInfoConstructionInfo_getSuspensionRestLength(btWheelInfoConstructionInfo* obj); + EXPORT btScalar btWheelInfoConstructionInfo_getSuspensionStiffness(btWheelInfoConstructionInfo* obj); + EXPORT void btWheelInfoConstructionInfo_getWheelAxleCS(btWheelInfoConstructionInfo* obj, btVector3* value); + EXPORT void btWheelInfoConstructionInfo_getWheelDirectionCS(btWheelInfoConstructionInfo* obj, btVector3* value); + EXPORT btScalar btWheelInfoConstructionInfo_getWheelRadius(btWheelInfoConstructionInfo* obj); + EXPORT btScalar btWheelInfoConstructionInfo_getWheelsDampingCompression(btWheelInfoConstructionInfo* obj); + EXPORT btScalar btWheelInfoConstructionInfo_getWheelsDampingRelaxation(btWheelInfoConstructionInfo* obj); + EXPORT void btWheelInfoConstructionInfo_setBIsFrontWheel(btWheelInfoConstructionInfo* obj, bool value); + EXPORT void btWheelInfoConstructionInfo_setChassisConnectionCS(btWheelInfoConstructionInfo* obj, const btVector3* value); + EXPORT void btWheelInfoConstructionInfo_setFrictionSlip(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setMaxSuspensionForce(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setMaxSuspensionTravelCm(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setSuspensionRestLength(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setSuspensionStiffness(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setWheelAxleCS(btWheelInfoConstructionInfo* obj, const btVector3* value); + EXPORT void btWheelInfoConstructionInfo_setWheelDirectionCS(btWheelInfoConstructionInfo* obj, const btVector3* value); + EXPORT void btWheelInfoConstructionInfo_setWheelRadius(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setWheelsDampingCompression(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_setWheelsDampingRelaxation(btWheelInfoConstructionInfo* obj, btScalar value); + EXPORT void btWheelInfoConstructionInfo_delete(btWheelInfoConstructionInfo* obj); + + EXPORT btWheelInfo_RaycastInfo* btWheelInfo_RaycastInfo_new(); + EXPORT void btWheelInfo_RaycastInfo_getContactNormalWS(btWheelInfo_RaycastInfo* obj, btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_getContactPointWS(btWheelInfo_RaycastInfo* obj, btVector3* value); + EXPORT void* btWheelInfo_RaycastInfo_getGroundObject(btWheelInfo_RaycastInfo* obj); + EXPORT void btWheelInfo_RaycastInfo_getHardPointWS(btWheelInfo_RaycastInfo* obj, btVector3* value); + EXPORT bool btWheelInfo_RaycastInfo_getIsInContact(btWheelInfo_RaycastInfo* obj); + EXPORT btScalar btWheelInfo_RaycastInfo_getSuspensionLength(btWheelInfo_RaycastInfo* obj); + EXPORT void btWheelInfo_RaycastInfo_getWheelAxleWS(btWheelInfo_RaycastInfo* obj, btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_getWheelDirectionWS(btWheelInfo_RaycastInfo* obj, btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_setContactNormalWS(btWheelInfo_RaycastInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_setContactPointWS(btWheelInfo_RaycastInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_setGroundObject(btWheelInfo_RaycastInfo* obj, void* value); + EXPORT void btWheelInfo_RaycastInfo_setHardPointWS(btWheelInfo_RaycastInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_setIsInContact(btWheelInfo_RaycastInfo* obj, bool value); + EXPORT void btWheelInfo_RaycastInfo_setSuspensionLength(btWheelInfo_RaycastInfo* obj, btScalar value); + EXPORT void btWheelInfo_RaycastInfo_setWheelAxleWS(btWheelInfo_RaycastInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_setWheelDirectionWS(btWheelInfo_RaycastInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_RaycastInfo_delete(btWheelInfo_RaycastInfo* obj); + + EXPORT btWheelInfo* btWheelInfo_new(btWheelInfoConstructionInfo* ci); + EXPORT bool btWheelInfo_getBIsFrontWheel(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getBrake(btWheelInfo* obj); + EXPORT void btWheelInfo_getChassisConnectionPointCS(btWheelInfo* obj, btVector3* value); + EXPORT void* btWheelInfo_getClientInfo(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getClippedInvContactDotSuspension(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getDeltaRotation(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getEngineForce(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getFrictionSlip(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getMaxSuspensionForce(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getMaxSuspensionTravelCm(btWheelInfo* obj); + EXPORT btWheelInfo_RaycastInfo* btWheelInfo_getRaycastInfo(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getRollInfluence(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getRotation(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getSkidInfo(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getSteering(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getSuspensionRelativeVelocity(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getSuspensionRestLength(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getSuspensionRestLength1(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getSuspensionStiffness(btWheelInfo* obj); + EXPORT void btWheelInfo_getWheelAxleCS(btWheelInfo* obj, btVector3* value); + EXPORT void btWheelInfo_getWheelDirectionCS(btWheelInfo* obj, btVector3* value); + EXPORT btScalar btWheelInfo_getWheelsDampingCompression(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getWheelsDampingRelaxation(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getWheelsRadius(btWheelInfo* obj); + EXPORT btScalar btWheelInfo_getWheelsSuspensionForce(btWheelInfo* obj); + EXPORT void btWheelInfo_getWorldTransform(btWheelInfo* obj, btTransform* value); + EXPORT void btWheelInfo_setBIsFrontWheel(btWheelInfo* obj, bool value); + EXPORT void btWheelInfo_setBrake(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setChassisConnectionPointCS(btWheelInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_setClientInfo(btWheelInfo* obj, void* value); + EXPORT void btWheelInfo_setClippedInvContactDotSuspension(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setDeltaRotation(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setEngineForce(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setFrictionSlip(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setMaxSuspensionForce(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setMaxSuspensionTravelCm(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setRollInfluence(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setRotation(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setSkidInfo(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setSteering(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setSuspensionRelativeVelocity(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setSuspensionRestLength1(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setSuspensionStiffness(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setWheelAxleCS(btWheelInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_setWheelDirectionCS(btWheelInfo* obj, const btVector3* value); + EXPORT void btWheelInfo_setWheelsDampingCompression(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setWheelsDampingRelaxation(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setWheelsRadius(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setWheelsSuspensionForce(btWheelInfo* obj, btScalar value); + EXPORT void btWheelInfo_setWorldTransform(btWheelInfo* obj, const btTransform* value); + EXPORT void btWheelInfo_updateWheel(btWheelInfo* obj, const btRigidBody* chassis, btWheelInfo_RaycastInfo* raycastInfo); + EXPORT void btWheelInfo_delete(btWheelInfo* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/bulletc.h b/dali-csharp-binder/dali-physics-3d/bullet/bulletc.h new file mode 100644 index 0000000..96d600b --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/bulletc.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "btActionInterface_wrap.h" +#include "btAlignedObjectArray_wrap.h" +#include "btAxisSweep3_wrap.h" +#include "btBox2dBox2dCollisionAlgorithm_wrap.h" +#include "btBox2dShape_wrap.h" +#include "btBoxBoxCollisionAlgorithm_wrap.h" +#include "btBoxBoxDetector_wrap.h" +#include "btBoxCollision_wrap.h" +#include "btBoxShape_wrap.h" +#include "btBroadphaseInterface_wrap.h" +#include "btBroadphaseProxy_wrap.h" +#include "btBulletFile_wrap.h" +//#include "btBulletMaterial_wrap.h" +#include "btBulletWorldImporter_wrap.h" +#include "btBulletXmlWorldImporter_wrap.h" +#include "btBvhTriangleMeshShape_wrap.h" +#include "btCapsuleShape_wrap.h" +#include "btCharacterControllerInterface_wrap.h" +#include "btCollisionAlgorithm_wrap.h" +#include "btCollisionConfiguration_wrap.h" +#include "btCollisionCreateFunc_wrap.h" +#include "btCollisionDispatcher_wrap.h" +#include "btCollisionObjectWrapper_wrap.h" +#include "btCollisionObject_wrap.h" +#include "btCollisionShape_wrap.h" +#include "btCollisionWorld_wrap.h" +#include "btCompoundCollisionAlgorithm_wrap.h" +#include "btCompoundCompoundCollisionAlgorithm_wrap.h" +#include "btCompoundFromGimpact_wrap.h" +#include "btCompoundShape_wrap.h" +#include "btConcaveShape_wrap.h" +#include "btConeShape_wrap.h" +#include "btConeTwistConstraint_wrap.h" +#include "btConstraintSolver_wrap.h" +#include "btContactConstraint_wrap.h" +#include "btContactSolverInfo_wrap.h" +#include "btContinuousConvexCollision_wrap.h" +#include "btConvex2dConvex2dAlgorithm_wrap.h" +#include "btConvex2dShape_wrap.h" +#include "btConvexCast_wrap.h" +#include "btConvexConcaveCollisionAlgorithm_wrap.h" +#include "btConvexConvexAlgorithm_wrap.h" +#include "btConvexHullShape_wrap.h" +#include "btConvexInternalShape_wrap.h" +#include "btConvexPenetrationDepthSolver_wrap.h" +#include "btConvexPlaneCollisionAlgorithm_wrap.h" +#include "btConvexPointCloudShape_wrap.h" +#include "btConvexPolyhedron_wrap.h" +#include "btConvexShape_wrap.h" +#include "btConvexTriangleMeshShape_wrap.h" +#include "btCylinderShape_wrap.h" +#include "btDantzigSolver_wrap.h" +#include "btDbvtBroadphase_wrap.h" +#include "btDbvt_wrap.h" +#include "btDefaultCollisionConfiguration_wrap.h" +#include "btDefaultMotionState_wrap.h" +#include "btDefaultSoftBodySolver_wrap.h" +#include "btDiscreteCollisionDetectorInterface_wrap.h" +#include "btDiscreteDynamicsWorld_wrap.h" +#include "btDispatcher_wrap.h" +#include "btDynamicsWorld_wrap.h" +#include "btEmptyCollisionAlgorithm_wrap.h" +#include "btEmptyShape_wrap.h" +#include "btFixedConstraint_wrap.h" +#include "btGImpactBvh_wrap.h" +#include "btGImpactCollisionAlgorithm_wrap.h" +#include "btGImpactQuantizedBvh_wrap.h" +#include "btGImpactShape_wrap.h" +#include "btGearConstraint_wrap.h" +#include "btGeneric6DofConstraint_wrap.h" +#include "btGeneric6DofSpring2Constraint_wrap.h" +#include "btGeneric6DofSpringConstraint_wrap.h" +#include "btGeometryUtil_wrap.h" +#include "btGhostObject_wrap.h" +#include "btGjkConvexCast_wrap.h" +#include "btGjkEpaPenetrationDepthSolver_wrap.h" +#include "btGjkPairDetector_wrap.h" +#include "btHeightfieldTerrainShape_wrap.h" +#include "btHinge2Constraint_wrap.h" +#include "btHingeConstraint_wrap.h" +#include "btIDebugDraw_wrap.h" +#include "btKinematicCharacterController_wrap.h" +//#include "btLemkeSolver_wrap.h" +#include "btMLCPSolverInterface_wrap.h" +#include "btMLCPSolver_wrap.h" +#include "btManifoldPoint_wrap.h" +#include "btManifoldResult_wrap.h" +#include "btMinkowskiPenetrationDepthSolver_wrap.h" +#include "btMinkowskiSumShape_wrap.h" +#include "btMotionState_wrap.h" +#include "btMultiBodyConstraintSolver_wrap.h" +#include "btMultiBodyConstraint_wrap.h" +#include "btMultiBodyDynamicsWorld_wrap.h" +#include "btMultiBodyFixedConstraint_wrap.h" +#include "btMultiBodyJointLimitConstraint_wrap.h" +#include "btMultiBodyJointMotor_wrap.h" +#include "btMultiBodyLinkCollider_wrap.h" +#include "btMultiBodyLink_wrap.h" +#include "btMultiBodyPoint2Point_wrap.h" +#include "btMultiBodySliderConstraint_wrap.h" +#include "btMultiBodySolverConstraint_wrap.h" +#include "btMultiBody_wrap.h" +#include "btMultiSphereShape_wrap.h" +#include "btMultimaterialTriangleMeshShape_wrap.h" +#include "btNNCGConstraintSolver_wrap.h" +#include "btOptimizedBvh_wrap.h" +#include "btOverlappingPairCache_wrap.h" +#include "btOverlappingPairCallback_wrap.h" +#include "btPersistentManifold_wrap.h" +#include "btPoint2PointConstraint_wrap.h" +#include "btPointCollector_wrap.h" +#include "btPolarDecomposition_wrap.h" +#include "btPolyhedralConvexShape_wrap.h" +#include "btQuantizedBvh_wrap.h" +#include "btRaycastVehicle_wrap.h" +#include "btRigidBody_wrap.h" +#include "btScaledBvhTriangleMeshShape_wrap.h" +#include "btSequentialImpulseConstraintSolver_wrap.h" +#include "btSerializer_wrap.h" +#include "btShapeHull_wrap.h" +#include "btSimulationIslandManager_wrap.h" +#include "btSliderConstraint_wrap.h" +#include "btSoftBodyConcaveCollisionAlgorithm_wrap.h" +#include "btSoftBodyHelpers_wrap.h" +#include "btSoftBodyRigidBodyCollisionConfiguration_wrap.h" +#include "btSoftBodySolvers_wrap.h" +#include "btSoftBody_wrap.h" +#include "btSoftRigidCollisionAlgorithm_wrap.h" +#include "btSoftRigidDynamicsWorld_wrap.h" +#include "btSoftSoftCollisionAlgorithm_wrap.h" +#include "btSparseSdf3_wrap.h" +#include "btSphereBoxCollisionAlgorithm_wrap.h" +#include "btSphereShape_wrap.h" +#include "btSphereSphereCollisionAlgorithm_wrap.h" +#include "btSphereTriangleCollisionAlgorithm_wrap.h" +#include "btStaticPlaneShape_wrap.h" +#include "btStridingMeshInterface_wrap.h" +#include "btTetrahedronShape_wrap.h" +#include "btTransformUtil_wrap.h" +#include "btTriangleBuffer_wrap.h" +#include "btTriangleCallback_wrap.h" +#include "btTriangleIndexVertexArray_wrap.h" +#include "btTriangleIndexVertexMaterialArray_wrap.h" +#include "btTriangleInfoMap_wrap.h" +#include "btTriangleMeshShape_wrap.h" +#include "btTriangleMesh_wrap.h" +#include "btTriangleShapeEx_wrap.h" +#include "btTriangleShape_wrap.h" +#include "btTypedConstraint_wrap.h" +#include "btUniformScalingShape_wrap.h" +#include "btUnionFind_wrap.h" +#include "btUniversalConstraint_wrap.h" +#include "btVehicleRaycaster_wrap.h" +#include "btVoronoiSimplexSolver_wrap.h" +#include "btWheelInfo_wrap.h" +//#include "btWorldImporter_wrap.h" +#include "collections.h" +//#include "hacdHACD_wrap.h" diff --git a/dali-csharp-binder/dali-physics-3d/bullet/collections.cpp b/dali-csharp-binder/dali-physics-3d/bullet/collections.cpp new file mode 100644 index 0000000..b6b95d6 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/collections.cpp @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include +#include + +#include "conversion.h" +#include "collections.h" + +btCompoundShapeChild* btCompoundShapeChild_array_at(btCompoundShapeChild* a, int n) +{ + return &a[n]; +} + +btSoftBody::Node* btSoftBodyNodePtrArray_at(btSoftBody::Node** obj, int n) +{ + return obj[n]; +} + +void btSoftBodyNodePtrArray_set(btSoftBodyNodePtrArray* obj, btSoftBody_Node* value, int index) +{ + obj[index] = value; +} + +void btVector3_array_at(const btVector3* obj, int n, btVector3* value) +{ + BTVECTOR3_SET(value, obj[n]); +} + +void btVector3_array_set(btVector3* obj, int n, const btVector3* value) +{ + BTVECTOR3_COPY(&obj[n], value); +} + +btAlignedObjectArray_btVector3* btAlignedObjectArray_btVector3_new() +{ + return new btAlignedObjectArray_btVector3(); +} + +void btAlignedObjectArray_btVector3_at(btAlignedObjectArray_btVector3* obj, int n, btVector3* value) +{ + BTVECTOR3_SET(value, obj->at(n)); +} + +void btAlignedObjectArray_btVector3_push_back(btAlignedObjectArray_btVector3* obj, const btVector3* value) +{ + BTVECTOR3_IN(value); + obj->push_back(BTVECTOR3_USE(value)); +} + +void btAlignedObjectArray_btVector3_push_back2(btAlignedObjectArray_btVector3* obj, const btVector4* value) +{ + BTVECTOR4_IN(value); + obj->push_back(BTVECTOR4_USE(value)); +} + +void btAlignedObjectArray_btVector3_set(btAlignedObjectArray_btVector3* obj, int n, const btVector3* value) +{ + BTVECTOR3_COPY(&obj->at(n), value); +} + +int btAlignedObjectArray_btVector3_size(btAlignedObjectArray_btVector3* obj) +{ + return obj->size(); +} + +void btAlignedObjectArray_btVector3_delete(btAlignedObjectArray_btVector3* obj) +{ + delete obj; +} diff --git a/dali-csharp-binder/dali-physics-3d/bullet/collections.h b/dali-csharp-binder/dali-physics-3d/bullet/collections.h new file mode 100644 index 0000000..e66aff2 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/collections.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#include "main.h" + +#ifdef __cplusplus +extern "C" { +#endif + EXPORT btCompoundShapeChild* btCompoundShapeChild_array_at(btCompoundShapeChild* a, int n); + EXPORT btSoftBody_Node* btSoftBodyNodePtrArray_at(btSoftBodyNodePtrArray* obj, int n); + EXPORT void btSoftBodyNodePtrArray_set(btSoftBodyNodePtrArray* obj, btSoftBody_Node* value, int index); + EXPORT void btVector3_array_at(const btVector3* a, int n, btVector3* value); + EXPORT void btVector3_array_set(btVector3* obj, int n, const btVector3* value); + EXPORT btAlignedObjectArray_btVector3* btAlignedObjectArray_btVector3_new(); + EXPORT void btAlignedObjectArray_btVector3_at(btAlignedObjectArray_btVector3* obj, int n, btVector3* value); + EXPORT void btAlignedObjectArray_btVector3_push_back(btAlignedObjectArray_btVector3* obj, const btVector3* value); + EXPORT void btAlignedObjectArray_btVector3_push_back2(btAlignedObjectArray_btVector3* obj, const btVector4* value); + EXPORT void btAlignedObjectArray_btVector3_set(btAlignedObjectArray_btVector3* obj, int n, const btVector3* value); + EXPORT int btAlignedObjectArray_btVector3_size(btAlignedObjectArray_btVector3* obj); + EXPORT void btAlignedObjectArray_btVector3_delete(btAlignedObjectArray_btVector3* obj); +#ifdef __cplusplus +} +#endif diff --git a/dali-csharp-binder/dali-physics-3d/bullet/conversion.h b/dali-csharp-binder/dali-physics-3d/bullet/conversion.h new file mode 100644 index 0000000..430cfcf --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/conversion.h @@ -0,0 +1,420 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#pragma once + +#include +#include +#include +#include +#include "LinearMath/btTransform.h" + +#include + +#define BTTRANSFORM_TRANSPOSE +#define BTTRANSFORM_TO4X4 + +inline void btVector3ToVector3(const btVector3* v, btScalar* s) +{ + s[0] = v->getX(); + s[1] = v->getY(); + s[2] = v->getZ(); +} + +inline void btVector3ToVector3(const btVector3& v, btScalar* s) +{ + s[0] = v.getX(); + s[1] = v.getY(); + s[2] = v.getZ(); +} + +inline void btVector3_copy(btVector3* destination, const btVector3* source) +{ + destination->m_floats[0] = source->m_floats[0]; + destination->m_floats[1] = source->m_floats[1]; + destination->m_floats[2] = source->m_floats[2]; +} + +inline void btVector3_copy(btVector3* destination, const btVector3& source) +{ + destination->m_floats[0] = source.m_floats[0]; + destination->m_floats[1] = source.m_floats[1]; + destination->m_floats[2] = source.m_floats[2]; +} + +inline void Vector3TobtVector3(const btScalar* s, btVector3* v) +{ + v->setX(s[0]); + v->setY(s[1]); + v->setZ(s[2]); +} + +inline btVector3* Vector3ArrayIn(const btScalar* va, int n) +{ + btVector3* vertices = new btVector3[n]; + for (int i = 0; i < n; i++) { + Vector3TobtVector3(&va[i * 3], &vertices[i]); + } + return vertices; +} + +inline void btVector4ToVector4(const btVector4* v, btScalar* s) +{ + s[0] = v->getX(); + s[1] = v->getY(); + s[2] = v->getZ(); + s[3] = v->getW(); +} + +inline void btVector4ToVector4(const btVector4& v, btScalar* s) +{ + s[0] = v.getX(); + s[1] = v.getY(); + s[2] = v.getZ(); + s[3] = v.getW(); +} + +inline void Vector4TobtVector4(const btScalar* s, btVector4* v) +{ + v->setX(s[0]); + v->setY(s[1]); + v->setZ(s[2]); + v->setW(s[3]); +} + +inline void btVector4_copy(btVector4* destination, const btVector4* source) +{ + destination->m_floats[0] = source->m_floats[0]; + destination->m_floats[1] = source->m_floats[1]; + destination->m_floats[2] = source->m_floats[2]; + destination->m_floats[3] = source->m_floats[3]; +} + +inline void btVector4_copy(btVector4* destination, const btVector4& source) +{ + destination->m_floats[0] = source.m_floats[0]; + destination->m_floats[1] = source.m_floats[1]; + destination->m_floats[2] = source.m_floats[2]; + destination->m_floats[3] = source.m_floats[3]; +} + +inline void btQuaternionToQuaternion(const btQuaternion* q, btScalar* s) +{ + s[0] = q->getX(); + s[1] = q->getY(); + s[2] = q->getZ(); + s[3] = q->getW(); +} + +inline void btQuaternionToQuaternion(const btQuaternion& q, btScalar* s) +{ + s[0] = q.getX(); + s[1] = q.getY(); + s[2] = q.getZ(); + s[3] = q.getW(); +} + +inline void QuaternionTobtQuaternion(const btScalar* s, btQuaternion* v) +{ + v->setX(s[0]); + v->setY(s[1]); + v->setZ(s[2]); + v->setW(s[3]); +} + +inline void btQuaternion_copy(btQuaternion* destination, const btQuaternion* source) +{ + (*destination)[0] = (*source)[0]; + (*destination)[1] = (*source)[1]; + (*destination)[2] = (*source)[2]; + (*destination)[3] = (*source)[3]; +} + +inline void btQuaternion_copy(btQuaternion* destination, const btQuaternion& source) +{ + (*destination)[0] = source[0]; + (*destination)[1] = source[1]; + (*destination)[2] = source[2]; + (*destination)[3] = source[3]; +} + + +inline void btTransformToMatrix(const btTransform* t, btScalar* m) +{ +#ifdef BTTRANSFORM_TO4X4 +#ifdef BTTRANSFORM_TRANSPOSE + m[0] = t->getBasis().getRow(0).getX(); + m[4] = t->getBasis().getRow(0).getY(); + m[8] = t->getBasis().getRow(0).getZ(); + m[1] = t->getBasis().getRow(1).getX(); + m[5] = t->getBasis().getRow(1).getY(); + m[9] = t->getBasis().getRow(1).getZ(); + m[2] = t->getBasis().getRow(2).getX(); + m[6] = t->getBasis().getRow(2).getY(); + m[10] = t->getBasis().getRow(2).getZ(); + m[12] = t->getOrigin().getX(); + m[13] = t->getOrigin().getY(); + m[14] = t->getOrigin().getZ(); +#else + // MSVC translates memcpy into four movups instructions. + // Movaps cannot be used, because C# does not guarantee 16-byte alignment of the argument. + memcpy(m, t, sizeof(btTransform)); +#endif + // Bullet leaves the following members uninitialized and only uses them for alignment, + // but graphics APIs that support scaling and shearing will consider these. + m[3] = 0; + m[7] = 0; + m[11] = 0; + m[15] = 1; +#else +#ifdef BTTRANSFORM_TRANSPOSE + m[0] = t->getBasis().getRow(0).getX(); + m[3] = t->getBasis().getRow(0).getY(); + m[6] = t->getBasis().getRow(0).getZ(); + m[1] = t->getBasis().getRow(1).getX(); + m[4] = t->getBasis().getRow(1).getY(); + m[7] = t->getBasis().getRow(1).getZ(); + m[2] = t->getBasis().getRow(2).getX(); + m[5] = t->getBasis().getRow(2).getY(); + m[8] = t->getBasis().getRow(2).getZ(); +#else + m[0] = t->getBasis().getRow(0).getX(); + m[1] = t->getBasis().getRow(0).getY(); + m[2] = t->getBasis().getRow(0).getZ(); + m[3] = t->getBasis().getRow(1).getX(); + m[4] = t->getBasis().getRow(1).getY(); + m[5] = t->getBasis().getRow(1).getZ(); + m[6] = t->getBasis().getRow(2).getX(); + m[7] = t->getBasis().getRow(2).getY(); + m[8] = t->getBasis().getRow(2).getZ(); +#endif + m[9] = t->getOrigin().getX(); + m[10] = t->getOrigin().getY(); + m[11] = t->getOrigin().getZ(); +#endif +} + +inline void btTransformToMatrix(const btTransform& t, btScalar* m) +{ + btTransformToMatrix(&t, m); +} + +inline void MatrixTobtTransform(const btScalar* m, btTransform* t) +{ +#ifdef BTTRANSFORM_TO4X4 +#ifdef BTTRANSFORM_TRANSPOSE + t->getBasis().setValue(m[0],m[4],m[8],m[1],m[5],m[9],m[2],m[6],m[10]); + t->getOrigin().setX(m[12]); + t->getOrigin().setY(m[13]); + t->getOrigin().setZ(m[14]); +#else + memcpy(t, m, sizeof(btTransform)); +#endif +#else +#ifdef BTTRANSFORM_TRANSPOSE + t->getBasis().setValue(m[0],m[3],m[6],m[1],m[4],m[7],m[2],m[5],m[8]); +#else + t->getBasis().setValue(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8]); +#endif + t->getOrigin().setX(m[9]); + t->getOrigin().setY(m[10]); + t->getOrigin().setZ(m[11]); +#endif + t->getOrigin().setW(1); +} + +inline void btTransform_copy(btTransform* destination, const btTransform* source) +{ + MatrixTobtTransform(reinterpret_cast(source), destination); +} + + +inline void btMatrix3x3ToMatrix(const btMatrix3x3* t, btScalar* m) +{ +#ifdef BTTRANSFORM_TO4X4 +#ifdef BTTRANSFORM_TRANSPOSE + m[0] = t->getRow(0).getX(); + m[4] = t->getRow(0).getY(); + m[8] = t->getRow(0).getZ(); + m[1] = t->getRow(1).getX(); + m[5] = t->getRow(1).getY(); + m[9] = t->getRow(1).getZ(); + m[2] = t->getRow(2).getX(); + m[6] = t->getRow(2).getY(); + m[10] = t->getRow(2).getZ(); +#else + m[0] = t->getRow(0).getX(); + m[1] = t->getRow(0).getY(); + m[2] = t->getRow(0).getZ(); + m[4] = t->getRow(1).getX(); + m[5] = t->getRow(1).getY(); + m[6] = t->getRow(1).getZ(); + m[8] = t->getRow(2).getX(); + m[9] = t->getRow(2).getY(); + m[10] = t->getRow(2).getZ(); +#endif + m[12] = 0; + m[13] = 0; + m[14] = 0; + m[15] = 1; +#else +#ifdef BTTRANSFORM_TRANSPOSE + m[0] = t->getRow(0).getX(); + m[3] = t->getRow(0).getY(); + m[6] = t->getRow(0).getZ(); + m[1] = t->getRow(1).getX(); + m[4] = t->getRow(1).getY(); + m[7] = t->getRow(1).getZ(); + m[2] = t->getRow(2).getX(); + m[5] = t->getRow(2).getY(); + m[8] = t->getRow(2).getZ(); +#else + m[0] = t->getRow(0).getX(); + m[1] = t->getRow(0).getY(); + m[2] = t->getRow(0).getZ(); + m[3] = t->getRow(1).getX(); + m[4] = t->getRow(1).getY(); + m[5] = t->getRow(1).getZ(); + m[6] = t->getRow(2).getX(); + m[7] = t->getRow(2).getY(); + m[8] = t->getRow(2).getZ(); +#endif + m[9] = 0; + m[10] = 0; + m[11] = 0; +#endif +} + +inline void btMatrix3x3ToMatrix(const btMatrix3x3& t, btScalar* m) +{ + btMatrix3x3ToMatrix(&t, m); +} + +inline void MatrixTobtMatrix3x3(const btScalar* m, btMatrix3x3* t) +{ +#ifdef BTTRANSFORM_TO4X4 +#ifdef BTTRANSFORM_TRANSPOSE + t->setValue(m[0],m[4],m[8],m[1],m[5],m[9],m[2],m[6],m[10]); +#else + t->setValue(m[0],m[1],m[2],m[4],m[5],m[6],m[8],m[9],m[10]); +#endif +#else +#ifdef BTTRANSFORM_TRANSPOSE + t->.setValue(m[0],m[3],m[6],m[1],m[4],m[7],m[2],m[5],m[8]); +#else + t->setValue(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8]); +#endif +#endif +} + + +// SSE requires math structs to be aligned to 16-byte boundaries. +// Alignment cannot be guaranteed in .NET, so aligned temporary intermediate variables +// must be used to exchange vectors and transforms with Bullet (if SSE is enabled). +#define TEMP(var) var ## Temp +#if defined(BT_USE_SSE) //&& defined(BT_USE_SSE_IN_API) && defined(BT_USE_SIMD_VECTOR3) +#define BTVECTOR3_DEF(v) ATTRIBUTE_ALIGNED16(btVector3) TEMP(v) +#define BTVECTOR3_USE(v) TEMP(v) +#define BTVECTOR3_SET(to, from) btVector3_copy(to, &from) +#define BTVECTOR3_COPY(to, from) btVector3_copy(to, from) +#define BTVECTOR3_IN(v) BTVECTOR3_DEF(v); BTVECTOR3_COPY(&BTVECTOR3_USE(v), v) +#define BTVECTOR3_DEF_OUT(v) BTVECTOR3_SET(v, BTVECTOR3_USE(v)) + +#define BTVECTOR4_DEF(v) ATTRIBUTE_ALIGNED16(btVector4) TEMP(v) +#define BTVECTOR4_USE(v) TEMP(v) +#define BTVECTOR4_SET(to, from) btVector4_copy(to, &from) +#define BTVECTOR4_COPY(to, from) btVector4_copy(to, from) +#define BTVECTOR4_IN(v) BTVECTOR4_DEF(v); BTVECTOR4_COPY(&BTVECTOR3_USE(v), v) +#define BTVECTOR4_DEF_OUT(v) BTVECTOR4_SET(v, BTVECTOR4_USE(v)) + +#define BTQUATERNION_DEF(v) ATTRIBUTE_ALIGNED16(btQuaternion) TEMP(v) +#define BTQUATERNION_USE(v) TEMP(v) +#define BTQUATERNION_SET(to, from) btQuaternion_copy(to, &from) +#define BTQUATERNION_COPY(to, from) btQuaternion_copy(to, from) +#define BTQUATERNION_IN(v) BTQUATERNION_DEF(v); BTQUATERNION_COPY(&BTQUATERNION_USE(v), v) +#define BTQUATERNION_DEF_OUT(v) BTQUATERNION_SET(v, BTQUATERNION_USE(v)) + +#define BTTRANSFORM_DEF(v) ATTRIBUTE_ALIGNED16(btTransform) TEMP(v) +#define BTTRANSFORM_USE(v) TEMP(v) +#define BTTRANSFORM_SET(to, from) btTransform_copy(to, &from) +#define BTTRANSFORM_COPY(to, from) btTransform_copy(to, from) +#define BTTRANSFORM_IN(v) BTTRANSFORM_DEF(v); BTTRANSFORM_COPY(&BTTRANSFORM_USE(v), v) +#define BTTRANSFORM_DEF_OUT(v) BTTRANSFORM_SET(v, BTTRANSFORM_USE(v)) +#define BTTRANSFORM_IN_REF(v) BTTRANSFORM_DEF(v); BTTRANSFORM_SET(&BTTRANSFORM_USE(v), v) +#define BTTRANSFORM_USE_REF(v) TEMP(v) +#define BTTRANSFORM_DEF_OUT_REF(v) BTTRANSFORM_SET(&v, BTTRANSFORM_USE_REF(v)) + +#define BTMATRIX3X3_DEF(tr) ATTRIBUTE_ALIGNED16(btMatrix3x3) TEMP(tr) +#else +// Cant use a pinned pointer to a Vector3 in case sizeof(Vector3) != sizeof(btVector3) +#if VECTOR3_16B +#define BTVECTOR3_DEF(v) +#define BTVECTOR3_USE(v) *v +#define BTVECTOR3_SET(to, from) *to = from +#define BTVECTOR3_COPY(to, from) BTVECTOR3_SET(to, *from) +#define BTVECTOR3_IN(v) +#define BTVECTOR3_DEF_OUT(v) +#else +#define BTVECTOR3_DEF(v) btVector3 TEMP(v) +#define BTVECTOR3_USE(v) TEMP(v) +#define BTVECTOR3_SET(to, from) btVector3_copy(to, &from) +#define BTVECTOR3_COPY(to, from) btVector3_copy(to, from) +#define BTVECTOR3_IN(v) BTVECTOR3_DEF(v); BTVECTOR3_COPY(&BTVECTOR3_USE(v), v) +#define BTVECTOR3_DEF_OUT(v) BTVECTOR3_SET(v, BTVECTOR3_USE(v)) +#endif + +#define BTVECTOR4_DEF(v) +#define BTVECTOR4_USE(v) *v +#define BTVECTOR4_SET(to, from) *to = from +#define BTVECTOR4_COPY(to, from) BTVECTOR4_SET(to, *from) +#define BTVECTOR4_IN(v) +#define BTVECTOR4_DEF_OUT(v) + +#define BTQUATERNION_DEF(v) +#define BTQUATERNION_USE(v) *v +#define BTQUATERNION_SET(to, from) *to = from +#define BTQUATERNION_COPY(to, from) BTQUATERNION_SET(to, *from) +#define BTQUATERNION_IN(v) +#define BTQUATERNION_DEF_OUT(v) + +#ifdef BTTRANSFORM_TRANSPOSE +#define BTTRANSFORM_DEF(v) btTransform TEMP(v) +#define BTTRANSFORM_USE(v) TEMP(v) +#define BTTRANSFORM_SET(to, from) btTransform_copy(to, &from) +#define BTTRANSFORM_COPY(to, from) btTransform_copy(to, from) +#define BTTRANSFORM_IN(v) BTTRANSFORM_DEF(v); BTTRANSFORM_COPY(&BTTRANSFORM_USE(v), v) +#define BTTRANSFORM_DEF_OUT(v) BTTRANSFORM_SET(v, BTTRANSFORM_USE(v)) +#define BTTRANSFORM_IN_REF(v) BTTRANSFORM_DEF(v); BTTRANSFORM_SET(&BTTRANSFORM_USE(v), v) +#define BTTRANSFORM_USE_REF(v) TEMP(v) +#define BTTRANSFORM_DEF_OUT_REF(v) BTTRANSFORM_SET(&v, BTTRANSFORM_USE_REF(v)) +#else +#define BTTRANSFORM_DEF(v) +#define BTTRANSFORM_USE(v) *v +#define BTTRANSFORM_SET(to, from) *to = from +#define BTTRANSFORM_COPY(to, from) BTTRANSFORM_SET(to, *from) +#define BTTRANSFORM_IN(v) +#define BTTRANSFORM_DEF_OUT(v) +#define BTTRANSFORM_IN_REF(v) +#define BTTRANSFORM_USE_REF(v) v +#define BTTRANSFORM_DEF_OUT_REF(v) +#endif + +#define BTMATRIX3X3_DEF(tr) btMatrix3x3 TEMP(tr) +#endif + +#define BTMATRIX3X3_USE(tr) TEMP(tr) +#define BTMATRIX3X3_SET(to, from) MatrixTobtMatrix3x3(from, to) +#define BTMATRIX3X3_IN(v) BTMATRIX3X3_DEF(v); MatrixTobtMatrix3x3((btScalar*)v, &BTMATRIX3X3_USE(v)) +#define BTMATRIX3X3_OUT(to, from) btMatrix3x3ToMatrix(from, (btScalar*)to) +#define BTMATRIX3X3_DEF_OUT(tr) BTMATRIX3X3_OUT(tr, &TEMP(tr)) diff --git a/dali-csharp-binder/dali-physics-3d/bullet/main.h b/dali-csharp-binder/dali-physics-3d/bullet/main.h new file mode 100644 index 0000000..af0bf10 --- /dev/null +++ b/dali-csharp-binder/dali-physics-3d/bullet/main.h @@ -0,0 +1,1196 @@ +/* + * Copyright (c) 2013-2017 Andres Traks + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it freely, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + */ + +#pragma once + +#include // size_t + +//#define BULLETC_DISABLE_HACD +#define BULLETC_DISABLE_IACTION_CLASSES // omits classes inheriting from btActionInterface +#define BULLETC_DISABLE_GEOMETRY_UTIL +#define BULLETC_DISABLE_SOFTBODY_HELPERS +#define BULLETC_DISABLE_WORLD_IMPORTERS + +#ifdef _MSC_VER +#define EXPORT __declspec(dllexport) +#else +#if __GNUC__ >= 4 + #define EXPORT __attribute__ ((visibility("default"))) +#else + #define EXPORT +#endif +#endif + +#ifndef BT_SCALAR_H +#ifdef BT_USE_DOUBLE_PRECISION +#define btScalar double +#else +#define btScalar float +#endif +#endif + +#define ALIGNED_NEW_FORCE(targetClass) new (btAlignedAlloc(sizeof(targetClass), 16)) targetClass +#define ALIGNED_FREE_FORCE(target) btAlignedFree(target) + +//#if defined(BT_USE_SIMD_VECTOR3) && defined(BT_USE_SSE_IN_API) && defined(BT_USE_SSE) +#if defined(BT_USE_SIMD_VECTOR3) && defined(BT_USE_SSE) +#define ALIGNED_NEW(targetClass) ALIGNED_NEW_FORCE(targetClass) +#define ALIGNED_FREE(target) ALIGNED_FREE_FORCE(target) +#else +#define ALIGNED_NEW(targetClass) new targetClass +#define ALIGNED_FREE(target) delete target +#endif + +#ifndef _BT_ACTION_INTERFACE_H +#define btActionInterface void +#endif + +#ifndef BT_AXIS_SWEEP_3_H +#define bt32BitAxisSweep3 void +#define btAxisSweep3 void +#define btAxisSweep3Internal_unsigned_int_Handle void +#define btAxisSweep3Internal_unsigned_short_Handle void +#else +#define btAxisSweep3Internal_unsigned_int_Handle btAxisSweep3Internal::Handle +#define btAxisSweep3Internal_unsigned_short_Handle btAxisSweep3Internal::Handle +#endif + +#ifndef BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H +#define btBox2dBox2dCollisionAlgorithm void +#define btBox2dBox2dCollisionAlgorithm_CreateFunc void +#else +#define btBox2dBox2dCollisionAlgorithm_CreateFunc btBox2dBox2dCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_BOX_BOX__COLLISION_ALGORITHM_H +#define btBoxBoxCollisionAlgorithm void +#define btBoxBoxCollisionAlgorithm_CreateFunc void +#else +#define btBoxBoxCollisionAlgorithm_CreateFunc btBoxBoxCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_BOX_BOX_DETECTOR_H +#define btBoxBoxDetector void +#endif + +#ifndef BT_BOX_COLLISION_H_INCLUDED +#define BT_BOX_BOX_TRANSFORM_CACHE void +#define btAABB void +#define eBT_PLANE_INTERSECTION_TYPE int +#endif + +#ifndef BT_BROADPHASE_INTERFACE_H +#define btBroadphaseAabbCallback void +#define btBroadphaseInterface void +#define btBroadphaseRayCallback void +#endif + +#ifndef BT_BROADPHASE_PROXY_H +#define btAlignedObjectArray_btBroadphasePair void +#define btBroadphasePair void +#define btBroadphasePairSortPredicate void +#define btBroadphaseProxy void +#else +#define btAlignedObjectArray_btBroadphasePair btAlignedObjectArray +#endif + +#ifndef BT_BULLET_FILE_H +#define btAlignedObjectArray_charPtr void +#define btAlignedObjectArray_bParse_bStructHandlePtr void +#define bParse_btBulletFile void +#else +#define btAlignedObjectArray_charPtr btAlignedObjectArray +#define btAlignedObjectArray_bParse_bStructHandlePtr btAlignedObjectArray +#define bParse_btBulletFile bParse::btBulletFile +#endif + +#ifndef BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H +#define btMultimaterialTriangleMeshShape void +#endif + +#ifndef BT_BVH_TRIANGLE_MESH_SHAPE_H +#define btBvhTriangleMeshShape void +#endif + +#ifndef BT_CAPSULE_SHAPE_H +#define btCapsuleShape void +#define btCapsuleShapeX void +#define btCapsuleShapeZ void +#define btCapsuleShapeData void +#endif + +#ifndef BT_CHARACTER_CONTROLLER_INTERFACE_H +#define btCharacterControllerInterface void +#endif + +#ifndef BT_COLLISION_ALGORITHM_H +#define btCollisionAlgorithm void +#define btCollisionAlgorithmConstructionInfo void +#endif + +#ifndef BT_COLLISION_CONFIGURATION +#define btCollisionConfiguration void +#endif + +#ifndef BT_COLLISION_CREATE_FUNC +#define btCollisionAlgorithmCreateFunc void +#endif + +#ifndef BT_COLLISION__DISPATCHER_H +#define btCollisionDispatcher void +#define btNearCallback void* +#endif + +#ifndef BT_COLLISION_DISPATCHER_MT_H +#define btCollisionDispatcherMt void +#endif + +#ifndef BT_COLLISION_OBJECT_H +#define btAlignedObjectArray_btCollisionObjectPtr void +#define btAlignedObjectArray_const_btCollisionObjectPtr void +#define btCollisionObject void +#define btCollisionObjectArray void +#else +#define btAlignedObjectArray_btCollisionObjectPtr btAlignedObjectArray +#define btAlignedObjectArray_const_btCollisionObjectPtr btAlignedObjectArray +#endif + +#ifndef BT_COLLISION_OBJECT_WRAPPER_H +#define btCollisionObjectWrapper void +#endif + +#ifndef BT_COLLISION_SHAPE_H +#define btCollisionShape void +#endif + +#ifndef BT_COLLISION_WORLD_H +#define btCollisionWorld void +#define btCollisionWorld_AllHitsRayResultCallback void +#define btCollisionWorld_ClosestConvexResultCallback void +#define btCollisionWorld_ClosestRayResultCallback void +#define btCollisionWorld_ContactResultCallback void +#define btCollisionWorld_ConvexResultCallback void +#define btCollisionWorld_LocalConvexResult void +#define btCollisionWorld_LocalRayResult void +#define btCollisionWorld_LocalShapeInfo void +#define btCollisionWorld_RayResultCallback void +#else +#define btCollisionWorld_AllHitsRayResultCallback btCollisionWorld::AllHitsRayResultCallback +#define btCollisionWorld_ClosestConvexResultCallback btCollisionWorld::ClosestConvexResultCallback +#define btCollisionWorld_ClosestRayResultCallback btCollisionWorld::ClosestRayResultCallback +#define btCollisionWorld_ContactResultCallback btCollisionWorld::ContactResultCallback +#define btCollisionWorld_ConvexResultCallback btCollisionWorld::ConvexResultCallback +#define btCollisionWorld_LocalConvexResult btCollisionWorld::LocalConvexResult +#define btCollisionWorld_LocalRayResult btCollisionWorld::LocalRayResult +#define btCollisionWorld_LocalShapeInfo btCollisionWorld::LocalShapeInfo +#define btCollisionWorld_RayResultCallback btCollisionWorld::RayResultCallback +#endif + +#ifndef BT_COMPOUND_COLLISION_ALGORITHM_H +#define btCompoundCollisionAlgorithm void +#define btCompoundCollisionAlgorithm_CreateFunc void +#define btCompoundCollisionAlgorithm_SwappedCreateFunc void +#else +#define btCompoundCollisionAlgorithm_CreateFunc btCompoundCollisionAlgorithm::CreateFunc +#define btCompoundCollisionAlgorithm_SwappedCreateFunc btCompoundCollisionAlgorithm::SwappedCreateFunc +#endif + +#ifndef BT_COMPOUND_COMPOUND_COLLISION_ALGORITHM_H +#define btCompoundCompoundCollisionAlgorithm void +#define btCompoundCompoundCollisionAlgorithm_CreateFunc void +#define btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc void +#else +#define btCompoundCompoundCollisionAlgorithm_CreateFunc btCompoundCompoundCollisionAlgorithm::CreateFunc +#define btCompoundCompoundCollisionAlgorithm_SwappedCreateFunc btCompoundCompoundCollisionAlgorithm::SwappedCreateFunc +#endif + +#ifndef BT_COMPOUND_SHAPE_H +#define btCompoundShape void +#define btCompoundShapeChild void +#endif + +#ifndef BT_CONCAVE_SHAPE_H +#define btConcaveShape void +#define PHY_ScalarType int +#endif + +#ifndef BT_CONE_MINKOWSKI_H +#define btConeShape void +#define btConeShapeX void +#define btConeShapeZ void +#endif + +#ifndef BT_CONETWISTCONSTRAINT_H +#define btConeTwistConstraint void +#endif + +#ifndef BT_CONSTRAINT_SOLVER_H +#define btConstraintSolver void +#define btConstraintSolverType int +#endif + +#ifndef BT_CONTACT_CONSTRAINT_H +#define btContactConstraint void +#endif + +#ifndef BT_CONTACT_SOLVER_INFO +#define btContactSolverInfo void +#define btContactSolverInfoData void +#endif + +#ifndef BT_CONTINUOUS_COLLISION_CONVEX_CAST_H +#define btContinuousConvexCollision void +#endif + +#ifndef BT_CONVEX_2D_SHAPE_H +#define btConvex2dShape void +#endif + +#ifndef BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H +#define btConvex2dConvex2dAlgorithm void +#define btConvex2dConvex2dAlgorithm_CreateFunc void +#else +#define btConvex2dConvex2dAlgorithm_CreateFunc btConvex2dConvex2dAlgorithm::CreateFunc +#endif + +#ifndef BT_CONVEX_CAST_H +#define btConvexCast void +#define btConvexCast_CastResult void +#else +#define btConvexCast_CastResult btConvexCast::CastResult +#endif + +#ifndef BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H +#define btConvexConcaveCollisionAlgorithm void +#define btConvexConcaveCollisionAlgorithm_CreateFunc void +#define btConvexConcaveCollisionAlgorithm_SwappedCreateFunc void +#define btConvexTriangleCallback void +#else +#define btConvexConcaveCollisionAlgorithm_CreateFunc btConvexConcaveCollisionAlgorithm::CreateFunc +#define btConvexConcaveCollisionAlgorithm_SwappedCreateFunc btConvexConcaveCollisionAlgorithm::SwappedCreateFunc +#endif + +#ifndef BT_CONVEX_CONVEX_ALGORITHM_H +#define btConvexConvexAlgorithm void +#define btConvexConvexAlgorithm_CreateFunc void +#else +#define btConvexConvexAlgorithm_CreateFunc btConvexConvexAlgorithm::CreateFunc +#endif + +#ifndef BT_CONVEX_HULL_SHAPE_H +#define btConvexHullShape void +#endif + +#ifndef BT_CONVEX_INTERNAL_SHAPE_H +#define btConvexInternalShape void +#define btConvexInternalAabbCachingShape void +#endif + +#ifndef BT_CONVEX_PENETRATION_DEPTH_H +#define btConvexPenetrationDepthSolver void +#endif + +#ifndef BT_CONVEX_PLANE_COLLISION_ALGORITHM_H +#define btConvexPlaneCollisionAlgorithm void +#define btConvexPlaneCollisionAlgorithm_CreateFunc void +#else +#define btConvexPlaneCollisionAlgorithm_CreateFunc btConvexPlaneCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_CONVEX_POINT_CLOUD_SHAPE_H +#define btConvexPointCloudShape void +#endif + +#ifndef BT_CONVEX_SHAPE_INTERFACE1 +#define btConvexShape void +#endif + +#ifndef BT_CONVEX_TRIANGLEMESH_SHAPE_H +#define btConvexTriangleMeshShape void +#endif + +#ifndef BT_CYLINDER_MINKOWSKI_H +#define btCylinderShape void +#define btCylinderShapeX void +#define btCylinderShapeZ void +#endif + +#ifndef BT_DANTZIG_SOLVER_H +#define btDantzigSolver void +#endif + +#ifndef BT_DEFAULT_COLLISION_CONFIGURATION +#define btDefaultCollisionConfiguration void +#define btDefaultCollisionConstructionInfo void +#endif + +#ifndef BT_DBVT_BROADPHASE_H +#define btDbvtBroadphase void +#define btDbvtProxy void +#endif + +#ifndef BT_DEFAULT_MOTION_STATE_H +#define btDefaultMotionState void +#endif + +#ifndef BT_DEFORMABLE_BODY_SOLVERS_H +#define btDeformableBodySolver void +#endif + +#ifndef BT_DEFORMABLE_GRAVITY_FORCE_H +#define btDeformableGravityForce void +#endif + +#ifndef BT_DEFORMABLE_LAGRANGIAN_FORCE_H +#define btDeformableLagrangianForce void +#endif + +#ifndef BT_DEFORMABLE_MULTIBODY_CONSTRAINT_SOLVER_H +#define btDeformableMultiBodyConstraintSolver void +#endif + +#ifndef BT_DEFORMABLE_MULTIBODY_DYNAMICS_WORLD_H +#define btDeformableMultiBodyDynamicsWorld void +#endif + +#ifndef BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H +#define btDiscreteCollisionDetectorInterface void +#define btDiscreteCollisionDetectorInterface_ClosestPointInput void +#define btDiscreteCollisionDetectorInterface_Result void +#define btStorageResult void +#else +#define btDiscreteCollisionDetectorInterface_ClosestPointInput btDiscreteCollisionDetectorInterface::ClosestPointInput +#define btDiscreteCollisionDetectorInterface_Result btDiscreteCollisionDetectorInterface::Result +#endif + +#ifndef BT_DISCRETE_DYNAMICS_WORLD_H +#define btDiscreteDynamicsWorld void +#endif + +#ifndef BT_DISCRETE_DYNAMICS_WORLD_MT_H +#define btConstraintSolverPoolMt void +#define btDiscreteDynamicsWorldMt void +#endif + +#ifndef BT_DISPATCHER_H +#define btDispatcher void +#define btDispatcherInfo void +#define ebtDispatcherQueryType int +#endif + +#ifndef BT_DYNAMIC_BOUNDING_VOLUME_TREE_H +#define btDbvt void +#define btDbvtAabbMm void +#define btDbvtNode void +#define btDbvtVolume void +#define btDbvt_IClone void +#define btDbvt_ICollide void +#define btDbvt_IWriter void +#define btDbvt_sStkCLN void +#define btDbvt_sStkNN void +#define btDbvt_sStkNP void +#define btDbvt_sStkNPS void +#define btAlignedObjectArray_const_btDbvtNodePtr void +#define btAlignedObjectArray_btDbvt_sStkNN void +#define btAlignedObjectArray_btDbvt_sStkNPS void +#else +#define btDbvt_IClone btDbvt::IClone +#define btDbvt_ICollide btDbvt::ICollide +#define btDbvt_IWriter btDbvt::IWriter +#define btDbvt_sStkCLN btDbvt::sStkCLN +#define btDbvt_sStkNN btDbvt::sStkNN +#define btDbvt_sStkNP btDbvt::sStkNP +#define btDbvt_sStkNPS btDbvt::sStkNPS +#define btAlignedObjectArray_const_btDbvtNodePtr btAlignedObjectArray +#define btAlignedObjectArray_btDbvt_sStkNN btAlignedObjectArray +#define btAlignedObjectArray_btDbvt_sStkNPS btAlignedObjectArray +#endif + +#ifndef BT_DYNAMICS_WORLD_H +#define btDynamicsWorld void +#define btDynamicsWorldType int +#define btInternalTickCallback void* +#endif + +#ifndef BT_EMPTY_ALGORITH +#define btEmptyAlgorithm void +#define btEmptyAlgorithm_CreateFunc void +#else +#define btEmptyAlgorithm_CreateFunc btEmptyAlgorithm::CreateFunc +#endif + +#ifndef BT_EMPTY_SHAPE_H +#define btEmptyShape void +#endif + +#ifndef BT_FEATHERSTONE_LINK_COLLIDER_H +#define btMultiBodyLinkCollider void +#endif + +#ifndef BT_FIXED_CONSTRAINT_H +#define btFixedConstraint void +#endif + +#ifndef BT_GEAR_CONSTRAINT_H +#define btGearConstraint void +#endif + +#ifndef BT_GENERIC_6DOF_CONSTRAINT_H +#define btGeneric6DofConstraint void +#define btRotationalLimitMotor void +#define btTranslationalLimitMotor void +#endif + +#ifndef BT_GENERIC_6DOF_CONSTRAINT2_H +#define btGeneric6DofSpring2Constraint void +#define btRotationalLimitMotor2 void +#define btTranslationalLimitMotor2 void +#define RotateOrder int +#endif + +#ifndef BT_GENERIC_6DOF_SPRING_CONSTRAINT_H +#define btGeneric6DofSpringConstraint void +#endif + +#ifndef BT_GHOST_OBJECT_H +#define btGhostObject void +#define btGhostPairCallback void +#define btPairCachingGhostObject void +#endif + +#ifndef BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H +#define btGImpactCollisionAlgorithm void +#define btGImpactCollisionAlgorithm_CreateFunc void +#else +#define btGImpactCollisionAlgorithm_CreateFunc btGImpactCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_GJK_CONVEX_CAST_H +#define btGjkConvexCast void +#endif + +#ifndef BT_GJP_EPA_PENETRATION_DEPTH_H +#define btGjkEpaPenetrationDepthSolver void +#endif + +#ifndef BT_GJK_PAIR_DETECTOR_H +#define btGjkPairDetector void +#endif + +#ifndef BT_HEIGHTFIELD_TERRAIN_SHAPE_H +#define btHeightfieldTerrainShape void +#endif + +#ifndef BT_HINGE2_CONSTRAINT_H +#define btHinge2Constraint void +#endif + +#ifndef BT_HINGECONSTRAINT_H +#define btHingeConstraint void +#define btHingeAccumulatedAngleConstraint void +#endif + +#ifndef BT_IDEBUG_DRAW__H +#define btIDebugDraw void +#endif + +#ifndef BT_KINEMATIC_CHARACTER_CONTROLLER_H +#define btKinematicCharacterController void +#endif + +#ifndef BT_MANIFOLD_CONTACT_POINT_H +#define btConstraintRow void +#define btManifoldPoint void +#endif + +#ifndef BT_MANIFOLD_RESULT_H +#define btManifoldResult void +#define ContactAddedCallback void* +#endif + +#ifndef BT_MATERIAL_H +#define btMaterial void +#endif + +#ifndef BT_MATRIX3x3_H +#define btMatrix3x3 void +#define btAlignedObjectArray_btMatrix3x3 void +#else +#define btAlignedObjectArray_btMatrix3x3 btAlignedObjectArray +#endif + +#ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H +#define btMinkowskiPenetrationDepthSolver void +#endif + +#ifndef BT_MLCP_SOLVER_H +#define btMLCPSolver void +#endif + +#ifndef BT_MLCP_SOLVER_INTERFACE_H +#define btMLCPSolverInterface void +#endif + +#ifndef BT_MINKOWSKI_SUM_SHAPE_H +#define btMinkowskiSumShape void +#endif + +#ifndef BT_MOTIONSTATE_H +#define btMotionState void +#endif + +#ifndef BT_MULTI_SPHERE_MINKOWSKI_H +#define btMultiSphereShape void +#endif + +#ifndef BT_MULTIBODY_H +#define btMultiBody void +#endif + +#ifndef BT_MULTIBODY_CONSTRAINT_H +#define btMultiBodyConstraint void +#define btMultiBodyJacobianData void +#endif + +#ifndef BT_MULTIBODY_CONSTRAINT_SOLVER_H +#define btMultiBodyConstraintSolver void +#endif + +#ifndef BT_MULTIBODY_DYNAMICS_WORLD_H +#define btMultiBodyDynamicsWorld void +#endif + +#ifndef BT_MULTIBODY_FIXED_CONSTRAINT_H +#define btMultiBodyFixedConstraint void +#endif + +#ifndef BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H +#define btMultiBodyJointLimitConstraint void +#endif + +#ifndef BT_MULTIBODY_JOINT_MOTOR_H +#define btMultiBodyJointMotor void +#endif + +#ifndef BT_MULTIBODY_LINK_H +#define btMultiBodyJointFeedback void +#define btMultibodyLink void +#define btSpatialMotionVector void +#define btMultibodyLink_eFeatherstoneJointType int +#else +#define btMultibodyLink_eFeatherstoneJointType btMultibodyLink::eFeatherstoneJointType +#endif + +#ifndef BT_MULTIBODY_POINT2POINT_H +#define btMultiBodyPoint2Point void +#endif + +#ifndef BT_MULTIBODY_SLIDER_CONSTRAINT_H +#define btMultiBodySliderConstraint void +#endif + +#ifndef BT_MULTIBODY_SOLVER_CONSTRAINT_H +#define btAlignedObjectArray_btMultiBodySolverConstraint void +#define btMultiBodySolverConstraint void +#else +#define btAlignedObjectArray_btMultiBodySolverConstraint btAlignedObjectArray +#endif + +#ifndef BT_MULTIMATERIAL_TRIANGLE_INDEX_VERTEX_ARRAY_H +#define btMaterialProperties void +#define btTriangleIndexVertexMaterialArray void +#endif + +#ifndef BT_NNCG_CONSTRAINT_SOLVER_H +#define btNNCGConstraintSolver void +#endif + +#ifndef BT_OBB_BOX_2D_SHAPE_H +#define btBox2dShape void +#endif + +#ifndef BT_OBB_BOX_MINKOWSKI_H +#define btBoxShape void +#endif + +#ifndef BT_OBB_TRIANGLE_MINKOWSKI_H +#define btTriangleShape void +#endif + +#ifndef BT_OBJECT_ARRAY__ +#define btAlignedObjectArray_bool void +#define btAlignedObjectArray_int void +#define btAlignedObjectArray_btScalar void +#else +#define btAlignedObjectArray_bool btAlignedObjectArray +#define btAlignedObjectArray_int btAlignedObjectArray +#define btAlignedObjectArray_btScalar btAlignedObjectArray +#endif + +#ifndef BT_OPTIMIZED_BVH_H +#define btOptimizedBvh void +#endif + +#ifndef BT_OVERLAPPING_PAIR_CACHE_H +#define btHashedOverlappingPairCache void +#define btNullPairCache void +#define btOverlapCallback void +#define btOverlapFilterCallback void +#define btOverlappingPairCache void +#define btSortedOverlappingPairCache void +#endif + +#ifndef OVERLAPPING_PAIR_CALLBACK_H +#define btOverlappingPairCallback void +#endif + +#ifndef __BT_PARALLEL_CONSTRAINT_SOLVER_H +#define btParallelConstraintSolver void +#endif + +#ifndef BT_PERSISTENT_MANIFOLD_H +#define btAlignedObjectArray_btPersistentManifoldPtr void +#define btPersistentManifold void +#define ContactDestroyedCallback void* +#define ContactProcessedCallback void* +#else +#define btAlignedObjectArray_btPersistentManifoldPtr btAlignedObjectArray +#endif + +#ifndef BT_POINT_COLLECTOR_H +#define btPointCollector void +#endif + +#ifndef BT_POINT2POINTCONSTRAINT_H +#define btConstraintSetting void +#define btPoint2PointConstraint void +#endif + +#ifndef _BT_POOL_ALLOCATOR_H +#define btPoolAllocator void +#endif + +#ifndef BT_POLYHEDRAL_CONVEX_SHAPE_H +#define btPolyhedralConvexAabbCachingShape void +#define btPolyhedralConvexShape void +#endif + +#ifndef _BT_POLYHEDRAL_FEATURES_H +#define btConvexPolyhedron void +#define btFace void +#define btAlignedObjectArray_btFace void +#else +#define btAlignedObjectArray_btFace btAlignedObjectArray +#endif + +#ifndef BT_QUANTIZED_BVH_H +#define btNodeOverlapCallback void +#define btOptimizedBvhNode void +#define btQuantizedBvh void +#define btQuantizedBvh_btTraversalMode int +#define btQuantizedBvhDoubleData void +#define btQuantizedBvhFloatData void +#define btQuantizedBvhNode void +#define btAlignedObjectArray_btBvhSubtreeInfo void +#define btAlignedObjectArray_btQuantizedBvhNode void +#else +#define btQuantizedBvh_btTraversalMode btQuantizedBvh::btTraversalMode +#define btAlignedObjectArray_btBvhSubtreeInfo btAlignedObjectArray +#define btAlignedObjectArray_btQuantizedBvhNode btAlignedObjectArray +#endif + +#ifndef BT_SIMD__QUATERNION_H_ +#define btQuaternion void +#define btAlignedObjectArray_btQuaternion void +#else +#define btAlignedObjectArray_btQuaternion btAlignedObjectArray +#endif + +#ifndef BT_RAYCASTVEHICLE_H +#define btDefaultVehicleRaycaster void +#define btRaycastVehicle void +#define btRaycastVehicle_btVehicleTuning void +#else +#define btRaycastVehicle_btVehicleTuning btRaycastVehicle::btVehicleTuning +#endif + +#ifndef BT_RIGIDBODY_H +#define btAlignedObjectArray_btRigidBodyPtr void +#define btRigidBody void +#define btRigidBody_btRigidBodyConstructionInfo void +#else +#define btAlignedObjectArray_btRigidBodyPtr btAlignedObjectArray +#define btRigidBody_btRigidBodyConstructionInfo btRigidBody::btRigidBodyConstructionInfo +#endif + +#ifndef BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H +#define btScaledBvhTriangleMeshShape void +#endif + +#ifndef BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H +#define btSequentialImpulseConstraintSolver void +#endif + +#ifndef BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_MT_H +#define btSequentialImpulseConstraintSolverMt void +#endif + +#ifndef BT_SERIALIZER_H +#define btChunk void +#define btDefaultSerializer void +#define btPointerUid void +#define btSerializer void +#endif + +#ifndef BT_SHAPE_HULL_H +#define btShapeHull void +#endif + +#ifndef BT_SIMPLEX_1TO4_SHAPE +#define btBU_Simplex1to4 void +#endif + +#ifndef BT_SLIDER_CONSTRAINT_H +#define btSliderConstraint void +#endif + +#ifndef BT_SIMULATION_ISLAND_MANAGER_H +#define btSimulationIslandManager void +#define btSimulationIslandManager_IslandCallback void +#else +#define btSimulationIslandManager_IslandCallback btSimulationIslandManager::IslandCallback +#endif + +#ifndef _BT_SOFT_BODY_H +#define btAlignedObjectArray_btSoftBodyPtr void +#define btAlignedObjectArray_btSoftBody_Anchor void +#define btAlignedObjectArray_btSoftBody_ClusterPtr void +#define btAlignedObjectArray_btSoftBody_ePSolver__ void +#define btAlignedObjectArray_btSoftBody_Face void +#define btAlignedObjectArray_btSoftBody_JointPtr void +#define btAlignedObjectArray_btSoftBody_Link void +#define btAlignedObjectArray_btSoftBody_MaterialPtr void +#define btAlignedObjectArray_btSoftBody_Node void +#define btAlignedObjectArray_btSoftBody_NodePtr void +#define btAlignedObjectArray_btSoftBody_Note void +#define btAlignedObjectArray_btSoftBody_RContact void +#define btAlignedObjectArray_btSoftBody_SContact void +#define btAlignedObjectArray_btSoftBody_Tetra void +#define btAlignedObjectArray_btSoftBody_TetraScratch void +#define btAlignedObjectArray_btSoftBody_eVSolver__ void +#define btSoftBodyNodePtrArray void +#define btSoftBody void +#define btSoftBodyWorldInfo void +#define btSoftBody_eAeroModel int +#define btSoftBody_eFeature int +#define btSoftBody_ePSolver int +#define btSoftBody_eSolverPresets int +#define btSoftBody_eVSolver int +#define btSoftBody_fCollision int +#define btSoftBody_fMaterial int +#define btSoftBody_AJoint void +#define btSoftBody_AJoint_IControl void +#define btSoftBody_AJoint_Specs void +#define btSoftBody_Anchor void +#define btSoftBody_Body void +#define btSoftBody_CJoint void +#define btSoftBody_Cluster void +#define btSoftBody_Config void +#define btSoftBody_Element void +#define btSoftBody_Face void +#define btSoftBody_Feature void +#define btSoftBody_ImplicitFn void +#define btSoftBody_Impulse void +#define btSoftBody_Joint void +#define btSoftBody_Joint_eType void +#define btSoftBody_Joint_Specs void +#define btSoftBody_Link void +#define btSoftBody_LJoint void +#define btSoftBody_LJoint_Specs void +#define btSoftBody_Material void +#define btSoftBody_Node void +#define btSoftBody_Note void +#define btSoftBody_Pose void +#define btSoftBody_RayFromToCaster void +#define btSoftBody_RContact void +#define btSoftBody_SContact void +#define btSoftBody_sCti void +#define btSoftBody_sMedium void +#define btSoftBody_SolverState void +#define btSoftBody_sRayCast void +#define btSoftBody_Tetra void +#define btSoftBody_TetraScratch void +#else +#define btAlignedObjectArray_btSoftBodyPtr btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_Anchor btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_ClusterPtr btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_ePSolver__ btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_Face btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_JointPtr btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_Link btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_MaterialPtr btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_Node btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_NodePtr btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_Note btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_RContact btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_SContact btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_Tetra btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_TetraScratch btAlignedObjectArray +#define btAlignedObjectArray_btSoftBody_eVSolver__ btAlignedObjectArray +#define btSoftBodyNodePtrArray btSoftBody::Node* +#define btSoftBody_eAeroModel btSoftBody::eAeroModel::_ +#define btSoftBody_eFeature btSoftBody::eFeature::_ +#define btSoftBody_ePSolver btSoftBody::ePSolver::_ +#define btSoftBody_eSolverPresets btSoftBody::eSolverPresets::_ +#define btSoftBody_eVSolver btSoftBody::eVSolver::_ +#define btSoftBody_fCollision btSoftBody::fCollision +#define btSoftBody_fMaterial btSoftBody::fMaterial +#define btSoftBody_AJoint btSoftBody::AJoint +#define btSoftBody_AJoint_IControl btSoftBody::AJoint::IControl +#define btSoftBody_AJoint_Specs btSoftBody::AJoint::Specs +#define btSoftBody_Anchor btSoftBody::Anchor +#define btSoftBody_Body btSoftBody::Body +#define btSoftBody_CJoint btSoftBody::CJoint +#define btSoftBody_Cluster btSoftBody::Cluster +#define btSoftBody_Config btSoftBody::Config +#define btSoftBody_Element btSoftBody::Element +#define btSoftBody_Face btSoftBody::Face +#define btSoftBody_Feature btSoftBody::Feature +#define btSoftBody_ImplicitFn btSoftBody::ImplicitFn +#define btSoftBody_Impulse btSoftBody::Impulse +#define btSoftBody_Joint btSoftBody::Joint +#define btSoftBody_Joint_eType btSoftBody::Joint::eType::_ +#define btSoftBody_Joint_Specs btSoftBody::Joint::Specs +#define btSoftBody_Link btSoftBody::Link +#define btSoftBody_LJoint btSoftBody::LJoint +#define btSoftBody_LJoint_Specs btSoftBody::LJoint::Specs +#define btSoftBody_Material btSoftBody::Material +#define btSoftBody_Node btSoftBody::Node +#define btSoftBody_Note btSoftBody::Note +#define btSoftBody_Pose btSoftBody::Pose +#define btSoftBody_RayFromToCaster btSoftBody::RayFromToCaster +#define btSoftBody_RContact btSoftBody::RContact +#define btSoftBody_SContact btSoftBody::SContact +#define btSoftBody_sCti btSoftBody::sCti +#define btSoftBody_sMedium btSoftBody::sMedium +#define btSoftBody_SolverState btSoftBody::SolverState +#define btSoftBody_sRayCast btSoftBody::sRayCast +#define btSoftBody_Tetra btSoftBody::Tetra +#define btSoftBody_TetraScratch btSoftBody::TetraScratch +#endif + +#ifndef BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H +#define btSoftBodyConcaveCollisionAlgorithm void +#define btSoftBodyConcaveCollisionAlgorithm_CreateFunc void +#define btSoftBodyConcaveCollisionAlgorithm_SwappedCreateFunc void +#define btSoftBodyTriangleCallback void +#define btTriIndex void +#else +#define btSoftBodyConcaveCollisionAlgorithm_CreateFunc btSoftBodyConcaveCollisionAlgorithm::CreateFunc +#define btSoftBodyConcaveCollisionAlgorithm_SwappedCreateFunc btSoftBodyConcaveCollisionAlgorithm::SwappedCreateFunc +#endif + +#ifndef BT_SOFT_BODY_DEFAULT_SOLVER_H +#define btDefaultSoftBodySolver void +#endif + +#ifndef BT_SOFT_BODY_HELPERS_H +#define fDrawFlags void +#endif + +#ifndef BT_SOFT_BODY_SOLVERS_H +#define btSoftBodySolver void +#define btSoftBodySolverOutput void +#endif + +#ifndef BT_SOFT_RIGID_COLLISION_ALGORITHM_H +#define btSoftRigidCollisionAlgorithm void +#define btSoftRigidCollisionAlgorithm_CreateFunc void +#else +#define btSoftRigidCollisionAlgorithm_CreateFunc btSoftRigidCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_SOFT_SOFT_COLLISION_ALGORITHM_H +#define btSoftSoftCollisionAlgorithm void +#define btSoftSoftCollisionAlgorithm_CreateFunc void +#else +#define btSoftSoftCollisionAlgorithm_CreateFunc btSoftSoftCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_SOFT_RIGID_DYNAMICS_WORLD_H +#define btSoftBodyArray void +#define btSoftRigidDynamicsWorld void +#endif + +#ifndef BT_SOFTBODY_RIGIDBODY_COLLISION_CONFIGURATION +#define btSoftBodyRigidBodyCollisionConfiguration void +#endif + +#ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_H +#define btVertexBufferDescriptor void +#endif + +#ifndef BT_SOLVER_BODY_H +#define btSolverBody void +#endif + +#ifndef BT_SOLVER_CONSTRAINT_H +#define btAlignedObjectArray_btSolverConstraint void +#else +#define btAlignedObjectArray_btSolverConstraint btAlignedObjectArray +#endif + +#ifndef BT_SPARSE_SDF_H +#define btSparseSdf_3 void +#else +#define btSparseSdf_3 btSparseSdf<3> +#endif + +#ifndef BT_SPHERE_BOX_COLLISION_ALGORITHM_H +#define btSphereBoxCollisionAlgorithm void +#define btSphereBoxCollisionAlgorithm_CreateFunc void +#else +#define btSphereBoxCollisionAlgorithm_CreateFunc btSphereBoxCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_SPHERE_MINKOWSKI_H +#define btSphereShape void +#endif + +#ifndef BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H +#define btSphereSphereCollisionAlgorithm void +#define btSphereSphereCollisionAlgorithm_CreateFunc void +#else +#define btSphereSphereCollisionAlgorithm_CreateFunc btSphereSphereCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H +#define btSphereTriangleCollisionAlgorithm void +#define btSphereTriangleCollisionAlgorithm_CreateFunc void +#else +#define btSphereTriangleCollisionAlgorithm_CreateFunc btSphereTriangleCollisionAlgorithm::CreateFunc +#endif + +#ifndef BT_SPU_COLLISION_TASK_PROCESS_H +#define SpuCollisionTaskProcess void +#define SpuGatherAndProcessWorkUnitInput void +#endif + +#ifndef BT_SPU_GATHERING_COLLISION__DISPATCHER_H +#define SpuGatheringCollisionDispatcher void +#endif + +#ifndef BT_STATIC_PLANE_SHAPE_H +#define btStaticPlaneShape void +#endif + +#ifndef BT_STRIDING_MESHINTERFACE_H +#define btStridingMeshInterface void +#define btStridingMeshInterfaceData void +#endif + +#ifndef BT_THREAD_SUPPORT_INTERFACE_H +#define btBarrier void +#define btCriticalSection void +#define btThreadSupportInterface void +#endif + +#ifndef BT_THREADS_H +#define btITaskScheduler void +#endif + +#ifndef BT_TRANSFORM_H +#define btTransform void +#endif + +#ifndef BT_TRANSFORM_UTIL_H +#define btConvexSeparatingDistanceUtil void +#endif + +#ifndef BT_TRIANGLE_BUFFER_H +#define btTriangle void +#define btTriangleBuffer void +#endif + +#ifndef BT_TRIANGLE_CALLBACK_H +#define btInternalTriangleIndexCallback void +#define btTriangleCallback void +#endif + +#ifndef BT_TRIANGLE_INDEX_VERTEX_ARRAY_H +#define btAlignedObjectArray_btIndexedMesh void +#define btIndexedMesh void +#define btTriangleIndexVertexArray void +#define IndexedMeshArray void +#else +#define btAlignedObjectArray_btIndexedMesh btAlignedObjectArray +#endif + +#ifndef _BT_TRIANGLE_INFO_MAP_H +#define btTriangleInfo void +#define btTriangleInfoMap void +#endif + +#ifndef BT_TRIANGLE_MESH_H +#define btTriangleMesh void +#endif + +#ifndef BT_TRIANGLE_MESH_SHAPE_H +#define btTriangleMeshShape void +#endif + +#ifndef BT_TYPED_CONSTRAINT_H +#define btAngularLimit void +#define btJointFeedback void +#define btTypedConstraint void +#define btTypedConstraint_btConstraintInfo1 void +#define btTypedConstraint_btConstraintInfo2 void +#define btTypedConstraintType int +#else +#define btTypedConstraint_btConstraintInfo1 btTypedConstraint::btConstraintInfo1 +#define btTypedConstraint_btConstraintInfo2 btTypedConstraint::btConstraintInfo2 +#endif + +#ifndef BT_UNIFORM_SCALING_SHAPE_H +#define btUniformScalingShape void +#endif + +#ifndef BT_UNION_FIND_H +#define btElement void +#define btUnionFind void +#endif + +#ifndef BT_UNIVERSAL_CONSTRAINT_H +#define btUniversalConstraint void +#endif + +#ifndef BT_VECTOR3_H +#define btAlignedObjectArray_btVector3 void +#define btVector3 void +#define btVector4 void +#else +#define btAlignedObjectArray_btVector3 btAlignedObjectArray +#endif + +#ifndef BT_VEHICLE_RAYCASTER_H +#define btVehicleRaycaster void +#define btVehicleRaycaster_btVehicleRaycasterResult void +#else +#define btVehicleRaycaster_btVehicleRaycasterResult btVehicleRaycaster::btVehicleRaycasterResult +#endif + +#ifndef BT_VORONOI_SIMPLEX_SOLVER_H +#define btSubSimplexClosestResult void +#define btUsageBitfield void +#define btVoronoiSimplexSolver void +#endif + +#ifndef BT_WHEEL_INFO_H +#define btAlignedObjectArray_btWheelInfo void +#define btWheelInfo void +#define btWheelInfo_RaycastInfo void +#define btWheelInfoConstructionInfo void +#else +#define btAlignedObjectArray_btWheelInfo btAlignedObjectArray +#define btWheelInfo_RaycastInfo btWheelInfo::RaycastInfo +#endif + +#ifndef BT_WIN32_THREAD_SUPPORT_H +#define Win32ThreadSupport void +#define Win32ThreadSupport_Win32ThreadConstructionInfo void +typedef void (*Win32ThreadFunc)(void* userPtr,void* lsMemory); +typedef void* (*Win32lsMemorySetupFunc)(); +#else +#define Win32ThreadSupport_Win32ThreadConstructionInfo Win32ThreadSupport::Win32ThreadConstructionInfo +#endif + +#ifndef BT_WORLD_IMPORTER_H +#define btWorldImporter void +#endif + +#ifndef BULLET_WORLD_IMPORTER_H +#define btBulletWorldImporter void +#endif + +#ifndef BT_BULLET_XML_WORLD_IMPORTER_H +#define btBulletXmlWorldImporter void +#endif + +#ifndef BT_GIMPACT_BVH_H_INCLUDED +#define btBvhTree void +#define btPairSet void +#define GIM_BVH_DATA void +#define GIM_BVH_DATA_ARRAY void +#define GIM_BVH_TREE_NODE void +#define GIM_BVH_TREE_NODE_ARRAY void +#define GIM_PAIR void +#define btGImpactBvh void +#define btPrimitiveManagerBase void +#endif + +#ifndef GIM_QUANTIZED_SET_H_INCLUDED +#define BT_QUANTIZED_BVH_NODE void +#define GIM_QUANTIZED_BVH_NODE_ARRAY void +#define btGImpactQuantizedBvh void +#define btQuantizedBvhTree void +#endif + +#ifndef GIMPACT_SHAPE_H +#define btGImpactBoxSet void +#define btGImpactCompoundShape void +#define btGImpactCompoundShape_CompoundPrimitiveManager void +#define btGImpactMeshShapePart_TrimeshPrimitiveManager void +#define btGImpactMeshShape void +#define btGImpactMeshShapePart void +#define btGImpactShapeInterface void +#define btTetrahedronShapeEx void +#define eGIMPACT_SHAPE_TYPE int +#else +#define btGImpactCompoundShape_CompoundPrimitiveManager btGImpactCompoundShape::CompoundPrimitiveManager +#define btGImpactMeshShapePart_TrimeshPrimitiveManager btGImpactMeshShapePart::TrimeshPrimitiveManager +#endif + +#ifndef GIMPACT_TRIANGLE_SHAPE_EX_H +#define btPrimitiveTriangle void +#define btTriangleShapeEx void +#define GIM_TRIANGLE_CONTACT void +#endif + +#ifndef POLARDECOMPOSITION_H +#define btPolarDecomposition void +#endif + +#ifndef HACD_HACD_H +#define HACD_HACD void +#define HACD_Vec3_long long +#define HACD_Vec3_Real void +typedef bool (*HACD_CallBackFunction)(const char *, double, double, size_t); +#else +#define HACD_HACD HACD::HACD +#define HACD_Vec3_long HACD::Vec3 +#define HACD_Vec3_Real HACD::Vec3 +#define HACD_CallBackFunction HACD::CallBackFunction +#endif + +#ifndef SPU_GATHERING_COLLISION_TASK_H +#if defined(_WIN64) + typedef unsigned __int64 ppu_address_t; +#elif defined(__LP64__) || defined(__x86_64__) + typedef unsigned long int ppu_address_t; +#else + typedef unsigned int ppu_address_t; +#endif +#define CollisionTask_LocalStoreMemory void +#define SpuGatherAndProcessPairsTaskDesc void +#endif diff --git a/dali-csharp-binder/file.list b/dali-csharp-binder/file.list index 9b282e4..a01b63c 100755 --- a/dali-csharp-binder/file.list +++ b/dali-csharp-binder/file.list @@ -128,6 +128,170 @@ SET( dali_csharp_binder_physics_2d_src_files SET( dali_csharp_binder_physics_3d_src_files ${dali_csharp_binder_dir}/dali-physics-3d/physics-adaptor-3d-wrap.cpp ${dali_csharp_binder_dir}/dali-physics-3d/physics-actor-3d-wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/collections.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btActionInterface_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btAlignedObjectArray_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btAxisSweep3_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBox2dBox2dCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBox2dShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBoxBoxCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBoxBoxDetector_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBoxCollision_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBoxShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBroadphaseInterface_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBroadphaseProxy_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btBvhTriangleMeshShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCapsuleShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCharacterControllerInterface_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionConfiguration_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionCreateFunc_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionDispatcher_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionDispatcherMt_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionObject_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionObjectWrapper_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCollisionWorld_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCompoundCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCompoundCompoundCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCompoundFromGimpact_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCompoundShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConcaveShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConeShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConeTwistConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConstraintSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btContactConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btContactSolverInfo_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btContinuousConvexCollision_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvex2dConvex2dAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvex2dShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexCast_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexConcaveCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexConvexAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexHullShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexInternalShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexPenetrationDepthSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexPlaneCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexPointCloudShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexPolyhedron_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btConvexTriangleMeshShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCpuFeatureUtility_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btCylinderShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDantzigSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDbvt_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDbvtBroadphase_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDefaultCollisionConfiguration_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDefaultMotionState_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDefaultSoftBodySolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDeformableBodySolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDeformableGravityForce_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDeformableLagrangianForce_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDeformableMultiBodyConstraintSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDeformableMultiBodyDynamicsWorld_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDeformableNeoHookeanForce_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDiscreteCollisionDetectorInterface_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDiscreteDynamicsWorld_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDiscreteDynamicsWorldMt_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDispatcher_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btDynamicsWorld_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btEmptyCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btEmptyShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btFixedConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGearConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGeneric6DofConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGeneric6DofSpring2Constraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGeneric6DofSpringConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGeometryUtil_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGhostObject_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGImpactBvh_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGImpactCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGImpactQuantizedBvh_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGImpactShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGjkConvexCast_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGjkEpaPenetrationDepthSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btGjkPairDetector_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btHeightfieldTerrainShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btHinge2Constraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btHingeConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btIDebugDraw_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btKinematicCharacterController_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btLemkeSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btManifoldPoint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btManifoldResult_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMinkowskiPenetrationDepthSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMinkowskiSumShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMLCPSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMLCPSolverInterface_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMotionState_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBody_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyConstraintSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyDynamicsWorld_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyFixedConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyJointLimitConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyJointMotor_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyLink_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyLinkCollider_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodyPoint2Point_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodySliderConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiBodySolverConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultimaterialTriangleMeshShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btMultiSphereShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btNNCGConstraintSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btOptimizedBvh_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btOverlappingPairCache_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btOverlappingPairCallback_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btPersistentManifold_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btPoint2PointConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btPointCollector_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btPolarDecomposition_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btPolyhedralConvexShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btPoolAllocator_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btQuantizedBvh_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btRaycastVehicle_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btRigidBody_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btScaledBvhTriangleMeshShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSequentialImpulseConstraintSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSequentialImpulseConstraintSolverMt_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSerializer_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btShapeHull_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSimulationIslandManager_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSliderConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftBody_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftBodyConcaveCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftBodyHelpers_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftBodyRigidBodyCollisionConfiguration_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftBodySolvers_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftRigidCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftRigidDynamicsWorld_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSoftSoftCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSparseSdf3_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSphereBoxCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSphereShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSphereSphereCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btSphereTriangleCollisionAlgorithm_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btStaticPlaneShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btStridingMeshInterface_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTetrahedronShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btThreads_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTransformUtil_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleBuffer_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleCallback_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleIndexVertexArray_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleIndexVertexMaterialArray_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleInfoMap_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleMesh_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleMeshShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTriangleShapeEx_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btTypedConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btUniformScalingShape_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btUnionFind_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btUniversalConstraint_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btVehicleRaycaster_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btVoronoiSimplexSolver_wrap.cpp + ${dali_csharp_binder_dir}/dali-physics-3d/bullet/btWheelInfo_wrap.cpp ) SET( dali_csharp_binder_header_files -- 2.7.4