ruby-bullet 0.0.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 (460) hide show
  1. data/INSTALL.md +22 -0
  2. data/LICENSE +23 -0
  3. data/README.md +39 -0
  4. data/Rakefile +131 -0
  5. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btAxisSweep3.i +30 -0
  6. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btBroadphaseInterface.i +8 -0
  7. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btBroadphaseProxy.i +8 -0
  8. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.i +8 -0
  9. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btDbvt.i +10 -0
  10. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btDbvtBroadphase.i +8 -0
  11. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btDispatcher.i +8 -0
  12. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.i +10 -0
  13. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btOverlappingPairCache.i +8 -0
  14. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.i +8 -0
  15. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btQuantizedBvh.i +8 -0
  16. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/btSimpleBroadphase.i +8 -0
  17. data/bindings/bullet/interface/BulletCollision/BroadphaseCollision/local_btAxisSweep3Internal.h +191 -0
  18. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/SphereTriangleDetector.i +8 -0
  19. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.i +8 -0
  20. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.i +8 -0
  21. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.i +8 -0
  22. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btBoxBoxDetector.i +8 -0
  23. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionConfiguration.i +21 -0
  24. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionCreateFunc.i +8 -0
  25. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionDispatcher.i +24 -0
  26. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionObject.i +8 -0
  27. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionWorld.i +82 -0
  28. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.i +8 -0
  29. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.i +8 -0
  30. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.i +8 -0
  31. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.i +8 -0
  32. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.i +8 -0
  33. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.i +8 -0
  34. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.i +8 -0
  35. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btGhostObject.i +8 -0
  36. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btInternalEdgeUtility.i +8 -0
  37. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btManifoldResult.i +8 -0
  38. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btSimulationIslandManager.i +8 -0
  39. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.i +8 -0
  40. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.i +8 -0
  41. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.i +8 -0
  42. data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btUnionFind.i +10 -0
  43. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btBox2dShape.i +8 -0
  44. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btBoxShape.i +22 -0
  45. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.i +8 -0
  46. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btCapsuleShape.i +8 -0
  47. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btCollisionMargin.i +8 -0
  48. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btCollisionShape.i +8 -0
  49. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btCompoundShape.i +8 -0
  50. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConcaveShape.i +8 -0
  51. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConeShape.i +8 -0
  52. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvex2dShape.i +8 -0
  53. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvexHullShape.i +8 -0
  54. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvexInternalShape.i +8 -0
  55. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvexPointCloudShape.i +8 -0
  56. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvexPolyhedron.i +8 -0
  57. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvexShape.i +8 -0
  58. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.i +8 -0
  59. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btCylinderShape.i +8 -0
  60. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btEmptyShape.i +8 -0
  61. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.i +8 -0
  62. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btMaterial.i +8 -0
  63. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btMinkowskiSumShape.i +8 -0
  64. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btMultiSphereShape.i +8 -0
  65. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.i +8 -0
  66. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btOptimizedBvh.i +8 -0
  67. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btPolyhedralConvexShape.i +8 -0
  68. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.i +8 -0
  69. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btShapeHull.i +8 -0
  70. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btSphereShape.i +8 -0
  71. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btStaticPlaneShape.i +8 -0
  72. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btStridingMeshInterface.i +8 -0
  73. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTetrahedronShape.i +8 -0
  74. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleBuffer.i +8 -0
  75. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleCallback.i +8 -0
  76. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.i +8 -0
  77. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.i +8 -0
  78. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleInfoMap.i +8 -0
  79. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleMeshShape.i +8 -0
  80. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btTriangleShape.i +8 -0
  81. data/bindings/bullet/interface/BulletCollision/CollisionShapes/btUniformScalingShape.i +8 -0
  82. data/bindings/bullet/interface/BulletCollision/Gimpact/btBoxCollision.i +8 -0
  83. data/bindings/bullet/interface/BulletCollision/Gimpact/btClipPolygon.i +8 -0
  84. data/bindings/bullet/interface/BulletCollision/Gimpact/btContactProcessing.i +8 -0
  85. data/bindings/bullet/interface/BulletCollision/Gimpact/btGImpactBvh.i +8 -0
  86. data/bindings/bullet/interface/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.i +8 -0
  87. data/bindings/bullet/interface/BulletCollision/Gimpact/btGImpactMassUtil.i +8 -0
  88. data/bindings/bullet/interface/BulletCollision/Gimpact/btGImpactQuantizedBvh.i +8 -0
  89. data/bindings/bullet/interface/BulletCollision/Gimpact/btGImpactShape.i +8 -0
  90. data/bindings/bullet/interface/BulletCollision/Gimpact/btGenericPoolAllocator.i +11 -0
  91. data/bindings/bullet/interface/BulletCollision/Gimpact/btGeometryOperations.i +8 -0
  92. data/bindings/bullet/interface/BulletCollision/Gimpact/btQuantization.i +8 -0
  93. data/bindings/bullet/interface/BulletCollision/Gimpact/btTriangleShapeEx.i +8 -0
  94. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.i +8 -0
  95. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btConvexCast.i +8 -0
  96. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.i +8 -0
  97. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.i +11 -0
  98. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.i +8 -0
  99. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btGjkEpa2.i +8 -0
  100. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.i +8 -0
  101. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.i +8 -0
  102. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btManifoldPoint.i +8 -0
  103. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.i +8 -0
  104. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btPersistentManifold.i +8 -0
  105. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btPointCollector.i +8 -0
  106. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.i +8 -0
  107. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btRaycastCallback.i +8 -0
  108. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.i +8 -0
  109. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.i +8 -0
  110. data/bindings/bullet/interface/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.i +8 -0
  111. data/bindings/bullet/interface/BulletDynamics/Character/btCharacterControllerInterface.i +8 -0
  112. data/bindings/bullet/interface/BulletDynamics/Character/btKinematicCharacterController.i +8 -0
  113. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btConeTwistConstraint.i +8 -0
  114. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btConstraintSolver.i +8 -0
  115. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btContactConstraint.i +8 -0
  116. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btContactSolverInfo.i +8 -0
  117. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.i +8 -0
  118. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.i +8 -0
  119. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btHinge2Constraint.i +8 -0
  120. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btHingeConstraint.i +8 -0
  121. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btJacobianEntry.i +8 -0
  122. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.i +8 -0
  123. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.i +21 -0
  124. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btSliderConstraint.i +8 -0
  125. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.i +8 -0
  126. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btSolverBody.i +8 -0
  127. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btSolverConstraint.i +8 -0
  128. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btTypedConstraint.i +8 -0
  129. data/bindings/bullet/interface/BulletDynamics/ConstraintSolver/btUniversalConstraint.i +8 -0
  130. data/bindings/bullet/interface/BulletDynamics/Dynamics/btActionInterface.i +8 -0
  131. data/bindings/bullet/interface/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.i +23 -0
  132. data/bindings/bullet/interface/BulletDynamics/Dynamics/btDynamicsWorld.i +37 -0
  133. data/bindings/bullet/interface/BulletDynamics/Dynamics/btRigidBody.i +20 -0
  134. data/bindings/bullet/interface/BulletDynamics/Dynamics/btSimpleDynamicsWorld.i +8 -0
  135. data/bindings/bullet/interface/BulletDynamics/Vehicle/btRaycastVehicle.i +12 -0
  136. data/bindings/bullet/interface/BulletDynamics/Vehicle/btVehicleRaycaster.i +8 -0
  137. data/bindings/bullet/interface/BulletDynamics/Vehicle/btWheelInfo.i +8 -0
  138. data/bindings/bullet/interface/BulletSoftBody/btDefaultSoftBodySolver.i +8 -0
  139. data/bindings/bullet/interface/BulletSoftBody/btSoftBody.i +8 -0
  140. data/bindings/bullet/interface/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.i +8 -0
  141. data/bindings/bullet/interface/BulletSoftBody/btSoftBodyData.i +8 -0
  142. data/bindings/bullet/interface/BulletSoftBody/btSoftBodyHelpers.i +8 -0
  143. data/bindings/bullet/interface/BulletSoftBody/btSoftBodyInternals.i +8 -0
  144. data/bindings/bullet/interface/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.i +8 -0
  145. data/bindings/bullet/interface/BulletSoftBody/btSoftBodySolverVertexBuffer.i +8 -0
  146. data/bindings/bullet/interface/BulletSoftBody/btSoftBodySolvers.i +8 -0
  147. data/bindings/bullet/interface/BulletSoftBody/btSoftRigidCollisionAlgorithm.i +8 -0
  148. data/bindings/bullet/interface/BulletSoftBody/btSoftRigidDynamicsWorld.i +8 -0
  149. data/bindings/bullet/interface/BulletSoftBody/btSoftSoftCollisionAlgorithm.i +8 -0
  150. data/bindings/bullet/interface/BulletSoftBody/btSparseSDF.i +8 -0
  151. data/bindings/bullet/interface/LinearMath/btAabbUtil2.i +8 -0
  152. data/bindings/bullet/interface/LinearMath/btAlignedAllocator.i +8 -0
  153. data/bindings/bullet/interface/LinearMath/btAlignedObjectArray.i +8 -0
  154. data/bindings/bullet/interface/LinearMath/btConvexHull.i +8 -0
  155. data/bindings/bullet/interface/LinearMath/btConvexHullComputer.i +8 -0
  156. data/bindings/bullet/interface/LinearMath/btDefaultMotionState.i +10 -0
  157. data/bindings/bullet/interface/LinearMath/btGeometryUtil.i +10 -0
  158. data/bindings/bullet/interface/LinearMath/btGrahamScan2dConvexHull.i +8 -0
  159. data/bindings/bullet/interface/LinearMath/btHashMap.i +8 -0
  160. data/bindings/bullet/interface/LinearMath/btIDebugDraw.i +10 -0
  161. data/bindings/bullet/interface/LinearMath/btList.i +8 -0
  162. data/bindings/bullet/interface/LinearMath/btMatrix3x3.i +8 -0
  163. data/bindings/bullet/interface/LinearMath/btMinMax.i +8 -0
  164. data/bindings/bullet/interface/LinearMath/btMotionState.i +10 -0
  165. data/bindings/bullet/interface/LinearMath/btPoolAllocator.i +10 -0
  166. data/bindings/bullet/interface/LinearMath/btQuadWord.i +8 -0
  167. data/bindings/bullet/interface/LinearMath/btQuaternion.i +60 -0
  168. data/bindings/bullet/interface/LinearMath/btQuickprof.i +10 -0
  169. data/bindings/bullet/interface/LinearMath/btRandom.i +8 -0
  170. data/bindings/bullet/interface/LinearMath/btScalar.i +8 -0
  171. data/bindings/bullet/interface/LinearMath/btSerializer.i +10 -0
  172. data/bindings/bullet/interface/LinearMath/btStackAlloc.i +10 -0
  173. data/bindings/bullet/interface/LinearMath/btTransform.i +8 -0
  174. data/bindings/bullet/interface/LinearMath/btTransformUtil.i +8 -0
  175. data/bindings/bullet/interface/LinearMath/btVector3.i +42 -0
  176. data/bindings/bullet/interface/Makefile +19 -0
  177. data/bindings/bullet/interface/bullet.i +9 -0
  178. data/bindings/bullet/interface/bullet_all.i +186 -0
  179. data/bindings/bullet/interface/bullet_wrap.cpp +194161 -0
  180. data/bindings/bullet/interface/bullet_wrap.h +106 -0
  181. data/bindings/bullet/interface/bullet_wrap.o +0 -0
  182. data/bindings/bullet/src/TickListener.h +22 -0
  183. data/deps/include/bullet/Bullet-C-Api.h +176 -0
  184. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.h +1051 -0
  185. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h +82 -0
  186. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h +270 -0
  187. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h +80 -0
  188. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.h +1257 -0
  189. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h +146 -0
  190. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDispatcher.h +110 -0
  191. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h +151 -0
  192. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +469 -0
  193. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h +40 -0
  194. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btQuantizedBvh.h +579 -0
  195. data/deps/include/bullet/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h +171 -0
  196. data/deps/include/bullet/BulletCollision/CollisionDispatch/SphereTriangleDetector.h +51 -0
  197. data/deps/include/bullet/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h +36 -0
  198. data/deps/include/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h +66 -0
  199. data/deps/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h +66 -0
  200. data/deps/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxDetector.h +44 -0
  201. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionConfiguration.h +48 -0
  202. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h +45 -0
  203. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.h +172 -0
  204. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h +524 -0
  205. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.h +509 -0
  206. data/deps/include/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h +86 -0
  207. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h +95 -0
  208. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h +116 -0
  209. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h +109 -0
  210. data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h +84 -0
  211. data/deps/include/bullet/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h +137 -0
  212. data/deps/include/bullet/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h +54 -0
  213. data/deps/include/bullet/BulletCollision/CollisionDispatch/btGhostObject.h +175 -0
  214. data/deps/include/bullet/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h +46 -0
  215. data/deps/include/bullet/BulletCollision/CollisionDispatch/btManifoldResult.h +128 -0
  216. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSimulationIslandManager.h +81 -0
  217. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h +75 -0
  218. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h +66 -0
  219. data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h +69 -0
  220. data/deps/include/bullet/BulletCollision/CollisionDispatch/btUnionFind.h +129 -0
  221. data/deps/include/bullet/BulletCollision/CollisionShapes/btBox2dShape.h +369 -0
  222. data/deps/include/bullet/BulletCollision/CollisionShapes/btBoxShape.h +312 -0
  223. data/deps/include/bullet/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +139 -0
  224. data/deps/include/bullet/BulletCollision/CollisionShapes/btCapsuleShape.h +173 -0
  225. data/deps/include/bullet/BulletCollision/CollisionShapes/btCollisionMargin.h +27 -0
  226. data/deps/include/bullet/BulletCollision/CollisionShapes/btCollisionShape.h +150 -0
  227. data/deps/include/bullet/BulletCollision/CollisionShapes/btCompoundShape.h +212 -0
  228. data/deps/include/bullet/BulletCollision/CollisionShapes/btConcaveShape.h +60 -0
  229. data/deps/include/bullet/BulletCollision/CollisionShapes/btConeShape.h +103 -0
  230. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvex2dShape.h +80 -0
  231. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h +122 -0
  232. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexInternalShape.h +224 -0
  233. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.h +105 -0
  234. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexPolyhedron.h +62 -0
  235. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexShape.h +84 -0
  236. data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h +75 -0
  237. data/deps/include/bullet/BulletCollision/CollisionShapes/btCylinderShape.h +200 -0
  238. data/deps/include/bullet/BulletCollision/CollisionShapes/btEmptyShape.h +70 -0
  239. data/deps/include/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h +161 -0
  240. data/deps/include/bullet/BulletCollision/CollisionShapes/btMaterial.h +35 -0
  241. data/deps/include/bullet/BulletCollision/CollisionShapes/btMinkowskiSumShape.h +60 -0
  242. data/deps/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h +99 -0
  243. data/deps/include/bullet/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +120 -0
  244. data/deps/include/bullet/BulletCollision/CollisionShapes/btOptimizedBvh.h +65 -0
  245. data/deps/include/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h +112 -0
  246. data/deps/include/bullet/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h +93 -0
  247. data/deps/include/bullet/BulletCollision/CollisionShapes/btShapeHull.h +59 -0
  248. data/deps/include/bullet/BulletCollision/CollisionShapes/btSphereShape.h +73 -0
  249. data/deps/include/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h +103 -0
  250. data/deps/include/bullet/BulletCollision/CollisionShapes/btStridingMeshInterface.h +162 -0
  251. data/deps/include/bullet/BulletCollision/CollisionShapes/btTetrahedronShape.h +74 -0
  252. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h +69 -0
  253. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleCallback.h +42 -0
  254. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h +133 -0
  255. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h +84 -0
  256. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleInfoMap.h +241 -0
  257. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleMesh.h +69 -0
  258. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleMeshShape.h +89 -0
  259. data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleShape.h +182 -0
  260. data/deps/include/bullet/BulletCollision/CollisionShapes/btUniformScalingShape.h +87 -0
  261. data/deps/include/bullet/BulletCollision/Gimpact/btBoxCollision.h +647 -0
  262. data/deps/include/bullet/BulletCollision/Gimpact/btClipPolygon.h +182 -0
  263. data/deps/include/bullet/BulletCollision/Gimpact/btContactProcessing.h +145 -0
  264. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactBvh.h +396 -0
  265. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h +306 -0
  266. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactMassUtil.h +60 -0
  267. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactQuantizedBvh.h +372 -0
  268. data/deps/include/bullet/BulletCollision/Gimpact/btGImpactShape.h +1171 -0
  269. data/deps/include/bullet/BulletCollision/Gimpact/btGenericPoolAllocator.h +163 -0
  270. data/deps/include/bullet/BulletCollision/Gimpact/btGeometryOperations.h +212 -0
  271. data/deps/include/bullet/BulletCollision/Gimpact/btQuantization.h +88 -0
  272. data/deps/include/bullet/BulletCollision/Gimpact/btTriangleShapeEx.h +180 -0
  273. data/deps/include/bullet/BulletCollision/Gimpact/gim_array.h +326 -0
  274. data/deps/include/bullet/BulletCollision/Gimpact/gim_basic_geometry_operations.h +543 -0
  275. data/deps/include/bullet/BulletCollision/Gimpact/gim_bitset.h +123 -0
  276. data/deps/include/bullet/BulletCollision/Gimpact/gim_box_collision.h +590 -0
  277. data/deps/include/bullet/BulletCollision/Gimpact/gim_box_set.h +674 -0
  278. data/deps/include/bullet/BulletCollision/Gimpact/gim_clip_polygon.h +210 -0
  279. data/deps/include/bullet/BulletCollision/Gimpact/gim_contact.h +164 -0
  280. data/deps/include/bullet/BulletCollision/Gimpact/gim_geom_types.h +97 -0
  281. data/deps/include/bullet/BulletCollision/Gimpact/gim_geometry.h +42 -0
  282. data/deps/include/bullet/BulletCollision/Gimpact/gim_hash_table.h +902 -0
  283. data/deps/include/bullet/BulletCollision/Gimpact/gim_linear_math.h +1573 -0
  284. data/deps/include/bullet/BulletCollision/Gimpact/gim_math.h +157 -0
  285. data/deps/include/bullet/BulletCollision/Gimpact/gim_memory.h +190 -0
  286. data/deps/include/bullet/BulletCollision/Gimpact/gim_radixsort.h +406 -0
  287. data/deps/include/bullet/BulletCollision/Gimpact/gim_tri_collision.h +379 -0
  288. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h +59 -0
  289. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.h +73 -0
  290. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h +42 -0
  291. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h +91 -0
  292. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h +50 -0
  293. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h +75 -0
  294. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h +43 -0
  295. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h +103 -0
  296. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h +158 -0
  297. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h +40 -0
  298. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +228 -0
  299. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPointCollector.h +64 -0
  300. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h +46 -0
  301. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h +72 -0
  302. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h +63 -0
  303. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h +50 -0
  304. data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h +179 -0
  305. data/deps/include/bullet/BulletCollision/btBulletCollisionCommon.h +69 -0
  306. data/deps/include/bullet/BulletDynamics/Character/btCharacterControllerInterface.h +46 -0
  307. data/deps/include/bullet/BulletDynamics/Character/btKinematicCharacterController.h +163 -0
  308. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h +346 -0
  309. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btConstraintSolver.h +52 -0
  310. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btContactConstraint.h +71 -0
  311. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h +87 -0
  312. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +614 -0
  313. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h +99 -0
  314. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btHinge2Constraint.h +58 -0
  315. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btHingeConstraint.h +381 -0
  316. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btJacobianEntry.h +156 -0
  317. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h +161 -0
  318. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h +130 -0
  319. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSliderConstraint.h +333 -0
  320. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h +107 -0
  321. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolverBody.h +191 -0
  322. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolverConstraint.h +98 -0
  323. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btTypedConstraint.h +452 -0
  324. data/deps/include/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h +62 -0
  325. data/deps/include/bullet/BulletDynamics/Dynamics/btActionInterface.h +46 -0
  326. data/deps/include/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +203 -0
  327. data/deps/include/bullet/BulletDynamics/Dynamics/btDynamicsWorld.h +151 -0
  328. data/deps/include/bullet/BulletDynamics/Dynamics/btRigidBody.h +691 -0
  329. data/deps/include/bullet/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h +89 -0
  330. data/deps/include/bullet/BulletDynamics/Vehicle/btRaycastVehicle.h +236 -0
  331. data/deps/include/bullet/BulletDynamics/Vehicle/btVehicleRaycaster.h +35 -0
  332. data/deps/include/bullet/BulletDynamics/Vehicle/btWheelInfo.h +119 -0
  333. data/deps/include/bullet/BulletDynamics/btBulletDynamicsCommon.h +48 -0
  334. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h +323 -0
  335. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h +103 -0
  336. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h +173 -0
  337. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h +96 -0
  338. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h +107 -0
  339. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h +63 -0
  340. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h +691 -0
  341. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h +81 -0
  342. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h +209 -0
  343. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h +99 -0
  344. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h +169 -0
  345. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h +62 -0
  346. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h +84 -0
  347. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h +166 -0
  348. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h +52 -0
  349. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h +527 -0
  350. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h +81 -0
  351. data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/Shared/btSoftBodySolverData.h +748 -0
  352. data/deps/include/bullet/BulletMultiThreaded/HeapManager.h +117 -0
  353. data/deps/include/bullet/BulletMultiThreaded/PlatformDefinitions.h +99 -0
  354. data/deps/include/bullet/BulletMultiThreaded/PosixThreadSupport.h +142 -0
  355. data/deps/include/bullet/BulletMultiThreaded/PpuAddressSpace.h +37 -0
  356. data/deps/include/bullet/BulletMultiThreaded/SequentialThreadSupport.h +96 -0
  357. data/deps/include/bullet/BulletMultiThreaded/SpuCollisionObjectWrapper.h +40 -0
  358. data/deps/include/bullet/BulletMultiThreaded/SpuCollisionTaskProcess.h +163 -0
  359. data/deps/include/bullet/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h +120 -0
  360. data/deps/include/bullet/BulletMultiThreaded/SpuDoubleBuffer.h +126 -0
  361. data/deps/include/bullet/BulletMultiThreaded/SpuFakeDma.h +135 -0
  362. data/deps/include/bullet/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h +72 -0
  363. data/deps/include/bullet/BulletMultiThreaded/SpuLibspe2Support.h +180 -0
  364. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h +167 -0
  365. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h +128 -0
  366. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h +106 -0
  367. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h +51 -0
  368. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h +140 -0
  369. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h +19 -0
  370. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h +48 -0
  371. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h +70 -0
  372. data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h +65 -0
  373. data/deps/include/bullet/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h +54 -0
  374. data/deps/include/bullet/BulletMultiThreaded/SpuSampleTaskProcess.h +153 -0
  375. data/deps/include/bullet/BulletMultiThreaded/SpuSync.h +149 -0
  376. data/deps/include/bullet/BulletMultiThreaded/TrbDynBody.h +79 -0
  377. data/deps/include/bullet/BulletMultiThreaded/TrbStateVec.h +339 -0
  378. data/deps/include/bullet/BulletMultiThreaded/Win32ThreadSupport.h +138 -0
  379. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphase.h +138 -0
  380. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h +430 -0
  381. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h +61 -0
  382. data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h +67 -0
  383. data/deps/include/bullet/BulletMultiThreaded/btGpuDefines.h +211 -0
  384. data/deps/include/bullet/BulletMultiThreaded/btGpuUtilsSharedCode.h +55 -0
  385. data/deps/include/bullet/BulletMultiThreaded/btGpuUtilsSharedDefs.h +52 -0
  386. data/deps/include/bullet/BulletMultiThreaded/btParallelConstraintSolver.h +285 -0
  387. data/deps/include/bullet/BulletMultiThreaded/btThreadSupportInterface.h +85 -0
  388. data/deps/include/bullet/BulletMultiThreaded/vectormath2bullet.h +73 -0
  389. data/deps/include/bullet/BulletSoftBody/btDefaultSoftBodySolver.h +63 -0
  390. data/deps/include/bullet/BulletSoftBody/btSoftBody.h +987 -0
  391. data/deps/include/bullet/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h +153 -0
  392. data/deps/include/bullet/BulletSoftBody/btSoftBodyData.h +217 -0
  393. data/deps/include/bullet/BulletSoftBody/btSoftBodyHelpers.h +143 -0
  394. data/deps/include/bullet/BulletSoftBody/btSoftBodyInternals.h +930 -0
  395. data/deps/include/bullet/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h +48 -0
  396. data/deps/include/bullet/BulletSoftBody/btSoftBodySolverVertexBuffer.h +165 -0
  397. data/deps/include/bullet/BulletSoftBody/btSoftBodySolvers.h +154 -0
  398. data/deps/include/bullet/BulletSoftBody/btSoftRigidCollisionAlgorithm.h +75 -0
  399. data/deps/include/bullet/BulletSoftBody/btSoftRigidDynamicsWorld.h +107 -0
  400. data/deps/include/bullet/BulletSoftBody/btSoftSoftCollisionAlgorithm.h +69 -0
  401. data/deps/include/bullet/BulletSoftBody/btSparseSDF.h +306 -0
  402. data/deps/include/bullet/LinearMath/btAabbUtil2.h +236 -0
  403. data/deps/include/bullet/LinearMath/btAlignedAllocator.h +107 -0
  404. data/deps/include/bullet/LinearMath/btAlignedObjectArray.h +494 -0
  405. data/deps/include/bullet/LinearMath/btConvexHull.h +241 -0
  406. data/deps/include/bullet/LinearMath/btConvexHullComputer.h +103 -0
  407. data/deps/include/bullet/LinearMath/btDefaultMotionState.h +40 -0
  408. data/deps/include/bullet/LinearMath/btGeometryUtil.h +42 -0
  409. data/deps/include/bullet/LinearMath/btGrahamScan2dConvexHull.h +110 -0
  410. data/deps/include/bullet/LinearMath/btHashMap.h +450 -0
  411. data/deps/include/bullet/LinearMath/btIDebugDraw.h +418 -0
  412. data/deps/include/bullet/LinearMath/btList.h +73 -0
  413. data/deps/include/bullet/LinearMath/btMatrix3x3.h +771 -0
  414. data/deps/include/bullet/LinearMath/btMinMax.h +71 -0
  415. data/deps/include/bullet/LinearMath/btMotionState.h +40 -0
  416. data/deps/include/bullet/LinearMath/btPoolAllocator.h +121 -0
  417. data/deps/include/bullet/LinearMath/btQuadWord.h +180 -0
  418. data/deps/include/bullet/LinearMath/btQuaternion.h +430 -0
  419. data/deps/include/bullet/LinearMath/btQuickprof.h +203 -0
  420. data/deps/include/bullet/LinearMath/btRandom.h +42 -0
  421. data/deps/include/bullet/LinearMath/btScalar.h +539 -0
  422. data/deps/include/bullet/LinearMath/btSerializer.h +639 -0
  423. data/deps/include/bullet/LinearMath/btStackAlloc.h +116 -0
  424. data/deps/include/bullet/LinearMath/btTransform.h +307 -0
  425. data/deps/include/bullet/LinearMath/btTransformUtil.h +228 -0
  426. data/deps/include/bullet/LinearMath/btVector3.h +766 -0
  427. data/deps/include/bullet/MiniCL/MiniCLTask/MiniCLTask.h +62 -0
  428. data/deps/include/bullet/MiniCL/MiniCLTaskScheduler.h +194 -0
  429. data/deps/include/bullet/MiniCL/cl.h +867 -0
  430. data/deps/include/bullet/MiniCL/cl_MiniCL_Defs.h +439 -0
  431. data/deps/include/bullet/MiniCL/cl_gl.h +113 -0
  432. data/deps/include/bullet/MiniCL/cl_platform.h +254 -0
  433. data/deps/include/bullet/btBulletCollisionCommon.h +69 -0
  434. data/deps/include/bullet/btBulletDynamicsCommon.h +48 -0
  435. data/deps/include/bullet/vectormath/scalar/boolInVec.h +225 -0
  436. data/deps/include/bullet/vectormath/scalar/floatInVec.h +343 -0
  437. data/deps/include/bullet/vectormath/scalar/mat_aos.h +1630 -0
  438. data/deps/include/bullet/vectormath/scalar/quat_aos.h +433 -0
  439. data/deps/include/bullet/vectormath/scalar/vec_aos.h +1426 -0
  440. data/deps/include/bullet/vectormath/scalar/vectormath_aos.h +1872 -0
  441. data/deps/include/bullet/vectormath/sse/boolInVec.h +247 -0
  442. data/deps/include/bullet/vectormath/sse/floatInVec.h +340 -0
  443. data/deps/include/bullet/vectormath/sse/mat_aos.h +2190 -0
  444. data/deps/include/bullet/vectormath/sse/quat_aos.h +579 -0
  445. data/deps/include/bullet/vectormath/sse/vec_aos.h +1455 -0
  446. data/deps/include/bullet/vectormath/sse/vecidx_aos.h +80 -0
  447. data/deps/include/bullet/vectormath/sse/vectormath_aos.h +2547 -0
  448. data/deps/include/bullet/vectormath/vmInclude.h +27 -0
  449. data/deps/lib/libBulletCollision.a +0 -0
  450. data/deps/lib/libBulletDynamics.a +0 -0
  451. data/deps/lib/libBulletMultiThreaded.a +0 -0
  452. data/deps/lib/libBulletSoftBody.a +0 -0
  453. data/deps/lib/libBulletSoftBodySolvers_OpenCL_Mini.a +0 -0
  454. data/deps/lib/libLinearMath.a +0 -0
  455. data/deps/lib/libMiniCL.a +0 -0
  456. data/lib/Bullet.so +0 -0
  457. data/lib/BulletConfig.rb +28 -0
  458. data/lib/Version.rb +5 -0
  459. data/sample/hello_bullet/HelloBullet.rb +144 -0
  460. metadata +504 -0
