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.
- checksums.yaml +7 -0
- data/README.md +3 -0
- data/Rakefile +14 -2
- data/bindings/bullet/interface/BulletCollision/CollisionDispatch/btCollisionWorld.i +2 -2
- data/bindings/bullet/interface/bullet_wrap.cpp +17548 -6035
- data/bindings/bullet/interface/bullet_wrap.h +7 -7
- data/bindings/bullet/interface/bullet_wrap.o +0 -0
- data/lib/bullet.so +0 -0
- data/lib/ruby-bullet/version.rb +1 -1
- data/ruby-bullet.gemspec +0 -3
- metadata +169 -444
- data/deps/include/bullet/Bullet-C-Api.h +0 -176
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.h +0 -1051
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h +0 -82
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h +0 -270
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h +0 -80
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDbvt.h +0 -1257
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h +0 -146
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btDispatcher.h +0 -110
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h +0 -151
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +0 -469
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h +0 -40
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btQuantizedBvh.h +0 -579
- data/deps/include/bullet/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h +0 -171
- data/deps/include/bullet/BulletCollision/CollisionDispatch/SphereTriangleDetector.h +0 -51
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h +0 -36
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h +0 -66
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h +0 -66
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btBoxBoxDetector.h +0 -44
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionConfiguration.h +0 -48
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h +0 -45
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionDispatcher.h +0 -172
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h +0 -524
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.h +0 -509
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h +0 -86
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h +0 -95
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h +0 -116
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h +0 -109
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h +0 -84
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h +0 -137
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h +0 -54
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btGhostObject.h +0 -175
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h +0 -46
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btManifoldResult.h +0 -128
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btSimulationIslandManager.h +0 -81
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h +0 -75
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h +0 -66
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h +0 -69
- data/deps/include/bullet/BulletCollision/CollisionDispatch/btUnionFind.h +0 -129
- data/deps/include/bullet/BulletCollision/CollisionShapes/btBox2dShape.h +0 -369
- data/deps/include/bullet/BulletCollision/CollisionShapes/btBoxShape.h +0 -312
- data/deps/include/bullet/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +0 -139
- data/deps/include/bullet/BulletCollision/CollisionShapes/btCapsuleShape.h +0 -173
- data/deps/include/bullet/BulletCollision/CollisionShapes/btCollisionMargin.h +0 -27
- data/deps/include/bullet/BulletCollision/CollisionShapes/btCollisionShape.h +0 -150
- data/deps/include/bullet/BulletCollision/CollisionShapes/btCompoundShape.h +0 -212
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConcaveShape.h +0 -60
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConeShape.h +0 -103
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvex2dShape.h +0 -80
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexHullShape.h +0 -122
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexInternalShape.h +0 -224
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexPointCloudShape.h +0 -105
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexPolyhedron.h +0 -62
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexShape.h +0 -84
- data/deps/include/bullet/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h +0 -75
- data/deps/include/bullet/BulletCollision/CollisionShapes/btCylinderShape.h +0 -200
- data/deps/include/bullet/BulletCollision/CollisionShapes/btEmptyShape.h +0 -70
- data/deps/include/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h +0 -161
- data/deps/include/bullet/BulletCollision/CollisionShapes/btMaterial.h +0 -35
- data/deps/include/bullet/BulletCollision/CollisionShapes/btMinkowskiSumShape.h +0 -60
- data/deps/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h +0 -99
- data/deps/include/bullet/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +0 -120
- data/deps/include/bullet/BulletCollision/CollisionShapes/btOptimizedBvh.h +0 -65
- data/deps/include/bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h +0 -112
- data/deps/include/bullet/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h +0 -93
- data/deps/include/bullet/BulletCollision/CollisionShapes/btShapeHull.h +0 -59
- data/deps/include/bullet/BulletCollision/CollisionShapes/btSphereShape.h +0 -73
- data/deps/include/bullet/BulletCollision/CollisionShapes/btStaticPlaneShape.h +0 -103
- data/deps/include/bullet/BulletCollision/CollisionShapes/btStridingMeshInterface.h +0 -162
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTetrahedronShape.h +0 -74
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.h +0 -69
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleCallback.h +0 -42
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h +0 -133
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h +0 -84
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleInfoMap.h +0 -241
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleMesh.h +0 -69
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleMeshShape.h +0 -89
- data/deps/include/bullet/BulletCollision/CollisionShapes/btTriangleShape.h +0 -182
- data/deps/include/bullet/BulletCollision/CollisionShapes/btUniformScalingShape.h +0 -87
- data/deps/include/bullet/BulletCollision/Gimpact/btBoxCollision.h +0 -647
- data/deps/include/bullet/BulletCollision/Gimpact/btClipPolygon.h +0 -182
- data/deps/include/bullet/BulletCollision/Gimpact/btContactProcessing.h +0 -145
- data/deps/include/bullet/BulletCollision/Gimpact/btGImpactBvh.h +0 -396
- data/deps/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h +0 -306
- data/deps/include/bullet/BulletCollision/Gimpact/btGImpactMassUtil.h +0 -60
- data/deps/include/bullet/BulletCollision/Gimpact/btGImpactQuantizedBvh.h +0 -372
- data/deps/include/bullet/BulletCollision/Gimpact/btGImpactShape.h +0 -1171
- data/deps/include/bullet/BulletCollision/Gimpact/btGenericPoolAllocator.h +0 -163
- data/deps/include/bullet/BulletCollision/Gimpact/btGeometryOperations.h +0 -212
- data/deps/include/bullet/BulletCollision/Gimpact/btQuantization.h +0 -88
- data/deps/include/bullet/BulletCollision/Gimpact/btTriangleShapeEx.h +0 -180
- data/deps/include/bullet/BulletCollision/Gimpact/gim_array.h +0 -326
- data/deps/include/bullet/BulletCollision/Gimpact/gim_basic_geometry_operations.h +0 -543
- data/deps/include/bullet/BulletCollision/Gimpact/gim_bitset.h +0 -123
- data/deps/include/bullet/BulletCollision/Gimpact/gim_box_collision.h +0 -590
- data/deps/include/bullet/BulletCollision/Gimpact/gim_box_set.h +0 -674
- data/deps/include/bullet/BulletCollision/Gimpact/gim_clip_polygon.h +0 -210
- data/deps/include/bullet/BulletCollision/Gimpact/gim_contact.h +0 -164
- data/deps/include/bullet/BulletCollision/Gimpact/gim_geom_types.h +0 -97
- data/deps/include/bullet/BulletCollision/Gimpact/gim_geometry.h +0 -42
- data/deps/include/bullet/BulletCollision/Gimpact/gim_hash_table.h +0 -902
- data/deps/include/bullet/BulletCollision/Gimpact/gim_linear_math.h +0 -1573
- data/deps/include/bullet/BulletCollision/Gimpact/gim_math.h +0 -157
- data/deps/include/bullet/BulletCollision/Gimpact/gim_memory.h +0 -190
- data/deps/include/bullet/BulletCollision/Gimpact/gim_radixsort.h +0 -406
- data/deps/include/bullet/BulletCollision/Gimpact/gim_tri_collision.h +0 -379
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h +0 -59
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.h +0 -73
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h +0 -42
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h +0 -91
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h +0 -50
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h +0 -75
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h +0 -43
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h +0 -103
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h +0 -158
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h +0 -40
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +0 -228
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPointCollector.h +0 -64
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h +0 -46
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h +0 -72
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h +0 -63
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h +0 -50
- data/deps/include/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h +0 -179
- data/deps/include/bullet/BulletCollision/btBulletCollisionCommon.h +0 -69
- data/deps/include/bullet/BulletDynamics/Character/btCharacterControllerInterface.h +0 -46
- data/deps/include/bullet/BulletDynamics/Character/btKinematicCharacterController.h +0 -163
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h +0 -346
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btConstraintSolver.h +0 -52
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btContactConstraint.h +0 -71
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h +0 -87
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +0 -614
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h +0 -99
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btHinge2Constraint.h +0 -58
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btHingeConstraint.h +0 -381
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btJacobianEntry.h +0 -156
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h +0 -161
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h +0 -130
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSliderConstraint.h +0 -333
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h +0 -107
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolverBody.h +0 -191
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btSolverConstraint.h +0 -98
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btTypedConstraint.h +0 -452
- data/deps/include/bullet/BulletDynamics/ConstraintSolver/btUniversalConstraint.h +0 -62
- data/deps/include/bullet/BulletDynamics/Dynamics/btActionInterface.h +0 -46
- data/deps/include/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +0 -203
- data/deps/include/bullet/BulletDynamics/Dynamics/btDynamicsWorld.h +0 -151
- data/deps/include/bullet/BulletDynamics/Dynamics/btRigidBody.h +0 -691
- data/deps/include/bullet/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h +0 -89
- data/deps/include/bullet/BulletDynamics/Vehicle/btRaycastVehicle.h +0 -236
- data/deps/include/bullet/BulletDynamics/Vehicle/btVehicleRaycaster.h +0 -35
- data/deps/include/bullet/BulletDynamics/Vehicle/btWheelInfo.h +0 -119
- data/deps/include/bullet/BulletDynamics/btBulletDynamicsCommon.h +0 -48
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h +0 -323
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h +0 -103
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h +0 -173
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h +0 -96
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h +0 -107
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h +0 -63
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h +0 -691
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h +0 -81
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h +0 -209
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h +0 -99
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h +0 -169
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h +0 -62
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h +0 -84
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h +0 -166
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h +0 -52
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h +0 -527
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h +0 -81
- data/deps/include/bullet/BulletMultiThreaded/GpuSoftBodySolvers/Shared/btSoftBodySolverData.h +0 -748
- data/deps/include/bullet/BulletMultiThreaded/HeapManager.h +0 -117
- data/deps/include/bullet/BulletMultiThreaded/PlatformDefinitions.h +0 -99
- data/deps/include/bullet/BulletMultiThreaded/PosixThreadSupport.h +0 -142
- data/deps/include/bullet/BulletMultiThreaded/PpuAddressSpace.h +0 -37
- data/deps/include/bullet/BulletMultiThreaded/SequentialThreadSupport.h +0 -96
- data/deps/include/bullet/BulletMultiThreaded/SpuCollisionObjectWrapper.h +0 -40
- data/deps/include/bullet/BulletMultiThreaded/SpuCollisionTaskProcess.h +0 -163
- data/deps/include/bullet/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h +0 -120
- data/deps/include/bullet/BulletMultiThreaded/SpuDoubleBuffer.h +0 -126
- data/deps/include/bullet/BulletMultiThreaded/SpuFakeDma.h +0 -135
- data/deps/include/bullet/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h +0 -72
- data/deps/include/bullet/BulletMultiThreaded/SpuLibspe2Support.h +0 -180
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h +0 -167
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h +0 -128
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h +0 -106
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h +0 -51
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h +0 -140
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h +0 -19
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h +0 -48
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h +0 -70
- data/deps/include/bullet/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h +0 -65
- data/deps/include/bullet/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h +0 -54
- data/deps/include/bullet/BulletMultiThreaded/SpuSampleTaskProcess.h +0 -153
- data/deps/include/bullet/BulletMultiThreaded/SpuSync.h +0 -149
- data/deps/include/bullet/BulletMultiThreaded/TrbDynBody.h +0 -79
- data/deps/include/bullet/BulletMultiThreaded/TrbStateVec.h +0 -339
- data/deps/include/bullet/BulletMultiThreaded/Win32ThreadSupport.h +0 -138
- data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphase.h +0 -138
- data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h +0 -430
- data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h +0 -61
- data/deps/include/bullet/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h +0 -67
- data/deps/include/bullet/BulletMultiThreaded/btGpuDefines.h +0 -211
- data/deps/include/bullet/BulletMultiThreaded/btGpuUtilsSharedCode.h +0 -55
- data/deps/include/bullet/BulletMultiThreaded/btGpuUtilsSharedDefs.h +0 -52
- data/deps/include/bullet/BulletMultiThreaded/btParallelConstraintSolver.h +0 -285
- data/deps/include/bullet/BulletMultiThreaded/btThreadSupportInterface.h +0 -85
- data/deps/include/bullet/BulletMultiThreaded/vectormath2bullet.h +0 -73
- data/deps/include/bullet/BulletSoftBody/btDefaultSoftBodySolver.h +0 -63
- data/deps/include/bullet/BulletSoftBody/btSoftBody.h +0 -987
- data/deps/include/bullet/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h +0 -153
- data/deps/include/bullet/BulletSoftBody/btSoftBodyData.h +0 -217
- data/deps/include/bullet/BulletSoftBody/btSoftBodyHelpers.h +0 -143
- data/deps/include/bullet/BulletSoftBody/btSoftBodyInternals.h +0 -930
- data/deps/include/bullet/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h +0 -48
- data/deps/include/bullet/BulletSoftBody/btSoftBodySolverVertexBuffer.h +0 -165
- data/deps/include/bullet/BulletSoftBody/btSoftBodySolvers.h +0 -154
- data/deps/include/bullet/BulletSoftBody/btSoftRigidCollisionAlgorithm.h +0 -75
- data/deps/include/bullet/BulletSoftBody/btSoftRigidDynamicsWorld.h +0 -107
- data/deps/include/bullet/BulletSoftBody/btSoftSoftCollisionAlgorithm.h +0 -69
- data/deps/include/bullet/BulletSoftBody/btSparseSDF.h +0 -306
- data/deps/include/bullet/LinearMath/btAabbUtil2.h +0 -236
- data/deps/include/bullet/LinearMath/btAlignedAllocator.h +0 -107
- data/deps/include/bullet/LinearMath/btAlignedObjectArray.h +0 -494
- data/deps/include/bullet/LinearMath/btConvexHull.h +0 -241
- data/deps/include/bullet/LinearMath/btConvexHullComputer.h +0 -103
- data/deps/include/bullet/LinearMath/btDefaultMotionState.h +0 -40
- data/deps/include/bullet/LinearMath/btGeometryUtil.h +0 -42
- data/deps/include/bullet/LinearMath/btGrahamScan2dConvexHull.h +0 -110
- data/deps/include/bullet/LinearMath/btHashMap.h +0 -450
- data/deps/include/bullet/LinearMath/btIDebugDraw.h +0 -418
- data/deps/include/bullet/LinearMath/btList.h +0 -73
- data/deps/include/bullet/LinearMath/btMatrix3x3.h +0 -771
- data/deps/include/bullet/LinearMath/btMinMax.h +0 -71
- data/deps/include/bullet/LinearMath/btMotionState.h +0 -40
- data/deps/include/bullet/LinearMath/btPoolAllocator.h +0 -121
- data/deps/include/bullet/LinearMath/btQuadWord.h +0 -180
- data/deps/include/bullet/LinearMath/btQuaternion.h +0 -430
- data/deps/include/bullet/LinearMath/btQuickprof.h +0 -203
- data/deps/include/bullet/LinearMath/btRandom.h +0 -42
- data/deps/include/bullet/LinearMath/btScalar.h +0 -539
- data/deps/include/bullet/LinearMath/btSerializer.h +0 -639
- data/deps/include/bullet/LinearMath/btStackAlloc.h +0 -116
- data/deps/include/bullet/LinearMath/btTransform.h +0 -307
- data/deps/include/bullet/LinearMath/btTransformUtil.h +0 -228
- data/deps/include/bullet/LinearMath/btVector3.h +0 -766
- data/deps/include/bullet/MiniCL/MiniCLTask/MiniCLTask.h +0 -62
- data/deps/include/bullet/MiniCL/MiniCLTaskScheduler.h +0 -194
- data/deps/include/bullet/MiniCL/cl.h +0 -867
- data/deps/include/bullet/MiniCL/cl_MiniCL_Defs.h +0 -439
- data/deps/include/bullet/MiniCL/cl_gl.h +0 -113
- data/deps/include/bullet/MiniCL/cl_platform.h +0 -254
- data/deps/include/bullet/btBulletCollisionCommon.h +0 -69
- data/deps/include/bullet/btBulletDynamicsCommon.h +0 -48
- data/deps/include/bullet/vectormath/scalar/boolInVec.h +0 -225
- data/deps/include/bullet/vectormath/scalar/floatInVec.h +0 -343
- data/deps/include/bullet/vectormath/scalar/mat_aos.h +0 -1630
- data/deps/include/bullet/vectormath/scalar/quat_aos.h +0 -433
- data/deps/include/bullet/vectormath/scalar/vec_aos.h +0 -1426
- data/deps/include/bullet/vectormath/scalar/vectormath_aos.h +0 -1872
- data/deps/include/bullet/vectormath/sse/boolInVec.h +0 -247
- data/deps/include/bullet/vectormath/sse/floatInVec.h +0 -340
- data/deps/include/bullet/vectormath/sse/mat_aos.h +0 -2190
- data/deps/include/bullet/vectormath/sse/quat_aos.h +0 -579
- data/deps/include/bullet/vectormath/sse/vec_aos.h +0 -1455
- data/deps/include/bullet/vectormath/sse/vecidx_aos.h +0 -80
- data/deps/include/bullet/vectormath/sse/vectormath_aos.h +0 -2547
- data/deps/include/bullet/vectormath/vmInclude.h +0 -27
- data/deps/lib/libBulletCollision.a +0 -0
- data/deps/lib/libBulletDynamics.a +0 -0
- data/deps/lib/libBulletMultiThreaded.a +0 -0
- data/deps/lib/libBulletSoftBody.a +0 -0
- data/deps/lib/libBulletSoftBodySolvers_OpenCL_Mini.a +0 -0
- data/deps/lib/libLinearMath.a +0 -0
- data/deps/lib/libMiniCL.a +0 -0
@@ -1,430 +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_SIMD__QUATERNION_H_
|
18
|
-
#define BT_SIMD__QUATERNION_H_
|
19
|
-
|
20
|
-
|
21
|
-
#include "btVector3.h"
|
22
|
-
#include "btQuadWord.h"
|
23
|
-
|
24
|
-
/**@brief The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. */
|
25
|
-
class btQuaternion : public btQuadWord {
|
26
|
-
public:
|
27
|
-
/**@brief No initialization constructor */
|
28
|
-
btQuaternion() {}
|
29
|
-
|
30
|
-
// template <typename btScalar>
|
31
|
-
// explicit Quaternion(const btScalar *v) : Tuple4<btScalar>(v) {}
|
32
|
-
/**@brief Constructor from scalars */
|
33
|
-
btQuaternion(const btScalar& x, const btScalar& y, const btScalar& z, const btScalar& w)
|
34
|
-
: btQuadWord(x, y, z, w)
|
35
|
-
{}
|
36
|
-
/**@brief Axis angle Constructor
|
37
|
-
* @param axis The axis which the rotation is around
|
38
|
-
* @param angle The magnitude of the rotation around the angle (Radians) */
|
39
|
-
btQuaternion(const btVector3& axis, const btScalar& angle)
|
40
|
-
{
|
41
|
-
setRotation(axis, angle);
|
42
|
-
}
|
43
|
-
/**@brief Constructor from Euler angles
|
44
|
-
* @param yaw Angle around Y unless BT_EULER_DEFAULT_ZYX defined then Z
|
45
|
-
* @param pitch Angle around X unless BT_EULER_DEFAULT_ZYX defined then Y
|
46
|
-
* @param roll Angle around Z unless BT_EULER_DEFAULT_ZYX defined then X */
|
47
|
-
btQuaternion(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
|
48
|
-
{
|
49
|
-
#ifndef BT_EULER_DEFAULT_ZYX
|
50
|
-
setEuler(yaw, pitch, roll);
|
51
|
-
#else
|
52
|
-
setEulerZYX(yaw, pitch, roll);
|
53
|
-
#endif
|
54
|
-
}
|
55
|
-
/**@brief Set the rotation using axis angle notation
|
56
|
-
* @param axis The axis around which to rotate
|
57
|
-
* @param angle The magnitude of the rotation in Radians */
|
58
|
-
void setRotation(const btVector3& axis, const btScalar& angle)
|
59
|
-
{
|
60
|
-
btScalar d = axis.length();
|
61
|
-
btAssert(d != btScalar(0.0));
|
62
|
-
btScalar s = btSin(angle * btScalar(0.5)) / d;
|
63
|
-
setValue(axis.x() * s, axis.y() * s, axis.z() * s,
|
64
|
-
btCos(angle * btScalar(0.5)));
|
65
|
-
}
|
66
|
-
/**@brief Set the quaternion using Euler angles
|
67
|
-
* @param yaw Angle around Y
|
68
|
-
* @param pitch Angle around X
|
69
|
-
* @param roll Angle around Z */
|
70
|
-
void setEuler(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
|
71
|
-
{
|
72
|
-
btScalar halfYaw = btScalar(yaw) * btScalar(0.5);
|
73
|
-
btScalar halfPitch = btScalar(pitch) * btScalar(0.5);
|
74
|
-
btScalar halfRoll = btScalar(roll) * btScalar(0.5);
|
75
|
-
btScalar cosYaw = btCos(halfYaw);
|
76
|
-
btScalar sinYaw = btSin(halfYaw);
|
77
|
-
btScalar cosPitch = btCos(halfPitch);
|
78
|
-
btScalar sinPitch = btSin(halfPitch);
|
79
|
-
btScalar cosRoll = btCos(halfRoll);
|
80
|
-
btScalar sinRoll = btSin(halfRoll);
|
81
|
-
setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
|
82
|
-
cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
|
83
|
-
sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
|
84
|
-
cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
|
85
|
-
}
|
86
|
-
/**@brief Set the quaternion using euler angles
|
87
|
-
* @param yaw Angle around Z
|
88
|
-
* @param pitch Angle around Y
|
89
|
-
* @param roll Angle around X */
|
90
|
-
void setEulerZYX(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
|
91
|
-
{
|
92
|
-
btScalar halfYaw = btScalar(yaw) * btScalar(0.5);
|
93
|
-
btScalar halfPitch = btScalar(pitch) * btScalar(0.5);
|
94
|
-
btScalar halfRoll = btScalar(roll) * btScalar(0.5);
|
95
|
-
btScalar cosYaw = btCos(halfYaw);
|
96
|
-
btScalar sinYaw = btSin(halfYaw);
|
97
|
-
btScalar cosPitch = btCos(halfPitch);
|
98
|
-
btScalar sinPitch = btSin(halfPitch);
|
99
|
-
btScalar cosRoll = btCos(halfRoll);
|
100
|
-
btScalar sinRoll = btSin(halfRoll);
|
101
|
-
setValue(sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, //x
|
102
|
-
cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, //y
|
103
|
-
cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, //z
|
104
|
-
cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); //formerly yzx
|
105
|
-
}
|
106
|
-
/**@brief Add two quaternions
|
107
|
-
* @param q The quaternion to add to this one */
|
108
|
-
SIMD_FORCE_INLINE btQuaternion& operator+=(const btQuaternion& q)
|
109
|
-
{
|
110
|
-
m_floats[0] += q.x(); m_floats[1] += q.y(); m_floats[2] += q.z(); m_floats[3] += q.m_floats[3];
|
111
|
-
return *this;
|
112
|
-
}
|
113
|
-
|
114
|
-
/**@brief Subtract out a quaternion
|
115
|
-
* @param q The quaternion to subtract from this one */
|
116
|
-
btQuaternion& operator-=(const btQuaternion& q)
|
117
|
-
{
|
118
|
-
m_floats[0] -= q.x(); m_floats[1] -= q.y(); m_floats[2] -= q.z(); m_floats[3] -= q.m_floats[3];
|
119
|
-
return *this;
|
120
|
-
}
|
121
|
-
|
122
|
-
/**@brief Scale this quaternion
|
123
|
-
* @param s The scalar to scale by */
|
124
|
-
btQuaternion& operator*=(const btScalar& s)
|
125
|
-
{
|
126
|
-
m_floats[0] *= s; m_floats[1] *= s; m_floats[2] *= s; m_floats[3] *= s;
|
127
|
-
return *this;
|
128
|
-
}
|
129
|
-
|
130
|
-
/**@brief Multiply this quaternion by q on the right
|
131
|
-
* @param q The other quaternion
|
132
|
-
* Equivilant to this = this * q */
|
133
|
-
btQuaternion& operator*=(const btQuaternion& q)
|
134
|
-
{
|
135
|
-
setValue(m_floats[3] * q.x() + m_floats[0] * q.m_floats[3] + m_floats[1] * q.z() - m_floats[2] * q.y(),
|
136
|
-
m_floats[3] * q.y() + m_floats[1] * q.m_floats[3] + m_floats[2] * q.x() - m_floats[0] * q.z(),
|
137
|
-
m_floats[3] * q.z() + m_floats[2] * q.m_floats[3] + m_floats[0] * q.y() - m_floats[1] * q.x(),
|
138
|
-
m_floats[3] * q.m_floats[3] - m_floats[0] * q.x() - m_floats[1] * q.y() - m_floats[2] * q.z());
|
139
|
-
return *this;
|
140
|
-
}
|
141
|
-
/**@brief Return the dot product between this quaternion and another
|
142
|
-
* @param q The other quaternion */
|
143
|
-
btScalar dot(const btQuaternion& q) const
|
144
|
-
{
|
145
|
-
return m_floats[0] * q.x() + m_floats[1] * q.y() + m_floats[2] * q.z() + m_floats[3] * q.m_floats[3];
|
146
|
-
}
|
147
|
-
|
148
|
-
/**@brief Return the length squared of the quaternion */
|
149
|
-
btScalar length2() const
|
150
|
-
{
|
151
|
-
return dot(*this);
|
152
|
-
}
|
153
|
-
|
154
|
-
/**@brief Return the length of the quaternion */
|
155
|
-
btScalar length() const
|
156
|
-
{
|
157
|
-
return btSqrt(length2());
|
158
|
-
}
|
159
|
-
|
160
|
-
/**@brief Normalize the quaternion
|
161
|
-
* Such that x^2 + y^2 + z^2 +w^2 = 1 */
|
162
|
-
btQuaternion& normalize()
|
163
|
-
{
|
164
|
-
return *this /= length();
|
165
|
-
}
|
166
|
-
|
167
|
-
/**@brief Return a scaled version of this quaternion
|
168
|
-
* @param s The scale factor */
|
169
|
-
SIMD_FORCE_INLINE btQuaternion
|
170
|
-
operator*(const btScalar& s) const
|
171
|
-
{
|
172
|
-
return btQuaternion(x() * s, y() * s, z() * s, m_floats[3] * s);
|
173
|
-
}
|
174
|
-
|
175
|
-
|
176
|
-
/**@brief Return an inversely scaled versionof this quaternion
|
177
|
-
* @param s The inverse scale factor */
|
178
|
-
btQuaternion operator/(const btScalar& s) const
|
179
|
-
{
|
180
|
-
btAssert(s != btScalar(0.0));
|
181
|
-
return *this * (btScalar(1.0) / s);
|
182
|
-
}
|
183
|
-
|
184
|
-
/**@brief Inversely scale this quaternion
|
185
|
-
* @param s The scale factor */
|
186
|
-
btQuaternion& operator/=(const btScalar& s)
|
187
|
-
{
|
188
|
-
btAssert(s != btScalar(0.0));
|
189
|
-
return *this *= btScalar(1.0) / s;
|
190
|
-
}
|
191
|
-
|
192
|
-
/**@brief Return a normalized version of this quaternion */
|
193
|
-
btQuaternion normalized() const
|
194
|
-
{
|
195
|
-
return *this / length();
|
196
|
-
}
|
197
|
-
/**@brief Return the angle between this quaternion and the other
|
198
|
-
* @param q The other quaternion */
|
199
|
-
btScalar angle(const btQuaternion& q) const
|
200
|
-
{
|
201
|
-
btScalar s = btSqrt(length2() * q.length2());
|
202
|
-
btAssert(s != btScalar(0.0));
|
203
|
-
return btAcos(dot(q) / s);
|
204
|
-
}
|
205
|
-
/**@brief Return the angle of rotation represented by this quaternion */
|
206
|
-
btScalar getAngle() const
|
207
|
-
{
|
208
|
-
btScalar s = btScalar(2.) * btAcos(m_floats[3]);
|
209
|
-
return s;
|
210
|
-
}
|
211
|
-
|
212
|
-
/**@brief Return the axis of the rotation represented by this quaternion */
|
213
|
-
btVector3 getAxis() const
|
214
|
-
{
|
215
|
-
btScalar s_squared = 1.f-m_floats[3]*m_floats[3];
|
216
|
-
|
217
|
-
if (s_squared < btScalar(10.) * SIMD_EPSILON) //Check for divide by zero
|
218
|
-
return btVector3(1.0, 0.0, 0.0); // Arbitrary
|
219
|
-
btScalar s = 1.f/btSqrt(s_squared);
|
220
|
-
return btVector3(m_floats[0] * s, m_floats[1] * s, m_floats[2] * s);
|
221
|
-
}
|
222
|
-
|
223
|
-
/**@brief Return the inverse of this quaternion */
|
224
|
-
btQuaternion inverse() const
|
225
|
-
{
|
226
|
-
return btQuaternion(-m_floats[0], -m_floats[1], -m_floats[2], m_floats[3]);
|
227
|
-
}
|
228
|
-
|
229
|
-
/**@brief Return the sum of this quaternion and the other
|
230
|
-
* @param q2 The other quaternion */
|
231
|
-
SIMD_FORCE_INLINE btQuaternion
|
232
|
-
operator+(const btQuaternion& q2) const
|
233
|
-
{
|
234
|
-
const btQuaternion& q1 = *this;
|
235
|
-
return btQuaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_floats[3] + q2.m_floats[3]);
|
236
|
-
}
|
237
|
-
|
238
|
-
/**@brief Return the difference between this quaternion and the other
|
239
|
-
* @param q2 The other quaternion */
|
240
|
-
SIMD_FORCE_INLINE btQuaternion
|
241
|
-
operator-(const btQuaternion& q2) const
|
242
|
-
{
|
243
|
-
const btQuaternion& q1 = *this;
|
244
|
-
return btQuaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_floats[3] - q2.m_floats[3]);
|
245
|
-
}
|
246
|
-
|
247
|
-
/**@brief Return the negative of this quaternion
|
248
|
-
* This simply negates each element */
|
249
|
-
SIMD_FORCE_INLINE btQuaternion operator-() const
|
250
|
-
{
|
251
|
-
const btQuaternion& q2 = *this;
|
252
|
-
return btQuaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_floats[3]);
|
253
|
-
}
|
254
|
-
/**@todo document this and it's use */
|
255
|
-
SIMD_FORCE_INLINE btQuaternion farthest( const btQuaternion& qd) const
|
256
|
-
{
|
257
|
-
btQuaternion diff,sum;
|
258
|
-
diff = *this - qd;
|
259
|
-
sum = *this + qd;
|
260
|
-
if( diff.dot(diff) > sum.dot(sum) )
|
261
|
-
return qd;
|
262
|
-
return (-qd);
|
263
|
-
}
|
264
|
-
|
265
|
-
/**@todo document this and it's use */
|
266
|
-
SIMD_FORCE_INLINE btQuaternion nearest( const btQuaternion& qd) const
|
267
|
-
{
|
268
|
-
btQuaternion diff,sum;
|
269
|
-
diff = *this - qd;
|
270
|
-
sum = *this + qd;
|
271
|
-
if( diff.dot(diff) < sum.dot(sum) )
|
272
|
-
return qd;
|
273
|
-
return (-qd);
|
274
|
-
}
|
275
|
-
|
276
|
-
|
277
|
-
/**@brief Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion
|
278
|
-
* @param q The other quaternion to interpolate with
|
279
|
-
* @param t The ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q.
|
280
|
-
* Slerp interpolates assuming constant velocity. */
|
281
|
-
btQuaternion slerp(const btQuaternion& q, const btScalar& t) const
|
282
|
-
{
|
283
|
-
btScalar magnitude = btSqrt(length2() * q.length2());
|
284
|
-
btAssert(magnitude > btScalar(0));
|
285
|
-
|
286
|
-
btScalar product = dot(q) / magnitude;
|
287
|
-
if (btFabs(product) != btScalar(1))
|
288
|
-
{
|
289
|
-
// Take care of long angle case see http://en.wikipedia.org/wiki/Slerp
|
290
|
-
const btScalar sign = (product < 0) ? btScalar(-1) : btScalar(1);
|
291
|
-
|
292
|
-
const btScalar theta = btAcos(sign * product);
|
293
|
-
const btScalar s1 = btSin(sign * t * theta);
|
294
|
-
const btScalar d = btScalar(1.0) / btSin(theta);
|
295
|
-
const btScalar s0 = btSin((btScalar(1.0) - t) * theta);
|
296
|
-
|
297
|
-
return btQuaternion(
|
298
|
-
(m_floats[0] * s0 + q.x() * s1) * d,
|
299
|
-
(m_floats[1] * s0 + q.y() * s1) * d,
|
300
|
-
(m_floats[2] * s0 + q.z() * s1) * d,
|
301
|
-
(m_floats[3] * s0 + q.m_floats[3] * s1) * d);
|
302
|
-
}
|
303
|
-
else
|
304
|
-
{
|
305
|
-
return *this;
|
306
|
-
}
|
307
|
-
}
|
308
|
-
|
309
|
-
static const btQuaternion& getIdentity()
|
310
|
-
{
|
311
|
-
static const btQuaternion identityQuat(btScalar(0.),btScalar(0.),btScalar(0.),btScalar(1.));
|
312
|
-
return identityQuat;
|
313
|
-
}
|
314
|
-
|
315
|
-
SIMD_FORCE_INLINE const btScalar& getW() const { return m_floats[3]; }
|
316
|
-
|
317
|
-
|
318
|
-
};
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
/**@brief Return the product of two quaternions */
|
325
|
-
SIMD_FORCE_INLINE btQuaternion
|
326
|
-
operator*(const btQuaternion& q1, const btQuaternion& q2) {
|
327
|
-
return btQuaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(),
|
328
|
-
q1.w() * q2.y() + q1.y() * q2.w() + q1.z() * q2.x() - q1.x() * q2.z(),
|
329
|
-
q1.w() * q2.z() + q1.z() * q2.w() + q1.x() * q2.y() - q1.y() * q2.x(),
|
330
|
-
q1.w() * q2.w() - q1.x() * q2.x() - q1.y() * q2.y() - q1.z() * q2.z());
|
331
|
-
}
|
332
|
-
|
333
|
-
SIMD_FORCE_INLINE btQuaternion
|
334
|
-
operator*(const btQuaternion& q, const btVector3& w)
|
335
|
-
{
|
336
|
-
return btQuaternion( q.w() * w.x() + q.y() * w.z() - q.z() * w.y(),
|
337
|
-
q.w() * w.y() + q.z() * w.x() - q.x() * w.z(),
|
338
|
-
q.w() * w.z() + q.x() * w.y() - q.y() * w.x(),
|
339
|
-
-q.x() * w.x() - q.y() * w.y() - q.z() * w.z());
|
340
|
-
}
|
341
|
-
|
342
|
-
SIMD_FORCE_INLINE btQuaternion
|
343
|
-
operator*(const btVector3& w, const btQuaternion& q)
|
344
|
-
{
|
345
|
-
return btQuaternion( w.x() * q.w() + w.y() * q.z() - w.z() * q.y(),
|
346
|
-
w.y() * q.w() + w.z() * q.x() - w.x() * q.z(),
|
347
|
-
w.z() * q.w() + w.x() * q.y() - w.y() * q.x(),
|
348
|
-
-w.x() * q.x() - w.y() * q.y() - w.z() * q.z());
|
349
|
-
}
|
350
|
-
|
351
|
-
/**@brief Calculate the dot product between two quaternions */
|
352
|
-
SIMD_FORCE_INLINE btScalar
|
353
|
-
dot(const btQuaternion& q1, const btQuaternion& q2)
|
354
|
-
{
|
355
|
-
return q1.dot(q2);
|
356
|
-
}
|
357
|
-
|
358
|
-
|
359
|
-
/**@brief Return the length of a quaternion */
|
360
|
-
SIMD_FORCE_INLINE btScalar
|
361
|
-
length(const btQuaternion& q)
|
362
|
-
{
|
363
|
-
return q.length();
|
364
|
-
}
|
365
|
-
|
366
|
-
/**@brief Return the angle between two quaternions*/
|
367
|
-
SIMD_FORCE_INLINE btScalar
|
368
|
-
angle(const btQuaternion& q1, const btQuaternion& q2)
|
369
|
-
{
|
370
|
-
return q1.angle(q2);
|
371
|
-
}
|
372
|
-
|
373
|
-
/**@brief Return the inverse of a quaternion*/
|
374
|
-
SIMD_FORCE_INLINE btQuaternion
|
375
|
-
inverse(const btQuaternion& q)
|
376
|
-
{
|
377
|
-
return q.inverse();
|
378
|
-
}
|
379
|
-
|
380
|
-
/**@brief Return the result of spherical linear interpolation betwen two quaternions
|
381
|
-
* @param q1 The first quaternion
|
382
|
-
* @param q2 The second quaternion
|
383
|
-
* @param t The ration between q1 and q2. t = 0 return q1, t=1 returns q2
|
384
|
-
* Slerp assumes constant velocity between positions. */
|
385
|
-
SIMD_FORCE_INLINE btQuaternion
|
386
|
-
slerp(const btQuaternion& q1, const btQuaternion& q2, const btScalar& t)
|
387
|
-
{
|
388
|
-
return q1.slerp(q2, t);
|
389
|
-
}
|
390
|
-
|
391
|
-
SIMD_FORCE_INLINE btVector3
|
392
|
-
quatRotate(const btQuaternion& rotation, const btVector3& v)
|
393
|
-
{
|
394
|
-
btQuaternion q = rotation * v;
|
395
|
-
q *= rotation.inverse();
|
396
|
-
return btVector3(q.getX(),q.getY(),q.getZ());
|
397
|
-
}
|
398
|
-
|
399
|
-
SIMD_FORCE_INLINE btQuaternion
|
400
|
-
shortestArcQuat(const btVector3& v0, const btVector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized
|
401
|
-
{
|
402
|
-
btVector3 c = v0.cross(v1);
|
403
|
-
btScalar d = v0.dot(v1);
|
404
|
-
|
405
|
-
if (d < -1.0 + SIMD_EPSILON)
|
406
|
-
{
|
407
|
-
btVector3 n,unused;
|
408
|
-
btPlaneSpace1(v0,n,unused);
|
409
|
-
return btQuaternion(n.x(),n.y(),n.z(),0.0f); // just pick any vector that is orthogonal to v0
|
410
|
-
}
|
411
|
-
|
412
|
-
btScalar s = btSqrt((1.0f + d) * 2.0f);
|
413
|
-
btScalar rs = 1.0f / s;
|
414
|
-
|
415
|
-
return btQuaternion(c.getX()*rs,c.getY()*rs,c.getZ()*rs,s * 0.5f);
|
416
|
-
}
|
417
|
-
|
418
|
-
SIMD_FORCE_INLINE btQuaternion
|
419
|
-
shortestArcQuatNormalize2(btVector3& v0,btVector3& v1)
|
420
|
-
{
|
421
|
-
v0.normalize();
|
422
|
-
v1.normalize();
|
423
|
-
return shortestArcQuat(v0,v1);
|
424
|
-
}
|
425
|
-
|
426
|
-
#endif //BT_SIMD__QUATERNION_H_
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
@@ -1,203 +0,0 @@
|
|
1
|
-
|
2
|
-
/***************************************************************************************************
|
3
|
-
**
|
4
|
-
** Real-Time Hierarchical Profiling for Game Programming Gems 3
|
5
|
-
**
|
6
|
-
** by Greg Hjelstrom & Byon Garrabrant
|
7
|
-
**
|
8
|
-
***************************************************************************************************/
|
9
|
-
|
10
|
-
// Credits: The Clock class was inspired by the Timer classes in
|
11
|
-
// Ogre (www.ogre3d.org).
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
#ifndef BT_QUICK_PROF_H
|
16
|
-
#define BT_QUICK_PROF_H
|
17
|
-
|
18
|
-
//To disable built-in profiling, please comment out next line
|
19
|
-
//#define BT_NO_PROFILE 1
|
20
|
-
#ifndef BT_NO_PROFILE
|
21
|
-
#include <stdio.h>//@todo remove this, backwards compatibility
|
22
|
-
#include "btScalar.h"
|
23
|
-
#include "btAlignedAllocator.h"
|
24
|
-
#include <new>
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#define USE_BT_CLOCK 1
|
31
|
-
|
32
|
-
#ifdef USE_BT_CLOCK
|
33
|
-
|
34
|
-
///The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
|
35
|
-
class btClock
|
36
|
-
{
|
37
|
-
public:
|
38
|
-
btClock();
|
39
|
-
|
40
|
-
btClock(const btClock& other);
|
41
|
-
btClock& operator=(const btClock& other);
|
42
|
-
|
43
|
-
~btClock();
|
44
|
-
|
45
|
-
/// Resets the initial reference time.
|
46
|
-
void reset();
|
47
|
-
|
48
|
-
/// Returns the time in ms since the last call to reset or since
|
49
|
-
/// the btClock was created.
|
50
|
-
unsigned long int getTimeMilliseconds();
|
51
|
-
|
52
|
-
/// Returns the time in us since the last call to reset or since
|
53
|
-
/// the Clock was created.
|
54
|
-
unsigned long int getTimeMicroseconds();
|
55
|
-
private:
|
56
|
-
struct btClockData* m_data;
|
57
|
-
};
|
58
|
-
|
59
|
-
#endif //USE_BT_CLOCK
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
///A node in the Profile Hierarchy Tree
|
65
|
-
class CProfileNode {
|
66
|
-
|
67
|
-
public:
|
68
|
-
CProfileNode( const char * name, CProfileNode * parent );
|
69
|
-
~CProfileNode( void );
|
70
|
-
|
71
|
-
CProfileNode * Get_Sub_Node( const char * name );
|
72
|
-
|
73
|
-
CProfileNode * Get_Parent( void ) { return Parent; }
|
74
|
-
CProfileNode * Get_Sibling( void ) { return Sibling; }
|
75
|
-
CProfileNode * Get_Child( void ) { return Child; }
|
76
|
-
|
77
|
-
void CleanupMemory();
|
78
|
-
void Reset( void );
|
79
|
-
void Call( void );
|
80
|
-
bool Return( void );
|
81
|
-
|
82
|
-
const char * Get_Name( void ) { return Name; }
|
83
|
-
int Get_Total_Calls( void ) { return TotalCalls; }
|
84
|
-
float Get_Total_Time( void ) { return TotalTime; }
|
85
|
-
void* GetUserPointer() const {return m_userPtr;}
|
86
|
-
void SetUserPointer(void* ptr) { m_userPtr = ptr;}
|
87
|
-
protected:
|
88
|
-
|
89
|
-
const char * Name;
|
90
|
-
int TotalCalls;
|
91
|
-
float TotalTime;
|
92
|
-
unsigned long int StartTime;
|
93
|
-
int RecursionCounter;
|
94
|
-
|
95
|
-
CProfileNode * Parent;
|
96
|
-
CProfileNode * Child;
|
97
|
-
CProfileNode * Sibling;
|
98
|
-
void* m_userPtr;
|
99
|
-
};
|
100
|
-
|
101
|
-
///An iterator to navigate through the tree
|
102
|
-
class CProfileIterator
|
103
|
-
{
|
104
|
-
public:
|
105
|
-
// Access all the children of the current parent
|
106
|
-
void First(void);
|
107
|
-
void Next(void);
|
108
|
-
bool Is_Done(void);
|
109
|
-
bool Is_Root(void) { return (CurrentParent->Get_Parent() == 0); }
|
110
|
-
|
111
|
-
void Enter_Child( int index ); // Make the given child the new parent
|
112
|
-
void Enter_Largest_Child( void ); // Make the largest child the new parent
|
113
|
-
void Enter_Parent( void ); // Make the current parent's parent the new parent
|
114
|
-
|
115
|
-
// Access the current child
|
116
|
-
const char * Get_Current_Name( void ) { return CurrentChild->Get_Name(); }
|
117
|
-
int Get_Current_Total_Calls( void ) { return CurrentChild->Get_Total_Calls(); }
|
118
|
-
float Get_Current_Total_Time( void ) { return CurrentChild->Get_Total_Time(); }
|
119
|
-
|
120
|
-
void* Get_Current_UserPointer( void ) { return CurrentChild->GetUserPointer(); }
|
121
|
-
void Set_Current_UserPointer(void* ptr) {CurrentChild->SetUserPointer(ptr);}
|
122
|
-
// Access the current parent
|
123
|
-
const char * Get_Current_Parent_Name( void ) { return CurrentParent->Get_Name(); }
|
124
|
-
int Get_Current_Parent_Total_Calls( void ) { return CurrentParent->Get_Total_Calls(); }
|
125
|
-
float Get_Current_Parent_Total_Time( void ) { return CurrentParent->Get_Total_Time(); }
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
protected:
|
130
|
-
|
131
|
-
CProfileNode * CurrentParent;
|
132
|
-
CProfileNode * CurrentChild;
|
133
|
-
|
134
|
-
|
135
|
-
CProfileIterator( CProfileNode * start );
|
136
|
-
friend class CProfileManager;
|
137
|
-
};
|
138
|
-
|
139
|
-
|
140
|
-
///The Manager for the Profile system
|
141
|
-
class CProfileManager {
|
142
|
-
public:
|
143
|
-
static void Start_Profile( const char * name );
|
144
|
-
static void Stop_Profile( void );
|
145
|
-
|
146
|
-
static void CleanupMemory(void)
|
147
|
-
{
|
148
|
-
Root.CleanupMemory();
|
149
|
-
}
|
150
|
-
|
151
|
-
static void Reset( void );
|
152
|
-
static void Increment_Frame_Counter( void );
|
153
|
-
static int Get_Frame_Count_Since_Reset( void ) { return FrameCounter; }
|
154
|
-
static float Get_Time_Since_Reset( void );
|
155
|
-
|
156
|
-
static CProfileIterator * Get_Iterator( void )
|
157
|
-
{
|
158
|
-
|
159
|
-
return new CProfileIterator( &Root );
|
160
|
-
}
|
161
|
-
static void Release_Iterator( CProfileIterator * iterator ) { delete ( iterator); }
|
162
|
-
|
163
|
-
static void dumpRecursive(CProfileIterator* profileIterator, int spacing);
|
164
|
-
|
165
|
-
static void dumpAll();
|
166
|
-
|
167
|
-
private:
|
168
|
-
static CProfileNode Root;
|
169
|
-
static CProfileNode * CurrentNode;
|
170
|
-
static int FrameCounter;
|
171
|
-
static unsigned long int ResetTime;
|
172
|
-
};
|
173
|
-
|
174
|
-
|
175
|
-
///ProfileSampleClass is a simple way to profile a function's scope
|
176
|
-
///Use the BT_PROFILE macro at the start of scope to time
|
177
|
-
class CProfileSample {
|
178
|
-
public:
|
179
|
-
CProfileSample( const char * name )
|
180
|
-
{
|
181
|
-
CProfileManager::Start_Profile( name );
|
182
|
-
}
|
183
|
-
|
184
|
-
~CProfileSample( void )
|
185
|
-
{
|
186
|
-
CProfileManager::Stop_Profile();
|
187
|
-
}
|
188
|
-
};
|
189
|
-
|
190
|
-
|
191
|
-
#define BT_PROFILE( name ) CProfileSample __profile( name )
|
192
|
-
|
193
|
-
#else
|
194
|
-
|
195
|
-
#define BT_PROFILE( name )
|
196
|
-
|
197
|
-
#endif //#ifndef BT_NO_PROFILE
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
#endif //BT_QUICK_PROF_H
|
202
|
-
|
203
|
-
|
@@ -1,42 +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_GEN_RANDOM_H
|
18
|
-
#define BT_GEN_RANDOM_H
|
19
|
-
|
20
|
-
#ifdef MT19937
|
21
|
-
|
22
|
-
#include <limits.h>
|
23
|
-
#include <mt19937.h>
|
24
|
-
|
25
|
-
#define GEN_RAND_MAX UINT_MAX
|
26
|
-
|
27
|
-
SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand(seed); }
|
28
|
-
SIMD_FORCE_INLINE unsigned int GEN_rand() { return genrand_int32(); }
|
29
|
-
|
30
|
-
#else
|
31
|
-
|
32
|
-
#include <stdlib.h>
|
33
|
-
|
34
|
-
#define GEN_RAND_MAX RAND_MAX
|
35
|
-
|
36
|
-
SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); }
|
37
|
-
SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand(); }
|
38
|
-
|
39
|
-
#endif
|
40
|
-
|
41
|
-
#endif //BT_GEN_RANDOM_H
|
42
|
-
|