ruby-bullet 0.1.0-x86-linux → 0.1.1-x86-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +3 -0
  3. data/Rakefile +14 -2
  4. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionWorld.i +2 -2
  5. data/bindings/bullet/interface/bullet_wrap.cpp +17548 -6035
  6. data/bindings/bullet/interface/bullet_wrap.h +7 -7
  7. data/bindings/bullet/interface/bullet_wrap.o +0 -0
  8. data/lib/bullet.so +0 -0
  9. data/lib/ruby-bullet/version.rb +1 -1
  10. data/ruby-bullet.gemspec +0 -3
  11. metadata +169 -444
  12. data/deps/include/bullet/Bullet-C-Api.h +0 -176
  13. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.h +0 -1051
  14. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h +0 -82
  15. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h +0 -270
  16. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h +0 -80
  17. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.h +0 -1257
  18. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h +0 -146
  19. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDispatcher.h +0 -110
  20. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h +0 -151
  21. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +0 -469
  22. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h +0 -40
  23. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btQuantizedBvh.h +0 -579
  24. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h +0 -171
  25. data/deps/include/bullet/BulletCollision/CollisionDispatch/SphereTriangleDetector.h +0 -51
  26. data/deps/include/bullet/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h +0 -36
  27. data/deps/include/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h +0 -66
  28. data/deps/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h +0 -66
  29. data/deps/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxDetector.h +0 -44
  30. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionConfiguration.h +0 -48
  31. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h +0 -45
  32. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.h +0 -172
  33. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h +0 -524
  34. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.h +0 -509
  35. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h +0 -86
  36. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h +0 -95
  37. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h +0 -116
  38. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h +0 -109
  39. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h +0 -84
  40. data/deps/include/bullet/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h +0 -137
  41. data/deps/include/bullet/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h +0 -54
  42. data/deps/include/bullet/BulletCollision/CollisionDispatch/btGhostObject.h +0 -175
  43. data/deps/include/bullet/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h +0 -46
  44. data/deps/include/bullet/BulletCollision/CollisionDispatch/btManifoldResult.h +0 -128
  45. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSimulationIslandManager.h +0 -81
  46. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h +0 -75
  47. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h +0 -66
  48. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h +0 -69
  49. data/deps/include/bullet/BulletCollision/CollisionDispatch/btUnionFind.h +0 -129
  50. data/deps/include/bullet/BulletCollision/CollisionShapes/btBox2dShape.h +0 -369
  51. data/deps/include/bullet/BulletCollision/CollisionShapes/btBoxShape.h +0 -312
  52. data/deps/include/bullet/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +0 -139
  53. data/deps/include/bullet/BulletCollision/CollisionShapes/btCapsuleShape.h +0 -173
  54. data/deps/include/bullet/BulletCollision/CollisionShapes/btCollisionMargin.h +0 -27
  55. data/deps/include/bullet/BulletCollision/CollisionShapes/btCollisionShape.h +0 -150
  56. data/deps/include/bullet/BulletCollision/CollisionShapes/btCompoundShape.h +0 -212
  57. data/deps/include/bullet/BulletCollision/CollisionShapes/btConcaveShape.h +0 -60
  58. data/deps/include/bullet/BulletCollision/CollisionShapes/btConeShape.h +0 -103
  59. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvex2dShape.h +0 -80
  60. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h +0 -122
  61. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexInternalShape.h +0 -224
  62. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.h +0 -105
  63. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexPolyhedron.h +0 -62
  64. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexShape.h +0 -84
  65. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h +0 -75
  66. data/deps/include/bullet/BulletCollision/CollisionShapes/btCylinderShape.h +0 -200
  67. data/deps/include/bullet/BulletCollision/CollisionShapes/btEmptyShape.h +0 -70
  68. data/deps/include/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h +0 -161
  69. data/deps/include/bullet/BulletCollision/CollisionShapes/btMaterial.h +0 -35
  70. data/deps/include/bullet/BulletCollision/CollisionShapes/btMinkowskiSumShape.h +0 -60
  71. data/deps/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h +0 -99
  72. data/deps/include/bullet/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +0 -120
  73. data/deps/include/bullet/BulletCollision/CollisionShapes/btOptimizedBvh.h +0 -65
  74. data/deps/include/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h +0 -112
  75. data/deps/include/bullet/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h +0 -93
  76. data/deps/include/bullet/BulletCollision/CollisionShapes/btShapeHull.h +0 -59
  77. data/deps/include/bullet/BulletCollision/CollisionShapes/btSphereShape.h +0 -73
  78. data/deps/include/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h +0 -103
  79. data/deps/include/bullet/BulletCollision/CollisionShapes/btStridingMeshInterface.h +0 -162
  80. data/deps/include/bullet/BulletCollision/CollisionShapes/btTetrahedronShape.h +0 -74
  81. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h +0 -69
  82. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleCallback.h +0 -42
  83. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h +0 -133
  84. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h +0 -84
  85. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleInfoMap.h +0 -241
  86. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleMesh.h +0 -69
  87. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleMeshShape.h +0 -89
  88. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleShape.h +0 -182
  89. data/deps/include/bullet/BulletCollision/CollisionShapes/btUniformScalingShape.h +0 -87
  90. data/deps/include/bullet/BulletCollision/Gimpact/btBoxCollision.h +0 -647
  91. data/deps/include/bullet/BulletCollision/Gimpact/btClipPolygon.h +0 -182
  92. data/deps/include/bullet/BulletCollision/Gimpact/btContactProcessing.h +0 -145
  93. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactBvh.h +0 -396
  94. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h +0 -306
  95. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactMassUtil.h +0 -60
  96. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactQuantizedBvh.h +0 -372
  97. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactShape.h +0 -1171
  98. data/deps/include/bullet/BulletCollision/Gimpact/btGenericPoolAllocator.h +0 -163
  99. data/deps/include/bullet/BulletCollision/Gimpact/btGeometryOperations.h +0 -212
  100. data/deps/include/bullet/BulletCollision/Gimpact/btQuantization.h +0 -88
  101. data/deps/include/bullet/BulletCollision/Gimpact/btTriangleShapeEx.h +0 -180
  102. data/deps/include/bullet/BulletCollision/Gimpact/gim_array.h +0 -326
  103. data/deps/include/bullet/BulletCollision/Gimpact/gim_basic_geometry_operations.h +0 -543
  104. data/deps/include/bullet/BulletCollision/Gimpact/gim_bitset.h +0 -123
  105. data/deps/include/bullet/BulletCollision/Gimpact/gim_box_collision.h +0 -590
  106. data/deps/include/bullet/BulletCollision/Gimpact/gim_box_set.h +0 -674
  107. data/deps/include/bullet/BulletCollision/Gimpact/gim_clip_polygon.h +0 -210
  108. data/deps/include/bullet/BulletCollision/Gimpact/gim_contact.h +0 -164
  109. data/deps/include/bullet/BulletCollision/Gimpact/gim_geom_types.h +0 -97
  110. data/deps/include/bullet/BulletCollision/Gimpact/gim_geometry.h +0 -42
  111. data/deps/include/bullet/BulletCollision/Gimpact/gim_hash_table.h +0 -902
  112. data/deps/include/bullet/BulletCollision/Gimpact/gim_linear_math.h +0 -1573
  113. data/deps/include/bullet/BulletCollision/Gimpact/gim_math.h +0 -157
  114. data/deps/include/bullet/BulletCollision/Gimpact/gim_memory.h +0 -190
  115. data/deps/include/bullet/BulletCollision/Gimpact/gim_radixsort.h +0 -406
  116. data/deps/include/bullet/BulletCollision/Gimpact/gim_tri_collision.h +0 -379
  117. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h +0 -59
  118. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.h +0 -73
  119. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h +0 -42
  120. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h +0 -91
  121. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h +0 -50
  122. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h +0 -75
  123. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h +0 -43
  124. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h +0 -103
  125. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h +0 -158
  126. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h +0 -40
  127. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +0 -228
  128. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPointCollector.h +0 -64
  129. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h +0 -46
  130. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h +0 -72
  131. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h +0 -63
  132. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h +0 -50
  133. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h +0 -179
  134. data/deps/include/bullet/BulletCollision/btBulletCollisionCommon.h +0 -69
  135. data/deps/include/bullet/BulletDynamics/Character/btCharacterControllerInterface.h +0 -46
  136. data/deps/include/bullet/BulletDynamics/Character/btKinematicCharacterController.h +0 -163
  137. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h +0 -346
  138. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btConstraintSolver.h +0 -52
  139. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btContactConstraint.h +0 -71
  140. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h +0 -87
  141. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +0 -614
  142. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h +0 -99
  143. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btHinge2Constraint.h +0 -58
  144. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btHingeConstraint.h +0 -381
  145. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btJacobianEntry.h +0 -156
  146. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h +0 -161
  147. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h +0 -130
  148. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSliderConstraint.h +0 -333
  149. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h +0 -107
  150. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolverBody.h +0 -191
  151. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolverConstraint.h +0 -98
  152. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btTypedConstraint.h +0 -452
  153. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h +0 -62
  154. data/deps/include/bullet/BulletDynamics/Dynamics/btActionInterface.h +0 -46
  155. data/deps/include/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +0 -203
  156. data/deps/include/bullet/BulletDynamics/Dynamics/btDynamicsWorld.h +0 -151
  157. data/deps/include/bullet/BulletDynamics/Dynamics/btRigidBody.h +0 -691
  158. data/deps/include/bullet/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h +0 -89
  159. data/deps/include/bullet/BulletDynamics/Vehicle/btRaycastVehicle.h +0 -236
  160. data/deps/include/bullet/BulletDynamics/Vehicle/btVehicleRaycaster.h +0 -35
  161. data/deps/include/bullet/BulletDynamics/Vehicle/btWheelInfo.h +0 -119
  162. data/deps/include/bullet/BulletDynamics/btBulletDynamicsCommon.h +0 -48
  163. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h +0 -323
  164. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h +0 -103
  165. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h +0 -173
  166. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h +0 -96
  167. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h +0 -107
  168. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h +0 -63
  169. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h +0 -691
  170. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h +0 -81
  171. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h +0 -209
  172. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h +0 -99
  173. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h +0 -169
  174. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h +0 -62
  175. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h +0 -84
  176. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h +0 -166
  177. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h +0 -52
  178. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h +0 -527
  179. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h +0 -81
  180. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/Shared/btSoftBodySolverData.h +0 -748
  181. data/deps/include/bullet/BulletMultiThreaded/HeapManager.h +0 -117
  182. data/deps/include/bullet/BulletMultiThreaded/PlatformDefinitions.h +0 -99
  183. data/deps/include/bullet/BulletMultiThreaded/PosixThreadSupport.h +0 -142
  184. data/deps/include/bullet/BulletMultiThreaded/PpuAddressSpace.h +0 -37
  185. data/deps/include/bullet/BulletMultiThreaded/SequentialThreadSupport.h +0 -96
  186. data/deps/include/bullet/BulletMultiThreaded/SpuCollisionObjectWrapper.h +0 -40
  187. data/deps/include/bullet/BulletMultiThreaded/SpuCollisionTaskProcess.h +0 -163
  188. data/deps/include/bullet/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h +0 -120
  189. data/deps/include/bullet/BulletMultiThreaded/SpuDoubleBuffer.h +0 -126
  190. data/deps/include/bullet/BulletMultiThreaded/SpuFakeDma.h +0 -135
  191. data/deps/include/bullet/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h +0 -72
  192. data/deps/include/bullet/BulletMultiThreaded/SpuLibspe2Support.h +0 -180
  193. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h +0 -167
  194. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h +0 -128
  195. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h +0 -106
  196. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h +0 -51
  197. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h +0 -140
  198. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h +0 -19
  199. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h +0 -48
  200. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h +0 -70
  201. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h +0 -65
  202. data/deps/include/bullet/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h +0 -54
  203. data/deps/include/bullet/BulletMultiThreaded/SpuSampleTaskProcess.h +0 -153
  204. data/deps/include/bullet/BulletMultiThreaded/SpuSync.h +0 -149
  205. data/deps/include/bullet/BulletMultiThreaded/TrbDynBody.h +0 -79
  206. data/deps/include/bullet/BulletMultiThreaded/TrbStateVec.h +0 -339
  207. data/deps/include/bullet/BulletMultiThreaded/Win32ThreadSupport.h +0 -138
  208. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphase.h +0 -138
  209. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h +0 -430
  210. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h +0 -61
  211. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h +0 -67
  212. data/deps/include/bullet/BulletMultiThreaded/btGpuDefines.h +0 -211
  213. data/deps/include/bullet/BulletMultiThreaded/btGpuUtilsSharedCode.h +0 -55
  214. data/deps/include/bullet/BulletMultiThreaded/btGpuUtilsSharedDefs.h +0 -52
  215. data/deps/include/bullet/BulletMultiThreaded/btParallelConstraintSolver.h +0 -285
  216. data/deps/include/bullet/BulletMultiThreaded/btThreadSupportInterface.h +0 -85
  217. data/deps/include/bullet/BulletMultiThreaded/vectormath2bullet.h +0 -73
  218. data/deps/include/bullet/BulletSoftBody/btDefaultSoftBodySolver.h +0 -63
  219. data/deps/include/bullet/BulletSoftBody/btSoftBody.h +0 -987
  220. data/deps/include/bullet/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h +0 -153
  221. data/deps/include/bullet/BulletSoftBody/btSoftBodyData.h +0 -217
  222. data/deps/include/bullet/BulletSoftBody/btSoftBodyHelpers.h +0 -143
  223. data/deps/include/bullet/BulletSoftBody/btSoftBodyInternals.h +0 -930
  224. data/deps/include/bullet/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h +0 -48
  225. data/deps/include/bullet/BulletSoftBody/btSoftBodySolverVertexBuffer.h +0 -165
  226. data/deps/include/bullet/BulletSoftBody/btSoftBodySolvers.h +0 -154
  227. data/deps/include/bullet/BulletSoftBody/btSoftRigidCollisionAlgorithm.h +0 -75
  228. data/deps/include/bullet/BulletSoftBody/btSoftRigidDynamicsWorld.h +0 -107
  229. data/deps/include/bullet/BulletSoftBody/btSoftSoftCollisionAlgorithm.h +0 -69
  230. data/deps/include/bullet/BulletSoftBody/btSparseSDF.h +0 -306
  231. data/deps/include/bullet/LinearMath/btAabbUtil2.h +0 -236
  232. data/deps/include/bullet/LinearMath/btAlignedAllocator.h +0 -107
  233. data/deps/include/bullet/LinearMath/btAlignedObjectArray.h +0 -494
  234. data/deps/include/bullet/LinearMath/btConvexHull.h +0 -241
  235. data/deps/include/bullet/LinearMath/btConvexHullComputer.h +0 -103
  236. data/deps/include/bullet/LinearMath/btDefaultMotionState.h +0 -40
  237. data/deps/include/bullet/LinearMath/btGeometryUtil.h +0 -42
  238. data/deps/include/bullet/LinearMath/btGrahamScan2dConvexHull.h +0 -110
  239. data/deps/include/bullet/LinearMath/btHashMap.h +0 -450
  240. data/deps/include/bullet/LinearMath/btIDebugDraw.h +0 -418
  241. data/deps/include/bullet/LinearMath/btList.h +0 -73
  242. data/deps/include/bullet/LinearMath/btMatrix3x3.h +0 -771
  243. data/deps/include/bullet/LinearMath/btMinMax.h +0 -71
  244. data/deps/include/bullet/LinearMath/btMotionState.h +0 -40
  245. data/deps/include/bullet/LinearMath/btPoolAllocator.h +0 -121
  246. data/deps/include/bullet/LinearMath/btQuadWord.h +0 -180
  247. data/deps/include/bullet/LinearMath/btQuaternion.h +0 -430
  248. data/deps/include/bullet/LinearMath/btQuickprof.h +0 -203
  249. data/deps/include/bullet/LinearMath/btRandom.h +0 -42
  250. data/deps/include/bullet/LinearMath/btScalar.h +0 -539
  251. data/deps/include/bullet/LinearMath/btSerializer.h +0 -639
  252. data/deps/include/bullet/LinearMath/btStackAlloc.h +0 -116
  253. data/deps/include/bullet/LinearMath/btTransform.h +0 -307
  254. data/deps/include/bullet/LinearMath/btTransformUtil.h +0 -228
  255. data/deps/include/bullet/LinearMath/btVector3.h +0 -766
  256. data/deps/include/bullet/MiniCL/MiniCLTask/MiniCLTask.h +0 -62
  257. data/deps/include/bullet/MiniCL/MiniCLTaskScheduler.h +0 -194
  258. data/deps/include/bullet/MiniCL/cl.h +0 -867
  259. data/deps/include/bullet/MiniCL/cl_MiniCL_Defs.h +0 -439
  260. data/deps/include/bullet/MiniCL/cl_gl.h +0 -113
  261. data/deps/include/bullet/MiniCL/cl_platform.h +0 -254
  262. data/deps/include/bullet/btBulletCollisionCommon.h +0 -69
  263. data/deps/include/bullet/btBulletDynamicsCommon.h +0 -48
  264. data/deps/include/bullet/vectormath/scalar/boolInVec.h +0 -225
  265. data/deps/include/bullet/vectormath/scalar/floatInVec.h +0 -343
  266. data/deps/include/bullet/vectormath/scalar/mat_aos.h +0 -1630
  267. data/deps/include/bullet/vectormath/scalar/quat_aos.h +0 -433
  268. data/deps/include/bullet/vectormath/scalar/vec_aos.h +0 -1426
  269. data/deps/include/bullet/vectormath/scalar/vectormath_aos.h +0 -1872
  270. data/deps/include/bullet/vectormath/sse/boolInVec.h +0 -247
  271. data/deps/include/bullet/vectormath/sse/floatInVec.h +0 -340
  272. data/deps/include/bullet/vectormath/sse/mat_aos.h +0 -2190
  273. data/deps/include/bullet/vectormath/sse/quat_aos.h +0 -579
  274. data/deps/include/bullet/vectormath/sse/vec_aos.h +0 -1455
  275. data/deps/include/bullet/vectormath/sse/vecidx_aos.h +0 -80
  276. data/deps/include/bullet/vectormath/sse/vectormath_aos.h +0 -2547
  277. data/deps/include/bullet/vectormath/vmInclude.h +0 -27
  278. data/deps/lib/libBulletCollision.a +0 -0
  279. data/deps/lib/libBulletDynamics.a +0 -0
  280. data/deps/lib/libBulletMultiThreaded.a +0 -0
  281. data/deps/lib/libBulletSoftBody.a +0 -0
  282. data/deps/lib/libBulletSoftBodySolvers_OpenCL_Mini.a +0 -0
  283. data/deps/lib/libLinearMath.a +0 -0
  284. data/deps/lib/libMiniCL.a +0 -0
