├── .gitignore ├── ClothExample ├── addons.make ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── CodeBlocksExample ├── CodeBlocksExample.cbp ├── CodeBlocksExample.depend ├── CodeBlocksExample.workspace ├── CodeBlocksExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── CodeBlocksExample Debug.xcscheme │ │ └── CodeBlocksExample Release.xcscheme ├── README.md ├── addons.make ├── icon.rc ├── lib │ └── bullet-2.81-rev2613 │ │ ├── Bullet-C-Api.h │ │ ├── BulletCollision │ │ ├── BroadphaseCollision │ │ │ ├── btAxisSweep3.cpp │ │ │ ├── btAxisSweep3.h │ │ │ ├── btBroadphaseInterface.h │ │ │ ├── btBroadphaseProxy.cpp │ │ │ ├── btBroadphaseProxy.h │ │ │ ├── btCollisionAlgorithm.cpp │ │ │ ├── btCollisionAlgorithm.h │ │ │ ├── btDbvt.cpp │ │ │ ├── btDbvt.h │ │ │ ├── btDbvtBroadphase.cpp │ │ │ ├── btDbvtBroadphase.h │ │ │ ├── btDispatcher.cpp │ │ │ ├── btDispatcher.h │ │ │ ├── btMultiSapBroadphase.cpp │ │ │ ├── btMultiSapBroadphase.h │ │ │ ├── btOverlappingPairCache.cpp │ │ │ ├── btOverlappingPairCache.h │ │ │ ├── btOverlappingPairCallback.h │ │ │ ├── btQuantizedBvh.cpp │ │ │ ├── btQuantizedBvh.h │ │ │ ├── btSimpleBroadphase.cpp │ │ │ └── btSimpleBroadphase.h │ │ ├── CMakeLists.txt │ │ ├── CollisionDispatch │ │ │ ├── SphereTriangleDetector.cpp │ │ │ ├── SphereTriangleDetector.h │ │ │ ├── btActivatingCollisionAlgorithm.cpp │ │ │ ├── btActivatingCollisionAlgorithm.h │ │ │ ├── btBox2dBox2dCollisionAlgorithm.cpp │ │ │ ├── btBox2dBox2dCollisionAlgorithm.h │ │ │ ├── btBoxBoxCollisionAlgorithm.cpp │ │ │ ├── btBoxBoxCollisionAlgorithm.h │ │ │ ├── btBoxBoxDetector.cpp │ │ │ ├── btBoxBoxDetector.h │ │ │ ├── btCollisionConfiguration.h │ │ │ ├── btCollisionCreateFunc.h │ │ │ ├── btCollisionDispatcher.cpp │ │ │ ├── btCollisionDispatcher.h │ │ │ ├── btCollisionObject.cpp │ │ │ ├── btCollisionObject.h │ │ │ ├── btCollisionObjectWrapper.h │ │ │ ├── btCollisionWorld.cpp │ │ │ ├── btCollisionWorld.h │ │ │ ├── btCompoundCollisionAlgorithm.cpp │ │ │ ├── btCompoundCollisionAlgorithm.h │ │ │ ├── btConvex2dConvex2dAlgorithm.cpp │ │ │ ├── btConvex2dConvex2dAlgorithm.h │ │ │ ├── btConvexConcaveCollisionAlgorithm.cpp │ │ │ ├── btConvexConcaveCollisionAlgorithm.h │ │ │ ├── btConvexConvexAlgorithm.cpp │ │ │ ├── btConvexConvexAlgorithm.h │ │ │ ├── btConvexPlaneCollisionAlgorithm.cpp │ │ │ ├── btConvexPlaneCollisionAlgorithm.h │ │ │ ├── btDefaultCollisionConfiguration.cpp │ │ │ ├── btDefaultCollisionConfiguration.h │ │ │ ├── btEmptyCollisionAlgorithm.cpp │ │ │ ├── btEmptyCollisionAlgorithm.h │ │ │ ├── btGhostObject.cpp │ │ │ ├── btGhostObject.h │ │ │ ├── btInternalEdgeUtility.cpp │ │ │ ├── btInternalEdgeUtility.h │ │ │ ├── btManifoldResult.cpp │ │ │ ├── btManifoldResult.h │ │ │ ├── btSimulationIslandManager.cpp │ │ │ ├── btSimulationIslandManager.h │ │ │ ├── btSphereBoxCollisionAlgorithm.cpp │ │ │ ├── btSphereBoxCollisionAlgorithm.h │ │ │ ├── btSphereSphereCollisionAlgorithm.cpp │ │ │ ├── btSphereSphereCollisionAlgorithm.h │ │ │ ├── btSphereTriangleCollisionAlgorithm.cpp │ │ │ ├── btSphereTriangleCollisionAlgorithm.h │ │ │ ├── btUnionFind.cpp │ │ │ └── btUnionFind.h │ │ ├── CollisionShapes │ │ │ ├── btBox2dShape.cpp │ │ │ ├── btBox2dShape.h │ │ │ ├── btBoxShape.cpp │ │ │ ├── btBoxShape.h │ │ │ ├── btBvhTriangleMeshShape.cpp │ │ │ ├── btBvhTriangleMeshShape.h │ │ │ ├── btCapsuleShape.cpp │ │ │ ├── btCapsuleShape.h │ │ │ ├── btCollisionMargin.h │ │ │ ├── btCollisionShape.cpp │ │ │ ├── btCollisionShape.h │ │ │ ├── btCompoundShape.cpp │ │ │ ├── btCompoundShape.h │ │ │ ├── btConcaveShape.cpp │ │ │ ├── btConcaveShape.h │ │ │ ├── btConeShape.cpp │ │ │ ├── btConeShape.h │ │ │ ├── btConvex2dShape.cpp │ │ │ ├── btConvex2dShape.h │ │ │ ├── btConvexHullShape.cpp │ │ │ ├── btConvexHullShape.h │ │ │ ├── btConvexInternalShape.cpp │ │ │ ├── btConvexInternalShape.h │ │ │ ├── btConvexPointCloudShape.cpp │ │ │ ├── btConvexPointCloudShape.h │ │ │ ├── btConvexPolyhedron.cpp │ │ │ ├── btConvexPolyhedron.h │ │ │ ├── btConvexShape.cpp │ │ │ ├── btConvexShape.h │ │ │ ├── btConvexTriangleMeshShape.cpp │ │ │ ├── btConvexTriangleMeshShape.h │ │ │ ├── btCylinderShape.cpp │ │ │ ├── btCylinderShape.h │ │ │ ├── btEmptyShape.cpp │ │ │ ├── btEmptyShape.h │ │ │ ├── btHeightfieldTerrainShape.cpp │ │ │ ├── btHeightfieldTerrainShape.h │ │ │ ├── btMaterial.h │ │ │ ├── btMinkowskiSumShape.cpp │ │ │ ├── btMinkowskiSumShape.h │ │ │ ├── btMultiSphereShape.cpp │ │ │ ├── btMultiSphereShape.h │ │ │ ├── btMultimaterialTriangleMeshShape.cpp │ │ │ ├── btMultimaterialTriangleMeshShape.h │ │ │ ├── btOptimizedBvh.cpp │ │ │ ├── btOptimizedBvh.h │ │ │ ├── btPolyhedralConvexShape.cpp │ │ │ ├── btPolyhedralConvexShape.h │ │ │ ├── btScaledBvhTriangleMeshShape.cpp │ │ │ ├── btScaledBvhTriangleMeshShape.h │ │ │ ├── btShapeHull.cpp │ │ │ ├── btShapeHull.h │ │ │ ├── btSphereShape.cpp │ │ │ ├── btSphereShape.h │ │ │ ├── btStaticPlaneShape.cpp │ │ │ ├── btStaticPlaneShape.h │ │ │ ├── btStridingMeshInterface.cpp │ │ │ ├── btStridingMeshInterface.h │ │ │ ├── btTetrahedronShape.cpp │ │ │ ├── btTetrahedronShape.h │ │ │ ├── btTriangleBuffer.cpp │ │ │ ├── btTriangleBuffer.h │ │ │ ├── btTriangleCallback.cpp │ │ │ ├── btTriangleCallback.h │ │ │ ├── btTriangleIndexVertexArray.cpp │ │ │ ├── btTriangleIndexVertexArray.h │ │ │ ├── btTriangleIndexVertexMaterialArray.cpp │ │ │ ├── btTriangleIndexVertexMaterialArray.h │ │ │ ├── btTriangleInfoMap.h │ │ │ ├── btTriangleMesh.cpp │ │ │ ├── btTriangleMesh.h │ │ │ ├── btTriangleMeshShape.cpp │ │ │ ├── btTriangleMeshShape.h │ │ │ ├── btTriangleShape.h │ │ │ ├── btUniformScalingShape.cpp │ │ │ └── btUniformScalingShape.h │ │ ├── Doxyfile │ │ ├── Gimpact │ │ │ ├── btBoxCollision.h │ │ │ ├── btClipPolygon.h │ │ │ ├── btContactProcessing.cpp │ │ │ ├── btContactProcessing.h │ │ │ ├── btGImpactBvh.cpp │ │ │ ├── btGImpactBvh.h │ │ │ ├── btGImpactCollisionAlgorithm.cpp │ │ │ ├── btGImpactCollisionAlgorithm.h │ │ │ ├── btGImpactMassUtil.h │ │ │ ├── btGImpactQuantizedBvh.cpp │ │ │ ├── btGImpactQuantizedBvh.h │ │ │ ├── btGImpactShape.cpp │ │ │ ├── btGImpactShape.h │ │ │ ├── btGenericPoolAllocator.cpp │ │ │ ├── btGenericPoolAllocator.h │ │ │ ├── btGeometryOperations.h │ │ │ ├── btQuantization.h │ │ │ ├── btTriangleShapeEx.cpp │ │ │ ├── btTriangleShapeEx.h │ │ │ ├── gim_array.h │ │ │ ├── gim_basic_geometry_operations.h │ │ │ ├── gim_bitset.h │ │ │ ├── gim_box_collision.h │ │ │ ├── gim_box_set.cpp │ │ │ ├── gim_box_set.h │ │ │ ├── gim_clip_polygon.h │ │ │ ├── gim_contact.cpp │ │ │ ├── gim_contact.h │ │ │ ├── gim_geom_types.h │ │ │ ├── gim_geometry.h │ │ │ ├── gim_hash_table.h │ │ │ ├── gim_linear_math.h │ │ │ ├── gim_math.h │ │ │ ├── gim_memory.cpp │ │ │ ├── gim_memory.h │ │ │ ├── gim_radixsort.h │ │ │ ├── gim_tri_collision.cpp │ │ │ └── gim_tri_collision.h │ │ ├── NarrowPhaseCollision │ │ │ ├── btContinuousConvexCollision.cpp │ │ │ ├── btContinuousConvexCollision.h │ │ │ ├── btConvexCast.cpp │ │ │ ├── btConvexCast.h │ │ │ ├── btConvexPenetrationDepthSolver.h │ │ │ ├── btDiscreteCollisionDetectorInterface.h │ │ │ ├── btGjkConvexCast.cpp │ │ │ ├── btGjkConvexCast.h │ │ │ ├── btGjkEpa2.cpp │ │ │ ├── btGjkEpa2.h │ │ │ ├── btGjkEpaPenetrationDepthSolver.cpp │ │ │ ├── btGjkEpaPenetrationDepthSolver.h │ │ │ ├── btGjkPairDetector.cpp │ │ │ ├── btGjkPairDetector.h │ │ │ ├── btManifoldPoint.h │ │ │ ├── btMinkowskiPenetrationDepthSolver.cpp │ │ │ ├── btMinkowskiPenetrationDepthSolver.h │ │ │ ├── btPersistentManifold.cpp │ │ │ ├── btPersistentManifold.h │ │ │ ├── btPointCollector.h │ │ │ ├── btPolyhedralContactClipping.cpp │ │ │ ├── btPolyhedralContactClipping.h │ │ │ ├── btRaycastCallback.cpp │ │ │ ├── btRaycastCallback.h │ │ │ ├── btSimplexSolverInterface.h │ │ │ ├── btSubSimplexConvexCast.cpp │ │ │ ├── btSubSimplexConvexCast.h │ │ │ ├── btVoronoiSimplexSolver.cpp │ │ │ └── btVoronoiSimplexSolver.h │ │ └── premake4.lua │ │ ├── BulletDynamics │ │ ├── CMakeLists.txt │ │ ├── Character │ │ │ ├── btCharacterControllerInterface.h │ │ │ ├── btKinematicCharacterController.cpp │ │ │ └── btKinematicCharacterController.h │ │ ├── ConstraintSolver │ │ │ ├── btConeTwistConstraint.cpp │ │ │ ├── btConeTwistConstraint.h │ │ │ ├── btConstraintSolver.h │ │ │ ├── btContactConstraint.cpp │ │ │ ├── btContactConstraint.h │ │ │ ├── btContactSolverInfo.h │ │ │ ├── btGearConstraint.cpp │ │ │ ├── btGearConstraint.h │ │ │ ├── btGeneric6DofConstraint.cpp │ │ │ ├── btGeneric6DofConstraint.h │ │ │ ├── btGeneric6DofSpringConstraint.cpp │ │ │ ├── btGeneric6DofSpringConstraint.h │ │ │ ├── btHinge2Constraint.cpp │ │ │ ├── btHinge2Constraint.h │ │ │ ├── btHingeConstraint.cpp │ │ │ ├── btHingeConstraint.h │ │ │ ├── btJacobianEntry.h │ │ │ ├── btPoint2PointConstraint.cpp │ │ │ ├── btPoint2PointConstraint.h │ │ │ ├── btSequentialImpulseConstraintSolver.cpp │ │ │ ├── btSequentialImpulseConstraintSolver.h │ │ │ ├── btSliderConstraint.cpp │ │ │ ├── btSliderConstraint.h │ │ │ ├── btSolve2LinearConstraint.cpp │ │ │ ├── btSolve2LinearConstraint.h │ │ │ ├── btSolverBody.h │ │ │ ├── btSolverConstraint.h │ │ │ ├── btTypedConstraint.cpp │ │ │ ├── btTypedConstraint.h │ │ │ ├── btUniversalConstraint.cpp │ │ │ └── btUniversalConstraint.h │ │ ├── Dynamics │ │ │ ├── Bullet-C-API.cpp │ │ │ ├── btActionInterface.h │ │ │ ├── btDiscreteDynamicsWorld.cpp │ │ │ ├── btDiscreteDynamicsWorld.h │ │ │ ├── btDynamicsWorld.h │ │ │ ├── btRigidBody.cpp │ │ │ ├── btRigidBody.h │ │ │ ├── btSimpleDynamicsWorld.cpp │ │ │ └── btSimpleDynamicsWorld.h │ │ ├── Vehicle │ │ │ ├── btRaycastVehicle.cpp │ │ │ ├── btRaycastVehicle.h │ │ │ ├── btVehicleRaycaster.h │ │ │ ├── btWheelInfo.cpp │ │ │ └── btWheelInfo.h │ │ └── premake4.lua │ │ ├── BulletSoftBody │ │ ├── CMakeLists.txt │ │ ├── btDefaultSoftBodySolver.cpp │ │ ├── btDefaultSoftBodySolver.h │ │ ├── btSoftBody.cpp │ │ ├── btSoftBody.h │ │ ├── btSoftBodyConcaveCollisionAlgorithm.cpp │ │ ├── btSoftBodyConcaveCollisionAlgorithm.h │ │ ├── btSoftBodyData.h │ │ ├── btSoftBodyHelpers.cpp │ │ ├── btSoftBodyHelpers.h │ │ ├── btSoftBodyInternals.h │ │ ├── btSoftBodyRigidBodyCollisionConfiguration.cpp │ │ ├── btSoftBodyRigidBodyCollisionConfiguration.h │ │ ├── btSoftBodySolverVertexBuffer.h │ │ ├── btSoftBodySolvers.h │ │ ├── btSoftRigidCollisionAlgorithm.cpp │ │ ├── btSoftRigidCollisionAlgorithm.h │ │ ├── btSoftRigidDynamicsWorld.cpp │ │ ├── btSoftRigidDynamicsWorld.h │ │ ├── btSoftSoftCollisionAlgorithm.cpp │ │ ├── btSoftSoftCollisionAlgorithm.h │ │ ├── btSparseSDF.h │ │ └── premake4.lua │ │ ├── CMakeLists.txt │ │ ├── LinearMath │ │ ├── CMakeLists.txt │ │ ├── btAabbUtil2.h │ │ ├── btAlignedAllocator.cpp │ │ ├── btAlignedAllocator.h │ │ ├── btAlignedObjectArray.h │ │ ├── btConvexHull.cpp │ │ ├── btConvexHull.h │ │ ├── btConvexHullComputer.cpp │ │ ├── btConvexHullComputer.h │ │ ├── btDefaultMotionState.h │ │ ├── btGeometryUtil.cpp │ │ ├── btGeometryUtil.h │ │ ├── btGrahamScan2dConvexHull.h │ │ ├── btHashMap.h │ │ ├── btIDebugDraw.h │ │ ├── btList.h │ │ ├── btMatrix3x3.h │ │ ├── btMinMax.h │ │ ├── btMotionState.h │ │ ├── btPolarDecomposition.cpp │ │ ├── btPolarDecomposition.h │ │ ├── btPoolAllocator.h │ │ ├── btQuadWord.h │ │ ├── btQuaternion.h │ │ ├── btQuickprof.cpp │ │ ├── btQuickprof.h │ │ ├── btRandom.h │ │ ├── btScalar.h │ │ ├── btSerializer.cpp │ │ ├── btSerializer.h │ │ ├── btStackAlloc.h │ │ ├── btTransform.h │ │ ├── btTransformUtil.h │ │ ├── btVector3.cpp │ │ ├── btVector3.h │ │ └── premake4.lua │ │ ├── Makefile.am │ │ ├── btBulletCollisionCommon.h │ │ ├── btBulletDynamicsCommon.h │ │ └── vectormath │ │ ├── neon │ │ ├── boolInVec.h │ │ ├── floatInVec.h │ │ ├── mat_aos.h │ │ ├── quat_aos.h │ │ ├── vec_aos.h │ │ └── vectormath_aos.h │ │ ├── scalar │ │ ├── boolInVec.h │ │ ├── floatInVec.h │ │ ├── mat_aos.h │ │ ├── quat_aos.h │ │ ├── vec_aos.h │ │ └── vectormath_aos.h │ │ ├── sse │ │ ├── boolInVec.h │ │ ├── floatInVec.h │ │ ├── mat_aos.h │ │ ├── quat_aos.h │ │ ├── vec_aos.h │ │ ├── vecidx_aos.h │ │ └── vectormath_aos.h │ │ └── vmInclude.h └── src │ ├── main.cpp │ ├── testApp.cpp │ └── testApp.h ├── CustomShapesExample ├── addons.make ├── bin │ └── data │ │ └── OFlogo.dae ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── EventsExample ├── addons.make ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── JointsExample ├── addons.make ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── MeshExample ├── addons.make ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── README.md ├── SimpleExample ├── addons.make ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── SoftBodyExample ├── addons.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── SoftBodyMeshExample ├── addons.make ├── bin │ └── data │ │ └── lofi-bunny.ply ├── config.make └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── iosEmptyExample ├── Project.xcconfig ├── bin │ └── data │ │ ├── .gitkeep │ │ ├── Default-568h@2x~iphone.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── Default@2x~ipad.png │ │ ├── Default@2x~iphone.png │ │ ├── Default~ipad.png │ │ ├── Default~iphone.png │ │ ├── Icon-72.png │ │ ├── Icon-72@2x.png │ │ ├── Icon.png │ │ └── Icon@2x.png ├── iosofxBulletEmptyExample.xcodeproj │ └── project.pbxproj ├── ofxiOS-Info.plist ├── ofxiOS_Prefix.pch └── src │ ├── main.mm │ ├── ofApp.h │ └── ofApp.mm ├── iosSimpleExample ├── Project.xcconfig ├── iosofxBulletEmptyExample.xcodeproj │ └── project.pbxproj ├── ofxiOS-Info.plist ├── ofxiOS_Prefix.pch └── src │ ├── main.mm │ ├── ofApp.h │ └── ofApp.mm ├── libs └── bullet2.8.2 │ ├── include │ ├── Bullet-C-Api.h │ ├── BulletCollision │ │ ├── BroadphaseCollision │ │ │ ├── btAxisSweep3.cpp │ │ │ ├── btAxisSweep3.h │ │ │ ├── btBroadphaseInterface.h │ │ │ ├── btBroadphaseProxy.cpp │ │ │ ├── btBroadphaseProxy.h │ │ │ ├── btCollisionAlgorithm.cpp │ │ │ ├── btCollisionAlgorithm.h │ │ │ ├── btDbvt.cpp │ │ │ ├── btDbvt.h │ │ │ ├── btDbvtBroadphase.cpp │ │ │ ├── btDbvtBroadphase.h │ │ │ ├── btDispatcher.cpp │ │ │ ├── btDispatcher.h │ │ │ ├── btMultiSapBroadphase.cpp │ │ │ ├── btMultiSapBroadphase.h │ │ │ ├── btOverlappingPairCache.cpp │ │ │ ├── btOverlappingPairCache.h │ │ │ ├── btOverlappingPairCallback.h │ │ │ ├── btQuantizedBvh.cpp │ │ │ ├── btQuantizedBvh.h │ │ │ ├── btSimpleBroadphase.cpp │ │ │ └── btSimpleBroadphase.h │ │ ├── CMakeLists.txt │ │ ├── CollisionDispatch │ │ │ ├── SphereTriangleDetector.cpp │ │ │ ├── SphereTriangleDetector.h │ │ │ ├── btActivatingCollisionAlgorithm.cpp │ │ │ ├── btActivatingCollisionAlgorithm.h │ │ │ ├── btBox2dBox2dCollisionAlgorithm.cpp │ │ │ ├── btBox2dBox2dCollisionAlgorithm.h │ │ │ ├── btBoxBoxCollisionAlgorithm.cpp │ │ │ ├── btBoxBoxCollisionAlgorithm.h │ │ │ ├── btBoxBoxDetector.cpp │ │ │ ├── btBoxBoxDetector.h │ │ │ ├── btCollisionConfiguration.h │ │ │ ├── btCollisionCreateFunc.h │ │ │ ├── btCollisionDispatcher.cpp │ │ │ ├── btCollisionDispatcher.h │ │ │ ├── btCollisionObject.cpp │ │ │ ├── btCollisionObject.h │ │ │ ├── btCollisionObjectWrapper.h │ │ │ ├── btCollisionWorld.cpp │ │ │ ├── btCollisionWorld.h │ │ │ ├── btCompoundCollisionAlgorithm.cpp │ │ │ ├── btCompoundCollisionAlgorithm.h │ │ │ ├── btCompoundCompoundCollisionAlgorithm.cpp │ │ │ ├── btCompoundCompoundCollisionAlgorithm.h │ │ │ ├── btConvex2dConvex2dAlgorithm.cpp │ │ │ ├── btConvex2dConvex2dAlgorithm.h │ │ │ ├── btConvexConcaveCollisionAlgorithm.cpp │ │ │ ├── btConvexConcaveCollisionAlgorithm.h │ │ │ ├── btConvexConvexAlgorithm.cpp │ │ │ ├── btConvexConvexAlgorithm.h │ │ │ ├── btConvexPlaneCollisionAlgorithm.cpp │ │ │ ├── btConvexPlaneCollisionAlgorithm.h │ │ │ ├── btDefaultCollisionConfiguration.cpp │ │ │ ├── btDefaultCollisionConfiguration.h │ │ │ ├── btEmptyCollisionAlgorithm.cpp │ │ │ ├── btEmptyCollisionAlgorithm.h │ │ │ ├── btGhostObject.cpp │ │ │ ├── btGhostObject.h │ │ │ ├── btHashedSimplePairCache.cpp │ │ │ ├── btHashedSimplePairCache.h │ │ │ ├── btInternalEdgeUtility.cpp │ │ │ ├── btInternalEdgeUtility.h │ │ │ ├── btManifoldResult.cpp │ │ │ ├── btManifoldResult.h │ │ │ ├── btSimulationIslandManager.cpp │ │ │ ├── btSimulationIslandManager.h │ │ │ ├── btSphereBoxCollisionAlgorithm.cpp │ │ │ ├── btSphereBoxCollisionAlgorithm.h │ │ │ ├── btSphereSphereCollisionAlgorithm.cpp │ │ │ ├── btSphereSphereCollisionAlgorithm.h │ │ │ ├── btSphereTriangleCollisionAlgorithm.cpp │ │ │ ├── btSphereTriangleCollisionAlgorithm.h │ │ │ ├── btUnionFind.cpp │ │ │ └── btUnionFind.h │ │ ├── CollisionShapes │ │ │ ├── btBox2dShape.cpp │ │ │ ├── btBox2dShape.h │ │ │ ├── btBoxShape.cpp │ │ │ ├── btBoxShape.h │ │ │ ├── btBvhTriangleMeshShape.cpp │ │ │ ├── btBvhTriangleMeshShape.h │ │ │ ├── btCapsuleShape.cpp │ │ │ ├── btCapsuleShape.h │ │ │ ├── btCollisionMargin.h │ │ │ ├── btCollisionShape.cpp │ │ │ ├── btCollisionShape.h │ │ │ ├── btCompoundShape.cpp │ │ │ ├── btCompoundShape.h │ │ │ ├── btConcaveShape.cpp │ │ │ ├── btConcaveShape.h │ │ │ ├── btConeShape.cpp │ │ │ ├── btConeShape.h │ │ │ ├── btConvex2dShape.cpp │ │ │ ├── btConvex2dShape.h │ │ │ ├── btConvexHullShape.cpp │ │ │ ├── btConvexHullShape.h │ │ │ ├── btConvexInternalShape.cpp │ │ │ ├── btConvexInternalShape.h │ │ │ ├── btConvexPointCloudShape.cpp │ │ │ ├── btConvexPointCloudShape.h │ │ │ ├── btConvexPolyhedron.cpp │ │ │ ├── btConvexPolyhedron.h │ │ │ ├── btConvexShape.cpp │ │ │ ├── btConvexShape.h │ │ │ ├── btConvexTriangleMeshShape.cpp │ │ │ ├── btConvexTriangleMeshShape.h │ │ │ ├── btCylinderShape.cpp │ │ │ ├── btCylinderShape.h │ │ │ ├── btEmptyShape.cpp │ │ │ ├── btEmptyShape.h │ │ │ ├── btHeightfieldTerrainShape.cpp │ │ │ ├── btHeightfieldTerrainShape.h │ │ │ ├── btMaterial.h │ │ │ ├── btMinkowskiSumShape.cpp │ │ │ ├── btMinkowskiSumShape.h │ │ │ ├── btMultiSphereShape.cpp │ │ │ ├── btMultiSphereShape.h │ │ │ ├── btMultimaterialTriangleMeshShape.cpp │ │ │ ├── btMultimaterialTriangleMeshShape.h │ │ │ ├── btOptimizedBvh.cpp │ │ │ ├── btOptimizedBvh.h │ │ │ ├── btPolyhedralConvexShape.cpp │ │ │ ├── btPolyhedralConvexShape.h │ │ │ ├── btScaledBvhTriangleMeshShape.cpp │ │ │ ├── btScaledBvhTriangleMeshShape.h │ │ │ ├── btShapeHull.cpp │ │ │ ├── btShapeHull.h │ │ │ ├── btSphereShape.cpp │ │ │ ├── btSphereShape.h │ │ │ ├── btStaticPlaneShape.cpp │ │ │ ├── btStaticPlaneShape.h │ │ │ ├── btStridingMeshInterface.cpp │ │ │ ├── btStridingMeshInterface.h │ │ │ ├── btTetrahedronShape.cpp │ │ │ ├── btTetrahedronShape.h │ │ │ ├── btTriangleBuffer.cpp │ │ │ ├── btTriangleBuffer.h │ │ │ ├── btTriangleCallback.cpp │ │ │ ├── btTriangleCallback.h │ │ │ ├── btTriangleIndexVertexArray.cpp │ │ │ ├── btTriangleIndexVertexArray.h │ │ │ ├── btTriangleIndexVertexMaterialArray.cpp │ │ │ ├── btTriangleIndexVertexMaterialArray.h │ │ │ ├── btTriangleInfoMap.h │ │ │ ├── btTriangleMesh.cpp │ │ │ ├── btTriangleMesh.h │ │ │ ├── btTriangleMeshShape.cpp │ │ │ ├── btTriangleMeshShape.h │ │ │ ├── btTriangleShape.h │ │ │ ├── btUniformScalingShape.cpp │ │ │ └── btUniformScalingShape.h │ │ ├── Doxyfile │ │ ├── Gimpact │ │ │ ├── btBoxCollision.h │ │ │ ├── btClipPolygon.h │ │ │ ├── btCompoundFromGimpact.h │ │ │ ├── btContactProcessing.cpp │ │ │ ├── btContactProcessing.h │ │ │ ├── btGImpactBvh.cpp │ │ │ ├── btGImpactBvh.h │ │ │ ├── btGImpactCollisionAlgorithm.cpp │ │ │ ├── btGImpactCollisionAlgorithm.h │ │ │ ├── btGImpactMassUtil.h │ │ │ ├── btGImpactQuantizedBvh.cpp │ │ │ ├── btGImpactQuantizedBvh.h │ │ │ ├── btGImpactShape.cpp │ │ │ ├── btGImpactShape.h │ │ │ ├── btGenericPoolAllocator.cpp │ │ │ ├── btGenericPoolAllocator.h │ │ │ ├── btGeometryOperations.h │ │ │ ├── btQuantization.h │ │ │ ├── btTriangleShapeEx.cpp │ │ │ ├── btTriangleShapeEx.h │ │ │ ├── gim_array.h │ │ │ ├── gim_basic_geometry_operations.h │ │ │ ├── gim_bitset.h │ │ │ ├── gim_box_collision.h │ │ │ ├── gim_box_set.cpp │ │ │ ├── gim_box_set.h │ │ │ ├── gim_clip_polygon.h │ │ │ ├── gim_contact.cpp │ │ │ ├── gim_contact.h │ │ │ ├── gim_geom_types.h │ │ │ ├── gim_geometry.h │ │ │ ├── gim_hash_table.h │ │ │ ├── gim_linear_math.h │ │ │ ├── gim_math.h │ │ │ ├── gim_memory.cpp │ │ │ ├── gim_memory.h │ │ │ ├── gim_radixsort.h │ │ │ ├── gim_tri_collision.cpp │ │ │ └── gim_tri_collision.h │ │ ├── NarrowPhaseCollision │ │ │ ├── btContinuousConvexCollision.cpp │ │ │ ├── btContinuousConvexCollision.h │ │ │ ├── btConvexCast.cpp │ │ │ ├── btConvexCast.h │ │ │ ├── btConvexPenetrationDepthSolver.h │ │ │ ├── btDiscreteCollisionDetectorInterface.h │ │ │ ├── btGjkConvexCast.cpp │ │ │ ├── btGjkConvexCast.h │ │ │ ├── btGjkEpa2.cpp │ │ │ ├── btGjkEpa2.h │ │ │ ├── btGjkEpaPenetrationDepthSolver.cpp │ │ │ ├── btGjkEpaPenetrationDepthSolver.h │ │ │ ├── btGjkPairDetector.cpp │ │ │ ├── btGjkPairDetector.h │ │ │ ├── btManifoldPoint.h │ │ │ ├── btMinkowskiPenetrationDepthSolver.cpp │ │ │ ├── btMinkowskiPenetrationDepthSolver.h │ │ │ ├── btPersistentManifold.cpp │ │ │ ├── btPersistentManifold.h │ │ │ ├── btPointCollector.h │ │ │ ├── btPolyhedralContactClipping.cpp │ │ │ ├── btPolyhedralContactClipping.h │ │ │ ├── btRaycastCallback.cpp │ │ │ ├── btRaycastCallback.h │ │ │ ├── btSimplexSolverInterface.h │ │ │ ├── btSubSimplexConvexCast.cpp │ │ │ ├── btSubSimplexConvexCast.h │ │ │ ├── btVoronoiSimplexSolver.cpp │ │ │ └── btVoronoiSimplexSolver.h │ │ └── premake4.lua │ ├── BulletDynamics │ │ ├── CMakeLists.txt │ │ ├── Character │ │ │ ├── btCharacterControllerInterface.h │ │ │ ├── btKinematicCharacterController.cpp │ │ │ └── btKinematicCharacterController.h │ │ ├── ConstraintSolver │ │ │ ├── btConeTwistConstraint.cpp │ │ │ ├── btConeTwistConstraint.h │ │ │ ├── btConstraintSolver.h │ │ │ ├── btContactConstraint.cpp │ │ │ ├── btContactConstraint.h │ │ │ ├── btContactSolverInfo.h │ │ │ ├── btFixedConstraint.cpp │ │ │ ├── btFixedConstraint.h │ │ │ ├── btGearConstraint.cpp │ │ │ ├── btGearConstraint.h │ │ │ ├── btGeneric6DofConstraint.cpp │ │ │ ├── btGeneric6DofConstraint.h │ │ │ ├── btGeneric6DofSpringConstraint.cpp │ │ │ ├── btGeneric6DofSpringConstraint.h │ │ │ ├── btHinge2Constraint.cpp │ │ │ ├── btHinge2Constraint.h │ │ │ ├── btHingeConstraint.cpp │ │ │ ├── btHingeConstraint.h │ │ │ ├── btJacobianEntry.h │ │ │ ├── btPoint2PointConstraint.cpp │ │ │ ├── btPoint2PointConstraint.h │ │ │ ├── btSequentialImpulseConstraintSolver.cpp │ │ │ ├── btSequentialImpulseConstraintSolver.h │ │ │ ├── btSliderConstraint.cpp │ │ │ ├── btSliderConstraint.h │ │ │ ├── btSolve2LinearConstraint.cpp │ │ │ ├── btSolve2LinearConstraint.h │ │ │ ├── btSolverBody.h │ │ │ ├── btSolverConstraint.h │ │ │ ├── btTypedConstraint.cpp │ │ │ ├── btTypedConstraint.h │ │ │ ├── btUniversalConstraint.cpp │ │ │ └── btUniversalConstraint.h │ │ ├── Dynamics │ │ │ ├── Bullet-C-API.cpp │ │ │ ├── btActionInterface.h │ │ │ ├── btDiscreteDynamicsWorld.cpp │ │ │ ├── btDiscreteDynamicsWorld.h │ │ │ ├── btDynamicsWorld.h │ │ │ ├── btRigidBody.cpp │ │ │ ├── btRigidBody.h │ │ │ ├── btSimpleDynamicsWorld.cpp │ │ │ └── btSimpleDynamicsWorld.h │ │ ├── Featherstone │ │ │ ├── btMultiBody.cpp │ │ │ ├── btMultiBody.h │ │ │ ├── btMultiBodyConstraint.cpp │ │ │ ├── btMultiBodyConstraint.h │ │ │ ├── btMultiBodyConstraintSolver.cpp │ │ │ ├── btMultiBodyConstraintSolver.h │ │ │ ├── btMultiBodyDynamicsWorld.cpp │ │ │ ├── btMultiBodyDynamicsWorld.h │ │ │ ├── btMultiBodyJointLimitConstraint.cpp │ │ │ ├── btMultiBodyJointLimitConstraint.h │ │ │ ├── btMultiBodyJointMotor.cpp │ │ │ ├── btMultiBodyJointMotor.h │ │ │ ├── btMultiBodyLink.h │ │ │ ├── btMultiBodyLinkCollider.h │ │ │ ├── btMultiBodyPoint2Point.cpp │ │ │ ├── btMultiBodyPoint2Point.h │ │ │ └── btMultiBodySolverConstraint.h │ │ ├── MLCPSolvers │ │ │ ├── btDantzigLCP.cpp │ │ │ ├── btDantzigLCP.h │ │ │ ├── btDantzigSolver.h │ │ │ ├── btMLCPSolver.cpp │ │ │ ├── btMLCPSolver.h │ │ │ ├── btMLCPSolverInterface.h │ │ │ ├── btPATHSolver.h │ │ │ └── btSolveProjectedGaussSeidel.h │ │ ├── Vehicle │ │ │ ├── btRaycastVehicle.cpp │ │ │ ├── btRaycastVehicle.h │ │ │ ├── btVehicleRaycaster.h │ │ │ ├── btWheelInfo.cpp │ │ │ └── btWheelInfo.h │ │ └── premake4.lua │ ├── BulletSoftBody │ │ ├── CMakeLists.txt │ │ ├── btDefaultSoftBodySolver.cpp │ │ ├── btDefaultSoftBodySolver.h │ │ ├── btSoftBody.cpp │ │ ├── btSoftBody.h │ │ ├── btSoftBodyConcaveCollisionAlgorithm.cpp │ │ ├── btSoftBodyConcaveCollisionAlgorithm.h │ │ ├── btSoftBodyData.h │ │ ├── btSoftBodyHelpers.cpp │ │ ├── btSoftBodyHelpers.h │ │ ├── btSoftBodyInternals.h │ │ ├── btSoftBodyRigidBodyCollisionConfiguration.cpp │ │ ├── btSoftBodyRigidBodyCollisionConfiguration.h │ │ ├── btSoftBodySolverVertexBuffer.h │ │ ├── btSoftBodySolvers.h │ │ ├── btSoftRigidCollisionAlgorithm.cpp │ │ ├── btSoftRigidCollisionAlgorithm.h │ │ ├── btSoftRigidDynamicsWorld.cpp │ │ ├── btSoftRigidDynamicsWorld.h │ │ ├── btSoftSoftCollisionAlgorithm.cpp │ │ ├── btSoftSoftCollisionAlgorithm.h │ │ ├── btSparseSDF.h │ │ └── premake4.lua │ ├── CMakeLists.txt │ ├── LinearMath │ │ ├── CMakeLists.txt │ │ ├── btAabbUtil2.h │ │ ├── btAlignedAllocator.cpp │ │ ├── btAlignedAllocator.h │ │ ├── btAlignedObjectArray.h │ │ ├── btConvexHull.cpp │ │ ├── btConvexHull.h │ │ ├── btConvexHullComputer.cpp │ │ ├── btConvexHullComputer.h │ │ ├── btDefaultMotionState.h │ │ ├── btGeometryUtil.cpp │ │ ├── btGeometryUtil.h │ │ ├── btGrahamScan2dConvexHull.h │ │ ├── btHashMap.h │ │ ├── btIDebugDraw.h │ │ ├── btList.h │ │ ├── btMatrix3x3.h │ │ ├── btMatrixX.h │ │ ├── btMinMax.h │ │ ├── btMotionState.h │ │ ├── btPolarDecomposition.cpp │ │ ├── btPolarDecomposition.h │ │ ├── btPoolAllocator.h │ │ ├── btQuadWord.h │ │ ├── btQuaternion.h │ │ ├── btQuickprof.cpp │ │ ├── btQuickprof.h │ │ ├── btRandom.h │ │ ├── btScalar.h │ │ ├── btSerializer.cpp │ │ ├── btSerializer.h │ │ ├── btStackAlloc.h │ │ ├── btTransform.h │ │ ├── btTransformUtil.h │ │ ├── btVector3.cpp │ │ ├── btVector3.h │ │ └── premake4.lua │ ├── Makefile.am │ ├── btBulletCollisionCommon.h │ ├── btBulletDynamicsCommon.h │ └── vectormath │ │ ├── neon │ │ ├── boolInVec.h │ │ ├── floatInVec.h │ │ ├── mat_aos.h │ │ ├── quat_aos.h │ │ ├── vec_aos.h │ │ └── vectormath_aos.h │ │ ├── scalar │ │ ├── boolInVec.h │ │ ├── floatInVec.h │ │ ├── mat_aos.h │ │ ├── quat_aos.h │ │ ├── vec_aos.h │ │ └── vectormath_aos.h │ │ ├── sse │ │ ├── boolInVec.h │ │ ├── floatInVec.h │ │ ├── mat_aos.h │ │ ├── quat_aos.h │ │ ├── vec_aos.h │ │ ├── vecidx_aos.h │ │ └── vectormath_aos.h │ │ └── vmInclude.h │ └── lib │ ├── ios │ ├── arm7 │ │ ├── libBulletCollision.a │ │ ├── libBulletDynamics.a │ │ ├── libBulletSoftBody.a │ │ └── libLinearMath.a │ └── i386 │ │ ├── libBulletCollision.a │ │ ├── libBulletDynamics.a │ │ ├── libBulletSoftBody.a │ │ └── libLinearMath.a │ ├── osx │ ├── fat │ │ ├── libBulletCollision.a │ │ ├── libBulletDynamics.a │ │ ├── libBulletSoftBody.a │ │ └── libLinearMath.a │ ├── i386 │ │ ├── libBulletCollision.a │ │ ├── libBulletDynamics.a │ │ ├── libBulletSoftBody.a │ │ └── libLinearMath.a │ └── x86_64 │ │ ├── libBulletCollision.a │ │ ├── libBulletDynamics.a │ │ ├── libBulletSoftBody.a │ │ └── libLinearMath.a │ └── win │ ├── vs │ ├── BulletCollision.lib │ ├── BulletCollisiond.lib │ ├── BulletCollisiond.pdb │ ├── BulletDynamics.lib │ ├── BulletDynamicsd.lib │ ├── BulletDynamicsd.pdb │ ├── BulletSoftBody.lib │ ├── BulletSoftBodyd.lib │ ├── BulletSoftBodyd.pdb │ ├── LinearMath.lib │ ├── LinearMathd.lib │ └── LinearMathd.pdb │ └── vs64 │ ├── BulletCollision.lib │ ├── BulletCollisiond.lib │ ├── BulletCollisiond.pdb │ ├── BulletDynamics.lib │ ├── BulletDynamicsd.lib │ ├── BulletDynamicsd.pdb │ ├── BulletSoftBody.lib │ ├── BulletSoftBodyd.lib │ ├── BulletSoftBodyd.pdb │ ├── LinearMath.lib │ ├── LinearMathd.lib │ └── LinearMathd.pdb ├── ofxBulletLib ├── ofxBulletDebug.props ├── ofxBulletLib.vcxproj ├── ofxBulletLib.vcxproj.filters └── ofxBulletRelease.props ├── ofxaddons_thumbnail.png └── src ├── events ├── ofxBulletCollisionData.h ├── ofxBulletMousePickEvent.h └── ofxBulletRaycastData.h ├── joints ├── ofxBulletJoint.cpp └── ofxBulletJoint.h ├── ofxBullet.h ├── ofxBulletConstants.h ├── ofxBulletUserData.h ├── ofxBulletUtils.h ├── ofxBulletWorldRigid.cpp ├── ofxBulletWorldRigid.h ├── ofxBulletWorldSoft.cpp ├── ofxBulletWorldSoft.h ├── render ├── GLDebugDrawer.cpp └── GLDebugDrawer.h └── shapes ├── ofxBulletBaseShape.cpp ├── ofxBulletBaseShape.h ├── ofxBulletBox.cpp ├── ofxBulletBox.h ├── ofxBulletCapsule.cpp ├── ofxBulletCapsule.h ├── ofxBulletCone.cpp ├── ofxBulletCone.h ├── ofxBulletConvexShape.cpp ├── ofxBulletConvexShape.h ├── ofxBulletCustomShape.cpp ├── ofxBulletCustomShape.h ├── ofxBulletCylinder.cpp ├── ofxBulletCylinder.h ├── ofxBulletEllipsoid.cpp ├── ofxBulletEllipsoid.h ├── ofxBulletPatch.cpp ├── ofxBulletPatch.h ├── ofxBulletRigidBody.cpp ├── ofxBulletRigidBody.h ├── ofxBulletRope.cpp ├── ofxBulletRope.h ├── ofxBulletSoftBody.cpp ├── ofxBulletSoftBody.h ├── ofxBulletSoftTriMesh.cpp ├── ofxBulletSoftTriMesh.h ├── ofxBulletSphere.cpp ├── ofxBulletSphere.h ├── ofxBulletStaticPlane.cpp ├── ofxBulletStaticPlane.h ├── ofxBulletTriMeshShape.cpp └── ofxBulletTriMeshShape.h /.gitignore: -------------------------------------------------------------------------------- 1 | libs/ 2 | docs/ 3 | 4 | *.depend 5 | *.layout 6 | *.mode*v3 7 | *.pbxuser 8 | *.app* 9 | *.DS_* 10 | ._*.* 11 | 12 | .svn/ 13 | obj/ 14 | bin/ 15 | build/ 16 | !data/ 17 | xcuserdata/ 18 | project.xcworkspace/ 19 | 20 | ipch/ 21 | *.suo 22 | *.opensdf 23 | *.vcxproj.user 24 | 25 | *.obj 26 | *.tlog 27 | *.sdf 28 | *.pdb 29 | *.idb 30 | *.pch 31 | Debug/ 32 | Release/ 33 | 34 | 35 | *~.xml -------------------------------------------------------------------------------- /ClothExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /ClothExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /ClothExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024, 768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ClothExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxBulletWorldSoft world; 24 | 25 | ofEasyCam camera; 26 | ofxBulletBox ground; 27 | 28 | vector< shared_ptr > rigidBodies; 29 | vector< shared_ptr > patches; 30 | 31 | ofLight light; 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /CodeBlocksExample/CodeBlocksExample.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /CodeBlocksExample/README.md: -------------------------------------------------------------------------------- 1 | ofxBulletCodeBlocksExample 2 | =================== 3 | 4 | Workaround to get ofxBullet running with Code::Blocks. Only tried this in windows. It should also compile under GNU/Linux, but no promises for that. 5 | 6 | Missing support for MiniCL and multi threaded simulations, since they won't compile with MinGW/gcc. 7 | -------------------------------------------------------------------------------- /CodeBlocksExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /CodeBlocksExample/icon.rc: -------------------------------------------------------------------------------- 1 | //TODO: figure out how to do debug and release icons 2 | MAINICON ICON "../../../libs/openFrameworksCompiled/project/win_cb/icon.ico" 3 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp: -------------------------------------------------------------------------------- 1 | 2 | //Bullet Continuous Collision Detection and Physics Library 3 | //Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | 6 | // 7 | // btAxisSweep3 8 | // 9 | // Copyright (c) 2006 Simon Hobbs 10 | // 11 | // This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 12 | // 13 | // Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 16 | // 17 | // 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 18 | // 19 | // 3. This notice may not be removed or altered from any source distribution. 20 | #include "btAxisSweep3.h" 21 | 22 | 23 | btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) 24 | :btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache,disableRaycastAccelerator) 25 | { 26 | // 1 handle is reserved as sentinel 27 | btAssert(maxHandles > 1 && maxHandles < 32767); 28 | 29 | } 30 | 31 | 32 | bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache , bool disableRaycastAccelerator) 33 | :btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache,disableRaycastAccelerator) 34 | { 35 | // 1 handle is reserved as sentinel 36 | btAssert(maxHandles > 1 && maxHandles < 2147483647); 37 | } 38 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btBroadphaseProxy.h" 17 | 18 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btCollisionAlgorithm.h" 17 | #include "btDispatcher.h" 18 | 19 | btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) 20 | { 21 | m_dispatcher = ci.m_dispatcher1; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/BroadphaseCollision/btDispatcher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btDispatcher.h" 17 | 18 | btDispatcher::~btDispatcher() 19 | { 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 5 | 6 | This software is provided 'as-is', without any express or implied warranty. 7 | In no event will the authors be held liable for any damages arising from the use of this software. 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it freely, 10 | subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 14 | 3. This notice may not be removed or altered from any source distribution. 15 | */ 16 | 17 | #ifndef OVERLAPPING_PAIR_CALLBACK_H 18 | #define OVERLAPPING_PAIR_CALLBACK_H 19 | 20 | class btDispatcher; 21 | struct btBroadphasePair; 22 | 23 | ///The btOverlappingPairCallback class is an additional optional broadphase user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache. 24 | class btOverlappingPairCallback 25 | { 26 | public: 27 | virtual ~btOverlappingPairCallback() 28 | { 29 | 30 | } 31 | 32 | virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0; 33 | 34 | virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher) = 0; 35 | 36 | virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0,btDispatcher* dispatcher) = 0; 37 | 38 | }; 39 | 40 | #endif //OVERLAPPING_PAIR_CALLBACK_H 41 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btActivatingCollisionAlgorithm.h" 17 | #include "btCollisionDispatcher.h" 18 | #include "btCollisionObject.h" 19 | 20 | btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci) 21 | :btCollisionAlgorithm(ci) 22 | //, 23 | //m_colObj0(0), 24 | //m_colObj1(0) 25 | { 26 | } 27 | btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* ,const btCollisionObjectWrapper* ) 28 | :btCollisionAlgorithm(ci) 29 | //, 30 | //m_colObj0(0), 31 | //m_colObj1(0) 32 | { 33 | // if (ci.m_dispatcher1->needsCollision(colObj0,colObj1)) 34 | // { 35 | // m_colObj0 = colObj0; 36 | // m_colObj1 = colObj1; 37 | // 38 | // m_colObj0->activate(); 39 | // m_colObj1->activate(); 40 | // } 41 | } 42 | 43 | btActivatingCollisionAlgorithm::~btActivatingCollisionAlgorithm() 44 | { 45 | // m_colObj0->activate(); 46 | // m_colObj1->activate(); 47 | } 48 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef __BT_ACTIVATING_COLLISION_ALGORITHM_H 17 | #define __BT_ACTIVATING_COLLISION_ALGORITHM_H 18 | 19 | #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" 20 | 21 | ///This class is not enabled yet (work-in-progress) to more aggressively activate objects. 22 | class btActivatingCollisionAlgorithm : public btCollisionAlgorithm 23 | { 24 | // btCollisionObject* m_colObj0; 25 | // btCollisionObject* m_colObj1; 26 | 27 | public: 28 | 29 | btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci); 30 | 31 | btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap); 32 | 33 | virtual ~btActivatingCollisionAlgorithm(); 34 | 35 | }; 36 | #endif //__BT_ACTIVATING_COLLISION_ALGORITHM_H 37 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btCollisionConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_CONFIGURATION 17 | #define BT_COLLISION_CONFIGURATION 18 | 19 | struct btCollisionAlgorithmCreateFunc; 20 | 21 | class btStackAlloc; 22 | class btPoolAllocator; 23 | 24 | ///btCollisionConfiguration allows to configure Bullet collision detection 25 | ///stack allocator size, default collision algorithms and persistent manifold pool size 26 | ///@todo: describe the meaning 27 | class btCollisionConfiguration 28 | { 29 | 30 | public: 31 | 32 | virtual ~btCollisionConfiguration() 33 | { 34 | } 35 | 36 | ///memory pools 37 | virtual btPoolAllocator* getPersistentManifoldPool() = 0; 38 | 39 | virtual btPoolAllocator* getCollisionAlgorithmPool() = 0; 40 | 41 | virtual btStackAlloc* getStackAllocator() = 0; 42 | 43 | virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0; 44 | 45 | }; 46 | 47 | #endif //BT_COLLISION_CONFIGURATION 48 | 49 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_CREATE_FUNC 17 | #define BT_COLLISION_CREATE_FUNC 18 | 19 | #include "LinearMath/btAlignedObjectArray.h" 20 | class btCollisionAlgorithm; 21 | class btCollisionObject; 22 | struct btCollisionObjectWrapper; 23 | struct btCollisionAlgorithmConstructionInfo; 24 | 25 | ///Used by the btCollisionDispatcher to register and create instances for btCollisionAlgorithm 26 | struct btCollisionAlgorithmCreateFunc 27 | { 28 | bool m_swapped; 29 | 30 | btCollisionAlgorithmCreateFunc() 31 | :m_swapped(false) 32 | { 33 | } 34 | virtual ~btCollisionAlgorithmCreateFunc(){}; 35 | 36 | virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& , const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap) 37 | { 38 | 39 | (void)body0Wrap; 40 | (void)body1Wrap; 41 | return 0; 42 | } 43 | }; 44 | #endif //BT_COLLISION_CREATE_FUNC 45 | 46 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_COLLISION_OBJECT_WRAPPER_H 2 | #define BT_COLLISION_OBJECT_WRAPPER_H 3 | 4 | ///btCollisionObjectWrapperis an internal data structure. 5 | ///Most users can ignore this and use btCollisionObject and btCollisionShape instead 6 | class btCollisionShape; 7 | class btCollisionObject; 8 | class btTransform; 9 | #include "LinearMath/btScalar.h" // for SIMD_FORCE_INLINE definition 10 | 11 | #define BT_DECLARE_STACK_ONLY_OBJECT \ 12 | private: \ 13 | void* operator new(size_t size); \ 14 | void operator delete(void*); 15 | 16 | struct btCollisionObjectWrapper; 17 | struct btCollisionObjectWrapper 18 | { 19 | BT_DECLARE_STACK_ONLY_OBJECT 20 | 21 | private: 22 | btCollisionObjectWrapper(const btCollisionObjectWrapper&); // not implemented. Not allowed. 23 | btCollisionObjectWrapper* operator=(const btCollisionObjectWrapper&); 24 | 25 | public: 26 | const btCollisionObjectWrapper* m_parent; 27 | const btCollisionShape* m_shape; 28 | const btCollisionObject* m_collisionObject; 29 | const btTransform& m_worldTransform; 30 | 31 | btCollisionObjectWrapper(const btCollisionObjectWrapper* parent, const btCollisionShape* shape, const btCollisionObject* collisionObject, const btTransform& worldTransform) 32 | : m_parent(parent), m_shape(shape), m_collisionObject(collisionObject), m_worldTransform(worldTransform) 33 | {} 34 | 35 | SIMD_FORCE_INLINE const btTransform& getWorldTransform() const { return m_worldTransform; } 36 | SIMD_FORCE_INLINE const btCollisionObject* getCollisionObject() const { return m_collisionObject; } 37 | SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { return m_shape; } 38 | }; 39 | 40 | #endif //BT_COLLISION_OBJECT_WRAPPER_H 41 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btEmptyCollisionAlgorithm.h" 17 | 18 | 19 | 20 | btEmptyAlgorithm::btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) 21 | : btCollisionAlgorithm(ci) 22 | { 23 | } 24 | 25 | void btEmptyAlgorithm::processCollision (const btCollisionObjectWrapper* ,const btCollisionObjectWrapper* ,const btDispatcherInfo& ,btManifoldResult* ) 26 | { 27 | } 28 | 29 | btScalar btEmptyAlgorithm::calculateTimeOfImpact(btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* ) 30 | { 31 | return btScalar(1.); 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef BT_INTERNAL_EDGE_UTILITY_H 3 | #define BT_INTERNAL_EDGE_UTILITY_H 4 | 5 | #include "LinearMath/btHashMap.h" 6 | #include "LinearMath/btVector3.h" 7 | 8 | #include "BulletCollision/CollisionShapes/btTriangleInfoMap.h" 9 | 10 | ///The btInternalEdgeUtility helps to avoid or reduce artifacts due to wrong collision normals caused by internal edges. 11 | ///See also http://code.google.com/p/bullet/issues/detail?id=27 12 | 13 | class btBvhTriangleMeshShape; 14 | class btCollisionObject; 15 | struct btCollisionObjectWrapper; 16 | class btManifoldPoint; 17 | class btIDebugDraw; 18 | 19 | 20 | 21 | enum btInternalEdgeAdjustFlags 22 | { 23 | BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1, 24 | BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2, //double sided options are experimental, single sided is recommended 25 | BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4 26 | }; 27 | 28 | 29 | ///Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo' 30 | void btGenerateInternalEdgeInfo (btBvhTriangleMeshShape*trimeshShape, btTriangleInfoMap* triangleInfoMap); 31 | 32 | 33 | ///Call the btFixMeshNormal to adjust the collision normal, using the triangle info map (generated using btGenerateInternalEdgeInfo) 34 | ///If this info map is missing, or the triangle is not store in this map, nothing will be done 35 | void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObjectWrapper* trimeshColObj0Wrap,const btCollisionObjectWrapper* otherColObj1Wrap, int partId0, int index0, int normalAdjustFlags = 0); 36 | 37 | ///Enable the BT_INTERNAL_EDGE_DEBUG_DRAW define and call btSetDebugDrawer, to get visual info to see if the internal edge utility works properly. 38 | ///If the utility doesn't work properly, you might have to adjust the threshold values in btTriangleInfoMap 39 | //#define BT_INTERNAL_EDGE_DEBUG_DRAW 40 | 41 | #ifdef BT_INTERNAL_EDGE_DEBUG_DRAW 42 | void btSetDebugDrawer(btIDebugDraw* debugDrawer); 43 | #endif //BT_INTERNAL_EDGE_DEBUG_DRAW 44 | 45 | 46 | #endif //BT_INTERNAL_EDGE_UTILITY_H 47 | 48 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btBox2dShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btBox2dShape.h" 17 | 18 | 19 | //{ 20 | 21 | 22 | void btBox2dShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const 23 | { 24 | btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax); 25 | } 26 | 27 | 28 | void btBox2dShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const 29 | { 30 | //btScalar margin = btScalar(0.); 31 | btVector3 halfExtents = getHalfExtentsWithMargin(); 32 | 33 | btScalar lx=btScalar(2.)*(halfExtents.x()); 34 | btScalar ly=btScalar(2.)*(halfExtents.y()); 35 | btScalar lz=btScalar(2.)*(halfExtents.z()); 36 | 37 | inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz), 38 | mass/(btScalar(12.0)) * (lx*lx + lz*lz), 39 | mass/(btScalar(12.0)) * (lx*lx + ly*ly)); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btCollisionMargin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_MARGIN_H 17 | #define BT_COLLISION_MARGIN_H 18 | 19 | ///The CONVEX_DISTANCE_MARGIN is a default collision margin for convex collision shapes derived from btConvexInternalShape. 20 | ///This collision margin is used by Gjk and some other algorithms 21 | ///Note that when creating small objects, you need to make sure to set a smaller collision margin, using the 'setMargin' API 22 | #define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar(0.01) 23 | 24 | 25 | 26 | #endif //BT_COLLISION_MARGIN_H 27 | 28 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btConcaveShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | 17 | #include "btConcaveShape.h" 18 | 19 | btConcaveShape::btConcaveShape() : m_collisionMargin(btScalar(0.)) 20 | { 21 | 22 | } 23 | 24 | btConcaveShape::~btConcaveShape() 25 | { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btEmptyShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btEmptyShape.h" 17 | 18 | 19 | #include "btCollisionShape.h" 20 | 21 | 22 | btEmptyShape::btEmptyShape() : btConcaveShape () 23 | { 24 | m_shapeType = EMPTY_SHAPE_PROXYTYPE; 25 | } 26 | 27 | 28 | btEmptyShape::~btEmptyShape() 29 | { 30 | } 31 | 32 | 33 | ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version 34 | void btEmptyShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const 35 | { 36 | btVector3 margin(getMargin(),getMargin(),getMargin()); 37 | 38 | aabbMin = t.getOrigin() - margin; 39 | 40 | aabbMax = t.getOrigin() + margin; 41 | 42 | } 43 | 44 | void btEmptyShape::calculateLocalInertia(btScalar ,btVector3& ) const 45 | { 46 | btAssert(0); 47 | } 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btMaterial.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | /// This file was created by Alex Silverman 17 | 18 | #ifndef BT_MATERIAL_H 19 | #define BT_MATERIAL_H 20 | 21 | // Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties 22 | class btMaterial 23 | { 24 | // public members so that materials can change due to world events 25 | public: 26 | btScalar m_friction; 27 | btScalar m_restitution; 28 | int pad[2]; 29 | 30 | btMaterial(){} 31 | btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitution = rest; } 32 | }; 33 | 34 | #endif // BT_MATERIAL_H 35 | 36 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btTriangleBuffer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btTriangleBuffer.h" 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | void btTriangleBuffer::processTriangle(btVector3* triangle,int partId,int triangleIndex) 25 | { 26 | btTriangle tri; 27 | tri.m_vertex0 = triangle[0]; 28 | tri.m_vertex1 = triangle[1]; 29 | tri.m_vertex2 = triangle[2]; 30 | tri.m_partId = partId; 31 | tri.m_triangleIndex = triangleIndex; 32 | 33 | m_triangleBuffer.push_back(tri); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btTriangleCallback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btTriangleCallback.h" 17 | 18 | btTriangleCallback::~btTriangleCallback() 19 | { 20 | 21 | } 22 | 23 | 24 | btInternalTriangleIndexCallback::~btInternalTriangleIndexCallback() 25 | { 26 | 27 | } 28 | 29 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/CollisionShapes/btTriangleCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_TRIANGLE_CALLBACK_H 17 | #define BT_TRIANGLE_CALLBACK_H 18 | 19 | #include "LinearMath/btVector3.h" 20 | 21 | 22 | ///The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTriangles. 23 | ///This callback is called by processAllTriangles for all btConcaveShape derived class, such as btBvhTriangleMeshShape, btStaticPlaneShape and btHeightfieldTerrainShape. 24 | class btTriangleCallback 25 | { 26 | public: 27 | 28 | virtual ~btTriangleCallback(); 29 | virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) = 0; 30 | }; 31 | 32 | class btInternalTriangleIndexCallback 33 | { 34 | public: 35 | 36 | virtual ~btInternalTriangleIndexCallback(); 37 | virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) = 0; 38 | }; 39 | 40 | 41 | 42 | #endif //BT_TRIANGLE_CALLBACK_H 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/Gimpact/btGImpactShape.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/Gimpact/btGImpactShape.h -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/Gimpact/gim_geometry.h: -------------------------------------------------------------------------------- 1 | #ifndef GIM_GEOMETRY_H_INCLUDED 2 | #define GIM_GEOMETRY_H_INCLUDED 3 | 4 | /*! \file gim_geometry.h 5 | \author Francisco Leon Najera 6 | */ 7 | /* 8 | ----------------------------------------------------------------------------- 9 | This source file is part of GIMPACT Library. 10 | 11 | For the latest info, see http://gimpact.sourceforge.net/ 12 | 13 | Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. 14 | email: projectileman@yahoo.com 15 | 16 | This library is free software; you can redistribute it and/or 17 | modify it under the terms of EITHER: 18 | (1) The GNU Lesser General Public License as published by the Free 19 | Software Foundation; either version 2.1 of the License, or (at 20 | your option) any later version. The text of the GNU Lesser 21 | General Public License is included with this library in the 22 | file GIMPACT-LICENSE-LGPL.TXT. 23 | (2) The BSD-style license that is included with this library in 24 | the file GIMPACT-LICENSE-BSD.TXT. 25 | (3) The zlib/libpng license that is included with this library in 26 | the file GIMPACT-LICENSE-ZLIB.TXT. 27 | 28 | This library is distributed in the hope that it will be useful, 29 | but WITHOUT ANY WARRANTY; without even the implied warranty of 30 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files 31 | GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. 32 | 33 | ----------------------------------------------------------------------------- 34 | */ 35 | 36 | ///Additional Headers for Collision 37 | #include "gim_basic_geometry_operations.h" 38 | #include "gim_clip_polygon.h" 39 | #include "gim_box_collision.h" 40 | #include "gim_tri_collision.h" 41 | 42 | #endif // GIM_VECTOR_H_INCLUDED 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btConvexCast.h" 17 | 18 | btConvexCast::~btConvexCast() 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | 17 | #ifndef BT_CONVEX_PENETRATION_DEPTH_H 18 | #define BT_CONVEX_PENETRATION_DEPTH_H 19 | 20 | class btStackAlloc; 21 | class btVector3; 22 | #include "btSimplexSolverInterface.h" 23 | class btConvexShape; 24 | class btTransform; 25 | 26 | ///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. 27 | class btConvexPenetrationDepthSolver 28 | { 29 | public: 30 | 31 | virtual ~btConvexPenetrationDepthSolver() {}; 32 | virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, 33 | const btConvexShape* convexA,const btConvexShape* convexB, 34 | const btTransform& transA,const btTransform& transB, 35 | btVector3& v, btVector3& pa, btVector3& pb, 36 | class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc 37 | ) = 0; 38 | 39 | 40 | }; 41 | #endif //BT_CONVEX_PENETRATION_DEPTH_H 42 | 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | 17 | 18 | #ifndef BT_GJK_CONVEX_CAST_H 19 | #define BT_GJK_CONVEX_CAST_H 20 | 21 | #include "BulletCollision/CollisionShapes/btCollisionMargin.h" 22 | 23 | #include "LinearMath/btVector3.h" 24 | #include "btConvexCast.h" 25 | class btConvexShape; 26 | class btMinkowskiSumShape; 27 | #include "btSimplexSolverInterface.h" 28 | 29 | ///GjkConvexCast performs a raycast on a convex object using support mapping. 30 | class btGjkConvexCast : public btConvexCast 31 | { 32 | btSimplexSolverInterface* m_simplexSolver; 33 | const btConvexShape* m_convexA; 34 | const btConvexShape* m_convexB; 35 | 36 | public: 37 | 38 | btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver); 39 | 40 | /// cast a convex against another convex object 41 | virtual bool calcTimeOfImpact( 42 | const btTransform& fromA, 43 | const btTransform& toA, 44 | const btTransform& fromB, 45 | const btTransform& toB, 46 | CastResult& result); 47 | 48 | }; 49 | 50 | #endif //BT_GJK_CONVEX_CAST_H 51 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | EPA Copyright (c) Ricardo Padrela 2006 6 | 7 | This software is provided 'as-is', without any express or implied warranty. 8 | In no event will the authors be held liable for any damages arising from the use of this software. 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it freely, 11 | subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 14 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | */ 17 | #ifndef BT_GJP_EPA_PENETRATION_DEPTH_H 18 | #define BT_GJP_EPA_PENETRATION_DEPTH_H 19 | 20 | #include "btConvexPenetrationDepthSolver.h" 21 | 22 | ///EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to 23 | ///calculate the penetration depth between two convex shapes. 24 | class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver 25 | { 26 | public : 27 | 28 | btGjkEpaPenetrationDepthSolver() 29 | { 30 | } 31 | 32 | bool calcPenDepth( btSimplexSolverInterface& simplexSolver, 33 | const btConvexShape* pConvexA, const btConvexShape* pConvexB, 34 | const btTransform& transformA, const btTransform& transformB, 35 | btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB, 36 | class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ); 37 | 38 | private : 39 | 40 | }; 41 | 42 | #endif // BT_GJP_EPA_PENETRATION_DEPTH_H 43 | 44 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H 17 | #define BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H 18 | 19 | #include "btConvexPenetrationDepthSolver.h" 20 | 21 | ///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. 22 | ///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. 23 | class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver 24 | { 25 | protected: 26 | 27 | static btVector3* getPenetrationDirections(); 28 | 29 | public: 30 | 31 | virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, 32 | const btConvexShape* convexA,const btConvexShape* convexB, 33 | const btTransform& transA,const btTransform& transB, 34 | btVector3& v, btVector3& pa, btVector3& pb, 35 | class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc 36 | ); 37 | }; 38 | 39 | #endif //BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H 40 | 41 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletCollision/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletCollision" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletDynamics/Dynamics/btActionInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef _BT_ACTION_INTERFACE_H 17 | #define _BT_ACTION_INTERFACE_H 18 | 19 | class btIDebugDraw; 20 | class btCollisionWorld; 21 | 22 | #include "LinearMath/btScalar.h" 23 | #include "btRigidBody.h" 24 | 25 | ///Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWorld 26 | class btActionInterface 27 | { 28 | protected: 29 | 30 | static btRigidBody& getFixedBody(); 31 | 32 | 33 | public: 34 | 35 | virtual ~btActionInterface() 36 | { 37 | } 38 | 39 | virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTimeStep)=0; 40 | 41 | virtual void debugDraw(btIDebugDraw* debugDrawer) = 0; 42 | 43 | }; 44 | 45 | #endif //_BT_ACTION_INTERFACE_H 46 | 47 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletDynamics/Vehicle/btVehicleRaycaster.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org 3 | * 4 | * Permission to use, copy, modify, distribute and sell this software 5 | * and its documentation for any purpose is hereby granted without fee, 6 | * provided that the above copyright notice appear in all copies. 7 | * Erwin Coumans makes no representations about the suitability 8 | * of this software for any purpose. 9 | * It is provided "as is" without express or implied warranty. 10 | */ 11 | #ifndef BT_VEHICLE_RAYCASTER_H 12 | #define BT_VEHICLE_RAYCASTER_H 13 | 14 | #include "LinearMath/btVector3.h" 15 | 16 | /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting 17 | struct btVehicleRaycaster 18 | { 19 | virtual ~btVehicleRaycaster() 20 | { 21 | } 22 | struct btVehicleRaycasterResult 23 | { 24 | btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){}; 25 | btVector3 m_hitPointInWorld; 26 | btVector3 m_hitNormalInWorld; 27 | btScalar m_distFraction; 28 | }; 29 | 30 | virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) = 0; 31 | 32 | }; 33 | 34 | #endif //BT_VEHICLE_RAYCASTER_H 35 | 36 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletDynamics/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletDynamics" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletSoftBody/btSoftBody.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/CodeBlocksExample/lib/bullet-2.81-rev2613/BulletSoftBody/btSoftBody.cpp -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/BulletSoftBody/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletSoftBody" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath ) 2 | 3 | IF(BUILD_MULTITHREADING) 4 | SUBDIRS(MiniCL BulletMultiThreaded) 5 | ENDIF() 6 | 7 | IF(INSTALL_LIBS) 8 | #INSTALL of other files requires CMake 2.6 9 | IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 10 | IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 11 | # Don't actually need to install any common files, the frameworks include everything 12 | ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 13 | INSTALL(FILES btBulletCollisionCommon.h btBulletDynamicsCommon.h Bullet-C-Api.h DESTINATION ${INCLUDE_INSTALL_DIR}) 14 | INSTALL(FILES vectormath/vmInclude.h DESTINATION ${INCLUDE_INSTALL_DIR}/vectormath) 15 | INSTALL(FILES vectormath/scalar/boolInVec.h 16 | vectormath/scalar/floatInVec.h 17 | vectormath/scalar/mat_aos.h 18 | vectormath/scalar/quat_aos.h 19 | vectormath/scalar/vec_aos.h 20 | vectormath/scalar/vectormath_aos.h 21 | DESTINATION ${INCLUDE_INSTALL_DIR}/vectormath/scalar) 22 | INSTALL(FILES vectormath/sse/boolInVec.h 23 | vectormath/sse/floatInVec.h 24 | vectormath/sse/mat_aos.h 25 | vectormath/sse/quat_aos.h 26 | vectormath/sse/vec_aos.h 27 | vectormath/sse/vecidx_aos.h 28 | vectormath/sse/vectormath_aos.h 29 | DESTINATION ${INCLUDE_INSTALL_DIR}/vectormath/sse) 30 | ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 31 | ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 32 | ENDIF(INSTALL_LIBS) 33 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/LinearMath/btDefaultMotionState.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_DEFAULT_MOTION_STATE_H 2 | #define BT_DEFAULT_MOTION_STATE_H 3 | 4 | #include "btMotionState.h" 5 | 6 | ///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets. 7 | ATTRIBUTE_ALIGNED16(struct) btDefaultMotionState : public btMotionState 8 | { 9 | btTransform m_graphicsWorldTrans; 10 | btTransform m_centerOfMassOffset; 11 | btTransform m_startWorldTrans; 12 | void* m_userPointer; 13 | 14 | BT_DECLARE_ALIGNED_ALLOCATOR(); 15 | 16 | btDefaultMotionState(const btTransform& startTrans = btTransform::getIdentity(),const btTransform& centerOfMassOffset = btTransform::getIdentity()) 17 | : m_graphicsWorldTrans(startTrans), 18 | m_centerOfMassOffset(centerOfMassOffset), 19 | m_startWorldTrans(startTrans), 20 | m_userPointer(0) 21 | 22 | { 23 | } 24 | 25 | ///synchronizes world transform from user to physics 26 | virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const 27 | { 28 | centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ; 29 | } 30 | 31 | ///synchronizes world transform from physics to user 32 | ///Bullet only calls the update of worldtransform for active objects 33 | virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans) 34 | { 35 | m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset ; 36 | } 37 | 38 | 39 | 40 | }; 41 | 42 | #endif //BT_DEFAULT_MOTION_STATE_H 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/LinearMath/btGeometryUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | 15 | 16 | #ifndef BT_GEOMETRY_UTIL_H 17 | #define BT_GEOMETRY_UTIL_H 18 | 19 | #include "btVector3.h" 20 | #include "btAlignedObjectArray.h" 21 | 22 | ///The btGeometryUtil helper class provides a few methods to convert between plane equations and vertices. 23 | class btGeometryUtil 24 | { 25 | public: 26 | 27 | 28 | static void getPlaneEquationsFromVertices(btAlignedObjectArray& vertices, btAlignedObjectArray& planeEquationsOut ); 29 | 30 | static void getVerticesFromPlaneEquations(const btAlignedObjectArray& planeEquations , btAlignedObjectArray& verticesOut ); 31 | 32 | static bool isInside(const btAlignedObjectArray& vertices, const btVector3& planeNormal, btScalar margin); 33 | 34 | static bool isPointInsidePlanes(const btAlignedObjectArray& planeEquations, const btVector3& point, btScalar margin); 35 | 36 | static bool areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray& vertices, btScalar margin); 37 | 38 | }; 39 | 40 | 41 | #endif //BT_GEOMETRY_UTIL_H 42 | 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/LinearMath/btMinMax.h: -------------------------------------------------------------------------------- 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_MINMAX_H 18 | #define BT_GEN_MINMAX_H 19 | 20 | #include "btScalar.h" 21 | 22 | template 23 | SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) 24 | { 25 | return a < b ? a : b ; 26 | } 27 | 28 | template 29 | SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b) 30 | { 31 | return a > b ? a : b; 32 | } 33 | 34 | template 35 | SIMD_FORCE_INLINE const T& btClamped(const T& a, const T& lb, const T& ub) 36 | { 37 | return a < lb ? lb : (ub < a ? ub : a); 38 | } 39 | 40 | template 41 | SIMD_FORCE_INLINE void btSetMin(T& a, const T& b) 42 | { 43 | if (b < a) 44 | { 45 | a = b; 46 | } 47 | } 48 | 49 | template 50 | SIMD_FORCE_INLINE void btSetMax(T& a, const T& b) 51 | { 52 | if (a < b) 53 | { 54 | a = b; 55 | } 56 | } 57 | 58 | template 59 | SIMD_FORCE_INLINE void btClamp(T& a, const T& lb, const T& ub) 60 | { 61 | if (a < lb) 62 | { 63 | a = lb; 64 | } 65 | else if (ub < a) 66 | { 67 | a = ub; 68 | } 69 | } 70 | 71 | #endif //BT_GEN_MINMAX_H 72 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/LinearMath/btMotionState.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MOTIONSTATE_H 17 | #define BT_MOTIONSTATE_H 18 | 19 | #include "btTransform.h" 20 | 21 | ///The btMotionState interface class allows the dynamics world to synchronize and interpolate the updated world transforms with graphics 22 | ///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation) 23 | class btMotionState 24 | { 25 | public: 26 | 27 | virtual ~btMotionState() 28 | { 29 | 30 | } 31 | 32 | virtual void getWorldTransform(btTransform& worldTrans ) const =0; 33 | 34 | //Bullet only calls the update of worldtransform for active objects 35 | virtual void setWorldTransform(const btTransform& worldTrans)=0; 36 | 37 | 38 | }; 39 | 40 | #endif //BT_MOTIONSTATE_H 41 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/LinearMath/btRandom.h: -------------------------------------------------------------------------------- 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 23 | #include 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 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 | 43 | -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/LinearMath/premake4.lua: -------------------------------------------------------------------------------- 1 | project "LinearMath" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /CodeBlocksExample/lib/bullet-2.81-rev2613/vectormath/vmInclude.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __VM_INCLUDE_H 3 | #define __VM_INCLUDE_H 4 | 5 | #include "LinearMath/btScalar.h" 6 | 7 | #if defined (USE_SYSTEM_VECTORMATH) || defined (__CELLOS_LV2__) 8 | #include 9 | #else //(USE_SYSTEM_VECTORMATH) 10 | #if defined (BT_USE_SSE) 11 | #include "sse/vectormath_aos.h" 12 | #else //all other platforms 13 | #if defined (BT_USE_NEON) 14 | #include "neon/vectormath_aos.h" 15 | #else 16 | #include "scalar/vectormath_aos.h" 17 | #endif 18 | #endif //(BT_USE_SSE) && defined (_WIN32) 19 | #endif //(USE_SYSTEM_VECTORMATH) 20 | 21 | 22 | 23 | typedef Vectormath::Aos::Vector3 vmVector3; 24 | typedef Vectormath::Aos::Quat vmQuat; 25 | typedef Vectormath::Aos::Matrix3 vmMatrix3; 26 | typedef Vectormath::Aos::Transform3 vmTransform3; 27 | typedef Vectormath::Aos::Point3 vmPoint3; 28 | 29 | #endif //__VM_INCLUDE_H 30 | 31 | 32 | -------------------------------------------------------------------------------- /CodeBlocksExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "testApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new testApp()); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /CodeBlocksExample/src/testApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class testApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed (int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxBulletWorldRigid world; 24 | ofxBulletBox ground; 25 | 26 | ofxBulletSphere* sphere; 27 | ofxBulletBox* box; 28 | ofxBulletCone* cone; 29 | ofxBulletCapsule* capsule; 30 | ofxBulletCylinder* cylinder; 31 | 32 | ofCamera camera; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /CustomShapesExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | ofxAssimpModelLoader 3 | -------------------------------------------------------------------------------- /CustomShapesExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /CustomShapesExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /CustomShapesExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | #include "ofxAssimpModelLoader.h" 6 | 7 | class ofApp : public ofBaseApp{ 8 | 9 | public: 10 | void setup(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed (int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | ofxBulletWorldRigid world; 25 | vector bounds; 26 | ofxBulletCustomShape* boundsShape; 27 | ofMaterial boundsMat; 28 | float boundsWidth; 29 | bool bDropBox; 30 | 31 | vector logos; 32 | ofMaterial logoMat; 33 | vector shapes; 34 | ofMaterial shapesMat; 35 | 36 | bool bDrawDebug; 37 | 38 | 39 | ofMesh mesh; 40 | ofCamera camera; 41 | ofLight light; 42 | 43 | ofxAssimpModelLoader assimpModel; 44 | 45 | }; 46 | -------------------------------------------------------------------------------- /EventsExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /EventsExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /EventsExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024, 768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /EventsExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void onCollision(ofxBulletCollisionData& cdata); 14 | void mousePickEvent( ofxBulletMousePickEvent &e ); 15 | 16 | void keyPressed (int key); 17 | void keyReleased(int key); 18 | void mouseMoved(int x, int y ); 19 | void mouseDragged(int x, int y, int button); 20 | void mousePressed(int x, int y, int button); 21 | void mouseReleased(int x, int y, int button); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | ofxBulletWorldRigid world; 27 | vector bounds; 28 | float boundsWidth; 29 | 30 | ofLight light; 31 | 32 | btBoxShape* boxShape; 33 | btSphereShape* sphereShape; 34 | vector shapes; 35 | vector bColliding; 36 | int mousePickIndex; 37 | ofVec3f mousePickPos; 38 | 39 | bool bDrawDebug; 40 | bool bRenderShapes; 41 | bool bAddCenterAttract; 42 | bool bSpacebar; 43 | 44 | ofCamera camera; 45 | 46 | }; 47 | -------------------------------------------------------------------------------- /JointsExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /JointsExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /JointsExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /JointsExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed (int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxBulletWorldRigid world; 24 | ofxBulletBox* ground; 25 | 26 | vector shapes; 27 | vector joints; 28 | vector shapeColors; 29 | ofColor colors[4]; 30 | 31 | bool bDrawDebug; 32 | bool bSpacebar; 33 | bool bShapesNeedErase; 34 | 35 | float jointLength; 36 | 37 | ofCamera camera; 38 | ofLight light; 39 | ofVec3f mousePos; 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /MeshExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /MeshExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /MeshExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /MeshExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | void exit(); 13 | 14 | void keyPressed (int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | ofxBulletWorldRigid world; 25 | 26 | bool bDrawDebug; 27 | bool bSpacebar; 28 | bool bDrawFbos; 29 | bool bAnimated; 30 | 31 | ofEasyCam camera; 32 | 33 | ofMesh mesh, omesh; 34 | shared_ptr bulletMesh; 35 | vector< shared_ptr > bulletSpheres; 36 | 37 | float anisotropy; 38 | ofFbo fbo, fboSphere; 39 | }; 40 | -------------------------------------------------------------------------------- /SimpleExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /SimpleExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /SimpleExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /SimpleExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed (int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxBulletWorldRigid world; 24 | ofxBulletBox ground; 25 | 26 | ofxBulletSphere* sphere; 27 | ofxBulletBox* box; 28 | ofxBulletCone* cone; 29 | ofxBulletCapsule* capsule; 30 | ofxBulletCylinder* cylinder; 31 | 32 | ofCamera camera; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /SoftBodyExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /SoftBodyExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp()); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /SoftBodyExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed (int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxBulletWorldSoft world; 24 | ofxBulletBox* ground; 25 | 26 | ofxBulletRope* rope; 27 | ofxBulletPatch* patch; 28 | vector ellipsoids; 29 | 30 | vector shapes; 31 | vector joints; 32 | vector shapeColors; 33 | ofColor colors[4]; 34 | 35 | bool bDrawDebug; 36 | bool bSpacebar; 37 | bool bAddEllipsoid; 38 | bool bShapesNeedErase; 39 | 40 | float jointLength; 41 | 42 | ofCamera camera; 43 | ofLight light; 44 | ofVec3f mousePos; 45 | 46 | }; 47 | -------------------------------------------------------------------------------- /SoftBodyMeshExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxBullet 2 | -------------------------------------------------------------------------------- /SoftBodyMeshExample/config.make: -------------------------------------------------------------------------------- 1 | # add custom variables to this file 2 | 3 | # OF_ROOT allows to move projects outside apps/* just set this variable to the 4 | # absoulte path to the OF root folder 5 | 6 | OF_ROOT = ../../../.. 7 | 8 | 9 | # USER_CFLAGS allows to pass custom flags to the compiler 10 | # for example search paths like: 11 | # USER_CFLAGS = -I src/objects 12 | 13 | USER_CFLAGS = -DUSE_MINICL 14 | 15 | 16 | # USER_LDFLAGS allows to pass custom flags to the linker 17 | # for example libraries like: 18 | # USER_LD_FLAGS = libs/libawesomelib.a 19 | 20 | USER_LDFLAGS = 21 | 22 | 23 | # use this to add system libraries for example: 24 | # USER_LIBS = -lpango 25 | 26 | USER_LIBS = 27 | 28 | 29 | # change this to add different compiler optimizations to your project 30 | 31 | USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os 32 | 33 | 34 | EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,.git" 35 | -------------------------------------------------------------------------------- /SoftBodyMeshExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024, 768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp() ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /SoftBodyMeshExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxBullet.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxBulletWorldSoft world; 24 | 25 | ofEasyCam camera; 26 | ofxBulletBox* ground; 27 | 28 | vector< shared_ptr > rigidBodies; 29 | vector< shared_ptr > bunnies; 30 | 31 | ofMesh mesh; 32 | 33 | ofLight light; 34 | 35 | }; 36 | -------------------------------------------------------------------------------- /iosEmptyExample/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig" 7 | 8 | BULLET_LIB_PATH = $(OF_PATH)/addons/ofxBullet/libs/bullet2.8.2 9 | 10 | HEADER_BULLET = "$(BULLET_LIB_PATH)/include/**" 11 | 12 | LIB_BULLET_COLLISION_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libBulletCollision.a" 13 | LIB_BULLET_DYNAMICS_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libBulletDynamics.a" 14 | LIB_BULLET_MATH_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libLinearMath.a" 15 | LIB_BULLET_SOFT_BODY_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libBulletSoftBody.a" 16 | 17 | LIB_BULLET_COLLISION_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libBulletCollision.a" 18 | LIB_BULLET_DYNAMICS_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libBulletDynamics.a" 19 | LIB_BULLET_MATH_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libLinearMath.a" 20 | LIB_BULLET_SOFT_BODY_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libBulletSoftBody.a" 21 | 22 | LIB_BULLET_ALL_RELEASE = $(LIB_BULLET_COLLISION_RELEASE) $(LIB_BULLET_DYNAMICS_RELEASE) $(LIB_BULLET_MATH_RELEASE) $(LIB_BULLET_SOFT_BODY_RELEASE) $(LIB_BULLET_COLLISION_RELEASE_SIM) $(LIB_BULLET_DYNAMICS_RELEASE_SIM) $(LIB_BULLET_MATH_RELEASE_SIM) $(LIB_BULLET_SOFT_BODY_RELEASE_SIM) 23 | 24 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(LIB_BULLET_ALL_RELEASE) 25 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 26 | 27 | COMPRESS_PNG_FILES = NO 28 | GCC_THUMB_SUPPORT = NO 29 | IPHONEOS_DEPLOYMENT_TARGET = 3.1 30 | TARGETED_DEVICE_FAMILY = 1 31 | -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/.gitkeep -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default@2x.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default@2x~ipad.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default@2x~iphone.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default~ipad.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Default~iphone.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Icon-72.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Icon-72@2x.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Icon.png -------------------------------------------------------------------------------- /iosEmptyExample/bin/data/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/iosEmptyExample/bin/data/Icon@2x.png -------------------------------------------------------------------------------- /iosEmptyExample/ofxiOS-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIStatusBarHidden 6 | 7 | UIViewControllerBasedStatusBarAppearance 8 | 9 | CFBundleDevelopmentRegion 10 | English 11 | CFBundleDisplayName 12 | ${PRODUCT_NAME} 13 | CFBundleExecutable 14 | ${EXECUTABLE_NAME} 15 | CFBundleIconFile 16 | 17 | CFBundleIcons 18 | 19 | CFBundlePrimaryIcon 20 | 21 | CFBundleIconFiles 22 | 23 | Icon.png 24 | Icon@2x.png 25 | 26 | 27 | 28 | CFBundleIdentifier 29 | ${PRODUCT_NAME:identifier} 30 | CFBundleInfoDictionaryVersion 31 | 6.0 32 | CFBundleName 33 | ${PRODUCT_NAME} 34 | CFBundlePackageType 35 | APPL 36 | CFBundleShortVersionString 37 | 1.0 38 | CFBundleSignature 39 | ???? 40 | CFBundleVersion 41 | 1.0 42 | LSRequiresIPhoneOS 43 | 44 | UIApplicationExitsOnSuspend 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /iosEmptyExample/ofxiOS_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'iPhone' target in the 'iPhone' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /iosEmptyExample/src/main.mm: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | int main(){ 5 | ofSetupOpenGL(1024,768, OF_FULLSCREEN); // <-------- setup the GL context 6 | 7 | ofRunApp(new ofApp); 8 | } 9 | -------------------------------------------------------------------------------- /iosEmptyExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxiOS.h" 5 | #include "ofxiOSExtras.h" 6 | 7 | class ofApp : public ofxiOSApp{ 8 | 9 | public: 10 | void setup(); 11 | void update(); 12 | void draw(); 13 | void exit(); 14 | 15 | void touchDown(ofTouchEventArgs & touch); 16 | void touchMoved(ofTouchEventArgs & touch); 17 | void touchUp(ofTouchEventArgs & touch); 18 | void touchDoubleTap(ofTouchEventArgs & touch); 19 | void touchCancelled(ofTouchEventArgs & touch); 20 | 21 | void lostFocus(); 22 | void gotFocus(); 23 | void gotMemoryWarning(); 24 | void deviceOrientationChanged(int newOrientation); 25 | 26 | }; 27 | 28 | 29 | -------------------------------------------------------------------------------- /iosEmptyExample/src/ofApp.mm: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | } 7 | 8 | //-------------------------------------------------------------- 9 | void ofApp::update(){ 10 | 11 | } 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::draw(){ 15 | 16 | } 17 | 18 | //-------------------------------------------------------------- 19 | void ofApp::exit(){ 20 | 21 | } 22 | 23 | //-------------------------------------------------------------- 24 | void ofApp::touchDown(ofTouchEventArgs & touch){ 25 | 26 | } 27 | 28 | //-------------------------------------------------------------- 29 | void ofApp::touchMoved(ofTouchEventArgs & touch){ 30 | 31 | } 32 | 33 | //-------------------------------------------------------------- 34 | void ofApp::touchUp(ofTouchEventArgs & touch){ 35 | 36 | } 37 | 38 | //-------------------------------------------------------------- 39 | void ofApp::touchDoubleTap(ofTouchEventArgs & touch){ 40 | 41 | } 42 | 43 | //-------------------------------------------------------------- 44 | void ofApp::touchCancelled(ofTouchEventArgs & touch){ 45 | 46 | } 47 | 48 | //-------------------------------------------------------------- 49 | void ofApp::lostFocus(){ 50 | 51 | } 52 | 53 | //-------------------------------------------------------------- 54 | void ofApp::gotFocus(){ 55 | 56 | } 57 | 58 | //-------------------------------------------------------------- 59 | void ofApp::gotMemoryWarning(){ 60 | 61 | } 62 | 63 | //-------------------------------------------------------------- 64 | void ofApp::deviceOrientationChanged(int newOrientation){ 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /iosSimpleExample/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig" 7 | 8 | BULLET_LIB_PATH = $(OF_PATH)/addons/ofxBullet/libs/bullet2.8.2 9 | 10 | HEADER_BULLET = "$(BULLET_LIB_PATH)/include/**" 11 | 12 | LIB_BULLET_COLLISION_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libBulletCollision.a" 13 | LIB_BULLET_DYNAMICS_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libBulletDynamics.a" 14 | LIB_BULLET_MATH_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libLinearMath.a" 15 | LIB_BULLET_SOFT_BODY_RELEASE = "$(BULLET_LIB_PATH)/lib/ios/arm7/libBulletSoftBody.a" 16 | 17 | LIB_BULLET_COLLISION_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libBulletCollision.a" 18 | LIB_BULLET_DYNAMICS_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libBulletDynamics.a" 19 | LIB_BULLET_MATH_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libLinearMath.a" 20 | LIB_BULLET_SOFT_BODY_RELEASE_SIM = "$(BULLET_LIB_PATH)/lib/ios/i386/libBulletSoftBody.a" 21 | 22 | LIB_BULLET_ALL_RELEASE = $(LIB_BULLET_COLLISION_RELEASE) $(LIB_BULLET_DYNAMICS_RELEASE) $(LIB_BULLET_MATH_RELEASE) $(LIB_BULLET_SOFT_BODY_RELEASE) $(LIB_BULLET_COLLISION_RELEASE_SIM) $(LIB_BULLET_DYNAMICS_RELEASE_SIM) $(LIB_BULLET_MATH_RELEASE_SIM) $(LIB_BULLET_SOFT_BODY_RELEASE_SIM) 23 | 24 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(LIB_BULLET_ALL_RELEASE) 25 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 26 | 27 | COMPRESS_PNG_FILES = NO 28 | GCC_THUMB_SUPPORT = NO 29 | IPHONEOS_DEPLOYMENT_TARGET = 3.1 30 | TARGETED_DEVICE_FAMILY = 1 31 | -------------------------------------------------------------------------------- /iosSimpleExample/ofxiOS-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIStatusBarHidden 6 | 7 | UIViewControllerBasedStatusBarAppearance 8 | 9 | CFBundleDevelopmentRegion 10 | English 11 | CFBundleDisplayName 12 | ${PRODUCT_NAME} 13 | CFBundleExecutable 14 | ${EXECUTABLE_NAME} 15 | CFBundleIconFile 16 | 17 | CFBundleIcons 18 | 19 | CFBundlePrimaryIcon 20 | 21 | CFBundleIconFiles 22 | 23 | Icon.png 24 | Icon@2x.png 25 | 26 | 27 | 28 | CFBundleIdentifier 29 | ${PRODUCT_NAME:identifier} 30 | CFBundleInfoDictionaryVersion 31 | 6.0 32 | CFBundleName 33 | ${PRODUCT_NAME} 34 | CFBundlePackageType 35 | APPL 36 | CFBundleShortVersionString 37 | 1.0 38 | CFBundleSignature 39 | ???? 40 | CFBundleVersion 41 | 1.0 42 | LSRequiresIPhoneOS 43 | 44 | UIApplicationExitsOnSuspend 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /iosSimpleExample/ofxiOS_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'iPhone' target in the 'iPhone' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /iosSimpleExample/src/main.mm: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | int main(){ 5 | ofAppiOSWindow * iOSWindow = new ofAppiOSWindow(); 6 | iOSWindow->enableDepthBuffer(); 7 | ofSetupOpenGL(iOSWindow, 1024, 768, OF_FULLSCREEN); 8 | 9 | ofRunApp(new ofApp); 10 | } 11 | -------------------------------------------------------------------------------- /iosSimpleExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxiOS.h" 5 | #include "ofxiOSExtras.h" 6 | #include "ofxBullet.h" 7 | 8 | class ofApp : public ofxiOSApp{ 9 | 10 | public: 11 | void setup(); 12 | void update(); 13 | void draw(); 14 | void exit(); 15 | 16 | void touchDown(ofTouchEventArgs & touch); 17 | void touchMoved(ofTouchEventArgs & touch); 18 | void touchUp(ofTouchEventArgs & touch); 19 | void touchDoubleTap(ofTouchEventArgs & touch); 20 | void touchCancelled(ofTouchEventArgs & touch); 21 | 22 | void lostFocus(); 23 | void gotFocus(); 24 | void gotMemoryWarning(); 25 | void deviceOrientationChanged(int newOrientation); 26 | 27 | ofxBulletWorldRigid world; 28 | vector shapes; 29 | vector colors; 30 | float lastShapeAddTimef; 31 | ofCamera camera; 32 | ofLight light; 33 | vector bounds; 34 | 35 | }; 36 | 37 | 38 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp: -------------------------------------------------------------------------------- 1 | 2 | //Bullet Continuous Collision Detection and Physics Library 3 | //Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | 6 | // 7 | // btAxisSweep3 8 | // 9 | // Copyright (c) 2006 Simon Hobbs 10 | // 11 | // This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 12 | // 13 | // Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 16 | // 17 | // 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 18 | // 19 | // 3. This notice may not be removed or altered from any source distribution. 20 | #include "btAxisSweep3.h" 21 | 22 | 23 | btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) 24 | :btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache,disableRaycastAccelerator) 25 | { 26 | // 1 handle is reserved as sentinel 27 | btAssert(maxHandles > 1 && maxHandles < 32767); 28 | 29 | } 30 | 31 | 32 | bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache , bool disableRaycastAccelerator) 33 | :btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache,disableRaycastAccelerator) 34 | { 35 | // 1 handle is reserved as sentinel 36 | btAssert(maxHandles > 1 && maxHandles < 2147483647); 37 | } 38 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btBroadphaseProxy.h" 17 | 18 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btCollisionAlgorithm.h" 17 | #include "btDispatcher.h" 18 | 19 | btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) 20 | { 21 | m_dispatcher = ci.m_dispatcher1; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/BroadphaseCollision/btDispatcher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btDispatcher.h" 17 | 18 | btDispatcher::~btDispatcher() 19 | { 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 5 | 6 | This software is provided 'as-is', without any express or implied warranty. 7 | In no event will the authors be held liable for any damages arising from the use of this software. 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it freely, 10 | subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 14 | 3. This notice may not be removed or altered from any source distribution. 15 | */ 16 | 17 | #ifndef OVERLAPPING_PAIR_CALLBACK_H 18 | #define OVERLAPPING_PAIR_CALLBACK_H 19 | 20 | class btDispatcher; 21 | struct btBroadphasePair; 22 | 23 | ///The btOverlappingPairCallback class is an additional optional broadphase user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache. 24 | class btOverlappingPairCallback 25 | { 26 | public: 27 | virtual ~btOverlappingPairCallback() 28 | { 29 | 30 | } 31 | 32 | virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0; 33 | 34 | virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher) = 0; 35 | 36 | virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0,btDispatcher* dispatcher) = 0; 37 | 38 | }; 39 | 40 | #endif //OVERLAPPING_PAIR_CALLBACK_H 41 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btActivatingCollisionAlgorithm.h" 17 | #include "btCollisionDispatcher.h" 18 | #include "btCollisionObject.h" 19 | 20 | btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci) 21 | :btCollisionAlgorithm(ci) 22 | //, 23 | //m_colObj0(0), 24 | //m_colObj1(0) 25 | { 26 | } 27 | btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* ,const btCollisionObjectWrapper* ) 28 | :btCollisionAlgorithm(ci) 29 | //, 30 | //m_colObj0(0), 31 | //m_colObj1(0) 32 | { 33 | // if (ci.m_dispatcher1->needsCollision(colObj0,colObj1)) 34 | // { 35 | // m_colObj0 = colObj0; 36 | // m_colObj1 = colObj1; 37 | // 38 | // m_colObj0->activate(); 39 | // m_colObj1->activate(); 40 | // } 41 | } 42 | 43 | btActivatingCollisionAlgorithm::~btActivatingCollisionAlgorithm() 44 | { 45 | // m_colObj0->activate(); 46 | // m_colObj1->activate(); 47 | } 48 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef __BT_ACTIVATING_COLLISION_ALGORITHM_H 17 | #define __BT_ACTIVATING_COLLISION_ALGORITHM_H 18 | 19 | #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" 20 | 21 | ///This class is not enabled yet (work-in-progress) to more aggressively activate objects. 22 | class btActivatingCollisionAlgorithm : public btCollisionAlgorithm 23 | { 24 | // btCollisionObject* m_colObj0; 25 | // btCollisionObject* m_colObj1; 26 | 27 | public: 28 | 29 | btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci); 30 | 31 | btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap); 32 | 33 | virtual ~btActivatingCollisionAlgorithm(); 34 | 35 | }; 36 | #endif //__BT_ACTIVATING_COLLISION_ALGORITHM_H 37 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btCollisionConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_CONFIGURATION 17 | #define BT_COLLISION_CONFIGURATION 18 | 19 | struct btCollisionAlgorithmCreateFunc; 20 | 21 | class btPoolAllocator; 22 | 23 | ///btCollisionConfiguration allows to configure Bullet collision detection 24 | ///stack allocator size, default collision algorithms and persistent manifold pool size 25 | ///@todo: describe the meaning 26 | class btCollisionConfiguration 27 | { 28 | 29 | public: 30 | 31 | virtual ~btCollisionConfiguration() 32 | { 33 | } 34 | 35 | ///memory pools 36 | virtual btPoolAllocator* getPersistentManifoldPool() = 0; 37 | 38 | virtual btPoolAllocator* getCollisionAlgorithmPool() = 0; 39 | 40 | 41 | virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0; 42 | 43 | }; 44 | 45 | #endif //BT_COLLISION_CONFIGURATION 46 | 47 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_CREATE_FUNC 17 | #define BT_COLLISION_CREATE_FUNC 18 | 19 | #include "LinearMath/btAlignedObjectArray.h" 20 | class btCollisionAlgorithm; 21 | class btCollisionObject; 22 | struct btCollisionObjectWrapper; 23 | struct btCollisionAlgorithmConstructionInfo; 24 | 25 | ///Used by the btCollisionDispatcher to register and create instances for btCollisionAlgorithm 26 | struct btCollisionAlgorithmCreateFunc 27 | { 28 | bool m_swapped; 29 | 30 | btCollisionAlgorithmCreateFunc() 31 | :m_swapped(false) 32 | { 33 | } 34 | virtual ~btCollisionAlgorithmCreateFunc(){}; 35 | 36 | virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& , const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap) 37 | { 38 | 39 | (void)body0Wrap; 40 | (void)body1Wrap; 41 | return 0; 42 | } 43 | }; 44 | #endif //BT_COLLISION_CREATE_FUNC 45 | 46 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_COLLISION_OBJECT_WRAPPER_H 2 | #define BT_COLLISION_OBJECT_WRAPPER_H 3 | 4 | ///btCollisionObjectWrapperis an internal data structure. 5 | ///Most users can ignore this and use btCollisionObject and btCollisionShape instead 6 | class btCollisionShape; 7 | class btCollisionObject; 8 | class btTransform; 9 | #include "LinearMath/btScalar.h" // for SIMD_FORCE_INLINE definition 10 | 11 | #define BT_DECLARE_STACK_ONLY_OBJECT \ 12 | private: \ 13 | void* operator new(size_t size); \ 14 | void operator delete(void*); 15 | 16 | struct btCollisionObjectWrapper; 17 | struct btCollisionObjectWrapper 18 | { 19 | BT_DECLARE_STACK_ONLY_OBJECT 20 | 21 | private: 22 | btCollisionObjectWrapper(const btCollisionObjectWrapper&); // not implemented. Not allowed. 23 | btCollisionObjectWrapper* operator=(const btCollisionObjectWrapper&); 24 | 25 | public: 26 | const btCollisionObjectWrapper* m_parent; 27 | const btCollisionShape* m_shape; 28 | const btCollisionObject* m_collisionObject; 29 | const btTransform& m_worldTransform; 30 | int m_partId; 31 | int m_index; 32 | 33 | btCollisionObjectWrapper(const btCollisionObjectWrapper* parent, const btCollisionShape* shape, const btCollisionObject* collisionObject, const btTransform& worldTransform, int partId, int index) 34 | : m_parent(parent), m_shape(shape), m_collisionObject(collisionObject), m_worldTransform(worldTransform), 35 | m_partId(partId), m_index(index) 36 | {} 37 | 38 | SIMD_FORCE_INLINE const btTransform& getWorldTransform() const { return m_worldTransform; } 39 | SIMD_FORCE_INLINE const btCollisionObject* getCollisionObject() const { return m_collisionObject; } 40 | SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { return m_shape; } 41 | }; 42 | 43 | #endif //BT_COLLISION_OBJECT_WRAPPER_H 44 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btEmptyCollisionAlgorithm.h" 17 | 18 | 19 | 20 | btEmptyAlgorithm::btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) 21 | : btCollisionAlgorithm(ci) 22 | { 23 | } 24 | 25 | void btEmptyAlgorithm::processCollision (const btCollisionObjectWrapper* ,const btCollisionObjectWrapper* ,const btDispatcherInfo& ,btManifoldResult* ) 26 | { 27 | } 28 | 29 | btScalar btEmptyAlgorithm::calculateTimeOfImpact(btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* ) 30 | { 31 | return btScalar(1.); 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef BT_INTERNAL_EDGE_UTILITY_H 3 | #define BT_INTERNAL_EDGE_UTILITY_H 4 | 5 | #include "LinearMath/btHashMap.h" 6 | #include "LinearMath/btVector3.h" 7 | 8 | #include "BulletCollision/CollisionShapes/btTriangleInfoMap.h" 9 | 10 | ///The btInternalEdgeUtility helps to avoid or reduce artifacts due to wrong collision normals caused by internal edges. 11 | ///See also http://code.google.com/p/bullet/issues/detail?id=27 12 | 13 | class btBvhTriangleMeshShape; 14 | class btCollisionObject; 15 | struct btCollisionObjectWrapper; 16 | class btManifoldPoint; 17 | class btIDebugDraw; 18 | 19 | 20 | 21 | enum btInternalEdgeAdjustFlags 22 | { 23 | BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1, 24 | BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2, //double sided options are experimental, single sided is recommended 25 | BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4 26 | }; 27 | 28 | 29 | ///Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo' 30 | void btGenerateInternalEdgeInfo (btBvhTriangleMeshShape*trimeshShape, btTriangleInfoMap* triangleInfoMap); 31 | 32 | 33 | ///Call the btFixMeshNormal to adjust the collision normal, using the triangle info map (generated using btGenerateInternalEdgeInfo) 34 | ///If this info map is missing, or the triangle is not store in this map, nothing will be done 35 | void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObjectWrapper* trimeshColObj0Wrap,const btCollisionObjectWrapper* otherColObj1Wrap, int partId0, int index0, int normalAdjustFlags = 0); 36 | 37 | ///Enable the BT_INTERNAL_EDGE_DEBUG_DRAW define and call btSetDebugDrawer, to get visual info to see if the internal edge utility works properly. 38 | ///If the utility doesn't work properly, you might have to adjust the threshold values in btTriangleInfoMap 39 | //#define BT_INTERNAL_EDGE_DEBUG_DRAW 40 | 41 | #ifdef BT_INTERNAL_EDGE_DEBUG_DRAW 42 | void btSetDebugDrawer(btIDebugDraw* debugDrawer); 43 | #endif //BT_INTERNAL_EDGE_DEBUG_DRAW 44 | 45 | 46 | #endif //BT_INTERNAL_EDGE_UTILITY_H 47 | 48 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btBox2dShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btBox2dShape.h" 17 | 18 | 19 | //{ 20 | 21 | 22 | void btBox2dShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const 23 | { 24 | btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax); 25 | } 26 | 27 | 28 | void btBox2dShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const 29 | { 30 | //btScalar margin = btScalar(0.); 31 | btVector3 halfExtents = getHalfExtentsWithMargin(); 32 | 33 | btScalar lx=btScalar(2.)*(halfExtents.x()); 34 | btScalar ly=btScalar(2.)*(halfExtents.y()); 35 | btScalar lz=btScalar(2.)*(halfExtents.z()); 36 | 37 | inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz), 38 | mass/(btScalar(12.0)) * (lx*lx + lz*lz), 39 | mass/(btScalar(12.0)) * (lx*lx + ly*ly)); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btCollisionMargin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_MARGIN_H 17 | #define BT_COLLISION_MARGIN_H 18 | 19 | ///The CONVEX_DISTANCE_MARGIN is a default collision margin for convex collision shapes derived from btConvexInternalShape. 20 | ///This collision margin is used by Gjk and some other algorithms 21 | ///Note that when creating small objects, you need to make sure to set a smaller collision margin, using the 'setMargin' API 22 | #define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar(0.01) 23 | 24 | 25 | 26 | #endif //BT_COLLISION_MARGIN_H 27 | 28 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btConcaveShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | 17 | #include "btConcaveShape.h" 18 | 19 | btConcaveShape::btConcaveShape() : m_collisionMargin(btScalar(0.)) 20 | { 21 | 22 | } 23 | 24 | btConcaveShape::~btConcaveShape() 25 | { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btEmptyShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btEmptyShape.h" 17 | 18 | 19 | #include "btCollisionShape.h" 20 | 21 | 22 | btEmptyShape::btEmptyShape() : btConcaveShape () 23 | { 24 | m_shapeType = EMPTY_SHAPE_PROXYTYPE; 25 | } 26 | 27 | 28 | btEmptyShape::~btEmptyShape() 29 | { 30 | } 31 | 32 | 33 | ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version 34 | void btEmptyShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const 35 | { 36 | btVector3 margin(getMargin(),getMargin(),getMargin()); 37 | 38 | aabbMin = t.getOrigin() - margin; 39 | 40 | aabbMax = t.getOrigin() + margin; 41 | 42 | } 43 | 44 | void btEmptyShape::calculateLocalInertia(btScalar ,btVector3& ) const 45 | { 46 | btAssert(0); 47 | } 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btMaterial.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | /// This file was created by Alex Silverman 17 | 18 | #ifndef BT_MATERIAL_H 19 | #define BT_MATERIAL_H 20 | 21 | // Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties 22 | class btMaterial 23 | { 24 | // public members so that materials can change due to world events 25 | public: 26 | btScalar m_friction; 27 | btScalar m_restitution; 28 | int pad[2]; 29 | 30 | btMaterial(){} 31 | btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitution = rest; } 32 | }; 33 | 34 | #endif // BT_MATERIAL_H 35 | 36 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btTriangleBuffer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btTriangleBuffer.h" 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | void btTriangleBuffer::processTriangle(btVector3* triangle,int partId,int triangleIndex) 25 | { 26 | btTriangle tri; 27 | tri.m_vertex0 = triangle[0]; 28 | tri.m_vertex1 = triangle[1]; 29 | tri.m_vertex2 = triangle[2]; 30 | tri.m_partId = partId; 31 | tri.m_triangleIndex = triangleIndex; 32 | 33 | m_triangleBuffer.push_back(tri); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btTriangleCallback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btTriangleCallback.h" 17 | 18 | btTriangleCallback::~btTriangleCallback() 19 | { 20 | 21 | } 22 | 23 | 24 | btInternalTriangleIndexCallback::~btInternalTriangleIndexCallback() 25 | { 26 | 27 | } 28 | 29 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/CollisionShapes/btTriangleCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_TRIANGLE_CALLBACK_H 17 | #define BT_TRIANGLE_CALLBACK_H 18 | 19 | #include "LinearMath/btVector3.h" 20 | 21 | 22 | ///The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTriangles. 23 | ///This callback is called by processAllTriangles for all btConcaveShape derived class, such as btBvhTriangleMeshShape, btStaticPlaneShape and btHeightfieldTerrainShape. 24 | class btTriangleCallback 25 | { 26 | public: 27 | 28 | virtual ~btTriangleCallback(); 29 | virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) = 0; 30 | }; 31 | 32 | class btInternalTriangleIndexCallback 33 | { 34 | public: 35 | 36 | virtual ~btInternalTriangleIndexCallback(); 37 | virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) = 0; 38 | }; 39 | 40 | 41 | 42 | #endif //BT_TRIANGLE_CALLBACK_H 43 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/include/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/Gimpact/btGImpactShape.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/include/BulletCollision/Gimpact/btGImpactShape.h -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/Gimpact/gim_geometry.h: -------------------------------------------------------------------------------- 1 | #ifndef GIM_GEOMETRY_H_INCLUDED 2 | #define GIM_GEOMETRY_H_INCLUDED 3 | 4 | /*! \file gim_geometry.h 5 | \author Francisco Leon Najera 6 | */ 7 | /* 8 | ----------------------------------------------------------------------------- 9 | This source file is part of GIMPACT Library. 10 | 11 | For the latest info, see http://gimpact.sourceforge.net/ 12 | 13 | Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. 14 | email: projectileman@yahoo.com 15 | 16 | This library is free software; you can redistribute it and/or 17 | modify it under the terms of EITHER: 18 | (1) The GNU Lesser General Public License as published by the Free 19 | Software Foundation; either version 2.1 of the License, or (at 20 | your option) any later version. The text of the GNU Lesser 21 | General Public License is included with this library in the 22 | file GIMPACT-LICENSE-LGPL.TXT. 23 | (2) The BSD-style license that is included with this library in 24 | the file GIMPACT-LICENSE-BSD.TXT. 25 | (3) The zlib/libpng license that is included with this library in 26 | the file GIMPACT-LICENSE-ZLIB.TXT. 27 | 28 | This library is distributed in the hope that it will be useful, 29 | but WITHOUT ANY WARRANTY; without even the implied warranty of 30 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files 31 | GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. 32 | 33 | ----------------------------------------------------------------------------- 34 | */ 35 | 36 | ///Additional Headers for Collision 37 | #include "gim_basic_geometry_operations.h" 38 | #include "gim_clip_polygon.h" 39 | #include "gim_box_collision.h" 40 | #include "gim_tri_collision.h" 41 | 42 | #endif // GIM_VECTOR_H_INCLUDED 43 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btConvexCast.h" 17 | 18 | btConvexCast::~btConvexCast() 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | 17 | #ifndef BT_CONVEX_PENETRATION_DEPTH_H 18 | #define BT_CONVEX_PENETRATION_DEPTH_H 19 | 20 | class btVector3; 21 | #include "btSimplexSolverInterface.h" 22 | class btConvexShape; 23 | class btTransform; 24 | 25 | ///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. 26 | class btConvexPenetrationDepthSolver 27 | { 28 | public: 29 | 30 | virtual ~btConvexPenetrationDepthSolver() {}; 31 | virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, 32 | const btConvexShape* convexA,const btConvexShape* convexB, 33 | const btTransform& transA,const btTransform& transB, 34 | btVector3& v, btVector3& pa, btVector3& pb, 35 | class btIDebugDraw* debugDraw) = 0; 36 | 37 | 38 | }; 39 | #endif //BT_CONVEX_PENETRATION_DEPTH_H 40 | 41 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | 17 | 18 | #ifndef BT_GJK_CONVEX_CAST_H 19 | #define BT_GJK_CONVEX_CAST_H 20 | 21 | #include "BulletCollision/CollisionShapes/btCollisionMargin.h" 22 | 23 | #include "LinearMath/btVector3.h" 24 | #include "btConvexCast.h" 25 | class btConvexShape; 26 | class btMinkowskiSumShape; 27 | #include "btSimplexSolverInterface.h" 28 | 29 | ///GjkConvexCast performs a raycast on a convex object using support mapping. 30 | class btGjkConvexCast : public btConvexCast 31 | { 32 | btSimplexSolverInterface* m_simplexSolver; 33 | const btConvexShape* m_convexA; 34 | const btConvexShape* m_convexB; 35 | 36 | public: 37 | 38 | btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver); 39 | 40 | /// cast a convex against another convex object 41 | virtual bool calcTimeOfImpact( 42 | const btTransform& fromA, 43 | const btTransform& toA, 44 | const btTransform& fromB, 45 | const btTransform& toB, 46 | CastResult& result); 47 | 48 | }; 49 | 50 | #endif //BT_GJK_CONVEX_CAST_H 51 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | EPA Copyright (c) Ricardo Padrela 2006 6 | 7 | This software is provided 'as-is', without any express or implied warranty. 8 | In no event will the authors be held liable for any damages arising from the use of this software. 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it freely, 11 | subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 14 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | */ 17 | #ifndef BT_GJP_EPA_PENETRATION_DEPTH_H 18 | #define BT_GJP_EPA_PENETRATION_DEPTH_H 19 | 20 | #include "btConvexPenetrationDepthSolver.h" 21 | 22 | ///EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to 23 | ///calculate the penetration depth between two convex shapes. 24 | class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver 25 | { 26 | public : 27 | 28 | btGjkEpaPenetrationDepthSolver() 29 | { 30 | } 31 | 32 | bool calcPenDepth( btSimplexSolverInterface& simplexSolver, 33 | const btConvexShape* pConvexA, const btConvexShape* pConvexB, 34 | const btTransform& transformA, const btTransform& transformB, 35 | btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB, 36 | class btIDebugDraw* debugDraw); 37 | 38 | private : 39 | 40 | }; 41 | 42 | #endif // BT_GJP_EPA_PENETRATION_DEPTH_H 43 | 44 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H 17 | #define BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H 18 | 19 | #include "btConvexPenetrationDepthSolver.h" 20 | 21 | ///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. 22 | ///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. 23 | class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver 24 | { 25 | protected: 26 | 27 | static btVector3* getPenetrationDirections(); 28 | 29 | public: 30 | 31 | virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, 32 | const btConvexShape* convexA,const btConvexShape* convexB, 33 | const btTransform& transA,const btTransform& transB, 34 | btVector3& v, btVector3& pa, btVector3& pb, 35 | class btIDebugDraw* debugDraw 36 | ); 37 | }; 38 | 39 | #endif //BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H 40 | 41 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletCollision/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletCollision" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/ConstraintSolver/btFixedConstraint.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_FIXED_CONSTRAINT_H 17 | #define BT_FIXED_CONSTRAINT_H 18 | 19 | #include "btTypedConstraint.h" 20 | 21 | ATTRIBUTE_ALIGNED16(class) btFixedConstraint : public btTypedConstraint 22 | { 23 | btVector3 m_pivotInA; 24 | btVector3 m_pivotInB; 25 | btQuaternion m_relTargetAB; 26 | 27 | public: 28 | btFixedConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& frameInA,const btTransform& frameInB); 29 | 30 | virtual ~btFixedConstraint(); 31 | 32 | 33 | virtual void getInfo1 (btConstraintInfo1* info); 34 | 35 | virtual void getInfo2 (btConstraintInfo2* info); 36 | 37 | virtual void setParam(int num, btScalar value, int axis = -1) 38 | { 39 | btAssert(0); 40 | } 41 | virtual btScalar getParam(int num, int axis = -1) const 42 | { 43 | btAssert(0); 44 | return 0.f; 45 | } 46 | 47 | }; 48 | 49 | #endif //BT_FIXED_CONSTRAINT_H 50 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/Dynamics/btActionInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef _BT_ACTION_INTERFACE_H 17 | #define _BT_ACTION_INTERFACE_H 18 | 19 | class btIDebugDraw; 20 | class btCollisionWorld; 21 | 22 | #include "LinearMath/btScalar.h" 23 | #include "btRigidBody.h" 24 | 25 | ///Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWorld 26 | class btActionInterface 27 | { 28 | protected: 29 | 30 | static btRigidBody& getFixedBody(); 31 | 32 | 33 | public: 34 | 35 | virtual ~btActionInterface() 36 | { 37 | } 38 | 39 | virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTimeStep)=0; 40 | 41 | virtual void debugDraw(btIDebugDraw* debugDrawer) = 0; 42 | 43 | }; 44 | 45 | #endif //_BT_ACTION_INTERFACE_H 46 | 47 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H 17 | #define BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H 18 | 19 | #include "btMultiBodyConstraint.h" 20 | struct btSolverInfo; 21 | 22 | class btMultiBodyJointLimitConstraint : public btMultiBodyConstraint 23 | { 24 | protected: 25 | 26 | btScalar m_lowerBound; 27 | btScalar m_upperBound; 28 | public: 29 | 30 | btMultiBodyJointLimitConstraint(btMultiBody* body, int link, btScalar lower, btScalar upper); 31 | virtual ~btMultiBodyJointLimitConstraint(); 32 | 33 | virtual int getIslandIdA() const; 34 | virtual int getIslandIdB() const; 35 | 36 | virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows, 37 | btMultiBodyJacobianData& data, 38 | const btContactSolverInfo& infoGlobal); 39 | 40 | 41 | }; 42 | 43 | #endif //BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H 44 | 45 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/Featherstone/btMultiBodyJointMotor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | ///This file was written by Erwin Coumans 17 | 18 | #ifndef BT_MULTIBODY_JOINT_MOTOR_H 19 | #define BT_MULTIBODY_JOINT_MOTOR_H 20 | 21 | #include "btMultiBodyConstraint.h" 22 | struct btSolverInfo; 23 | 24 | class btMultiBodyJointMotor : public btMultiBodyConstraint 25 | { 26 | protected: 27 | 28 | 29 | btScalar m_desiredVelocity; 30 | 31 | public: 32 | 33 | btMultiBodyJointMotor(btMultiBody* body, int link, btScalar desiredVelocity, btScalar maxMotorImpulse); 34 | virtual ~btMultiBodyJointMotor(); 35 | 36 | virtual int getIslandIdA() const; 37 | virtual int getIslandIdB() const; 38 | 39 | virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows, 40 | btMultiBodyJacobianData& data, 41 | const btContactSolverInfo& infoGlobal); 42 | 43 | 44 | }; 45 | 46 | #endif //BT_MULTIBODY_JOINT_MOTOR_H 47 | 48 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | ///original version written by Erwin Coumans, October 2013 16 | 17 | #ifndef BT_MLCP_SOLVER_INTERFACE_H 18 | #define BT_MLCP_SOLVER_INTERFACE_H 19 | 20 | #include "LinearMath/btMatrixX.h" 21 | 22 | class btMLCPSolverInterface 23 | { 24 | public: 25 | virtual ~btMLCPSolverInterface() 26 | { 27 | } 28 | 29 | //return true is it solves the problem successfully 30 | virtual bool solveMLCP(const btMatrixXu & A, const btVectorXu & b, btVectorXu& x, const btVectorXu & lo,const btVectorXu & hi,const btAlignedObjectArray& limitDependency, int numIterations, bool useSparsity = true)=0; 31 | }; 32 | 33 | #endif //BT_MLCP_SOLVER_INTERFACE_H 34 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/Vehicle/btVehicleRaycaster.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org 3 | * 4 | * Permission to use, copy, modify, distribute and sell this software 5 | * and its documentation for any purpose is hereby granted without fee, 6 | * provided that the above copyright notice appear in all copies. 7 | * Erwin Coumans makes no representations about the suitability 8 | * of this software for any purpose. 9 | * It is provided "as is" without express or implied warranty. 10 | */ 11 | #ifndef BT_VEHICLE_RAYCASTER_H 12 | #define BT_VEHICLE_RAYCASTER_H 13 | 14 | #include "LinearMath/btVector3.h" 15 | 16 | /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting 17 | struct btVehicleRaycaster 18 | { 19 | virtual ~btVehicleRaycaster() 20 | { 21 | } 22 | struct btVehicleRaycasterResult 23 | { 24 | btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){}; 25 | btVector3 m_hitPointInWorld; 26 | btVector3 m_hitNormalInWorld; 27 | btScalar m_distFraction; 28 | }; 29 | 30 | virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) = 0; 31 | 32 | }; 33 | 34 | #endif //BT_VEHICLE_RAYCASTER_H 35 | 36 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/Vehicle/btWheelInfo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ 3 | * 4 | * Permission to use, copy, modify, distribute and sell this software 5 | * and its documentation for any purpose is hereby granted without fee, 6 | * provided that the above copyright notice appear in all copies. 7 | * Erwin Coumans makes no representations about the suitability 8 | * of this software for any purpose. 9 | * It is provided "as is" without express or implied warranty. 10 | */ 11 | #include "btWheelInfo.h" 12 | #include "BulletDynamics/Dynamics/btRigidBody.h" // for pointvelocity 13 | 14 | 15 | btScalar btWheelInfo::getSuspensionRestLength() const 16 | { 17 | 18 | return m_suspensionRestLength1; 19 | 20 | } 21 | 22 | void btWheelInfo::updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo) 23 | { 24 | (void)raycastInfo; 25 | 26 | 27 | if (m_raycastInfo.m_isInContact) 28 | 29 | { 30 | btScalar project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS ); 31 | btVector3 chassis_velocity_at_contactPoint; 32 | btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition(); 33 | chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos ); 34 | btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint ); 35 | if ( project >= btScalar(-0.1)) 36 | { 37 | m_suspensionRelativeVelocity = btScalar(0.0); 38 | m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1); 39 | } 40 | else 41 | { 42 | btScalar inv = btScalar(-1.) / project; 43 | m_suspensionRelativeVelocity = projVel * inv; 44 | m_clippedInvContactDotSuspension = inv; 45 | } 46 | 47 | } 48 | 49 | else // Not in contact : position wheel in a nice (rest length) position 50 | { 51 | m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength(); 52 | m_suspensionRelativeVelocity = btScalar(0.0); 53 | m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS; 54 | m_clippedInvContactDotSuspension = btScalar(1.0); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletDynamics/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletDynamics" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletSoftBody/btSoftBody.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/include/BulletSoftBody/btSoftBody.cpp -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/BulletSoftBody/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletSoftBody" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath ) 2 | 3 | IF(BUILD_MULTITHREADING) 4 | SUBDIRS(MiniCL BulletMultiThreaded) 5 | ENDIF() 6 | 7 | IF(INSTALL_LIBS) 8 | #INSTALL of other files requires CMake 2.6 9 | IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 10 | IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 11 | # Don't actually need to install any common files, the frameworks include everything 12 | ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 13 | INSTALL(FILES btBulletCollisionCommon.h btBulletDynamicsCommon.h Bullet-C-Api.h DESTINATION ${INCLUDE_INSTALL_DIR}) 14 | INSTALL(FILES vectormath/vmInclude.h DESTINATION ${INCLUDE_INSTALL_DIR}/vectormath) 15 | INSTALL(FILES vectormath/scalar/boolInVec.h 16 | vectormath/scalar/floatInVec.h 17 | vectormath/scalar/mat_aos.h 18 | vectormath/scalar/quat_aos.h 19 | vectormath/scalar/vec_aos.h 20 | vectormath/scalar/vectormath_aos.h 21 | DESTINATION ${INCLUDE_INSTALL_DIR}/vectormath/scalar) 22 | INSTALL(FILES vectormath/sse/boolInVec.h 23 | vectormath/sse/floatInVec.h 24 | vectormath/sse/mat_aos.h 25 | vectormath/sse/quat_aos.h 26 | vectormath/sse/vec_aos.h 27 | vectormath/sse/vecidx_aos.h 28 | vectormath/sse/vectormath_aos.h 29 | DESTINATION ${INCLUDE_INSTALL_DIR}/vectormath/sse) 30 | ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 31 | ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 32 | ENDIF(INSTALL_LIBS) 33 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/LinearMath/btDefaultMotionState.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_DEFAULT_MOTION_STATE_H 2 | #define BT_DEFAULT_MOTION_STATE_H 3 | 4 | #include "btMotionState.h" 5 | 6 | ///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets. 7 | ATTRIBUTE_ALIGNED16(struct) btDefaultMotionState : public btMotionState 8 | { 9 | btTransform m_graphicsWorldTrans; 10 | btTransform m_centerOfMassOffset; 11 | btTransform m_startWorldTrans; 12 | void* m_userPointer; 13 | 14 | BT_DECLARE_ALIGNED_ALLOCATOR(); 15 | 16 | btDefaultMotionState(const btTransform& startTrans = btTransform::getIdentity(),const btTransform& centerOfMassOffset = btTransform::getIdentity()) 17 | : m_graphicsWorldTrans(startTrans), 18 | m_centerOfMassOffset(centerOfMassOffset), 19 | m_startWorldTrans(startTrans), 20 | m_userPointer(0) 21 | 22 | { 23 | } 24 | 25 | ///synchronizes world transform from user to physics 26 | virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const 27 | { 28 | centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ; 29 | } 30 | 31 | ///synchronizes world transform from physics to user 32 | ///Bullet only calls the update of worldtransform for active objects 33 | virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans) 34 | { 35 | m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset ; 36 | } 37 | 38 | 39 | 40 | }; 41 | 42 | #endif //BT_DEFAULT_MOTION_STATE_H 43 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/LinearMath/btGeometryUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | 15 | 16 | #ifndef BT_GEOMETRY_UTIL_H 17 | #define BT_GEOMETRY_UTIL_H 18 | 19 | #include "btVector3.h" 20 | #include "btAlignedObjectArray.h" 21 | 22 | ///The btGeometryUtil helper class provides a few methods to convert between plane equations and vertices. 23 | class btGeometryUtil 24 | { 25 | public: 26 | 27 | 28 | static void getPlaneEquationsFromVertices(btAlignedObjectArray& vertices, btAlignedObjectArray& planeEquationsOut ); 29 | 30 | static void getVerticesFromPlaneEquations(const btAlignedObjectArray& planeEquations , btAlignedObjectArray& verticesOut ); 31 | 32 | static bool isInside(const btAlignedObjectArray& vertices, const btVector3& planeNormal, btScalar margin); 33 | 34 | static bool isPointInsidePlanes(const btAlignedObjectArray& planeEquations, const btVector3& point, btScalar margin); 35 | 36 | static bool areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray& vertices, btScalar margin); 37 | 38 | }; 39 | 40 | 41 | #endif //BT_GEOMETRY_UTIL_H 42 | 43 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/LinearMath/btMinMax.h: -------------------------------------------------------------------------------- 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_MINMAX_H 18 | #define BT_GEN_MINMAX_H 19 | 20 | #include "btScalar.h" 21 | 22 | template 23 | SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) 24 | { 25 | return a < b ? a : b ; 26 | } 27 | 28 | template 29 | SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b) 30 | { 31 | return a > b ? a : b; 32 | } 33 | 34 | template 35 | SIMD_FORCE_INLINE const T& btClamped(const T& a, const T& lb, const T& ub) 36 | { 37 | return a < lb ? lb : (ub < a ? ub : a); 38 | } 39 | 40 | template 41 | SIMD_FORCE_INLINE void btSetMin(T& a, const T& b) 42 | { 43 | if (b < a) 44 | { 45 | a = b; 46 | } 47 | } 48 | 49 | template 50 | SIMD_FORCE_INLINE void btSetMax(T& a, const T& b) 51 | { 52 | if (a < b) 53 | { 54 | a = b; 55 | } 56 | } 57 | 58 | template 59 | SIMD_FORCE_INLINE void btClamp(T& a, const T& lb, const T& ub) 60 | { 61 | if (a < lb) 62 | { 63 | a = lb; 64 | } 65 | else if (ub < a) 66 | { 67 | a = ub; 68 | } 69 | } 70 | 71 | #endif //BT_GEN_MINMAX_H 72 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/LinearMath/btMotionState.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MOTIONSTATE_H 17 | #define BT_MOTIONSTATE_H 18 | 19 | #include "btTransform.h" 20 | 21 | ///The btMotionState interface class allows the dynamics world to synchronize and interpolate the updated world transforms with graphics 22 | ///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation) 23 | class btMotionState 24 | { 25 | public: 26 | 27 | virtual ~btMotionState() 28 | { 29 | 30 | } 31 | 32 | virtual void getWorldTransform(btTransform& worldTrans ) const =0; 33 | 34 | //Bullet only calls the update of worldtransform for active objects 35 | virtual void setWorldTransform(const btTransform& worldTrans)=0; 36 | 37 | 38 | }; 39 | 40 | #endif //BT_MOTIONSTATE_H 41 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/LinearMath/btRandom.h: -------------------------------------------------------------------------------- 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 23 | #include 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 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 | 43 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/LinearMath/premake4.lua: -------------------------------------------------------------------------------- 1 | project "LinearMath" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /libs/bullet2.8.2/include/vectormath/vmInclude.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __VM_INCLUDE_H 3 | #define __VM_INCLUDE_H 4 | 5 | #include "LinearMath/btScalar.h" 6 | 7 | #if defined (USE_SYSTEM_VECTORMATH) || defined (__CELLOS_LV2__) 8 | #include 9 | #else //(USE_SYSTEM_VECTORMATH) 10 | #if defined (BT_USE_SSE) 11 | #include "sse/vectormath_aos.h" 12 | #else //all other platforms 13 | #if defined (BT_USE_NEON) 14 | #include "neon/vectormath_aos.h" 15 | #else 16 | #include "scalar/vectormath_aos.h" 17 | #endif 18 | #endif //(BT_USE_SSE) && defined (_WIN32) 19 | #endif //(USE_SYSTEM_VECTORMATH) 20 | 21 | 22 | 23 | typedef Vectormath::Aos::Vector3 vmVector3; 24 | typedef Vectormath::Aos::Quat vmQuat; 25 | typedef Vectormath::Aos::Matrix3 vmMatrix3; 26 | typedef Vectormath::Aos::Transform3 vmTransform3; 27 | typedef Vectormath::Aos::Point3 vmPoint3; 28 | 29 | #endif //__VM_INCLUDE_H 30 | 31 | 32 | -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/arm7/libBulletCollision.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/arm7/libBulletCollision.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/arm7/libBulletDynamics.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/arm7/libBulletDynamics.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/arm7/libBulletSoftBody.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/arm7/libBulletSoftBody.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/arm7/libLinearMath.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/arm7/libLinearMath.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/i386/libBulletCollision.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/i386/libBulletCollision.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/i386/libBulletDynamics.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/i386/libBulletDynamics.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/i386/libBulletSoftBody.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/i386/libBulletSoftBody.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/ios/i386/libLinearMath.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/ios/i386/libLinearMath.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/fat/libBulletCollision.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/fat/libBulletCollision.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/fat/libBulletDynamics.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/fat/libBulletDynamics.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/fat/libBulletSoftBody.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/fat/libBulletSoftBody.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/fat/libLinearMath.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/fat/libLinearMath.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/i386/libBulletCollision.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/i386/libBulletCollision.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/i386/libBulletDynamics.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/i386/libBulletDynamics.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/i386/libBulletSoftBody.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/i386/libBulletSoftBody.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/i386/libLinearMath.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/i386/libLinearMath.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/x86_64/libBulletCollision.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/x86_64/libBulletCollision.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/x86_64/libBulletDynamics.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/x86_64/libBulletDynamics.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/x86_64/libBulletSoftBody.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/x86_64/libBulletSoftBody.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/osx/x86_64/libLinearMath.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/osx/x86_64/libLinearMath.a -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletCollision.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletCollision.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletCollisiond.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletCollisiond.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletCollisiond.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletCollisiond.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletDynamics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletDynamics.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletDynamicsd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletDynamicsd.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletDynamicsd.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletDynamicsd.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletSoftBody.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletSoftBody.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletSoftBodyd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletSoftBodyd.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/BulletSoftBodyd.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/BulletSoftBodyd.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/LinearMath.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/LinearMath.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/LinearMathd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/LinearMathd.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs/LinearMathd.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs/LinearMathd.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletCollision.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletCollision.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletCollisiond.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletCollisiond.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletCollisiond.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletCollisiond.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletDynamics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletDynamics.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletDynamicsd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletDynamicsd.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletDynamicsd.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletDynamicsd.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletSoftBody.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletSoftBody.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletSoftBodyd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletSoftBodyd.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/BulletSoftBodyd.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/BulletSoftBodyd.pdb -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/LinearMath.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/LinearMath.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/LinearMathd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/LinearMathd.lib -------------------------------------------------------------------------------- /libs/bullet2.8.2/lib/win/vs64/LinearMathd.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/libs/bullet2.8.2/lib/win/vs64/LinearMathd.pdb -------------------------------------------------------------------------------- /ofxaddons_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickHardeman/ofxBullet/8b75a2dcf807c7bf0df677858371bc7e0a8c2340/ofxaddons_thumbnail.png -------------------------------------------------------------------------------- /src/events/ofxBulletCollisionData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CollisionData.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/25/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofMain.h" 12 | #include "ofxBulletUserData.h" 13 | 14 | class ofxBulletCollisionData { 15 | public: 16 | int numContactPoints; 17 | ofxBulletUserData* userData1; 18 | vector worldContactPoints1; 19 | const btRigidBody* body1; 20 | 21 | ofxBulletUserData* userData2; 22 | vector worldContactPoints2; 23 | vector normalsOnShape2; 24 | const btRigidBody* body2; 25 | }; 26 | -------------------------------------------------------------------------------- /src/events/ofxBulletMousePickEvent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletMousePickEvent.h 3 | * ofxBullet_v7_joints 4 | * 5 | * Created by Nick Hardeman on 7/6/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofMain.h" 12 | #include "ofxBulletRaycastData.h" 13 | 14 | class ofxBulletMousePickEvent : public ofxBulletRaycastData { 15 | public: 16 | ofxBulletMousePickEvent() {} 17 | ~ofxBulletMousePickEvent() {} 18 | 19 | void setRaycastData( ofxBulletRaycastData& a_raycastdata ) { 20 | bHasHit = a_raycastdata.bHasHit; 21 | body = a_raycastdata.body; 22 | userData = a_raycastdata.userData; 23 | rayWorldPos = a_raycastdata.rayWorldPos; 24 | rayScreenPos = a_raycastdata.rayScreenPos; 25 | pickPosWorld = a_raycastdata.pickPosWorld; 26 | localPivotPos = a_raycastdata.localPivotPos; 27 | } 28 | }; -------------------------------------------------------------------------------- /src/events/ofxBulletRaycastData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletRaycastData.h 3 | * ofxBullet Events Example 4 | * 5 | * Created by Nick Hardeman on 7/12/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofMain.h" 12 | 13 | class ofxBulletRaycastData { 14 | public: 15 | ofxBulletRaycastData() { 16 | body = NULL; 17 | userData = NULL; 18 | bHasHit = false; 19 | } 20 | ~ofxBulletRaycastData() {}; 21 | 22 | bool bHasHit; 23 | // body that it hit // 24 | btRigidBody* body; 25 | ofxBulletUserData* userData; 26 | // location in the bullet world // 27 | glm::vec3 rayWorldPos; 28 | // location of the mouse on the screen, z will always be 0 // 29 | glm::vec3 rayScreenPos; 30 | // location of the pick position in the world coords // 31 | glm::vec3 pickPosWorld; 32 | // local point in rigid body coords // 33 | glm::vec3 localPivotPos; 34 | }; 35 | -------------------------------------------------------------------------------- /src/joints/ofxBulletJoint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletJoint.h 3 | * ofxBullet_v7_joints 4 | * 5 | * Created by Nick Hardeman on 7/6/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | #include "ofMain.h" 11 | #include "btBulletDynamicsCommon.h" 12 | #include "ofxBulletConstants.h" 13 | #include "ofxBulletUtils.h" 14 | #include "ofxBulletRigidBody.h" 15 | 16 | // creates a btGeneric6DofConstraint joint, free rotation, no constraints // 17 | class ofxBulletJoint { 18 | public: 19 | ofxBulletJoint(); 20 | ~ofxBulletJoint(); 21 | 22 | void create( btDiscreteDynamicsWorld* a_world, ofxBulletRigidBody* a_shape1, ofxBulletRigidBody* a_shape2 ); 23 | void create( btDiscreteDynamicsWorld* a_world, ofxBulletRigidBody* a_shape, glm::vec3 a_pos ); 24 | 25 | /******************************/ 26 | // call before calling add() // 27 | void setLinearLowerLimit( glm::vec3 a_limit ); 28 | void setLinearLowerLimit( float a_x, float a_y, float a_z ); 29 | void setLinearUpperLimit( glm::vec3 a_limit ); 30 | void setLinearUpperLimit( float a_x, float a_y, float a_z ); 31 | void setAngularLowerLimit( glm::vec3 a_limit ); 32 | void setAngularLowerLimit( float a_x, float a_y, float a_z ); 33 | void setAngularUpperLimit( glm::vec3 a_limit ); 34 | void setAngularUpperLimit( float a_x, float a_y, float a_z ); 35 | /******************************/ 36 | 37 | void add(); 38 | 39 | glm::vec3 getPivotAWorldPos(); 40 | glm::vec3 getPivotBWorldPos(); 41 | 42 | btRigidBody* getRigidBodyA() const; 43 | btRigidBody* getRigidBodyB() const; 44 | glm::vec3 getPositionA() const; 45 | glm::vec3 getPositionB() const; 46 | 47 | void updatePivotPos( const glm::vec3 a_pos, float a_length ); 48 | 49 | void draw(); 50 | void drawJointConstraints(); 51 | 52 | void remove(); 53 | 54 | protected: 55 | void _setDefaults(); 56 | 57 | private: 58 | btDiscreteDynamicsWorld* _world; 59 | btGeneric6DofConstraint* _joint; 60 | glm::vec3 _targetPos; 61 | // is there two bodies the joint is connecting? if not, what is the target pos // 62 | bool _bTwoBodies; 63 | bool _bCreated; 64 | bool _bAdded; 65 | }; 66 | 67 | -------------------------------------------------------------------------------- /src/ofxBullet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBullet.h 3 | * ofxBullet_v5_sphere_texture 4 | * 5 | * Created by Nick Hardeman on 6/3/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletWorldRigid.h" 12 | #include "ofxBulletWorldSoft.h" 13 | #include "ofxBulletConstants.h" 14 | #include "ofxBulletUtils.h" 15 | #include "ofxBulletUserData.h" 16 | 17 | // shapes // 18 | #include "ofxBulletSphere.h" 19 | #include "ofxBulletCylinder.h" 20 | #include "ofxBulletBox.h" 21 | #include "ofxBulletBaseShape.h" 22 | #include "ofxBulletCone.h" 23 | #include "ofxBulletCapsule.h" 24 | #include "ofxBulletCustomShape.h" 25 | #include "ofxBulletConvexShape.h" 26 | #include "ofxBulletStaticPlane.h" 27 | #include "ofxBulletTriMeshShape.h" 28 | 29 | #include "ofxBulletEllipsoid.h" 30 | #include "ofxBulletPatch.h" 31 | #include "ofxBulletRope.h" 32 | #include "ofxBulletSoftTriMesh.h" 33 | 34 | // dynamics // 35 | #include "ofxBulletJoint.h" 36 | 37 | // event data // 38 | #include "ofxBulletMousePickEvent.h" 39 | #include "ofxBulletCollisionData.h" 40 | 41 | -------------------------------------------------------------------------------- /src/ofxBulletConstants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletConstants.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/24/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | // render modes // 12 | #define OFX_BT_RENDER_QUADS 0 13 | #define OFX_BT_RENDER_TRIS 1 14 | 15 | // Activation States // 16 | #define OFX_BT_ACTIVATION_STATE_ACTIVE 1 17 | #define OFX_BT_ACTIVATION_STATE_ISLAND_SLEEPING 2 18 | #define OFX_BT_ACTIVATION_STATE_WANTS_DEACTIVATION 3 19 | #define OFX_BT_ACTIVATION_STATE_DISABLE_DEACTIVATION 4 20 | #define OFX_BT_ACTIVATION_STATE_DISABLE_SIMULATION 5 21 | 22 | -------------------------------------------------------------------------------- /src/ofxBulletUserData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletUserData.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/26/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | // extend this class if you wish to pass in custom data for the user data on the rigid body // 12 | class ofxBulletUserData { 13 | public: 14 | ofxBulletUserData() { } 15 | ~ofxBulletUserData() { } 16 | }; -------------------------------------------------------------------------------- /src/ofxBulletWorldSoft.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletWorldSoft.cpp 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2014-11-12. 6 | // 7 | // 8 | 9 | #include "ofxBulletWorldSoft.h" 10 | 11 | //-------------------------------------------------------------- 12 | void ofxBulletWorldSoft::setup() { 13 | ofxBulletWorldRigid::setup(); 14 | 15 | softBodyWorldInfo.air_density = 1.2; 16 | softBodyWorldInfo.water_density = 0; 17 | softBodyWorldInfo.water_offset = 0; 18 | softBodyWorldInfo.water_normal = btVector3(0,0,0); 19 | 20 | softBodyWorldInfo.m_dispatcher = dispatcher; 21 | softBodyWorldInfo.m_broadphase = broadphase; 22 | softBodyWorldInfo.m_sparsesdf.Initialize(); 23 | 24 | setGravity( getGravity() ); 25 | } 26 | 27 | //-------------------------------------------------------------- 28 | btCollisionConfiguration* ofxBulletWorldSoft::createCollisionConfig() { 29 | return new btSoftBodyRigidBodyCollisionConfiguration(); 30 | } 31 | 32 | //-------------------------------------------------------------- 33 | btDiscreteDynamicsWorld* ofxBulletWorldSoft::createWorld() { 34 | return new btSoftRigidDynamicsWorld(dispatcher, broadphase, solver, collisionConfig); 35 | } 36 | 37 | //-------------------------------------------------------------- 38 | btSoftRigidDynamicsWorld* ofxBulletWorldSoft::getWorld() { 39 | return (btSoftRigidDynamicsWorld*)world; 40 | } 41 | 42 | //-------------------------------------------------------------- 43 | btSoftBodyWorldInfo& ofxBulletWorldSoft::getInfo() { 44 | return softBodyWorldInfo; 45 | } 46 | 47 | //-------------------------------------------------------------- 48 | void ofxBulletWorldSoft::setGravity( glm::vec3 a_g ) { 49 | ofxBulletWorldRigid::setGravity( a_g ); 50 | softBodyWorldInfo.m_gravity = world->getGravity(); 51 | } 52 | -------------------------------------------------------------------------------- /src/ofxBulletWorldSoft.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletWorldSoft.h 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2014-11-12. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofMain.h" 12 | #include "ofxBulletWorldRigid.h" 13 | #include "BulletSoftBody/btSoftBody.h" 14 | #include "BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h" 15 | #include "BulletSoftBody/btSoftRigidDynamicsWorld.h" 16 | 17 | class ofxBulletWorldSoft : public ofxBulletWorldRigid { 18 | public: 19 | virtual void setup(); 20 | virtual void setGravity( glm::vec3 a_g ); 21 | 22 | btSoftRigidDynamicsWorld* getWorld(); 23 | btSoftBodyWorldInfo& getInfo(); 24 | 25 | protected: 26 | virtual btCollisionConfiguration* createCollisionConfig(); 27 | virtual btDiscreteDynamicsWorld* createWorld(); 28 | 29 | btSoftBodyWorldInfo softBodyWorldInfo; 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /src/render/GLDebugDrawer.h: -------------------------------------------------------------------------------- 1 | #ifndef GL_DEBUG_DRAWER_H 2 | #define GL_DEBUG_DRAWER_H 3 | 4 | #include "LinearMath/btIDebugDraw.h" 5 | #include "ofMain.h" 6 | 7 | 8 | class GLDebugDrawer : public btIDebugDraw 9 | { 10 | int m_debugMode; 11 | 12 | public: 13 | 14 | GLDebugDrawer(); 15 | 16 | 17 | virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& fromColor, const btVector3& toColor); 18 | 19 | virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color); 20 | 21 | virtual void drawSphere (const btVector3& p, btScalar radius, const btVector3& color); 22 | virtual void drawBox (const btVector3& boxMin, const btVector3& boxMax, const btVector3& color, btScalar alpha); 23 | 24 | virtual void drawTriangle(const btVector3& a,const btVector3& b,const btVector3& c,const btVector3& color,btScalar alpha); 25 | 26 | virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color); 27 | 28 | virtual void reportErrorWarning(const char* warningString); 29 | 30 | virtual void draw3dText(const btVector3& location,const char* textString); 31 | 32 | virtual void setDebugMode(int debugMode); 33 | 34 | virtual int getDebugMode() const { return m_debugMode;} 35 | 36 | }; 37 | 38 | #endif//GL_DEBUG_DRAWER_H 39 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletBox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletBox.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/23/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | 13 | class ofxBulletBox : public ofxBulletRigidBody { 14 | public: 15 | ofxBulletBox(); 16 | ~ofxBulletBox(); 17 | 18 | void init( float a_sizeX, float a_sizeY, float a_sizeZ ); 19 | void init( btBoxShape* a_colShape ); 20 | 21 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), float a_mass=1.f, float a_sizeX=5.f, float a_sizeY=5.f, float a_sizeZ=5.f ); 22 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc, glm::quat a_rot, float a_mass=1.f, float a_sizeX=5.f, float a_sizeY=5.f, float a_sizeZ=5.f ); 23 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass=1.f, float a_sizeX=5.f, float a_sizeY=5.f, float a_sizeZ=5.f ); 24 | 25 | void removeShape(); 26 | 27 | void draw(); 28 | 29 | // GETTERS // 30 | glm::vec3 getSize() const; 31 | float getWidth() const; 32 | float getHeight() const; 33 | float getDepth() const; 34 | bool isInside(const glm::vec3& a_pt, float tolerance=0.1f); 35 | 36 | protected: 37 | 38 | private: 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletCapsule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletCapsule.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/27/11. 6 | * 7 | */ 8 | 9 | 10 | #pragma once 11 | 12 | #include "ofxBulletRigidBody.h" 13 | #include "btShapeHull.h" 14 | 15 | class ofxBulletCapsule : public ofxBulletRigidBody { 16 | public: 17 | ofxBulletCapsule(); 18 | ~ofxBulletCapsule(); 19 | 20 | void init(float a_radius, float a_height); 21 | void init( btCapsuleShape* a_colShape ); 22 | 23 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), float a_mass=1.f, float a_radius=1.f, float a_height=10.f ); 24 | // angles of Quaternion should be in Radians // 25 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), glm::quat a_rot=glm::quat(0, 1, 0, 1), 26 | float a_mass=1.f, float a_radius=1.f, float a_height=10.f ); 27 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass=1.f, float a_radius=1.f, float a_height=10.f ); 28 | 29 | void removeShape(); 30 | 31 | void draw(); 32 | 33 | float getRadius(); 34 | float getHeight(); 35 | 36 | protected: 37 | btShapeHull* hull; 38 | ofMesh _cachedMesh; 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletCone.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletCone.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/24/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | #include "ofMain.h" 13 | #include "ofVbo.h" 14 | 15 | class ofxBulletCone : public ofxBulletRigidBody { 16 | public: 17 | ofxBulletCone(); 18 | ~ofxBulletCone(); 19 | 20 | void init(float a_radius, float a_height); 21 | void init( btConeShape* a_colShape ); 22 | 23 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), float a_mass=1.f, float a_radius=1.f, float a_height=2.f ); 24 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc, glm::quat a_rot, float a_mass=1.f, float a_radius=1.f, float a_height=2.f ); 25 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass=1.f, float a_radius=1.f, float a_height=2.f ); 26 | 27 | void removeShape(); 28 | 29 | // GETTERS // 30 | float getHeight(); 31 | float getRadius(); 32 | int getUpIndex(); 33 | 34 | void draw(); 35 | protected: 36 | 37 | private: 38 | 39 | }; 40 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletConvexShape.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletConvexShape.h 3 | // emptyExample 4 | // 5 | // Created by Nick Hardeman on 3/7/13. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | 13 | class ofxBulletConvexShape : public ofxBulletRigidBody { 14 | public: 15 | ofxBulletConvexShape(); 16 | ~ofxBulletConvexShape(); 17 | 18 | void init( ofMesh& aMesh, glm::vec3 a_localScaling=glm::vec3(1,1,1), bool a_bUseConvexHull=false ); 19 | void init( btConvexHullShape* a_colShape, glm::vec3 a_centroid ); 20 | 21 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc, float a_mass ); 22 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc, glm::quat a_rot, float a_mass ); 23 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass ); 24 | 25 | void removeShape(); 26 | 27 | glm::vec3 getCentroid() const; 28 | 29 | void transformGL(); 30 | 31 | // GETTERS // 32 | bool isInside(const glm::vec3& a_pt, float tolerance=0.1f); 33 | ofMesh& getMesh() { return _cachedMesh; } 34 | 35 | private: 36 | glm::vec3 _centroid = glm::vec3(0,0,0); 37 | ofMesh _cachedMesh; 38 | }; 39 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletCustomShape.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletCustomShape.h 3 | * ofxBullet Events Example 4 | * 5 | * Created by Nick Hardeman on 7/12/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | #include "btShapeHull.h" 13 | 14 | class ofxBulletCustomShape : public ofxBulletRigidBody { 15 | public: 16 | ofxBulletCustomShape(); 17 | ~ofxBulletCustomShape(); 18 | 19 | void init( btCompoundShape* a_colShape, glm::vec3 a_centroid ); 20 | 21 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), float a_mass=1.f ); 22 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc, glm::quat a_rot, float a_mass=1.f ); 23 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass=1.f ); 24 | 25 | void removeShape(); 26 | 27 | bool addShape( btCollisionShape* a_colShape, glm::vec3 a_localCentroidPos ); 28 | bool addMesh(ofMesh a_mesh, glm::vec3 a_localScaling, bool a_bUseConvexHull); 29 | void add(); 30 | 31 | glm::vec3 getCentroid(); 32 | int getNumChildShapes(); 33 | 34 | void draw(); 35 | void transformGL(); 36 | 37 | protected: 38 | btTransform _startTrans; 39 | glm::vec3 _centroid; 40 | vector centroids; 41 | vector shapes; 42 | }; 43 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletCylinder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletCylinder.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/23/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | #include "ofVbo.h" 13 | 14 | class ofxBulletCylinder : public ofxBulletRigidBody { 15 | public: 16 | ofxBulletCylinder(); 17 | ~ofxBulletCylinder(); 18 | void init(float a_radius, float a_height); 19 | void init( btCylinderShape* a_colShape ); 20 | 21 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), float a_mass=1.f, float a_radius=1.f, float a_height=10.f ); 22 | // angles of Quaternion should be in Radians // 23 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), glm::quat a_rot=glm::quat(0, 1, 0, 1), 24 | float a_mass=1.f, float a_radius=1.f, float a_height=10.f ); 25 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass=1.f, float a_radius=1.f, float a_height=10.f ); 26 | 27 | void removeShape(); 28 | 29 | // GETTERS // 30 | float getRadius(); 31 | float getHeight(); 32 | 33 | void draw(); 34 | //void destroy(); 35 | 36 | protected: 37 | 38 | 39 | private: 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletEllipsoid.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletEllipsoid.cpp 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2015-03-23. 6 | // 7 | // 8 | 9 | #include "ofxBulletEllipsoid.h" 10 | #include "BulletSoftBody/btSoftBodyHelpers.h" 11 | 12 | //-------------------------------------------------------------- 13 | ofxBulletEllipsoid::ofxBulletEllipsoid() : ofxBulletSoftBody() { 14 | _type = OFX_BULLET_SOFT_ELLIPSOID; 15 | _cachedMesh.setMode(OF_PRIMITIVE_TRIANGLES); 16 | } 17 | 18 | //-------------------------------------------------------------- 19 | void ofxBulletEllipsoid::create(ofxBulletWorldSoft* a_world, const glm::vec3& a_center, const glm::vec3& a_radius, int a_res) { 20 | if(a_world == NULL) { 21 | ofLogError("ofxBulletEllipsoid") << "create(): a_world param is NULL"; 22 | return; 23 | } 24 | 25 | _radius = a_radius; 26 | _world = a_world; 27 | 28 | _softBody = btSoftBodyHelpers::CreateEllipsoid(_world->getInfo(), btVector3(a_center.x, a_center.y, a_center.z), btVector3(a_radius.x, a_radius.y, a_radius.z), a_res); 29 | setCreated(_softBody); 30 | 31 | 32 | createInternalUserData(); 33 | } 34 | 35 | //-------------------------------------------------------------- 36 | void ofxBulletEllipsoid::draw() { 37 | if(!checkCreate()) { 38 | ofLogWarning("ofxBulletEllipsoid") << "draw() : must call create() first and add() after"; 39 | return; 40 | } 41 | transformGL(); 42 | getMesh().draw(); 43 | restoreTransformGL(); 44 | } 45 | 46 | //-------------------------------------------------------------- 47 | glm::vec3 ofxBulletEllipsoid::getRadius() { 48 | return _radius; 49 | } 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletEllipsoid.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletEllipsoid.h 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2015-03-23. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletSoftBody.h" 12 | 13 | class ofxBulletEllipsoid : public ofxBulletSoftBody { 14 | public: 15 | ofxBulletEllipsoid(); 16 | 17 | void create(ofxBulletWorldSoft* a_world, const glm::vec3& center, const glm::vec3& radius, int res = 10); 18 | 19 | void draw(); 20 | 21 | glm::vec3 getRadius(); 22 | int getResolution(); 23 | 24 | protected: 25 | glm::vec3 _radius; 26 | }; 27 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletPatch.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletPatch.h 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2015-03-23. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletSoftBody.h" 12 | 13 | class ofxBulletPatch : public ofxBulletSoftBody { 14 | public: 15 | ofxBulletPatch(); 16 | 17 | void create(ofxBulletWorldSoft* a_world, const glm::vec3& a_p0, const glm::vec3& a_p1, const glm::vec3& a_p2, const glm::vec3& a_p3, int a_resx = 10, int a_resy = 10); 18 | 19 | void draw(); 20 | 21 | int getResolutionX(); 22 | int getResolutionY(); 23 | 24 | void updateMesh( ofMesh& aMesh ); 25 | void updateMeshTexCoords( ofMesh& aMesh ); 26 | 27 | protected: 28 | int _resx, _resy; 29 | }; 30 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletRigidBody.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletRigidBody.h 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2014-11-12. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofMain.h" 12 | #include "ofxBulletBaseShape.h" 13 | 14 | class ofxBulletRigidBody : public ofxBulletBaseShape { 15 | public: 16 | ofxBulletRigidBody(); 17 | ~ofxBulletRigidBody(); 18 | 19 | virtual void create( btDiscreteDynamicsWorld* a_world, btCollisionShape* a_colShape, btTransform &a_bt_tr, float a_mass ); 20 | virtual void add(); 21 | virtual void add( short group, short mask ); 22 | virtual void remove(); 23 | virtual void removeShape(); 24 | virtual void removeRigidBody(); 25 | 26 | // GETTERS // 27 | btRigidBody* getRigidBody(); 28 | btCollisionShape* getCollisionShape() const; 29 | 30 | bool isCollisionShapeInternal(); 31 | 32 | float getMass() const; 33 | 34 | void getOpenGLMatrix( btScalar* a_m ); 35 | 36 | float getDamping() const; 37 | float getAngularDamping() const; 38 | 39 | // SETTERS, must be called after create() // 40 | void setDamping( float a_linear_damp ); 41 | void setAngularDamping( float a_angular_damp ); 42 | void setDamping( float a_linear_damp, float a_angular_damp ); 43 | 44 | // FORCES // 45 | void applyForce( const glm::vec3& a_frc, const glm::vec3& a_rel_pos ); 46 | void applyForce( const btVector3& a_frc, const btVector3& a_rel_pos ); 47 | 48 | void applyCentralForce( const glm::vec3& a_frc ); 49 | void applyCentralForce( float a_x, float a_y, float a_z ); 50 | void applyCentralForce( const btVector3& a_frc ); 51 | 52 | void applyTorque( const glm::vec3& a_torque ); 53 | void applyTorque( float a_x, float a_y, float a_z ); 54 | void applyTorque( const btVector3& a_torque ); 55 | 56 | virtual void transformGL(); 57 | 58 | protected: 59 | btDiscreteDynamicsWorld* _world; 60 | btCollisionShape* _shape; 61 | btRigidBody* _rigidBody; 62 | float _mass; 63 | 64 | // if the collision shape was created internally, then, we must delete it // 65 | bool _bColShapeCreatedInternally; 66 | }; 67 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletRope.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletRope.h 3 | // ofxBullet 4 | // 5 | // Created by Elias Zananiri on 2014-12-02. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletSoftBody.h" 12 | 13 | class ofxBulletRope : public ofxBulletSoftBody { 14 | public: 15 | ofxBulletRope(); 16 | 17 | void create(ofxBulletWorldSoft* a_world, const glm::vec3& a_from, const glm::vec3& a_to, int a_res = 10); 18 | 19 | void draw(); 20 | 21 | void appendNode(); 22 | 23 | glm::vec3 getPoint(float pct); 24 | 25 | float getLinkLength() const; 26 | 27 | void updateMesh( ofMesh& aMesh ); 28 | 29 | protected: 30 | float _linkLength; 31 | }; 32 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletSoftTriMesh.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletSoftTriMesh.h 3 | // ofxBulletSoftBodyMeshExample 4 | // 5 | // Created by Nick Hardeman on 7/5/15. 6 | // 7 | 8 | #pragma once 9 | 10 | #include "ofxBulletSoftBody.h" 11 | 12 | class ofxBulletSoftTriMesh : public ofxBulletSoftBody { 13 | public: 14 | ofxBulletSoftTriMesh(); 15 | 16 | void create( ofxBulletWorldSoft* a_world, ofMesh& aMesh, glm::vec3 a_loc, float a_mass ); 17 | void create( ofxBulletWorldSoft* a_world, ofMesh& aMesh, glm::vec3 a_loc, glm::quat a_rot, float a_mass ); 18 | void create( ofxBulletWorldSoft* a_world, ofMesh& aMesh, btTransform &a_bt_tr, float a_mass ); 19 | 20 | void draw(); 21 | 22 | void updateMesh( ofMesh& aMesh ); 23 | 24 | protected: 25 | btScalar* bullet_vertices; 26 | }; 27 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletSphere.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxBulletSphere.h 3 | * ofxBullet_v3 4 | * 5 | * Created by Nick Hardeman on 5/18/11. 6 | * 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | #include "ofVbo.h" 13 | 14 | class ofxBulletSphere : public ofxBulletRigidBody { 15 | public: 16 | ofxBulletSphere(); 17 | ~ofxBulletSphere(); 18 | 19 | void init( float a_radius ); 20 | void init( btSphereShape* a_colShape ); 21 | 22 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc=glm::vec3(0,0,0), float a_mass=1.f, float a_radius=1.f ); 23 | void create( btDiscreteDynamicsWorld* a_world, glm::vec3 a_loc, glm::quat a_rot, float a_mass=1.f, float a_radius=1.f ); 24 | void create( btDiscreteDynamicsWorld* a_world, btTransform &a_bt_tr, float a_mass=1.f, float a_radius=1.f ); 25 | 26 | void removeShape(); 27 | 28 | void draw(); 29 | 30 | // GETTERS // 31 | float getRadius(); 32 | 33 | protected: 34 | 35 | private: 36 | 37 | 38 | }; 39 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletStaticPlane.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletStaticPlane.h 3 | // emptyExample 4 | // 5 | // Created by Lukasz Karluk on 18/12/12. 6 | // 7 | // 8 | 9 | #pragma once 10 | 11 | #include "ofxBulletRigidBody.h" 12 | 13 | class ofxBulletStaticPlane : public ofxBulletRigidBody { 14 | 15 | public: 16 | 17 | ofxBulletStaticPlane(); 18 | ~ofxBulletStaticPlane(); 19 | 20 | void init(btStaticPlaneShape * shape); 21 | 22 | void createFloor(btDiscreteDynamicsWorld * world, glm::vec3 planePosition); 23 | void createCeiling(btDiscreteDynamicsWorld * world, glm::vec3 planePosition); 24 | void create(btDiscreteDynamicsWorld * world, glm::vec3 planePosition, glm::vec3 planeNormal, float planeConstant=0); 25 | 26 | void removeShape(); 27 | }; 28 | -------------------------------------------------------------------------------- /src/shapes/ofxBulletTriMeshShape.h: -------------------------------------------------------------------------------- 1 | // 2 | // ofxBulletTriMeshShape.h 3 | // ofxBulletMesh 4 | // 5 | // Created by Nick Hardeman on 10/10/14. 6 | // 7 | 8 | #pragma once 9 | 10 | #include "ofxBulletRigidBody.h" 11 | 12 | class ofxBulletTriMeshShape : public ofxBulletRigidBody { 13 | public: 14 | ofxBulletTriMeshShape(); 15 | ~ofxBulletTriMeshShape(); 16 | 17 | void create( btDiscreteDynamicsWorld* a_world, ofMesh& aMesh, glm::vec3 a_loc, float a_mass, 18 | glm::vec3 aAAbbMin=glm::vec3(-100,-100,-100), glm::vec3 aAAbbMax=glm::vec3(100,100,100) ); 19 | void create( btDiscreteDynamicsWorld* a_world, ofMesh& aMesh, glm::vec3 a_loc, glm::quat a_rot, float a_mass, 20 | glm::vec3 aAAbbMin=glm::vec3(-100,-100,-100), glm::vec3 aAAbbMax=glm::vec3(100,100,100) ); 21 | void create( btDiscreteDynamicsWorld* a_world, ofMesh& aMesh, btTransform &a_bt_tr, float a_mass, 22 | glm::vec3 aAAbbMin=glm::vec3(-100,-100,-100), glm::vec3 aAAbbMax=glm::vec3(100,100,100) ); 23 | 24 | void updateMesh( btDiscreteDynamicsWorld* a_world, ofMesh& aMesh ); 25 | 26 | void removeShape(); 27 | 28 | protected: 29 | btVector3* bullet_vertices; 30 | int* bullet_indices; 31 | btTriangleIndexVertexArray* bullet_indexVertexArrays; 32 | int totalVerts, totalIndices; 33 | }; 34 | 35 | 36 | 37 | 38 | 39 | 40 | --------------------------------------------------------------------------------