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

Sign up to get free protection for your applications and to get access to all the features.
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,766 +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
-
17
- #ifndef BT_VECTOR3_H
18
- #define BT_VECTOR3_H
19
-
20
-
21
- #include "btScalar.h"
22
- #include "btMinMax.h"
23
-
24
- #ifdef BT_USE_DOUBLE_PRECISION
25
- #define btVector3Data btVector3DoubleData
26
- #define btVector3DataName "btVector3DoubleData"
27
- #else
28
- #define btVector3Data btVector3FloatData
29
- #define btVector3DataName "btVector3FloatData"
30
- #endif //BT_USE_DOUBLE_PRECISION
31
-
32
-
33
-
34
-
35
- /**@brief btVector3 can be used to represent 3D points and vectors.
36
- * It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user
37
- * Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers
38
- */
39
- ATTRIBUTE_ALIGNED16(class) btVector3
40
- {
41
- public:
42
-
43
- #if defined (__SPU__) && defined (__CELLOS_LV2__)
44
- btScalar m_floats[4];
45
- public:
46
- SIMD_FORCE_INLINE const vec_float4& get128() const
47
- {
48
- return *((const vec_float4*)&m_floats[0]);
49
- }
50
- public:
51
- #else //__CELLOS_LV2__ __SPU__
52
- #ifdef BT_USE_SSE // _WIN32
53
- union {
54
- __m128 mVec128;
55
- btScalar m_floats[4];
56
- };
57
- SIMD_FORCE_INLINE __m128 get128() const
58
- {
59
- return mVec128;
60
- }
61
- SIMD_FORCE_INLINE void set128(__m128 v128)
62
- {
63
- mVec128 = v128;
64
- }
65
- #else
66
- btScalar m_floats[4];
67
- #endif
68
- #endif //__CELLOS_LV2__ __SPU__
69
-
70
- public:
71
-
72
- /**@brief No initialization constructor */
73
- SIMD_FORCE_INLINE btVector3() {}
74
-
75
-
76
-
77
- /**@brief Constructor from scalars
78
- * @param x X value
79
- * @param y Y value
80
- * @param z Z value
81
- */
82
- SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z)
83
- {
84
- m_floats[0] = x;
85
- m_floats[1] = y;
86
- m_floats[2] = z;
87
- m_floats[3] = btScalar(0.);
88
- }
89
-
90
-
91
- /**@brief Add a vector to this one
92
- * @param The vector to add to this one */
93
- SIMD_FORCE_INLINE btVector3& operator+=(const btVector3& v)
94
- {
95
-
96
- m_floats[0] += v.m_floats[0]; m_floats[1] += v.m_floats[1];m_floats[2] += v.m_floats[2];
97
- return *this;
98
- }
99
-
100
-
101
- /**@brief Subtract a vector from this one
102
- * @param The vector to subtract */
103
- SIMD_FORCE_INLINE btVector3& operator-=(const btVector3& v)
104
- {
105
- m_floats[0] -= v.m_floats[0]; m_floats[1] -= v.m_floats[1];m_floats[2] -= v.m_floats[2];
106
- return *this;
107
- }
108
- /**@brief Scale the vector
109
- * @param s Scale factor */
110
- SIMD_FORCE_INLINE btVector3& operator*=(const btScalar& s)
111
- {
112
- m_floats[0] *= s; m_floats[1] *= s;m_floats[2] *= s;
113
- return *this;
114
- }
115
-
116
- /**@brief Inversely scale the vector
117
- * @param s Scale factor to divide by */
118
- SIMD_FORCE_INLINE btVector3& operator/=(const btScalar& s)
119
- {
120
- btFullAssert(s != btScalar(0.0));
121
- return *this *= btScalar(1.0) / s;
122
- }
123
-
124
- /**@brief Return the dot product
125
- * @param v The other vector in the dot product */
126
- SIMD_FORCE_INLINE btScalar dot(const btVector3& v) const
127
- {
128
- return m_floats[0] * v.m_floats[0] + m_floats[1] * v.m_floats[1] +m_floats[2] * v.m_floats[2];
129
- }
130
-
131
- /**@brief Return the length of the vector squared */
132
- SIMD_FORCE_INLINE btScalar length2() const
133
- {
134
- return dot(*this);
135
- }
136
-
137
- /**@brief Return the length of the vector */
138
- SIMD_FORCE_INLINE btScalar length() const
139
- {
140
- return btSqrt(length2());
141
- }
142
-
143
- /**@brief Return the distance squared between the ends of this and another vector
144
- * This is symantically treating the vector like a point */
145
- SIMD_FORCE_INLINE btScalar distance2(const btVector3& v) const;
146
-
147
- /**@brief Return the distance between the ends of this and another vector
148
- * This is symantically treating the vector like a point */
149
- SIMD_FORCE_INLINE btScalar distance(const btVector3& v) const;
150
-
151
- SIMD_FORCE_INLINE btVector3& safeNormalize()
152
- {
153
- btVector3 absVec = this->absolute();
154
- int maxIndex = absVec.maxAxis();
155
- if (absVec[maxIndex]>0)
156
- {
157
- *this /= absVec[maxIndex];
158
- return *this /= length();
159
- }
160
- setValue(1,0,0);
161
- return *this;
162
- }
163
-
164
- /**@brief Normalize this vector
165
- * x^2 + y^2 + z^2 = 1 */
166
- SIMD_FORCE_INLINE btVector3& normalize()
167
- {
168
- return *this /= length();
169
- }
170
-
171
- /**@brief Return a normalized version of this vector */
172
- SIMD_FORCE_INLINE btVector3 normalized() const;
173
-
174
- /**@brief Return a rotated version of this vector
175
- * @param wAxis The axis to rotate about
176
- * @param angle The angle to rotate by */
177
- SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ) const;
178
-
179
- /**@brief Return the angle between this and another vector
180
- * @param v The other vector */
181
- SIMD_FORCE_INLINE btScalar angle(const btVector3& v) const
182
- {
183
- btScalar s = btSqrt(length2() * v.length2());
184
- btFullAssert(s != btScalar(0.0));
185
- return btAcos(dot(v) / s);
186
- }
187
- /**@brief Return a vector will the absolute values of each element */
188
- SIMD_FORCE_INLINE btVector3 absolute() const
189
- {
190
- return btVector3(
191
- btFabs(m_floats[0]),
192
- btFabs(m_floats[1]),
193
- btFabs(m_floats[2]));
194
- }
195
- /**@brief Return the cross product between this and another vector
196
- * @param v The other vector */
197
- SIMD_FORCE_INLINE btVector3 cross(const btVector3& v) const
198
- {
199
- return btVector3(
200
- m_floats[1] * v.m_floats[2] -m_floats[2] * v.m_floats[1],
201
- m_floats[2] * v.m_floats[0] - m_floats[0] * v.m_floats[2],
202
- m_floats[0] * v.m_floats[1] - m_floats[1] * v.m_floats[0]);
203
- }
204
-
205
- SIMD_FORCE_INLINE btScalar triple(const btVector3& v1, const btVector3& v2) const
206
- {
207
- return m_floats[0] * (v1.m_floats[1] * v2.m_floats[2] - v1.m_floats[2] * v2.m_floats[1]) +
208
- m_floats[1] * (v1.m_floats[2] * v2.m_floats[0] - v1.m_floats[0] * v2.m_floats[2]) +
209
- m_floats[2] * (v1.m_floats[0] * v2.m_floats[1] - v1.m_floats[1] * v2.m_floats[0]);
210
- }
211
-
212
- /**@brief Return the axis with the smallest value
213
- * Note return values are 0,1,2 for x, y, or z */
214
- SIMD_FORCE_INLINE int minAxis() const
215
- {
216
- return m_floats[0] < m_floats[1] ? (m_floats[0] <m_floats[2] ? 0 : 2) : (m_floats[1] <m_floats[2] ? 1 : 2);
217
- }
218
-
219
- /**@brief Return the axis with the largest value
220
- * Note return values are 0,1,2 for x, y, or z */
221
- SIMD_FORCE_INLINE int maxAxis() const
222
- {
223
- return m_floats[0] < m_floats[1] ? (m_floats[1] <m_floats[2] ? 2 : 1) : (m_floats[0] <m_floats[2] ? 2 : 0);
224
- }
225
-
226
- SIMD_FORCE_INLINE int furthestAxis() const
227
- {
228
- return absolute().minAxis();
229
- }
230
-
231
- SIMD_FORCE_INLINE int closestAxis() const
232
- {
233
- return absolute().maxAxis();
234
- }
235
-
236
- SIMD_FORCE_INLINE void setInterpolate3(const btVector3& v0, const btVector3& v1, btScalar rt)
237
- {
238
- btScalar s = btScalar(1.0) - rt;
239
- m_floats[0] = s * v0.m_floats[0] + rt * v1.m_floats[0];
240
- m_floats[1] = s * v0.m_floats[1] + rt * v1.m_floats[1];
241
- m_floats[2] = s * v0.m_floats[2] + rt * v1.m_floats[2];
242
- //don't do the unused w component
243
- // m_co[3] = s * v0[3] + rt * v1[3];
244
- }
245
-
246
- /**@brief Return the linear interpolation between this and another vector
247
- * @param v The other vector
248
- * @param t The ration of this to v (t = 0 => return this, t=1 => return other) */
249
- SIMD_FORCE_INLINE btVector3 lerp(const btVector3& v, const btScalar& t) const
250
- {
251
- return btVector3(m_floats[0] + (v.m_floats[0] - m_floats[0]) * t,
252
- m_floats[1] + (v.m_floats[1] - m_floats[1]) * t,
253
- m_floats[2] + (v.m_floats[2] -m_floats[2]) * t);
254
- }
255
-
256
- /**@brief Elementwise multiply this vector by the other
257
- * @param v The other vector */
258
- SIMD_FORCE_INLINE btVector3& operator*=(const btVector3& v)
259
- {
260
- m_floats[0] *= v.m_floats[0]; m_floats[1] *= v.m_floats[1];m_floats[2] *= v.m_floats[2];
261
- return *this;
262
- }
263
-
264
- /**@brief Return the x value */
265
- SIMD_FORCE_INLINE const btScalar& getX() const { return m_floats[0]; }
266
- /**@brief Return the y value */
267
- SIMD_FORCE_INLINE const btScalar& getY() const { return m_floats[1]; }
268
- /**@brief Return the z value */
269
- SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; }
270
- /**@brief Set the x value */
271
- SIMD_FORCE_INLINE void setX(btScalar x) { m_floats[0] = x;};
272
- /**@brief Set the y value */
273
- SIMD_FORCE_INLINE void setY(btScalar y) { m_floats[1] = y;};
274
- /**@brief Set the z value */
275
- SIMD_FORCE_INLINE void setZ(btScalar z) {m_floats[2] = z;};
276
- /**@brief Set the w value */
277
- SIMD_FORCE_INLINE void setW(btScalar w) { m_floats[3] = w;};
278
- /**@brief Return the x value */
279
- SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; }
280
- /**@brief Return the y value */
281
- SIMD_FORCE_INLINE const btScalar& y() const { return m_floats[1]; }
282
- /**@brief Return the z value */
283
- SIMD_FORCE_INLINE const btScalar& z() const { return m_floats[2]; }
284
- /**@brief Return the w value */
285
- SIMD_FORCE_INLINE const btScalar& w() const { return m_floats[3]; }
286
-
287
- //SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_floats[0])[i]; }
288
- //SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_floats[0])[i]; }
289
- ///operator btScalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.
290
- SIMD_FORCE_INLINE operator btScalar *() { return &m_floats[0]; }
291
- SIMD_FORCE_INLINE operator const btScalar *() const { return &m_floats[0]; }
292
-
293
- SIMD_FORCE_INLINE bool operator==(const btVector3& other) const
294
- {
295
- return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0]));
296
- }
297
-
298
- SIMD_FORCE_INLINE bool operator!=(const btVector3& other) const
299
- {
300
- return !(*this == other);
301
- }
302
-
303
- /**@brief Set each element to the max of the current values and the values of another btVector3
304
- * @param other The other btVector3 to compare with
305
- */
306
- SIMD_FORCE_INLINE void setMax(const btVector3& other)
307
- {
308
- btSetMax(m_floats[0], other.m_floats[0]);
309
- btSetMax(m_floats[1], other.m_floats[1]);
310
- btSetMax(m_floats[2], other.m_floats[2]);
311
- btSetMax(m_floats[3], other.w());
312
- }
313
- /**@brief Set each element to the min of the current values and the values of another btVector3
314
- * @param other The other btVector3 to compare with
315
- */
316
- SIMD_FORCE_INLINE void setMin(const btVector3& other)
317
- {
318
- btSetMin(m_floats[0], other.m_floats[0]);
319
- btSetMin(m_floats[1], other.m_floats[1]);
320
- btSetMin(m_floats[2], other.m_floats[2]);
321
- btSetMin(m_floats[3], other.w());
322
- }
323
-
324
- SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z)
325
- {
326
- m_floats[0]=x;
327
- m_floats[1]=y;
328
- m_floats[2]=z;
329
- m_floats[3] = btScalar(0.);
330
- }
331
-
332
- void getSkewSymmetricMatrix(btVector3* v0,btVector3* v1,btVector3* v2) const
333
- {
334
- v0->setValue(0. ,-z() ,y());
335
- v1->setValue(z() ,0. ,-x());
336
- v2->setValue(-y() ,x() ,0.);
337
- }
338
-
339
- void setZero()
340
- {
341
- setValue(btScalar(0.),btScalar(0.),btScalar(0.));
342
- }
343
-
344
- SIMD_FORCE_INLINE bool isZero() const
345
- {
346
- return m_floats[0] == btScalar(0) && m_floats[1] == btScalar(0) && m_floats[2] == btScalar(0);
347
- }
348
-
349
- SIMD_FORCE_INLINE bool fuzzyZero() const
350
- {
351
- return length2() < SIMD_EPSILON;
352
- }
353
-
354
- SIMD_FORCE_INLINE void serialize(struct btVector3Data& dataOut) const;
355
-
356
- SIMD_FORCE_INLINE void deSerialize(const struct btVector3Data& dataIn);
357
-
358
- SIMD_FORCE_INLINE void serializeFloat(struct btVector3FloatData& dataOut) const;
359
-
360
- SIMD_FORCE_INLINE void deSerializeFloat(const struct btVector3FloatData& dataIn);
361
-
362
- SIMD_FORCE_INLINE void serializeDouble(struct btVector3DoubleData& dataOut) const;
363
-
364
- SIMD_FORCE_INLINE void deSerializeDouble(const struct btVector3DoubleData& dataIn);
365
-
366
- };
367
-
368
- /**@brief Return the sum of two vectors (Point symantics)*/
369
- SIMD_FORCE_INLINE btVector3
370
- operator+(const btVector3& v1, const btVector3& v2)
371
- {
372
- return btVector3(v1.m_floats[0] + v2.m_floats[0], v1.m_floats[1] + v2.m_floats[1], v1.m_floats[2] + v2.m_floats[2]);
373
- }
374
-
375
- /**@brief Return the elementwise product of two vectors */
376
- SIMD_FORCE_INLINE btVector3
377
- operator*(const btVector3& v1, const btVector3& v2)
378
- {
379
- return btVector3(v1.m_floats[0] * v2.m_floats[0], v1.m_floats[1] * v2.m_floats[1], v1.m_floats[2] * v2.m_floats[2]);
380
- }
381
-
382
- /**@brief Return the difference between two vectors */
383
- SIMD_FORCE_INLINE btVector3
384
- operator-(const btVector3& v1, const btVector3& v2)
385
- {
386
- return btVector3(v1.m_floats[0] - v2.m_floats[0], v1.m_floats[1] - v2.m_floats[1], v1.m_floats[2] - v2.m_floats[2]);
387
- }
388
- /**@brief Return the negative of the vector */
389
- SIMD_FORCE_INLINE btVector3
390
- operator-(const btVector3& v)
391
- {
392
- return btVector3(-v.m_floats[0], -v.m_floats[1], -v.m_floats[2]);
393
- }
394
-
395
- /**@brief Return the vector scaled by s */
396
- SIMD_FORCE_INLINE btVector3
397
- operator*(const btVector3& v, const btScalar& s)
398
- {
399
- return btVector3(v.m_floats[0] * s, v.m_floats[1] * s, v.m_floats[2] * s);
400
- }
401
-
402
- /**@brief Return the vector scaled by s */
403
- SIMD_FORCE_INLINE btVector3
404
- operator*(const btScalar& s, const btVector3& v)
405
- {
406
- return v * s;
407
- }
408
-
409
- /**@brief Return the vector inversely scaled by s */
410
- SIMD_FORCE_INLINE btVector3
411
- operator/(const btVector3& v, const btScalar& s)
412
- {
413
- btFullAssert(s != btScalar(0.0));
414
- return v * (btScalar(1.0) / s);
415
- }
416
-
417
- /**@brief Return the vector inversely scaled by s */
418
- SIMD_FORCE_INLINE btVector3
419
- operator/(const btVector3& v1, const btVector3& v2)
420
- {
421
- return btVector3(v1.m_floats[0] / v2.m_floats[0],v1.m_floats[1] / v2.m_floats[1],v1.m_floats[2] / v2.m_floats[2]);
422
- }
423
-
424
- /**@brief Return the dot product between two vectors */
425
- SIMD_FORCE_INLINE btScalar
426
- btDot(const btVector3& v1, const btVector3& v2)
427
- {
428
- return v1.dot(v2);
429
- }
430
-
431
-
432
- /**@brief Return the distance squared between two vectors */
433
- SIMD_FORCE_INLINE btScalar
434
- btDistance2(const btVector3& v1, const btVector3& v2)
435
- {
436
- return v1.distance2(v2);
437
- }
438
-
439
-
440
- /**@brief Return the distance between two vectors */
441
- SIMD_FORCE_INLINE btScalar
442
- btDistance(const btVector3& v1, const btVector3& v2)
443
- {
444
- return v1.distance(v2);
445
- }
446
-
447
- /**@brief Return the angle between two vectors */
448
- SIMD_FORCE_INLINE btScalar
449
- btAngle(const btVector3& v1, const btVector3& v2)
450
- {
451
- return v1.angle(v2);
452
- }
453
-
454
- /**@brief Return the cross product of two vectors */
455
- SIMD_FORCE_INLINE btVector3
456
- btCross(const btVector3& v1, const btVector3& v2)
457
- {
458
- return v1.cross(v2);
459
- }
460
-
461
- SIMD_FORCE_INLINE btScalar
462
- btTriple(const btVector3& v1, const btVector3& v2, const btVector3& v3)
463
- {
464
- return v1.triple(v2, v3);
465
- }
466
-
467
- /**@brief Return the linear interpolation between two vectors
468
- * @param v1 One vector
469
- * @param v2 The other vector
470
- * @param t The ration of this to v (t = 0 => return v1, t=1 => return v2) */
471
- SIMD_FORCE_INLINE btVector3
472
- lerp(const btVector3& v1, const btVector3& v2, const btScalar& t)
473
- {
474
- return v1.lerp(v2, t);
475
- }
476
-
477
-
478
-
479
- SIMD_FORCE_INLINE btScalar btVector3::distance2(const btVector3& v) const
480
- {
481
- return (v - *this).length2();
482
- }
483
-
484
- SIMD_FORCE_INLINE btScalar btVector3::distance(const btVector3& v) const
485
- {
486
- return (v - *this).length();
487
- }
488
-
489
- SIMD_FORCE_INLINE btVector3 btVector3::normalized() const
490
- {
491
- return *this / length();
492
- }
493
-
494
- SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) const
495
- {
496
- // wAxis must be a unit lenght vector
497
-
498
- btVector3 o = wAxis * wAxis.dot( *this );
499
- btVector3 x = *this - o;
500
- btVector3 y;
501
-
502
- y = wAxis.cross( *this );
503
-
504
- return ( o + x * btCos( angle ) + y * btSin( angle ) );
505
- }
506
-
507
- class btVector4 : public btVector3
508
- {
509
- public:
510
-
511
- SIMD_FORCE_INLINE btVector4() {}
512
-
513
-
514
- SIMD_FORCE_INLINE btVector4(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
515
- : btVector3(x,y,z)
516
- {
517
- m_floats[3] = w;
518
- }
519
-
520
-
521
- SIMD_FORCE_INLINE btVector4 absolute4() const
522
- {
523
- return btVector4(
524
- btFabs(m_floats[0]),
525
- btFabs(m_floats[1]),
526
- btFabs(m_floats[2]),
527
- btFabs(m_floats[3]));
528
- }
529
-
530
-
531
-
532
- btScalar getW() const { return m_floats[3];}
533
-
534
-
535
- SIMD_FORCE_INLINE int maxAxis4() const
536
- {
537
- int maxIndex = -1;
538
- btScalar maxVal = btScalar(-BT_LARGE_FLOAT);
539
- if (m_floats[0] > maxVal)
540
- {
541
- maxIndex = 0;
542
- maxVal = m_floats[0];
543
- }
544
- if (m_floats[1] > maxVal)
545
- {
546
- maxIndex = 1;
547
- maxVal = m_floats[1];
548
- }
549
- if (m_floats[2] > maxVal)
550
- {
551
- maxIndex = 2;
552
- maxVal =m_floats[2];
553
- }
554
- if (m_floats[3] > maxVal)
555
- {
556
- maxIndex = 3;
557
- maxVal = m_floats[3];
558
- }
559
-
560
-
561
-
562
-
563
- return maxIndex;
564
-
565
- }
566
-
567
-
568
- SIMD_FORCE_INLINE int minAxis4() const
569
- {
570
- int minIndex = -1;
571
- btScalar minVal = btScalar(BT_LARGE_FLOAT);
572
- if (m_floats[0] < minVal)
573
- {
574
- minIndex = 0;
575
- minVal = m_floats[0];
576
- }
577
- if (m_floats[1] < minVal)
578
- {
579
- minIndex = 1;
580
- minVal = m_floats[1];
581
- }
582
- if (m_floats[2] < minVal)
583
- {
584
- minIndex = 2;
585
- minVal =m_floats[2];
586
- }
587
- if (m_floats[3] < minVal)
588
- {
589
- minIndex = 3;
590
- minVal = m_floats[3];
591
- }
592
-
593
- return minIndex;
594
-
595
- }
596
-
597
-
598
- SIMD_FORCE_INLINE int closestAxis4() const
599
- {
600
- return absolute4().maxAxis4();
601
- }
602
-
603
-
604
-
605
-
606
- /**@brief Set x,y,z and zero w
607
- * @param x Value of x
608
- * @param y Value of y
609
- * @param z Value of z
610
- */
611
-
612
-
613
- /* void getValue(btScalar *m) const
614
- {
615
- m[0] = m_floats[0];
616
- m[1] = m_floats[1];
617
- m[2] =m_floats[2];
618
- }
619
- */
620
- /**@brief Set the values
621
- * @param x Value of x
622
- * @param y Value of y
623
- * @param z Value of z
624
- * @param w Value of w
625
- */
626
- SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
627
- {
628
- m_floats[0]=x;
629
- m_floats[1]=y;
630
- m_floats[2]=z;
631
- m_floats[3]=w;
632
- }
633
-
634
-
635
- };
636
-
637
-
638
- ///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
639
- SIMD_FORCE_INLINE void btSwapScalarEndian(const btScalar& sourceVal, btScalar& destVal)
640
- {
641
- #ifdef BT_USE_DOUBLE_PRECISION
642
- unsigned char* dest = (unsigned char*) &destVal;
643
- unsigned char* src = (unsigned char*) &sourceVal;
644
- dest[0] = src[7];
645
- dest[1] = src[6];
646
- dest[2] = src[5];
647
- dest[3] = src[4];
648
- dest[4] = src[3];
649
- dest[5] = src[2];
650
- dest[6] = src[1];
651
- dest[7] = src[0];
652
- #else
653
- unsigned char* dest = (unsigned char*) &destVal;
654
- unsigned char* src = (unsigned char*) &sourceVal;
655
- dest[0] = src[3];
656
- dest[1] = src[2];
657
- dest[2] = src[1];
658
- dest[3] = src[0];
659
- #endif //BT_USE_DOUBLE_PRECISION
660
- }
661
- ///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
662
- SIMD_FORCE_INLINE void btSwapVector3Endian(const btVector3& sourceVec, btVector3& destVec)
663
- {
664
- for (int i=0;i<4;i++)
665
- {
666
- btSwapScalarEndian(sourceVec[i],destVec[i]);
667
- }
668
-
669
- }
670
-
671
- ///btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
672
- SIMD_FORCE_INLINE void btUnSwapVector3Endian(btVector3& vector)
673
- {
674
-
675
- btVector3 swappedVec;
676
- for (int i=0;i<4;i++)
677
- {
678
- btSwapScalarEndian(vector[i],swappedVec[i]);
679
- }
680
- vector = swappedVec;
681
- }
682
-
683
- template <class T>
684
- SIMD_FORCE_INLINE void btPlaneSpace1 (const T& n, T& p, T& q)
685
- {
686
- if (btFabs(n[2]) > SIMDSQRT12) {
687
- // choose p in y-z plane
688
- btScalar a = n[1]*n[1] + n[2]*n[2];
689
- btScalar k = btRecipSqrt (a);
690
- p[0] = 0;
691
- p[1] = -n[2]*k;
692
- p[2] = n[1]*k;
693
- // set q = n x p
694
- q[0] = a*k;
695
- q[1] = -n[0]*p[2];
696
- q[2] = n[0]*p[1];
697
- }
698
- else {
699
- // choose p in x-y plane
700
- btScalar a = n[0]*n[0] + n[1]*n[1];
701
- btScalar k = btRecipSqrt (a);
702
- p[0] = -n[1]*k;
703
- p[1] = n[0]*k;
704
- p[2] = 0;
705
- // set q = n x p
706
- q[0] = -n[2]*p[1];
707
- q[1] = n[2]*p[0];
708
- q[2] = a*k;
709
- }
710
- }
711
-
712
-
713
- struct btVector3FloatData
714
- {
715
- float m_floats[4];
716
- };
717
-
718
- struct btVector3DoubleData
719
- {
720
- double m_floats[4];
721
-
722
- };
723
-
724
- SIMD_FORCE_INLINE void btVector3::serializeFloat(struct btVector3FloatData& dataOut) const
725
- {
726
- ///could also do a memcpy, check if it is worth it
727
- for (int i=0;i<4;i++)
728
- dataOut.m_floats[i] = float(m_floats[i]);
729
- }
730
-
731
- SIMD_FORCE_INLINE void btVector3::deSerializeFloat(const struct btVector3FloatData& dataIn)
732
- {
733
- for (int i=0;i<4;i++)
734
- m_floats[i] = btScalar(dataIn.m_floats[i]);
735
- }
736
-
737
-
738
- SIMD_FORCE_INLINE void btVector3::serializeDouble(struct btVector3DoubleData& dataOut) const
739
- {
740
- ///could also do a memcpy, check if it is worth it
741
- for (int i=0;i<4;i++)
742
- dataOut.m_floats[i] = double(m_floats[i]);
743
- }
744
-
745
- SIMD_FORCE_INLINE void btVector3::deSerializeDouble(const struct btVector3DoubleData& dataIn)
746
- {
747
- for (int i=0;i<4;i++)
748
- m_floats[i] = btScalar(dataIn.m_floats[i]);
749
- }
750
-
751
-
752
- SIMD_FORCE_INLINE void btVector3::serialize(struct btVector3Data& dataOut) const
753
- {
754
- ///could also do a memcpy, check if it is worth it
755
- for (int i=0;i<4;i++)
756
- dataOut.m_floats[i] = m_floats[i];
757
- }
758
-
759
- SIMD_FORCE_INLINE void btVector3::deSerialize(const struct btVector3Data& dataIn)
760
- {
761
- for (int i=0;i<4;i++)
762
- m_floats[i] = dataIn.m_floats[i];
763
- }
764
-
765
-
766
- #endif //BT_VECTOR3_H