@@ -1,771 +0,0 @@
1
- /*
2
- Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
3
-
4
- This software is provided 'as-is', without any express or implied warranty.
5
- In no event will the authors be held liable for any damages arising from the use of this software.
6
- Permission is granted to anyone to use this software for any purpose,
7
- including commercial applications, and to alter it and redistribute it freely,
8
- subject to the following restrictions:
9
-
10
- 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
11
- 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
12
- 3. This notice may not be removed or altered from any source distribution.
13
- */
14
-
15
-
16
- #ifndef BT_MATRIX3x3_H
17
- #define BT_MATRIX3x3_H
18
-
19
- #include "btVector3.h"
20
- #include "btQuaternion.h"
21
-
22
- #ifdef BT_USE_DOUBLE_PRECISION
23
- #define btMatrix3x3Data btMatrix3x3DoubleData
24
- #else
25
- #define btMatrix3x3Data btMatrix3x3FloatData
26
- #endif //BT_USE_DOUBLE_PRECISION
27
-
28
-
29
- /**@brief The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with btQuaternion, btTransform and btVector3.
30
- * Make sure to only include a pure orthogonal matrix without scaling. */
31
- class btMatrix3x3 {
32
-
33
- ///Data storage for the matrix, each vector is a row of the matrix
34
- btVector3 m_el[3];
35
-
36
- public:
37
- /** @brief No initializaion constructor */
38
- btMatrix3x3 () {}
39
-
40
- // explicit btMatrix3x3(const btScalar *m) { setFromOpenGLSubMatrix(m); }
41
-
42
- /**@brief Constructor from Quaternion */
43
- explicit btMatrix3x3(const btQuaternion& q) { setRotation(q); }
44
- /*
45
- template <typename btScalar>
46
- Matrix3x3(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
47
- {
48
- setEulerYPR(yaw, pitch, roll);
49
- }
50
- */
51
- /** @brief Constructor with row major formatting */
52
- btMatrix3x3(const btScalar& xx, const btScalar& xy, const btScalar& xz,
53
- const btScalar& yx, const btScalar& yy, const btScalar& yz,
54
- const btScalar& zx, const btScalar& zy, const btScalar& zz)
55
- {
56
- setValue(xx, xy, xz,
57
- yx, yy, yz,
58
- zx, zy, zz);
59
- }
60
- /** @brief Copy constructor */
61
- SIMD_FORCE_INLINE btMatrix3x3 (const btMatrix3x3& other)
62
- {
63
- m_el[0] = other.m_el[0];
64
- m_el[1] = other.m_el[1];
65
- m_el[2] = other.m_el[2];
66
- }
67
- /** @brief Assignment Operator */
68
- SIMD_FORCE_INLINE btMatrix3x3& operator=(const btMatrix3x3& other)
69
- {
70
- m_el[0] = other.m_el[0];
71
- m_el[1] = other.m_el[1];
72
- m_el[2] = other.m_el[2];
73
- return *this;
74
- }
75
-
76
- /** @brief Get a column of the matrix as a vector
77
- * @param i Column number 0 indexed */
78
- SIMD_FORCE_INLINE btVector3 getColumn(int i) const
79
- {
80
- return btVector3(m_el[0][i],m_el[1][i],m_el[2][i]);
81
- }
82
-
83
-
84
- /** @brief Get a row of the matrix as a vector
85
- * @param i Row number 0 indexed */
86
- SIMD_FORCE_INLINE const btVector3& getRow(int i) const
87
- {
88
- btFullAssert(0 <= i && i < 3);
89
- return m_el[i];
90
- }
91
-
92
- /** @brief Get a mutable reference to a row of the matrix as a vector
93
- * @param i Row number 0 indexed */
94
- SIMD_FORCE_INLINE btVector3& operator[](int i)
95
- {
96
- btFullAssert(0 <= i && i < 3);
97
- return m_el[i];
98
- }
99
-
100
- /** @brief Get a const reference to a row of the matrix as a vector
101
- * @param i Row number 0 indexed */
102
- SIMD_FORCE_INLINE const btVector3& operator[](int i) const
103
- {
104
- btFullAssert(0 <= i && i < 3);
105
- return m_el[i];
106
- }
107
-
108
- /** @brief Multiply by the target matrix on the right
109
- * @param m Rotation matrix to be applied
110
- * Equivilant to this = this * m */
111
- btMatrix3x3& operator*=(const btMatrix3x3& m);
112
-
113
- /** @brief Adds by the target matrix on the right
114
- * @param m matrix to be applied
115
- * Equivilant to this = this + m */
116
- btMatrix3x3& operator+=(const btMatrix3x3& m);
117
-
118
- /** @brief Substractss by the target matrix on the right
119
- * @param m matrix to be applied
120
- * Equivilant to this = this - m */
121
- btMatrix3x3& operator-=(const btMatrix3x3& m);
122
-
123
- /** @brief Set from the rotational part of a 4x4 OpenGL matrix
124
- * @param m A pointer to the beginning of the array of scalars*/
125
- void setFromOpenGLSubMatrix(const btScalar *m)
126
- {
127
- m_el[0].setValue(m[0],m[4],m[8]);
128
- m_el[1].setValue(m[1],m[5],m[9]);
129
- m_el[2].setValue(m[2],m[6],m[10]);
130
-
131
- }
132
- /** @brief Set the values of the matrix explicitly (row major)
133
- * @param xx Top left
134
- * @param xy Top Middle
135
- * @param xz Top Right
136
- * @param yx Middle Left
137
- * @param yy Middle Middle
138
- * @param yz Middle Right
139
- * @param zx Bottom Left
140
- * @param zy Bottom Middle
141
- * @param zz Bottom Right*/
142
- void setValue(const btScalar& xx, const btScalar& xy, const btScalar& xz,
143
- const btScalar& yx, const btScalar& yy, const btScalar& yz,
144
- const btScalar& zx, const btScalar& zy, const btScalar& zz)
145
- {
146
- m_el[0].setValue(xx,xy,xz);
147
- m_el[1].setValue(yx,yy,yz);
148
- m_el[2].setValue(zx,zy,zz);
149
- }
150
-
151
- /** @brief Set the matrix from a quaternion
152
- * @param q The Quaternion to match */
153
- void setRotation(const btQuaternion& q)
154
- {
155
- btScalar d = q.length2();
156
- btFullAssert(d != btScalar(0.0));
157
- btScalar s = btScalar(2.0) / d;
158
- btScalar xs = q.x() * s, ys = q.y() * s, zs = q.z() * s;
159
- btScalar wx = q.w() * xs, wy = q.w() * ys, wz = q.w() * zs;
160
- btScalar xx = q.x() * xs, xy = q.x() * ys, xz = q.x() * zs;
161
- btScalar yy = q.y() * ys, yz = q.y() * zs, zz = q.z() * zs;
162
- setValue(btScalar(1.0) - (yy + zz), xy - wz, xz + wy,
163
- xy + wz, btScalar(1.0) - (xx + zz), yz - wx,
164
- xz - wy, yz + wx, btScalar(1.0) - (xx + yy));
165
- }
166
-
167
-
168
- /** @brief Set the matrix from euler angles using YPR around YXZ respectively
169
- * @param yaw Yaw about Y axis
170
- * @param pitch Pitch about X axis
171
- * @param roll Roll about Z axis
172
- */
173
- void setEulerYPR(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
174
- {
175
- setEulerZYX(roll, pitch, yaw);
176
- }
177
-
178
- /** @brief Set the matrix from euler angles YPR around ZYX axes
179
- * @param eulerX Roll about X axis
180
- * @param eulerY Pitch around Y axis
181
- * @param eulerZ Yaw aboud Z axis
182
- *
183
- * These angles are used to produce a rotation matrix. The euler
184
- * angles are applied in ZYX order. I.e a vector is first rotated
185
- * about X then Y and then Z
186
- **/
187
- void setEulerZYX(btScalar eulerX,btScalar eulerY,btScalar eulerZ) {
188
- ///@todo proposed to reverse this since it's labeled zyx but takes arguments xyz and it will match all other parts of the code
189
- btScalar ci ( btCos(eulerX));
190
- btScalar cj ( btCos(eulerY));
191
- btScalar ch ( btCos(eulerZ));
192
- btScalar si ( btSin(eulerX));
193
- btScalar sj ( btSin(eulerY));
194
- btScalar sh ( btSin(eulerZ));
195
- btScalar cc = ci * ch;
196
- btScalar cs = ci * sh;
197
- btScalar sc = si * ch;
198
- btScalar ss = si * sh;
199
-
200
- setValue(cj * ch, sj * sc - cs, sj * cc + ss,
201
- cj * sh, sj * ss + cc, sj * cs - sc,
202
- -sj, cj * si, cj * ci);
203
- }
204
-
205
- /**@brief Set the matrix to the identity */
206
- void setIdentity()
207
- {
208
- setValue(btScalar(1.0), btScalar(0.0), btScalar(0.0),
209
- btScalar(0.0), btScalar(1.0), btScalar(0.0),
210
- btScalar(0.0), btScalar(0.0), btScalar(1.0));
211
- }
212
-
213
- static const btMatrix3x3& getIdentity()
214
- {
215
- static const btMatrix3x3 identityMatrix(btScalar(1.0), btScalar(0.0), btScalar(0.0),
216
- btScalar(0.0), btScalar(1.0), btScalar(0.0),
217
- btScalar(0.0), btScalar(0.0), btScalar(1.0));
218
- return identityMatrix;
219
- }
220
-
221
- /**@brief Fill the rotational part of an OpenGL matrix and clear the shear/perspective
222
- * @param m The array to be filled */
223
- void getOpenGLSubMatrix(btScalar *m) const
224
- {
225
- m[0] = btScalar(m_el[0].x());
226
- m[1] = btScalar(m_el[1].x());
227
- m[2] = btScalar(m_el[2].x());
228
- m[3] = btScalar(0.0);
229
- m[4] = btScalar(m_el[0].y());
230
- m[5] = btScalar(m_el[1].y());
231
- m[6] = btScalar(m_el[2].y());
232
- m[7] = btScalar(0.0);
233
- m[8] = btScalar(m_el[0].z());
234
- m[9] = btScalar(m_el[1].z());
235
- m[10] = btScalar(m_el[2].z());
236
- m[11] = btScalar(0.0);
237
- }
238
-
239
- /**@brief Get the matrix represented as a quaternion
240
- * @param q The quaternion which will be set */
241
- void getRotation(btQuaternion& q) const
242
- {
243
- btScalar trace = m_el[0].x() + m_el[1].y() + m_el[2].z();
244
- btScalar temp[4];
245
-
246
- if (trace > btScalar(0.0))
247
- {
248
- btScalar s = btSqrt(trace + btScalar(1.0));
249
- temp[3]=(s * btScalar(0.5));
250
- s = btScalar(0.5) / s;
251
-
252
- temp[0]=((m_el[2].y() - m_el[1].z()) * s);
253
- temp[1]=((m_el[0].z() - m_el[2].x()) * s);
254
- temp[2]=((m_el[1].x() - m_el[0].y()) * s);
255
- }
256
- else
257
- {
258
- int i = m_el[0].x() < m_el[1].y() ?
259
- (m_el[1].y() < m_el[2].z() ? 2 : 1) :
260
- (m_el[0].x() < m_el[2].z() ? 2 : 0);
261
- int j = (i + 1) % 3;
262
- int k = (i + 2) % 3;
263
-
264
- btScalar s = btSqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + btScalar(1.0));
265
- temp[i] = s * btScalar(0.5);
266
- s = btScalar(0.5) / s;
267
-
268
- temp[3] = (m_el[k][j] - m_el[j][k]) * s;
269
- temp[j] = (m_el[j][i] + m_el[i][j]) * s;
270
- temp[k] = (m_el[k][i] + m_el[i][k]) * s;
271
- }
272
- q.setValue(temp[0],temp[1],temp[2],temp[3]);
273
- }
274
-
275
- /**@brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR
276
- * @param yaw Yaw around Y axis
277
- * @param pitch Pitch around X axis
278
- * @param roll around Z axis */
279
- void getEulerYPR(btScalar& yaw, btScalar& pitch, btScalar& roll) const
280
- {
281
-
282
- // first use the normal calculus
283
- yaw = btScalar(btAtan2(m_el[1].x(), m_el[0].x()));
284
- pitch = btScalar(btAsin(-m_el[2].x()));
285
- roll = btScalar(btAtan2(m_el[2].y(), m_el[2].z()));
286
-
287
- // on pitch = +/-HalfPI
288
- if (btFabs(pitch)==SIMD_HALF_PI)
289
- {
290
- if (yaw>0)
291
- yaw-=SIMD_PI;
292
- else
293
- yaw+=SIMD_PI;
294
-
295
- if (roll>0)
296
- roll-=SIMD_PI;
297
- else
298
- roll+=SIMD_PI;
299
- }
300
- };
301
-
302
-
303
- /**@brief Get the matrix represented as euler angles around ZYX
304
- * @param yaw Yaw around X axis
305
- * @param pitch Pitch around Y axis
306
- * @param roll around X axis
307
- * @param solution_number Which solution of two possible solutions ( 1 or 2) are possible values*/
308
- void getEulerZYX(btScalar& yaw, btScalar& pitch, btScalar& roll, unsigned int solution_number = 1) const
309
- {
310
- struct Euler
311
- {
312
- btScalar yaw;
313
- btScalar pitch;
314
- btScalar roll;
315
- };
316
-
317
- Euler euler_out;
318
- Euler euler_out2; //second solution
319
- //get the pointer to the raw data
320
-
321
- // Check that pitch is not at a singularity
322
- if (btFabs(m_el[2].x()) >= 1)
323
- {
324
- euler_out.yaw = 0;
325
- euler_out2.yaw = 0;
326
-
327
- // From difference of angles formula
328
- btScalar delta = btAtan2(m_el[0].x(),m_el[0].z());
329
- if (m_el[2].x() > 0) //gimbal locked up
330
- {
331
- euler_out.pitch = SIMD_PI / btScalar(2.0);
332
- euler_out2.pitch = SIMD_PI / btScalar(2.0);
333
- euler_out.roll = euler_out.pitch + delta;
334
- euler_out2.roll = euler_out.pitch + delta;
335
- }
336
- else // gimbal locked down
337
- {
338
- euler_out.pitch = -SIMD_PI / btScalar(2.0);
339
- euler_out2.pitch = -SIMD_PI / btScalar(2.0);
340
- euler_out.roll = -euler_out.pitch + delta;
341
- euler_out2.roll = -euler_out.pitch + delta;
342
- }
343
- }
344
- else
345
- {
346
- euler_out.pitch = - btAsin(m_el[2].x());
347
- euler_out2.pitch = SIMD_PI - euler_out.pitch;
348
-
349
- euler_out.roll = btAtan2(m_el[2].y()/btCos(euler_out.pitch),
350
- m_el[2].z()/btCos(euler_out.pitch));
351
- euler_out2.roll = btAtan2(m_el[2].y()/btCos(euler_out2.pitch),
352
- m_el[2].z()/btCos(euler_out2.pitch));
353
-
354
- euler_out.yaw = btAtan2(m_el[1].x()/btCos(euler_out.pitch),
355
- m_el[0].x()/btCos(euler_out.pitch));
356
- euler_out2.yaw = btAtan2(m_el[1].x()/btCos(euler_out2.pitch),
357
- m_el[0].x()/btCos(euler_out2.pitch));
358
- }
359
-
360
- if (solution_number == 1)
361
- {
362
- yaw = euler_out.yaw;
363
- pitch = euler_out.pitch;
364
- roll = euler_out.roll;
365
- }
366
- else
367
- {
368
- yaw = euler_out2.yaw;
369
- pitch = euler_out2.pitch;
370
- roll = euler_out2.roll;
371
- }
372
- }
373
-
374
- /**@brief Create a scaled copy of the matrix
375
- * @param s Scaling vector The elements of the vector will scale each column */
376
-
377
- btMatrix3x3 scaled(const btVector3& s) const
378
- {
379
- return btMatrix3x3(m_el[0].x() * s.x(), m_el[0].y() * s.y(), m_el[0].z() * s.z(),
380
- m_el[1].x() * s.x(), m_el[1].y() * s.y(), m_el[1].z() * s.z(),
381
- m_el[2].x() * s.x(), m_el[2].y() * s.y(), m_el[2].z() * s.z());
382
- }
383
-
384
- /**@brief Return the determinant of the matrix */
385
- btScalar determinant() const;
386
- /**@brief Return the adjoint of the matrix */
387
- btMatrix3x3 adjoint() const;
388
- /**@brief Return the matrix with all values non negative */
389
- btMatrix3x3 absolute() const;
390
- /**@brief Return the transpose of the matrix */
391
- btMatrix3x3 transpose() const;
392
- /**@brief Return the inverse of the matrix */
393
- btMatrix3x3 inverse() const;
394
-
395
- btMatrix3x3 transposeTimes(const btMatrix3x3& m) const;
396
- btMatrix3x3 timesTranspose(const btMatrix3x3& m) const;
397
-
398
- SIMD_FORCE_INLINE btScalar tdotx(const btVector3& v) const
399
- {
400
- return m_el[0].x() * v.x() + m_el[1].x() * v.y() + m_el[2].x() * v.z();
401
- }
402
- SIMD_FORCE_INLINE btScalar tdoty(const btVector3& v) const
403
- {
404
- return m_el[0].y() * v.x() + m_el[1].y() * v.y() + m_el[2].y() * v.z();
405
- }
406
- SIMD_FORCE_INLINE btScalar tdotz(const btVector3& v) const
407
- {
408
- return m_el[0].z() * v.x() + m_el[1].z() * v.y() + m_el[2].z() * v.z();
409
- }
410
-
411
-
412
- /**@brief diagonalizes this matrix by the Jacobi method.
413
- * @param rot stores the rotation from the coordinate system in which the matrix is diagonal to the original
414
- * coordinate system, i.e., old_this = rot * new_this * rot^T.
415
- * @param threshold See iteration
416
- * @param iteration The iteration stops when all off-diagonal elements are less than the threshold multiplied
417
- * by the sum of the absolute values of the diagonal, or when maxSteps have been executed.
418
- *
419
- * Note that this matrix is assumed to be symmetric.
420
- */
421
- void diagonalize(btMatrix3x3& rot, btScalar threshold, int maxSteps)
422
- {
423
- rot.setIdentity();
424
- for (int step = maxSteps; step > 0; step--)
425
- {
426
- // find off-diagonal element [p][q] with largest magnitude
427
- int p = 0;
428
- int q = 1;
429
- int r = 2;
430
- btScalar max = btFabs(m_el[0][1]);
431
- btScalar v = btFabs(m_el[0][2]);
432
- if (v > max)
433
- {
434
- q = 2;
435
- r = 1;
436
- max = v;
437
- }
438
- v = btFabs(m_el[1][2]);
439
- if (v > max)
440
- {
441
- p = 1;
442
- q = 2;
443
- r = 0;
444
- max = v;
445
- }
446
-
447
- btScalar t = threshold * (btFabs(m_el[0][0]) + btFabs(m_el[1][1]) + btFabs(m_el[2][2]));
448
- if (max <= t)
449
- {
450
- if (max <= SIMD_EPSILON * t)
451
- {
452
- return;
453
- }
454
- step = 1;
455
- }
456
-
457
- // compute Jacobi rotation J which leads to a zero for element [p][q]
458
- btScalar mpq = m_el[p][q];
459
- btScalar theta = (m_el[q][q] - m_el[p][p]) / (2 * mpq);
460
- btScalar theta2 = theta * theta;
461
- btScalar cos;
462
- btScalar sin;
463
- if (theta2 * theta2 < btScalar(10 / SIMD_EPSILON))
464
- {
465
- t = (theta >= 0) ? 1 / (theta + btSqrt(1 + theta2))
466
- : 1 / (theta - btSqrt(1 + theta2));
467
- cos = 1 / btSqrt(1 + t * t);
468
- sin = cos * t;
469
- }
470
- else
471
- {
472
- // approximation for large theta-value, i.e., a nearly diagonal matrix
473
- t = 1 / (theta * (2 + btScalar(0.5) / theta2));
474
- cos = 1 - btScalar(0.5) * t * t;
475
- sin = cos * t;
476
- }
477
-
478
- // apply rotation to matrix (this = J^T * this * J)
479
- m_el[p][q] = m_el[q][p] = 0;
480
- m_el[p][p] -= t * mpq;
481
- m_el[q][q] += t * mpq;
482
- btScalar mrp = m_el[r][p];
483
- btScalar mrq = m_el[r][q];
484
- m_el[r][p] = m_el[p][r] = cos * mrp - sin * mrq;
485
- m_el[r][q] = m_el[q][r] = cos * mrq + sin * mrp;
486
-
487
- // apply rotation to rot (rot = rot * J)
488
- for (int i = 0; i < 3; i++)
489
- {
490
- btVector3& row = rot[i];
491
- mrp = row[p];
492
- mrq = row[q];
493
- row[p] = cos * mrp - sin * mrq;
494
- row[q] = cos * mrq + sin * mrp;
495
- }
496
- }
497
- }
498
-
499
-
500
-
501
-
502
- /**@brief Calculate the matrix cofactor
503
- * @param r1 The first row to use for calculating the cofactor
504
- * @param c1 The first column to use for calculating the cofactor
505
- * @param r1 The second row to use for calculating the cofactor
506
- * @param c1 The second column to use for calculating the cofactor
507
- * See http://en.wikipedia.org/wiki/Cofactor_(linear_algebra) for more details
508
- */
509
- btScalar cofac(int r1, int c1, int r2, int c2) const
510
- {
511
- return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1];
512
- }
513
-
514
- void serialize(struct btMatrix3x3Data& dataOut) const;
515
-
516
- void serializeFloat(struct btMatrix3x3FloatData& dataOut) const;
517
-
518
- void deSerialize(const struct btMatrix3x3Data& dataIn);
519
-
520
- void deSerializeFloat(const struct btMatrix3x3FloatData& dataIn);
521
-
522
- void deSerializeDouble(const struct btMatrix3x3DoubleData& dataIn);
523
-
524
- };
525
-
526
-
527
- SIMD_FORCE_INLINE btMatrix3x3&
528
- btMatrix3x3::operator*=(const btMatrix3x3& m)
529
- {
530
- setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]),
531
- m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]),
532
- m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2]));
533
- return *this;
534
- }
535
-
536
- SIMD_FORCE_INLINE btMatrix3x3&
537
- btMatrix3x3::operator+=(const btMatrix3x3& m)
538
- {
539
- setValue(
540
- m_el[0][0]+m.m_el[0][0],
541
- m_el[0][1]+m.m_el[0][1],
542
- m_el[0][2]+m.m_el[0][2],
543
- m_el[1][0]+m.m_el[1][0],
544
- m_el[1][1]+m.m_el[1][1],
545
- m_el[1][2]+m.m_el[1][2],
546
- m_el[2][0]+m.m_el[2][0],
547
- m_el[2][1]+m.m_el[2][1],
548
- m_el[2][2]+m.m_el[2][2]);
549
- return *this;
550
- }
551
-
552
- SIMD_FORCE_INLINE btMatrix3x3
553
- operator*(const btMatrix3x3& m, const btScalar & k)
554
- {
555
- return btMatrix3x3(
556
- m[0].x()*k,m[0].y()*k,m[0].z()*k,
557
- m[1].x()*k,m[1].y()*k,m[1].z()*k,
558
- m[2].x()*k,m[2].y()*k,m[2].z()*k);
559
- }
560
-
561
- SIMD_FORCE_INLINE btMatrix3x3
562
- operator+(const btMatrix3x3& m1, const btMatrix3x3& m2)
563
- {
564
- return btMatrix3x3(
565
- m1[0][0]+m2[0][0],
566
- m1[0][1]+m2[0][1],
567
- m1[0][2]+m2[0][2],
568
- m1[1][0]+m2[1][0],
569
- m1[1][1]+m2[1][1],
570
- m1[1][2]+m2[1][2],
571
- m1[2][0]+m2[2][0],
572
- m1[2][1]+m2[2][1],
573
- m1[2][2]+m2[2][2]);
574
- }
575
-
576
- SIMD_FORCE_INLINE btMatrix3x3
577
- operator-(const btMatrix3x3& m1, const btMatrix3x3& m2)
578
- {
579
- return btMatrix3x3(
580
- m1[0][0]-m2[0][0],
581
- m1[0][1]-m2[0][1],
582
- m1[0][2]-m2[0][2],
583
- m1[1][0]-m2[1][0],
584
- m1[1][1]-m2[1][1],
585
- m1[1][2]-m2[1][2],
586
- m1[2][0]-m2[2][0],
587
- m1[2][1]-m2[2][1],
588
- m1[2][2]-m2[2][2]);
589
- }
590
-
591
-
592
- SIMD_FORCE_INLINE btMatrix3x3&
593
- btMatrix3x3::operator-=(const btMatrix3x3& m)
594
- {
595
- setValue(
596
- m_el[0][0]-m.m_el[0][0],
597
- m_el[0][1]-m.m_el[0][1],
598
- m_el[0][2]-m.m_el[0][2],
599
- m_el[1][0]-m.m_el[1][0],
600
- m_el[1][1]-m.m_el[1][1],
601
- m_el[1][2]-m.m_el[1][2],
602
- m_el[2][0]-m.m_el[2][0],
603
- m_el[2][1]-m.m_el[2][1],
604
- m_el[2][2]-m.m_el[2][2]);
605
- return *this;
606
- }
607
-
608
-
609
- SIMD_FORCE_INLINE btScalar
610
- btMatrix3x3::determinant() const
611
- {
612
- return btTriple((*this)[0], (*this)[1], (*this)[2]);
613
- }
614
-
615
-
616
- SIMD_FORCE_INLINE btMatrix3x3
617
- btMatrix3x3::absolute() const
618
- {
619
- return btMatrix3x3(
620
- btFabs(m_el[0].x()), btFabs(m_el[0].y()), btFabs(m_el[0].z()),
621
- btFabs(m_el[1].x()), btFabs(m_el[1].y()), btFabs(m_el[1].z()),
622
- btFabs(m_el[2].x()), btFabs(m_el[2].y()), btFabs(m_el[2].z()));
623
- }
624
-
625
- SIMD_FORCE_INLINE btMatrix3x3
626
- btMatrix3x3::transpose() const
627
- {
628
- return btMatrix3x3(m_el[0].x(), m_el[1].x(), m_el[2].x(),
629
- m_el[0].y(), m_el[1].y(), m_el[2].y(),
630
- m_el[0].z(), m_el[1].z(), m_el[2].z());
631
- }
632
-
633
- SIMD_FORCE_INLINE btMatrix3x3
634
- btMatrix3x3::adjoint() const
635
- {
636
- return btMatrix3x3(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2),
637
- cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0),
638
- cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1));
639
- }
640
-
641
- SIMD_FORCE_INLINE btMatrix3x3
642
- btMatrix3x3::inverse() const
643
- {
644
- btVector3 co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1));
645
- btScalar det = (*this)[0].dot(co);
646
- btFullAssert(det != btScalar(0.0));
647
- btScalar s = btScalar(1.0) / det;
648
- return btMatrix3x3(co.x() * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s,
649
- co.y() * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s,
650
- co.z() * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s);
651
- }
652
-
653
- SIMD_FORCE_INLINE btMatrix3x3
654
- btMatrix3x3::transposeTimes(const btMatrix3x3& m) const
655
- {
656
- return btMatrix3x3(
657
- m_el[0].x() * m[0].x() + m_el[1].x() * m[1].x() + m_el[2].x() * m[2].x(),
658
- m_el[0].x() * m[0].y() + m_el[1].x() * m[1].y() + m_el[2].x() * m[2].y(),
659
- m_el[0].x() * m[0].z() + m_el[1].x() * m[1].z() + m_el[2].x() * m[2].z(),
660
- m_el[0].y() * m[0].x() + m_el[1].y() * m[1].x() + m_el[2].y() * m[2].x(),
661
- m_el[0].y() * m[0].y() + m_el[1].y() * m[1].y() + m_el[2].y() * m[2].y(),
662
- m_el[0].y() * m[0].z() + m_el[1].y() * m[1].z() + m_el[2].y() * m[2].z(),
663
- m_el[0].z() * m[0].x() + m_el[1].z() * m[1].x() + m_el[2].z() * m[2].x(),
664
- m_el[0].z() * m[0].y() + m_el[1].z() * m[1].y() + m_el[2].z() * m[2].y(),
665
- m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].z());
666
- }
667
-
668
- SIMD_FORCE_INLINE btMatrix3x3
669
- btMatrix3x3::timesTranspose(const btMatrix3x3& m) const
670
- {
671
- return btMatrix3x3(
672
- m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]),
673
- m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]),
674
- m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2]));
675
-
676
- }
677
-
678
- SIMD_FORCE_INLINE btVector3
679
- operator*(const btMatrix3x3& m, const btVector3& v)
680
- {
681
- return btVector3(m[0].dot(v), m[1].dot(v), m[2].dot(v));
682
- }
683
-
684
-
685
- SIMD_FORCE_INLINE btVector3
686
- operator*(const btVector3& v, const btMatrix3x3& m)
687
- {
688
- return btVector3(m.tdotx(v), m.tdoty(v), m.tdotz(v));
689
- }
690
-
691
- SIMD_FORCE_INLINE btMatrix3x3
692
- operator*(const btMatrix3x3& m1, const btMatrix3x3& m2)
693
- {
694
- return btMatrix3x3(
695
- m2.tdotx( m1[0]), m2.tdoty( m1[0]), m2.tdotz( m1[0]),
696
- m2.tdotx( m1[1]), m2.tdoty( m1[1]), m2.tdotz( m1[1]),
697
- m2.tdotx( m1[2]), m2.tdoty( m1[2]), m2.tdotz( m1[2]));
698
- }
699
-
700
- /*
701
- SIMD_FORCE_INLINE btMatrix3x3 btMultTransposeLeft(const btMatrix3x3& m1, const btMatrix3x3& m2) {
702
- return btMatrix3x3(
703
- m1[0][0] * m2[0][0] + m1[1][0] * m2[1][0] + m1[2][0] * m2[2][0],
704
- m1[0][0] * m2[0][1] + m1[1][0] * m2[1][1] + m1[2][0] * m2[2][1],
705
- m1[0][0] * m2[0][2] + m1[1][0] * m2[1][2] + m1[2][0] * m2[2][2],
706
- m1[0][1] * m2[0][0] + m1[1][1] * m2[1][0] + m1[2][1] * m2[2][0],
707
- m1[0][1] * m2[0][1] + m1[1][1] * m2[1][1] + m1[2][1] * m2[2][1],
708
- m1[0][1] * m2[0][2] + m1[1][1] * m2[1][2] + m1[2][1] * m2[2][2],
709
- m1[0][2] * m2[0][0] + m1[1][2] * m2[1][0] + m1[2][2] * m2[2][0],
710
- m1[0][2] * m2[0][1] + m1[1][2] * m2[1][1] + m1[2][2] * m2[2][1],
711
- m1[0][2] * m2[0][2] + m1[1][2] * m2[1][2] + m1[2][2] * m2[2][2]);
712
- }
713
- */
714
-
715
- /**@brief Equality operator between two matrices
716
- * It will test all elements are equal. */
717
- SIMD_FORCE_INLINE bool operator==(const btMatrix3x3& m1, const btMatrix3x3& m2)
718
- {
719
- return ( m1[0][0] == m2[0][0] && m1[1][0] == m2[1][0] && m1[2][0] == m2[2][0] &&
720
- m1[0][1] == m2[0][1] && m1[1][1] == m2[1][1] && m1[2][1] == m2[2][1] &&
721
- m1[0][2] == m2[0][2] && m1[1][2] == m2[1][2] && m1[2][2] == m2[2][2] );
722
- }
723
-
724
- ///for serialization
725
- struct btMatrix3x3FloatData
726
- {
727
- btVector3FloatData m_el[3];
728
- };
729
-
730
- ///for serialization
731
- struct btMatrix3x3DoubleData
732
- {
733
- btVector3DoubleData m_el[3];
734
- };
735
-
736
-
737
-
738
-
739
- SIMD_FORCE_INLINE void btMatrix3x3::serialize(struct btMatrix3x3Data& dataOut) const
740
- {
741
- for (int i=0;i<3;i++)
742
- m_el[i].serialize(dataOut.m_el[i]);
743
- }
744
-
745
- SIMD_FORCE_INLINE void btMatrix3x3::serializeFloat(struct btMatrix3x3FloatData& dataOut) const
746
- {
747
- for (int i=0;i<3;i++)
748
- m_el[i].serializeFloat(dataOut.m_el[i]);
749
- }
750
-
751
-
752
- SIMD_FORCE_INLINE void btMatrix3x3::deSerialize(const struct btMatrix3x3Data& dataIn)
753
- {
754
- for (int i=0;i<3;i++)
755
- m_el[i].deSerialize(dataIn.m_el[i]);
756
- }
757
-
758
- SIMD_FORCE_INLINE void btMatrix3x3::deSerializeFloat(const struct btMatrix3x3FloatData& dataIn)
759
- {
760
- for (int i=0;i<3;i++)
761
- m_el[i].deSerializeFloat(dataIn.m_el[i]);
762
- }
763
-
764
- SIMD_FORCE_INLINE void btMatrix3x3::deSerializeDouble(const struct btMatrix3x3DoubleData& dataIn)
765
- {
766
- for (int i=0;i<3;i++)
767
- m_el[i].deSerializeDouble(dataIn.m_el[i]);
768
- }
769
-
770
- #endif //BT_MATRIX3x3_H
771
-