@@ -0,0 +1,902 @@
1
+ #ifndef GIM_HASH_TABLE_H_INCLUDED
2
+ #define GIM_HASH_TABLE_H_INCLUDED
3
+ /*! \file gim_trimesh_data.h
4
+ \author Francisco Leon Najera
5
+ */
6
+ /*
7
+ -----------------------------------------------------------------------------
8
+ This source file is part of GIMPACT Library.
9
+
10
+ For the latest info, see http://gimpact.sourceforge.net/
11
+
12
+ Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
13
+ email: projectileman@yahoo.com
14
+
15
+ This library is free software; you can redistribute it and/or
16
+ modify it under the terms of EITHER:
17
+ (1) The GNU Lesser General Public License as published by the Free
18
+ Software Foundation; either version 2.1 of the License, or (at
19
+ your option) any later version. The text of the GNU Lesser
20
+ General Public License is included with this library in the
21
+ file GIMPACT-LICENSE-LGPL.TXT.
22
+ (2) The BSD-style license that is included with this library in
23
+ the file GIMPACT-LICENSE-BSD.TXT.
24
+ (3) The zlib/libpng license that is included with this library in
25
+ the file GIMPACT-LICENSE-ZLIB.TXT.
26
+
27
+ This library is distributed in the hope that it will be useful,
28
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
29
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
30
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
31
+
32
+ -----------------------------------------------------------------------------
33
+ */
34
+
35
+ #include "gim_radixsort.h"
36
+
37
+
38
+ #define GIM_INVALID_HASH 0xffffffff //!< A very very high value
39
+ #define GIM_DEFAULT_HASH_TABLE_SIZE 380
40
+ #define GIM_DEFAULT_HASH_TABLE_NODE_SIZE 4
41
+ #define GIM_HASH_TABLE_GROW_FACTOR 2
42
+
43
+ #define GIM_MIN_RADIX_SORT_SIZE 860 //!< calibrated on a PIII
44
+
45
+ template<typename T>
46
+ struct GIM_HASH_TABLE_NODE
47
+ {
48
+ GUINT m_key;
49
+ T m_data;
50
+ GIM_HASH_TABLE_NODE()
51
+ {
52
+ }
53
+
54
+ GIM_HASH_TABLE_NODE(const GIM_HASH_TABLE_NODE & value)
55
+ {
56
+ m_key = value.m_key;
57
+ m_data = value.m_data;
58
+ }
59
+
60
+ GIM_HASH_TABLE_NODE(GUINT key, const T & data)
61
+ {
62
+ m_key = key;
63
+ m_data = data;
64
+ }
65
+
66
+ bool operator <(const GIM_HASH_TABLE_NODE<T> & other) const
67
+ {
68
+ ///inverse order, further objects are first
69
+ if(m_key < other.m_key) return true;
70
+ return false;
71
+ }
72
+
73
+ bool operator >(const GIM_HASH_TABLE_NODE<T> & other) const
74
+ {
75
+ ///inverse order, further objects are first
76
+ if(m_key > other.m_key) return true;
77
+ return false;
78
+ }
79
+
80
+ bool operator ==(const GIM_HASH_TABLE_NODE<T> & other) const
81
+ {
82
+ ///inverse order, further objects are first
83
+ if(m_key == other.m_key) return true;
84
+ return false;
85
+ }
86
+ };
87
+
88
+ ///Macro for getting the key
89
+ class GIM_HASH_NODE_GET_KEY
90
+ {
91
+ public:
92
+ template<class T>
93
+ inline GUINT operator()( const T& a)
94
+ {
95
+ return a.m_key;
96
+ }
97
+ };
98
+
99
+
100
+
101
+ ///Macro for comparing the key and the element
102
+ class GIM_HASH_NODE_CMP_KEY_MACRO
103
+ {
104
+ public:
105
+ template<class T>
106
+ inline int operator() ( const T& a, GUINT key)
107
+ {
108
+ return ((int)(a.m_key - key));
109
+ }
110
+ };
111
+
112
+ ///Macro for comparing Hash nodes
113
+ class GIM_HASH_NODE_CMP_MACRO
114
+ {
115
+ public:
116
+ template<class T>
117
+ inline int operator() ( const T& a, const T& b )
118
+ {
119
+ return ((int)(a.m_key - b.m_key));
120
+ }
121
+ };
122
+
123
+
124
+
125
+
126
+
127
+ //! Sorting for hash table
128
+ /*!
129
+ switch automatically between quicksort and radixsort
130
+ */
131
+ template<typename T>
132
+ void gim_sort_hash_node_array(T * array, GUINT array_count)
133
+ {
134
+ if(array_count<GIM_MIN_RADIX_SORT_SIZE)
135
+ {
136
+ gim_heap_sort(array,array_count,GIM_HASH_NODE_CMP_MACRO());
137
+ }
138
+ else
139
+ {
140
+ memcopy_elements_func cmpfunc;
141
+ gim_radix_sort(array,array_count,GIM_HASH_NODE_GET_KEY(),cmpfunc);
142
+ }
143
+ }
144
+
145
+
146
+
147
+
148
+
149
+
150
+ // Note: assumes long is at least 32 bits.
151
+ #define GIM_NUM_PRIME 28
152
+
153
+ static const GUINT gim_prime_list[GIM_NUM_PRIME] =
154
+ {
155
+ 53ul, 97ul, 193ul, 389ul, 769ul,
156
+ 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
157
+ 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
158
+ 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
159
+ 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
160
+ 1610612741ul, 3221225473ul, 4294967291ul
161
+ };
162
+
163
+ inline GUINT gim_next_prime(GUINT number)
164
+ {
165
+ //Find nearest upper prime
166
+ GUINT result_ind = 0;
167
+ gim_binary_search(gim_prime_list,0,(GIM_NUM_PRIME-2),number,result_ind);
168
+
169
+ // inv: result_ind < 28
170
+ return gim_prime_list[result_ind];
171
+ }
172
+
173
+
174
+
175
+ //! A compact hash table implementation
176
+ /*!
177
+ A memory aligned compact hash table that coud be treated as an array.
178
+ It could be a simple sorted array without the overhead of the hash key bucked, or could
179
+ be a formely hash table with an array of keys.
180
+ You can use switch_to_hashtable() and switch_to_sorted_array for saving space or increase speed.
181
+ </br>
182
+
183
+ <ul>
184
+ <li> if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes.
185
+ When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable.
186
+ <li> If node_size != 0, then this container becomes a hash table for ever
187
+ </ul>
188
+
189
+ */
190
+ template<class T>
191
+ class gim_hash_table
192
+ {
193
+ protected:
194
+ typedef GIM_HASH_TABLE_NODE<T> _node_type;
195
+
196
+ //!The nodes
197
+ //array< _node_type, SuperAllocator<_node_type> > m_nodes;
198
+ gim_array< _node_type > m_nodes;
199
+ //SuperBufferedArray< _node_type > m_nodes;
200
+ bool m_sorted;
201
+
202
+ ///Hash table data management. The hash table has the indices to the corresponding m_nodes array
203
+ GUINT * m_hash_table;//!<
204
+ GUINT m_table_size;//!<
205
+ GUINT m_node_size;//!<
206
+ GUINT m_min_hash_table_size;
207
+
208
+
209
+
210
+ //! Returns the cell index
211
+ inline GUINT _find_cell(GUINT hashkey)
212
+ {
213
+ _node_type * nodesptr = m_nodes.pointer();
214
+ GUINT start_index = (hashkey%m_table_size)*m_node_size;
215
+ GUINT end_index = start_index + m_node_size;
216
+
217
+ while(start_index<end_index)
218
+ {
219
+ GUINT value = m_hash_table[start_index];
220
+ if(value != GIM_INVALID_HASH)
221
+ {
222
+ if(nodesptr[value].m_key == hashkey) return start_index;
223
+ }
224
+ start_index++;
225
+ }
226
+ return GIM_INVALID_HASH;
227
+ }
228
+
229
+ //! Find the avaliable cell for the hashkey, and return an existing cell if it has the same hash key
230
+ inline GUINT _find_avaliable_cell(GUINT hashkey)
231
+ {
232
+ _node_type * nodesptr = m_nodes.pointer();
233
+ GUINT avaliable_index = GIM_INVALID_HASH;
234
+ GUINT start_index = (hashkey%m_table_size)*m_node_size;
235
+ GUINT end_index = start_index + m_node_size;
236
+
237
+ while(start_index<end_index)
238
+ {
239
+ GUINT value = m_hash_table[start_index];
240
+ if(value == GIM_INVALID_HASH)
241
+ {
242
+ if(avaliable_index==GIM_INVALID_HASH)
243
+ {
244
+ avaliable_index = start_index;
245
+ }
246
+ }
247
+ else if(nodesptr[value].m_key == hashkey)
248
+ {
249
+ return start_index;
250
+ }
251
+ start_index++;
252
+ }
253
+ return avaliable_index;
254
+ }
255
+
256
+
257
+
258
+ //! reserves the memory for the hash table.
259
+ /*!
260
+ \pre hash table must be empty
261
+ \post reserves the memory for the hash table, an initializes all elements to GIM_INVALID_HASH.
262
+ */
263
+ inline void _reserve_table_memory(GUINT newtablesize)
264
+ {
265
+ if(newtablesize==0) return;
266
+ if(m_node_size==0) return;
267
+
268
+ //Get a Prime size
269
+
270
+ m_table_size = gim_next_prime(newtablesize);
271
+
272
+ GUINT datasize = m_table_size*m_node_size;
273
+ //Alloc the data buffer
274
+ m_hash_table = (GUINT *)gim_alloc(datasize*sizeof(GUINT));
275
+ }
276
+
277
+ inline void _invalidate_keys()
278
+ {
279
+ GUINT datasize = m_table_size*m_node_size;
280
+ for(GUINT i=0;i<datasize;i++)
281
+ {
282
+ m_hash_table[i] = GIM_INVALID_HASH;// invalidate keys
283
+ }
284
+ }
285
+
286
+ //! Clear all memory for the hash table
287
+ inline void _clear_table_memory()
288
+ {
289
+ if(m_hash_table==NULL) return;
290
+ gim_free(m_hash_table);
291
+ m_hash_table = NULL;
292
+ m_table_size = 0;
293
+ }
294
+
295
+ //! Invalidates the keys (Assigning GIM_INVALID_HASH to all) Reorders the hash keys
296
+ inline void _rehash()
297
+ {
298
+ _invalidate_keys();
299
+
300
+ _node_type * nodesptr = m_nodes.pointer();
301
+ for(GUINT i=0;i<(GUINT)m_nodes.size();i++)
302
+ {
303
+ GUINT nodekey = nodesptr[i].m_key;
304
+ if(nodekey != GIM_INVALID_HASH)
305
+ {
306
+ //Search for the avaliable cell in buffer
307
+ GUINT index = _find_avaliable_cell(nodekey);
308
+
309
+
310
+ if(m_hash_table[index]!=GIM_INVALID_HASH)
311
+ {//The new index is alreade used... discard this new incomming object, repeated key
312
+ btAssert(m_hash_table[index]==nodekey);
313
+ nodesptr[i].m_key = GIM_INVALID_HASH;
314
+ }
315
+ else
316
+ {
317
+ //;
318
+ //Assign the value for alloc
319
+ m_hash_table[index] = i;
320
+ }
321
+ }
322
+ }
323
+ }
324
+
325
+ //! Resize hash table indices
326
+ inline void _resize_table(GUINT newsize)
327
+ {
328
+ //Clear memory
329
+ _clear_table_memory();
330
+ //Alloc the data
331
+ _reserve_table_memory(newsize);
332
+ //Invalidate keys and rehash
333
+ _rehash();
334
+ }
335
+
336
+ //! Destroy hash table memory
337
+ inline void _destroy()
338
+ {
339
+ if(m_hash_table==NULL) return;
340
+ _clear_table_memory();
341
+ }
342
+
343
+ //! Finds an avaliable hash table cell, and resizes the table if there isn't space
344
+ inline GUINT _assign_hash_table_cell(GUINT hashkey)
345
+ {
346
+ GUINT cell_index = _find_avaliable_cell(hashkey);
347
+
348
+ if(cell_index==GIM_INVALID_HASH)
349
+ {
350
+ //rehashing
351
+ _resize_table(m_table_size+1);
352
+ GUINT cell_index = _find_avaliable_cell(hashkey);
353
+ btAssert(cell_index!=GIM_INVALID_HASH);
354
+ }
355
+ return cell_index;
356
+ }
357
+
358
+ //! erase by index in hash table
359
+ inline bool _erase_by_index_hash_table(GUINT index)
360
+ {
361
+ if(index >= m_nodes.size()) return false;
362
+ if(m_nodes[index].m_key != GIM_INVALID_HASH)
363
+ {
364
+ //Search for the avaliable cell in buffer
365
+ GUINT cell_index = _find_cell(m_nodes[index].m_key);
366
+
367
+ btAssert(cell_index!=GIM_INVALID_HASH);
368
+ btAssert(m_hash_table[cell_index]==index);
369
+
370
+ m_hash_table[cell_index] = GIM_INVALID_HASH;
371
+ }
372
+
373
+ return this->_erase_unsorted(index);
374
+ }
375
+
376
+ //! erase by key in hash table
377
+ inline bool _erase_hash_table(GUINT hashkey)
378
+ {
379
+ if(hashkey == GIM_INVALID_HASH) return false;
380
+
381
+ //Search for the avaliable cell in buffer
382
+ GUINT cell_index = _find_cell(hashkey);
383
+ if(cell_index ==GIM_INVALID_HASH) return false;
384
+
385
+ GUINT index = m_hash_table[cell_index];
386
+ m_hash_table[cell_index] = GIM_INVALID_HASH;
387
+
388
+ return this->_erase_unsorted(index);
389
+ }
390
+
391
+
392
+
393
+ //! insert an element in hash table
394
+ /*!
395
+ If the element exists, this won't insert the element
396
+ \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted
397
+ If so, the element has been inserted at the last position of the array.
398
+ */
399
+ inline GUINT _insert_hash_table(GUINT hashkey, const T & value)
400
+ {
401
+ if(hashkey==GIM_INVALID_HASH)
402
+ {
403
+ //Insert anyway
404
+ _insert_unsorted(hashkey,value);
405
+ return GIM_INVALID_HASH;
406
+ }
407
+
408
+ GUINT cell_index = _assign_hash_table_cell(hashkey);
409
+
410
+ GUINT value_key = m_hash_table[cell_index];
411
+
412
+ if(value_key!= GIM_INVALID_HASH) return value_key;// Not overrited
413
+
414
+ m_hash_table[cell_index] = m_nodes.size();
415
+
416
+ _insert_unsorted(hashkey,value);
417
+ return GIM_INVALID_HASH;
418
+ }
419
+
420
+ //! insert an element in hash table.
421
+ /*!
422
+ If the element exists, this replaces the element.
423
+ \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted
424
+ If so, the element has been inserted at the last position of the array.
425
+ */
426
+ inline GUINT _insert_hash_table_replace(GUINT hashkey, const T & value)
427
+ {
428
+ if(hashkey==GIM_INVALID_HASH)
429
+ {
430
+ //Insert anyway
431
+ _insert_unsorted(hashkey,value);
432
+ return GIM_INVALID_HASH;
433
+ }
434
+
435
+ GUINT cell_index = _assign_hash_table_cell(hashkey);
436
+
437
+ GUINT value_key = m_hash_table[cell_index];
438
+
439
+ if(value_key!= GIM_INVALID_HASH)
440
+ {//replaces the existing
441
+ m_nodes[value_key] = _node_type(hashkey,value);
442
+ return value_key;// index of the replaced element
443
+ }
444
+
445
+ m_hash_table[cell_index] = m_nodes.size();
446
+
447
+ _insert_unsorted(hashkey,value);
448
+ return GIM_INVALID_HASH;
449
+
450
+ }
451
+
452
+
453
+ ///Sorted array data management. The hash table has the indices to the corresponding m_nodes array
454
+ inline bool _erase_sorted(GUINT index)
455
+ {
456
+ if(index>=(GUINT)m_nodes.size()) return false;
457
+ m_nodes.erase_sorted(index);
458
+ if(m_nodes.size()<2) m_sorted = false;
459
+ return true;
460
+ }
461
+
462
+ //! faster, but unsorted
463
+ inline bool _erase_unsorted(GUINT index)
464
+ {
465
+ if(index>=m_nodes.size()) return false;
466
+
467
+ GUINT lastindex = m_nodes.size()-1;
468
+ if(index<lastindex && m_hash_table!=0)
469
+ {
470
+ GUINT hashkey = m_nodes[lastindex].m_key;
471
+ if(hashkey!=GIM_INVALID_HASH)
472
+ {
473
+ //update the new position of the last element
474
+ GUINT cell_index = _find_cell(hashkey);
475
+ btAssert(cell_index!=GIM_INVALID_HASH);
476
+ //new position of the last element which will be swaped
477
+ m_hash_table[cell_index] = index;
478
+ }
479
+ }
480
+ m_nodes.erase(index);
481
+ m_sorted = false;
482
+ return true;
483
+ }
484
+
485
+ //! Insert in position ordered
486
+ /*!
487
+ Also checks if it is needed to transform this container to a hash table, by calling check_for_switching_to_hashtable
488
+ */
489
+ inline void _insert_in_pos(GUINT hashkey, const T & value, GUINT pos)
490
+ {
491
+ m_nodes.insert(_node_type(hashkey,value),pos);
492
+ this->check_for_switching_to_hashtable();
493
+ }
494
+
495
+ //! Insert an element in an ordered array
496
+ inline GUINT _insert_sorted(GUINT hashkey, const T & value)
497
+ {
498
+ if(hashkey==GIM_INVALID_HASH || size()==0)
499
+ {
500
+ m_nodes.push_back(_node_type(hashkey,value));
501
+ return GIM_INVALID_HASH;
502
+ }
503
+ //Insert at last position
504
+ //Sort element
505
+
506
+
507
+ GUINT result_ind=0;
508
+ GUINT last_index = m_nodes.size()-1;
509
+ _node_type * ptr = m_nodes.pointer();
510
+
511
+ bool found = gim_binary_search_ex(
512
+ ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO());
513
+
514
+
515
+ //Insert before found index
516
+ if(found)
517
+ {
518
+ return result_ind;
519
+ }
520
+ else
521
+ {
522
+ _insert_in_pos(hashkey, value, result_ind);
523
+ }
524
+ return GIM_INVALID_HASH;
525
+ }
526
+
527
+ inline GUINT _insert_sorted_replace(GUINT hashkey, const T & value)
528
+ {
529
+ if(hashkey==GIM_INVALID_HASH || size()==0)
530
+ {
531
+ m_nodes.push_back(_node_type(hashkey,value));
532
+ return GIM_INVALID_HASH;
533
+ }
534
+ //Insert at last position
535
+ //Sort element
536
+ GUINT result_ind;
537
+ GUINT last_index = m_nodes.size()-1;
538
+ _node_type * ptr = m_nodes.pointer();
539
+
540
+ bool found = gim_binary_search_ex(
541
+ ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO());
542
+
543
+ //Insert before found index
544
+ if(found)
545
+ {
546
+ m_nodes[result_ind] = _node_type(hashkey,value);
547
+ }
548
+ else
549
+ {
550
+ _insert_in_pos(hashkey, value, result_ind);
551
+ }
552
+ return result_ind;
553
+ }
554
+
555
+ //! Fast insertion in m_nodes array
556
+ inline GUINT _insert_unsorted(GUINT hashkey, const T & value)
557
+ {
558
+ m_nodes.push_back(_node_type(hashkey,value));
559
+ m_sorted = false;
560
+ return GIM_INVALID_HASH;
561
+ }
562
+
563
+
564
+
565
+ public:
566
+
567
+ /*!
568
+ <li> if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes.
569
+ When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable.
570
+ <li> If node_size != 0, then this container becomes a hash table for ever
571
+ </ul>
572
+ */
573
+ gim_hash_table(GUINT reserve_size = GIM_DEFAULT_HASH_TABLE_SIZE,
574
+ GUINT node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE,
575
+ GUINT min_hash_table_size = GIM_INVALID_HASH)
576
+ {
577
+ m_hash_table = NULL;
578
+ m_table_size = 0;
579
+ m_sorted = false;
580
+ m_node_size = node_size;
581
+ m_min_hash_table_size = min_hash_table_size;
582
+
583
+ if(m_node_size!=0)
584
+ {
585
+ if(reserve_size!=0)
586
+ {
587
+ m_nodes.reserve(reserve_size);
588
+ _reserve_table_memory(reserve_size);
589
+ _invalidate_keys();
590
+ }
591
+ else
592
+ {
593
+ m_nodes.reserve(GIM_DEFAULT_HASH_TABLE_SIZE);
594
+ _reserve_table_memory(GIM_DEFAULT_HASH_TABLE_SIZE);
595
+ _invalidate_keys();
596
+ }
597
+ }
598
+ else if(reserve_size!=0)
599
+ {
600
+ m_nodes.reserve(reserve_size);
601
+ }
602
+
603
+ }
604
+
605
+ ~gim_hash_table()
606
+ {
607
+ _destroy();
608
+ }
609
+
610
+ inline bool is_hash_table()
611
+ {
612
+ if(m_hash_table) return true;
613
+ return false;
614
+ }
615
+
616
+ inline bool is_sorted()
617
+ {
618
+ if(size()<2) return true;
619
+ return m_sorted;
620
+ }
621
+
622
+ bool sort()
623
+ {
624
+ if(is_sorted()) return true;
625
+ if(m_nodes.size()<2) return false;
626
+
627
+
628
+ _node_type * ptr = m_nodes.pointer();
629
+ GUINT siz = m_nodes.size();
630
+ gim_sort_hash_node_array(ptr,siz);
631
+ m_sorted=true;
632
+
633
+
634
+
635
+ if(m_hash_table)
636
+ {
637
+ _rehash();
638
+ }
639
+ return true;
640
+ }
641
+
642
+ bool switch_to_hashtable()
643
+ {
644
+ if(m_hash_table) return false;
645
+ if(m_node_size==0) m_node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE;
646
+ if(m_nodes.size()<GIM_DEFAULT_HASH_TABLE_SIZE)
647
+ {
648
+ _resize_table(GIM_DEFAULT_HASH_TABLE_SIZE);
649
+ }
650
+ else
651
+ {
652
+ _resize_table(m_nodes.size()+1);
653
+ }
654
+
655
+ return true;
656
+ }
657
+
658
+ bool switch_to_sorted_array()
659
+ {
660
+ if(m_hash_table==NULL) return true;
661
+ _clear_table_memory();
662
+ return sort();
663
+ }
664
+
665
+ //!If the container reaches the
666
+ bool check_for_switching_to_hashtable()
667
+ {
668
+ if(this->m_hash_table) return true;
669
+
670
+ if(!(m_nodes.size()< m_min_hash_table_size))
671
+ {
672
+ if(m_node_size == 0)
673
+ {
674
+ m_node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE;
675
+ }
676
+
677
+ _resize_table(m_nodes.size()+1);
678
+ return true;
679
+ }
680
+ return false;
681
+ }
682
+
683
+ inline void set_sorted(bool value)
684
+ {
685
+ m_sorted = value;
686
+ }
687
+
688
+ //! Retrieves the amount of keys.
689
+ inline GUINT size() const
690
+ {
691
+ return m_nodes.size();
692
+ }
693
+
694
+ //! Retrieves the hash key.
695
+ inline GUINT get_key(GUINT index) const
696
+ {
697
+ return m_nodes[index].m_key;
698
+ }
699
+
700
+ //! Retrieves the value by index
701
+ /*!
702
+ */
703
+ inline T * get_value_by_index(GUINT index)
704
+ {
705
+ return &m_nodes[index].m_data;
706
+ }
707
+
708
+ inline const T& operator[](GUINT index) const
709
+ {
710
+ return m_nodes[index].m_data;
711
+ }
712
+
713
+ inline T& operator[](GUINT index)
714
+ {
715
+ return m_nodes[index].m_data;
716
+ }
717
+
718
+ //! Finds the index of the element with the key
719
+ /*!
720
+ \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted
721
+ If so, the element has been inserted at the last position of the array.
722
+ */
723
+ inline GUINT find(GUINT hashkey)
724
+ {
725
+ if(m_hash_table)
726
+ {
727
+ GUINT cell_index = _find_cell(hashkey);
728
+ if(cell_index==GIM_INVALID_HASH) return GIM_INVALID_HASH;
729
+ return m_hash_table[cell_index];
730
+ }
731
+ GUINT last_index = m_nodes.size();
732
+ if(last_index<2)
733
+ {
734
+ if(last_index==0) return GIM_INVALID_HASH;
735
+ if(m_nodes[0].m_key == hashkey) return 0;
736
+ return GIM_INVALID_HASH;
737
+ }
738
+ else if(m_sorted)
739
+ {
740
+ //Binary search
741
+ GUINT result_ind = 0;
742
+ last_index--;
743
+ _node_type * ptr = m_nodes.pointer();
744
+
745
+ bool found = gim_binary_search_ex(ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO());
746
+
747
+
748
+ if(found) return result_ind;
749
+ }
750
+ return GIM_INVALID_HASH;
751
+ }
752
+
753
+ //! Retrieves the value associated with the index
754
+ /*!
755
+ \return the found element, or null
756
+ */
757
+ inline T * get_value(GUINT hashkey)
758
+ {
759
+ GUINT index = find(hashkey);
760
+ if(index == GIM_INVALID_HASH) return NULL;
761
+ return &m_nodes[index].m_data;
762
+ }
763
+
764
+
765
+ /*!
766
+ */
767
+ inline bool erase_by_index(GUINT index)
768
+ {
769
+ if(index > m_nodes.size()) return false;
770
+
771
+ if(m_hash_table == NULL)
772
+ {
773
+ if(is_sorted())
774
+ {
775
+ return this->_erase_sorted(index);
776
+ }
777
+ else
778
+ {
779
+ return this->_erase_unsorted(index);
780
+ }
781
+ }
782
+ else
783
+ {
784
+ return this->_erase_by_index_hash_table(index);
785
+ }
786
+ return false;
787
+ }
788
+
789
+
790
+
791
+ inline bool erase_by_index_unsorted(GUINT index)
792
+ {
793
+ if(index > m_nodes.size()) return false;
794
+
795
+ if(m_hash_table == NULL)
796
+ {
797
+ return this->_erase_unsorted(index);
798
+ }
799
+ else
800
+ {
801
+ return this->_erase_by_index_hash_table(index);
802
+ }
803
+ return false;
804
+ }
805
+
806
+
807
+
808
+ /*!
809
+
810
+ */
811
+ inline bool erase_by_key(GUINT hashkey)
812
+ {
813
+ if(size()==0) return false;
814
+
815
+ if(m_hash_table)
816
+ {
817
+ return this->_erase_hash_table(hashkey);
818
+ }
819
+ //Binary search
820
+
821
+ if(is_sorted()==false) return false;
822
+
823
+ GUINT result_ind = find(hashkey);
824
+ if(result_ind!= GIM_INVALID_HASH)
825
+ {
826
+ return this->_erase_sorted(result_ind);
827
+ }
828
+ return false;
829
+ }
830
+
831
+ void clear()
832
+ {
833
+ m_nodes.clear();
834
+
835
+ if(m_hash_table==NULL) return;
836
+ GUINT datasize = m_table_size*m_node_size;
837
+ //Initialize the hashkeys.
838
+ GUINT i;
839
+ for(i=0;i<datasize;i++)
840
+ {
841
+ m_hash_table[i] = GIM_INVALID_HASH;// invalidate keys
842
+ }
843
+ m_sorted = false;
844
+ }
845
+
846
+ //! Insert an element into the hash
847
+ /*!
848
+ \return If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position
849
+ of the existing element.
850
+ */
851
+ inline GUINT insert(GUINT hashkey, const T & element)
852
+ {
853
+ if(m_hash_table)
854
+ {
855
+ return this->_insert_hash_table(hashkey,element);
856
+ }
857
+ if(this->is_sorted())
858
+ {
859
+ return this->_insert_sorted(hashkey,element);
860
+ }
861
+ return this->_insert_unsorted(hashkey,element);
862
+ }
863
+
864
+ //! Insert an element into the hash, and could overrite an existing object with the same hash.
865
+ /*!
866
+ \return If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position
867
+ of the replaced element.
868
+ */
869
+ inline GUINT insert_override(GUINT hashkey, const T & element)
870
+ {
871
+ if(m_hash_table)
872
+ {
873
+ return this->_insert_hash_table_replace(hashkey,element);
874
+ }
875
+ if(this->is_sorted())
876
+ {
877
+ return this->_insert_sorted_replace(hashkey,element);
878
+ }
879
+ this->_insert_unsorted(hashkey,element);
880
+ return m_nodes.size();
881
+ }
882
+
883
+
884
+
885
+ //! Insert an element into the hash,But if this container is a sorted array, this inserts it unsorted
886
+ /*!
887
+ */
888
+ inline GUINT insert_unsorted(GUINT hashkey,const T & element)
889
+ {
890
+ if(m_hash_table)
891
+ {
892
+ return this->_insert_hash_table(hashkey,element);
893
+ }
894
+ return this->_insert_unsorted(hashkey,element);
895
+ }
896
+
897
+
898
+ };
899
+
900
+
901
+
902
+ #endif // GIM_CONTAINERS_H_INCLUDED