├── VERSION ├── Extras ├── CDTestFramework │ ├── License.txt.bak │ ├── AntTweakBar │ │ ├── src │ │ │ ├── TwPrecomp.cpp │ │ │ ├── TwFonts.h │ │ │ ├── TwMgr.cpp │ │ │ ├── AntTweakBar.rc │ │ │ ├── TwEventWin32.c │ │ │ ├── res │ │ │ │ ├── cur00000.cur │ │ │ │ ├── cur00001.cur │ │ │ │ ├── cur00002.cur │ │ │ │ ├── cur00003.cur │ │ │ │ ├── cur00004.cur │ │ │ │ ├── cur00005.cur │ │ │ │ ├── cur00006.cur │ │ │ │ ├── cur00007.cur │ │ │ │ ├── cur00008.cur │ │ │ │ ├── cur00009.cur │ │ │ │ ├── cur00010.cur │ │ │ │ ├── cur00011.cur │ │ │ │ ├── cur00012.cur │ │ │ │ └── cur00013.cur │ │ │ ├── d3d10vs2003.h │ │ │ └── resource.h │ │ ├── Clean.bat │ │ ├── Readme.txt │ │ └── License.txt │ ├── GLUT32.DLL │ ├── convex1.bin │ ├── Opcode │ │ ├── ReadMe.txt │ │ ├── OPC_RayTriOverlap.h │ │ ├── OPC_TriBoxOverlap.h │ │ ├── OPC_PlanesAABBOverlap.h │ │ ├── Opcode.dsw │ │ ├── Opcode.sln │ │ └── StdAfx.cpp │ ├── History.txt │ ├── CDTestFramework.txt │ ├── CDTestFramework.h │ ├── ReadMe.txt │ └── stdafx.h ├── sph │ ├── common │ │ ├── mtime.h │ │ ├── matrix.cpp │ │ ├── particle.cpp │ │ └── particle.h │ ├── fluid_system_host.linkinfo │ ├── cmp.sh │ ├── fluids │ │ └── fluid.cpp │ └── fluids_2005.sln ├── AllBulletDemosOSX │ ├── BulletIcon.icns │ ├── BulletIcon.psd │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ └── Credits.rtf │ ├── README.txt │ ├── AllBulletDemos.xcodeproj │ │ └── TemplateIcon.icns │ ├── AllBulletDemos_Prefix.pch │ ├── main.m │ ├── Info.plist │ └── src │ │ └── toolkit │ │ └── BTFullscreenWindow.h ├── khx2dae │ ├── Bullet_dae_screenshot.jpg │ ├── Havok_hkx_screenshot.jpg │ └── readme.txt ├── GIMPACTUtils │ └── btGImpactConvexDecompositionShape.h ├── Serialize │ ├── HeaderGenerator │ │ ├── createDnaString.bat │ │ └── CMakeLists.txt │ ├── BulletFileLoader │ │ └── premake4.lua │ ├── BulletWorldImporter │ │ └── premake4.lua │ ├── BulletXmlWorldImporter │ │ └── premake4.lua │ ├── BlenderSerialize │ │ └── CMakeLists.txt │ ├── makesdna │ │ └── DNA_rigidbody.h │ ├── CMakeLists.txt │ └── ReadBulletSample │ │ ├── CMakeLists.txt │ │ └── BulletDataExtractor.h ├── HACD │ └── premake4.lua ├── ConvexDecomposition │ └── premake4.lua ├── premake4.lua └── CMakeLists.txt ├── UnitTests ├── CMakeLists.txt ├── cppunit │ ├── THANKS │ ├── ChangeLog │ ├── BUGS │ ├── include │ │ └── cppunit │ │ │ ├── TextTestRunner.h │ │ │ ├── config │ │ │ ├── SourcePrefix.h │ │ │ └── CppUnitApi.h │ │ │ ├── Outputter.h │ │ │ ├── extensions │ │ │ ├── TestFactory.h │ │ │ ├── TestSuiteFactory.h │ │ │ ├── TestSetUp.h │ │ │ ├── TypeInfoHelper.h │ │ │ ├── TestCaseDecorator.h │ │ │ ├── RepeatedTest.h │ │ │ ├── XmlInputHelper.h │ │ │ └── TestDecorator.h │ │ │ ├── ui │ │ │ └── text │ │ │ │ └── TestRunner.h │ │ │ ├── portability │ │ │ ├── CppUnitDeque.h │ │ │ ├── CppUnitVector.h │ │ │ ├── CppUnitStack.h │ │ │ ├── CppUnitSet.h │ │ │ └── CppUnitMap.h │ │ │ ├── tools │ │ │ ├── Algorithm.h │ │ │ └── StringTools.h │ │ │ ├── plugin │ │ │ └── PlugInParameters.h │ │ │ ├── TestSuccessListener.h │ │ │ ├── TextTestResult.h │ │ │ ├── TestLeaf.h │ │ │ ├── TestComposite.h │ │ │ ├── BriefTestProgressListener.h │ │ │ └── TextTestProgressListener.h │ ├── AUTHORS │ └── src │ │ └── cppunit │ │ ├── DllMain.cpp │ │ ├── TestSetUp.cpp │ │ ├── TestLeaf.cpp │ │ ├── PlugInParameters.cpp │ │ ├── RepeatedTest.cpp │ │ ├── DefaultProtector.h │ │ ├── TestCaseDecorator.cpp │ │ ├── SynchronizedObject.cpp │ │ ├── AdditionalMessage.cpp │ │ ├── TestSuccessListener.cpp │ │ ├── TestNamer.cpp │ │ ├── XmlOutputterHook.cpp │ │ ├── ProtectorContext.h │ │ ├── TestDecorator.cpp │ │ ├── TextTestProgressListener.cpp │ │ ├── UnixDynamicLibraryManager.cpp │ │ ├── BriefTestProgressListener.cpp │ │ ├── TextTestResult.cpp │ │ ├── DefaultProtector.cpp │ │ ├── DynamicLibraryManagerException.cpp │ │ ├── TestPlugInDefaultImpl.cpp │ │ ├── TestSuite.cpp │ │ ├── BeOsDynamicLibraryManager.cpp │ │ ├── ShlDynamicLibraryManager.cpp │ │ └── ProtectorChain.h └── BulletUnitTests │ ├── btCholeskyDecomposition.h │ ├── CMakeLists.txt │ └── btCholeskyDecomposition.cpp ├── BspDemo.bsp ├── ChangeLog ├── GLUT32.DLL ├── convex0.bin ├── glut64.dll ├── Glut ├── glew32s.lib ├── glew64s.lib ├── glut32.lib ├── glut64.lib └── EmptyGL │ └── GL │ ├── egl_cpx.h │ └── glu.h ├── bullet_logo.png ├── src ├── BulletMultiThreaded │ ├── SpuSampleTask │ │ └── readme.txt │ ├── SpuNarrowPhaseCollisionTask │ │ ├── readme.txt │ │ ├── boxBoxDistance.cpp │ │ └── SpuLocalSupport.h │ ├── btParallelConstraintSolver.h │ ├── btParallelConstraintSolver.cpp │ ├── GpuSoftBodySolvers │ │ ├── OpenCL │ │ │ ├── OpenCLC10 │ │ │ │ ├── ApplyForces.cl │ │ │ │ ├── UpdateFixedVertexPositions.cl │ │ │ │ ├── UpdatePositionsFromVelocities.cl │ │ │ │ ├── Integrate.cl │ │ │ │ ├── UpdatePositions.cl │ │ │ │ └── PrepareLinks.cl │ │ │ ├── CMakeLists.txt │ │ │ ├── AMD │ │ │ │ └── premake4.lua │ │ │ ├── Intel │ │ │ │ └── premake4.lua │ │ │ └── NVidia │ │ │ │ └── premake4.lua │ │ ├── CMakeLists.txt │ │ └── DX11 │ │ │ ├── premake4.lua │ │ │ └── HLSL │ │ │ └── UpdatePositionsFromVelocities.hlsl │ └── btThreadSupportInterface.cpp ├── BulletSoftBody │ ├── btSoftBody.cpp │ └── premake4.lua ├── BulletCollision │ ├── Gimpact │ │ ├── btGImpactShape.h │ │ └── btGImpactCollisionAlgorithm.cpp │ ├── premake4.lua │ ├── BroadphaseCollision │ │ ├── btBroadphaseProxy.cpp │ │ ├── btDispatcher.cpp │ │ └── btCollisionAlgorithm.cpp │ ├── NarrowPhaseCollision │ │ └── btConvexCast.cpp │ └── CollisionShapes │ │ ├── btConcaveShape.cpp │ │ └── btTriangleCallback.cpp ├── LinearMath │ └── premake4.lua ├── BulletDynamics │ ├── premake4.lua │ └── Vehicle │ │ └── btVehicleRaycaster.h └── vectormath │ └── vmInclude.h ├── Bullet_User_Manual.pdf ├── heightfield128x128.raw ├── Demos ├── ParticlesOpenCL │ ├── shaders.h │ ├── CMakeLists.txt │ └── btParticlesSharedDefs.h ├── ConcaveDemo │ ├── Jamfile │ ├── main.cpp │ └── Win32ConcaveDemo.cpp ├── DX11ClothDemo │ ├── amdFlag.bmp │ ├── atiFlag.bmp │ ├── texture.bmp │ ├── texture.png │ ├── Media │ │ ├── UI │ │ │ ├── Font.dds │ │ │ └── dxutcontrols.dds │ │ └── Tiny │ │ │ ├── tiny.sdkmesh │ │ │ └── Tiny_skin.dds │ ├── DXUT │ │ ├── Optional │ │ │ ├── directx.ico │ │ │ └── DXUTres.h │ │ └── Core │ │ │ └── dpiaware.manifest │ ├── resource.h │ └── premake4.lua ├── SerializeDemo │ ├── testFile.bullet │ ├── testFileCloth.bullet │ └── Win32SerializeDemo.cpp ├── GenericJointDemo │ ├── GenericJointDemo.cpp │ └── Win32GenericJointDemo.cpp ├── ConvexDecompositionDemo │ ├── testFile32Single.bullet │ └── main.cpp ├── OpenCLClothDemo │ ├── fragment.glsl │ ├── clstuff.hpp │ ├── vertex.glsl │ ├── clstuff.h │ ├── CMakeLists.txt │ ├── gl_win.hpp │ └── CLClothDemo.sln ├── NativeClient │ ├── bin_html │ │ ├── tumbler.nmf │ │ ├── httpd.cmd │ │ └── bind.js │ ├── premake4.lua │ ├── opengl_context_ptrs.h │ └── shader_util.h ├── Makefile.am ├── VectorAdd_OpenCL │ ├── CMakeLists.txt │ ├── Apple │ │ └── CMakeLists.txt │ ├── NVidia │ │ └── CMakeLists.txt │ ├── AMD │ │ └── CMakeLists.txt │ └── MiniCL │ │ └── CMakeLists.txt ├── BasicDemo │ ├── Makefile.am │ └── Win32BasicDemo.cpp ├── Gpu2dDemo │ ├── Makefile.am │ ├── oecakeLoader.h │ └── CMakeLists.txt ├── RaytestDemo │ ├── Makefile.am │ └── Win32RaytestDemo.cpp ├── SoftDemo │ ├── Makefile.am │ └── AMD │ │ └── premake4.lua ├── RollingFrictionDemo │ └── Makefile.am ├── VehicleDemo │ ├── Makefile.am │ ├── main.cpp │ └── CMakeLists.txt ├── VoronoiFractureDemo │ └── Makefile.am ├── OpenGL │ ├── premake4.lua │ ├── Makefile.am │ └── GLDebugDrawer.h ├── TerrainDemo │ ├── Makefile.am │ ├── main.cpp │ └── TerrainDemo.h ├── CcdPhysicsDemo │ └── Makefile.am ├── Benchmarks │ ├── premake4.lua │ └── Win32BenchmarkDemo.cpp ├── HelloWorld │ ├── premake4.lua │ └── CMakeLists.txt ├── Raytracer │ └── main.cpp ├── ConcaveRaycastDemo │ └── main.cpp ├── MultiThreadedDemo │ └── Makefile.am ├── GjkConvexCastDemo │ └── main.cpp ├── ConcaveConvexcastDemo │ └── main.cpp ├── GimpactTestDemo │ ├── main.cpp │ └── Win32GimpactDemo.cpp ├── InternalEdgeDemo │ ├── main.cpp │ └── Win32InternalEdgeDemo.cpp ├── CollisionInterfaceDemo │ └── main.cpp ├── ForkLiftDemo │ └── main.cpp ├── CharacterDemo │ └── main.cpp ├── ConstraintDemo │ ├── main.cpp │ └── Win32ConstraintDemo.cpp ├── GyroscopicDemo │ └── main.cpp ├── MultiMaterialDemo │ ├── main.cpp │ └── CMakeLists.txt ├── SliderConstraintDemo │ └── main.cpp ├── OpenPL_Demo │ └── OpenPL_Demo.c ├── Gpu3dDemo │ └── CMakeLists.txt ├── Box2dDemo │ └── Win32Box2dDemo.cpp └── FractureDemo │ └── Win32FractureDemo.cpp ├── docs ├── BulletQuickstart.pdf └── faq.tex ├── NEWS ├── Makefile.am ├── bullet.pc.cmake ├── README ├── Test ├── Source │ ├── Tests │ │ ├── Test_qtdot.h │ │ ├── Test_qtmul.h │ │ ├── Test_v3div.h │ │ ├── Test_v3dot.h │ │ ├── Test_dot3.h │ │ ├── Test_maxdot.h │ │ ├── Test_qtnorm.h │ │ ├── Test_v3lerp.h │ │ ├── Test_v3norm.h │ │ ├── Test_v3sdiv.h │ │ ├── Test_v3skew.h │ │ ├── Test_3x3mulM.h │ │ ├── Test_v3cross.h │ │ ├── Test_3x3mulVM.h │ │ ├── Test_btDbvt.h │ │ ├── Test_mindot.h │ │ ├── Test_qtmulQV3.h │ │ ├── Test_qtmulV3Q.h │ │ ├── Test_v3interp.h │ │ ├── Test_v3rotate.h │ │ ├── Test_v3triple.h │ │ ├── Test_3x3getRot.h │ │ ├── Test_3x3mulMV.h │ │ ├── Test_3x3setRot.h │ │ ├── Test_3x3mulM1M2.h │ │ ├── Test_3x3transpose.h │ │ ├── Test_quat_aos_neon.h │ │ ├── Test_3x3timesTranspose.h │ │ └── Test_3x3transposeTimes.h │ ├── btIntDefines.h │ ├── TestList.h │ └── main.h └── premake4.lua ├── bullet.pc.in ├── lib └── readme.txt ├── README.md ├── AUTHORS ├── COPYING └── BulletLicense.txt /VERSION: -------------------------------------------------------------------------------- 1 | 2.81 2 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/License.txt.bak: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UnitTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS( cppunit BulletUnitTests) 3 | -------------------------------------------------------------------------------- /BspDemo.bsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/BspDemo.bsp -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/ChangeLog -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/TwPrecomp.cpp: -------------------------------------------------------------------------------- 1 | #include "TwPrecomp.h" 2 | -------------------------------------------------------------------------------- /GLUT32.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/GLUT32.DLL -------------------------------------------------------------------------------- /convex0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/convex0.bin -------------------------------------------------------------------------------- /glut64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/glut64.dll -------------------------------------------------------------------------------- /Glut/glew32s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Glut/glew32s.lib -------------------------------------------------------------------------------- /Glut/glew64s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Glut/glew64s.lib -------------------------------------------------------------------------------- /Glut/glut32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Glut/glut32.lib -------------------------------------------------------------------------------- /Glut/glut64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Glut/glut64.lib -------------------------------------------------------------------------------- /bullet_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/bullet_logo.png -------------------------------------------------------------------------------- /src/BulletMultiThreaded/SpuSampleTask/readme.txt: -------------------------------------------------------------------------------- 1 | Empty placeholder for future Libspe2 SPU task 2 | -------------------------------------------------------------------------------- /Bullet_User_Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Bullet_User_Manual.pdf -------------------------------------------------------------------------------- /heightfield128x128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/heightfield128x128.raw -------------------------------------------------------------------------------- /Demos/ParticlesOpenCL/shaders.h: -------------------------------------------------------------------------------- 1 | extern const char *vertexShader; 2 | extern const char *spherePixelShader; 3 | -------------------------------------------------------------------------------- /Extras/sph/common/mtime.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/sph/common/mtime.h -------------------------------------------------------------------------------- /UnitTests/cppunit/THANKS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/UnitTests/cppunit/THANKS -------------------------------------------------------------------------------- /docs/BulletQuickstart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/docs/BulletQuickstart.pdf -------------------------------------------------------------------------------- /src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/readme.txt: -------------------------------------------------------------------------------- 1 | Empty placeholder for future Libspe2 SPU task 2 | -------------------------------------------------------------------------------- /UnitTests/cppunit/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/UnitTests/cppunit/ChangeLog -------------------------------------------------------------------------------- /Demos/ConcaveDemo/Jamfile: -------------------------------------------------------------------------------- 1 | SubDir TOP Demos ConcaveDemo ; 2 | 3 | BulletDemo ConcaveDemo : [ Wildcard *.h *.cpp ] ; 4 | -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/amdFlag.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/amdFlag.bmp -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/atiFlag.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/atiFlag.bmp -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/texture.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/texture.bmp -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/texture.png -------------------------------------------------------------------------------- /Extras/CDTestFramework/GLUT32.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/GLUT32.DLL -------------------------------------------------------------------------------- /src/BulletSoftBody/btSoftBody.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletSoftBody/btSoftBody.cpp -------------------------------------------------------------------------------- /Demos/SerializeDemo/testFile.bullet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/SerializeDemo/testFile.bullet -------------------------------------------------------------------------------- /Extras/CDTestFramework/convex1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/convex1.bin -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/Media/UI/Font.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/Media/UI/Font.dds -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | 2 | For news, visit the Bullet Physics forums at 3 | http://www.bulletphysics.org and http://bullet.googlecode.com 4 | 5 | 6 | -------------------------------------------------------------------------------- /Demos/SerializeDemo/testFileCloth.bullet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/SerializeDemo/testFileCloth.bullet -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/BulletIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/AllBulletDemosOSX/BulletIcon.icns -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/BulletIcon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/AllBulletDemosOSX/BulletIcon.psd -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/Opcode/ReadMe.txt -------------------------------------------------------------------------------- /Extras/khx2dae/Bullet_dae_screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/khx2dae/Bullet_dae_screenshot.jpg -------------------------------------------------------------------------------- /Extras/khx2dae/Havok_hkx_screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/khx2dae/Havok_hkx_screenshot.jpg -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/Media/Tiny/tiny.sdkmesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/Media/Tiny/tiny.sdkmesh -------------------------------------------------------------------------------- /Demos/GenericJointDemo/GenericJointDemo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/GenericJointDemo/GenericJointDemo.cpp -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/DXUT/Optional/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/DXUT/Optional/directx.ico -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/Media/Tiny/Tiny_skin.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/Media/Tiny/Tiny_skin.dds -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/Media/UI/dxutcontrols.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/DX11ClothDemo/Media/UI/dxutcontrols.dds -------------------------------------------------------------------------------- /src/BulletCollision/Gimpact/btGImpactShape.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletCollision/Gimpact/btGImpactShape.h -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/TwFonts.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/TwFonts.h -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/TwMgr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/TwMgr.cpp -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/OPC_RayTriOverlap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/Opcode/OPC_RayTriOverlap.h -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/OPC_TriBoxOverlap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/Opcode/OPC_TriBoxOverlap.h -------------------------------------------------------------------------------- /Demos/ConvexDecompositionDemo/testFile32Single.bullet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Demos/ConvexDecompositionDemo/testFile32Single.bullet -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/AntTweakBar.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/AntTweakBar.rc -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/TwEventWin32.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/TwEventWin32.c -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/OPC_PlanesAABBOverlap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/Opcode/OPC_PlanesAABBOverlap.h -------------------------------------------------------------------------------- /src/BulletMultiThreaded/btParallelConstraintSolver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletMultiThreaded/btParallelConstraintSolver.h -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/AllBulletDemosOSX/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00000.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00000.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00001.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00001.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00002.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00002.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00003.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00003.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00004.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00004.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00005.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00005.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00006.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00006.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00007.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00007.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00008.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00008.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00009.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00009.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00010.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00010.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00011.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00011.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00012.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00012.cur -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/res/cur00013.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/CDTestFramework/AntTweakBar/src/res/cur00013.cur -------------------------------------------------------------------------------- /Extras/GIMPACTUtils/btGImpactConvexDecompositionShape.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/GIMPACTUtils/btGImpactConvexDecompositionShape.h -------------------------------------------------------------------------------- /Extras/Serialize/HeaderGenerator/createDnaString.bat: -------------------------------------------------------------------------------- 1 | delete dnaString.txt 2 | 3 | mkdir autogenerated 4 | 5 | Debug\HeaderGenerator.exe 6 | 7 | python bulletGenerate.py -------------------------------------------------------------------------------- /src/BulletMultiThreaded/btParallelConstraintSolver.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletMultiThreaded/btParallelConstraintSolver.cpp -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/fragment.glsl: -------------------------------------------------------------------------------- 1 | uniform sampler2D tex; 2 | 3 | void main() 4 | { 5 | vec4 color = texture2D(tex,gl_TexCoord[0].st); 6 | gl_FragColor = color; 7 | } -------------------------------------------------------------------------------- /Extras/HACD/premake4.lua: -------------------------------------------------------------------------------- 1 | project "HACD" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs {"."} 6 | files { 7 | "**.cpp", 8 | "**.h" 9 | } -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | if CONDITIONAL_BUILD_DEMOS 2 | SUBDIRS=src Extras Demos 3 | else 4 | SUBDIRS=src 5 | endif 6 | pkgconfigdir = $(libdir)/pkgconfig 7 | pkgconfig_DATA = bullet.pc 8 | -------------------------------------------------------------------------------- /UnitTests/cppunit/BUGS: -------------------------------------------------------------------------------- 1 | KNOWN BUGS 2 | ---------- 3 | 4 | The handling of html and man pages in doc/Makefile.am is 5 | flawed. It will not pass "make distcheck". 6 | 7 | -------------------------------------------------------------------------------- /src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/clstuff.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __CLSTUFF_HDR__ 2 | #define __CLSTUFF_HDR__ 3 | 4 | 5 | 6 | 7 | 8 | void initCL(void); 9 | 10 | #endif //__CLSTUFF_HDR__ -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/README.txt: -------------------------------------------------------------------------------- 1 | To build: 2 | Place AllBulletDemosOSX in bullet-/Extras and build with Xcode. 3 | 4 | Questions: 5 | contact Shamyl Zakariya 6 | shamyl@zakariya.net -------------------------------------------------------------------------------- /Demos/NativeClient/bin_html/tumbler.nmf: -------------------------------------------------------------------------------- 1 | { 2 | "program": { 3 | "x86-64": {"url": "NativeClientTumbler_x64.exe"}, 4 | "x86-32": {"url": "NativeClientTumbler.exe"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/AllBulletDemos.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/Extras/AllBulletDemosOSX/AllBulletDemos.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp -------------------------------------------------------------------------------- /docs/faq.tex: -------------------------------------------------------------------------------- 1 | 2 | \chapter{Frequently asked questions} 3 | Here is a placeholder for a future FAQ. For more information it is best to visit the Bullet Physics forums and wiki at \url{http://bulletphysics.org}. 4 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ApplyForces.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leaningtech/cheerp-bullet/HEAD/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ApplyForces.cl -------------------------------------------------------------------------------- /src/LinearMath/premake4.lua: -------------------------------------------------------------------------------- 1 | project "LinearMath" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /Extras/ConvexDecomposition/premake4.lua: -------------------------------------------------------------------------------- 1 | project "ConvexDecomposition" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs {".","../../src"} 6 | files { 7 | "**.cpp", 8 | "**.h" 9 | } -------------------------------------------------------------------------------- /Demos/NativeClient/bin_html/httpd.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | REM Relative path of CygWin 5 | set CYGWIN=%~dp0%..\third_party\cygwin\bin 6 | 7 | PATH=%CYGWIN%;%PATH% 8 | 9 | python httpd.py 10 | -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/vertex.glsl: -------------------------------------------------------------------------------- 1 | void main() 2 | { 3 | //gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; 4 | 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | gl_Position = gl_Vertex; 7 | } -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/TextTestRunner.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TEXTTESTRUNNER_H 2 | #define CPPUNIT_TEXTTESTRUNNER_H 3 | 4 | #include 5 | 6 | #endif // CPPUNIT_TEXTTESTRUNNER_H 7 | -------------------------------------------------------------------------------- /src/BulletCollision/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletCollision" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /src/BulletDynamics/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletDynamics" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /src/BulletSoftBody/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletSoftBody" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "..", 7 | } 8 | files { 9 | "**.cpp", 10 | "**.h" 11 | } -------------------------------------------------------------------------------- /Extras/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | include "HACD" 3 | include "ConvexDecomposition" 4 | 5 | include "Serialize/BulletFileLoader" 6 | include "Serialize/BulletWorldImporter" 7 | include "Serialize/BulletXmlWorldImporter" 8 | 9 | -------------------------------------------------------------------------------- /Extras/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS( Serialize ConvexDecomposition HACD GIMPACTUtils ) 2 | 3 | #Maya Dynamica plugin is moved to http://dynamica.googlecode.com 4 | 5 | IF (USE_GLUT AND GLUT_FOUND) 6 | SUBDIRS (glui) 7 | ENDIF () 8 | -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/AllBulletDemos_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'AllBulletDemos' target in the 'AllBulletDemos' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Extras/Serialize/BulletFileLoader/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletFileLoader" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "../../../src" 7 | } 8 | 9 | files { 10 | "**.cpp", 11 | "**.h" 12 | } -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE_DIRECTORIES( 3 | ${BULLET_PHYSICS_SOURCE_DIR}/src 4 | ) 5 | 6 | 7 | SUBDIRS ( 8 | OpenCL 9 | ) 10 | 11 | IF( USE_DX11 ) 12 | SUBDIRS( DX11 ) 13 | ENDIF( USE_DX11 ) 14 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/History.txt: -------------------------------------------------------------------------------- 1 | 2 | ========================= 3 | 4 | V 1.0 - March 16, 2007 5 | 6 | - sphere vs mesh queries 7 | - OBB vs mesh queries 8 | - capsule vs mesh queries 9 | - complete box pruning 10 | - bipartite box pruning 11 | 12 | -------------------------------------------------------------------------------- /Demos/Makefile.am: -------------------------------------------------------------------------------- 1 | if CONDITIONAL_BUILD_MULTITHREADED 2 | SUBDIRS=OpenGL BasicDemo TerrainDemo VehicleDemo CcdPhysicsDemo MultiThreadedDemo SoftDemo AllBulletDemos 3 | else 4 | SUBDIRS=OpenGL BasicDemo TerrainDemo VehicleDemo CcdPhysicsDemo SoftDemo AllBulletDemos 5 | endif 6 | -------------------------------------------------------------------------------- /Extras/Serialize/BulletWorldImporter/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletWorldImporter" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "../BulletFileLoader", 7 | "../../../src" 8 | } 9 | 10 | files { 11 | "**.cpp", 12 | "**.h" 13 | } -------------------------------------------------------------------------------- /bullet.pc.cmake: -------------------------------------------------------------------------------- 1 | Name: bullet 2 | Description: Bullet Continuous Collision Detection and Physics Library 3 | Requires: 4 | Version: @BULLET_VERSION@ 5 | Libs: -L@LIB_DESTINATION@ -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath 6 | Cflags: @BULLET_DOUBLE_DEF@ -I@INCLUDE_INSTALL_DIR@ 7 | -------------------------------------------------------------------------------- /Demos/VectorAdd_OpenCL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | IF(BUILD_MINICL_OPENCL_DEMOS) 3 | SUBDIRS( MiniCL ) 4 | ENDIF() 5 | 6 | IF(BUILD_AMD_OPENCL_DEMOS) 7 | SUBDIRS(AMD) 8 | ENDIF() 9 | 10 | IF(BUILD_NVIDIA_OPENCL_DEMOS) 11 | SUBDIRS(NVidia) 12 | ENDIF() 13 | 14 | IF(APPLE) 15 | SUBDIRS(Apple) 16 | ENDIF() 17 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | Bullet is a 3D Collision Detection and Rigid Body Dynamics Library for games and animation. 3 | Free for commercial use, including Playstation 3, open source under the ZLib License. 4 | 5 | See the Bullet_User_Manual.pdf for more info and visit the Bullet Physics Forum at 6 | http://bulletphysics.org 7 | -------------------------------------------------------------------------------- /Demos/BasicDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=BasicDemo 2 | 3 | BasicDemo_SOURCES=BasicDemo.cpp BasicDemo.h main.cpp 4 | BasicDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | BasicDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/Gpu2dDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=BasicDemo 2 | 3 | BasicDemo_SOURCES=BasicDemo.cpp BasicDemo.h main.cpp 4 | BasicDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | BasicDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lbulletdynamics -lbulletcollision -lbulletmath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Extras/Serialize/BulletXmlWorldImporter/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletXmlWorldImporter" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | "../BulletWorldImporter", 7 | "../BulletFileLoader", 8 | "../../../src" 9 | } 10 | 11 | files { 12 | "**.cpp", 13 | "**.h" 14 | } -------------------------------------------------------------------------------- /UnitTests/cppunit/AUTHORS: -------------------------------------------------------------------------------- 1 | Michael Feathers 2 | Jerome Lacoste 3 | E. Sommerlade 4 | Baptiste Lepilleur 5 | Bastiaan Bakker 6 | Steve Robbins 7 | -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/clstuff.h: -------------------------------------------------------------------------------- 1 | #ifndef __CLSTUFF_HDR__ 2 | #define __CLSTUFF_HDR__ 3 | 4 | 5 | 6 | 7 | // OpenCL initialization. 8 | // Takes an optional GL context which, if passed, will create an interop-enabled CL context. 9 | void initCL( void* glContext = 0, void* glDC = 0 ); 10 | 11 | #endif //__CLSTUFF_HDR__ -------------------------------------------------------------------------------- /Demos/RaytestDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=BasicDemo 2 | 3 | BasicDemo_SOURCES=BasicDemo.cpp BasicDemo.h main.cpp 4 | BasicDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | BasicDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/SoftDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=SoftDemo 2 | 3 | SoftDemo_SOURCES=SoftDemo.cpp SoftDemo.h main.cpp 4 | SoftDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | SoftDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/RollingFrictionDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=BasicDemo 2 | 3 | BasicDemo_SOURCES=BasicDemo.cpp BasicDemo.h main.cpp 4 | BasicDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | BasicDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/VehicleDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=VehicleDemo 2 | 3 | VehicleDemo_SOURCES=VehicleDemo.cpp VehicleDemo.h main.cpp 4 | VehicleDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | VehicleDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/VoronoiFractureDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=BasicDemo 2 | 3 | BasicDemo_SOURCES=BasicDemo.cpp BasicDemo.h main.cpp 4 | BasicDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | BasicDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS( MiniCL ) 2 | 3 | IF(BUILD_INTEL_OPENCL_DEMOS) 4 | SUBDIRS(Intel) 5 | ENDIF() 6 | 7 | IF(BUILD_AMD_OPENCL_DEMOS) 8 | SUBDIRS(AMD) 9 | ENDIF() 10 | 11 | IF(BUILD_NVIDIA_OPENCL_DEMOS) 12 | SUBDIRS(NVidia) 13 | ENDIF() 14 | 15 | IF(APPLE) 16 | SUBDIRS(Apple) 17 | ENDIF() 18 | -------------------------------------------------------------------------------- /Demos/OpenGL/premake4.lua: -------------------------------------------------------------------------------- 1 | project "OpenGLSupport" 2 | 3 | kind "StaticLib" 4 | targetdir "../../lib" 5 | includedirs { 6 | ".", 7 | "../../src" 8 | } 9 | configuration {"Windows"} 10 | includedirs { 11 | "../../Glut" 12 | } 13 | configuration{} 14 | 15 | files { 16 | "**.cpp", 17 | "**.h" 18 | } 19 | -------------------------------------------------------------------------------- /Demos/TerrainDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_PROGRAMS=TerrainDemo 3 | 4 | TerrainDemo_SOURCES=TerrainDemo.cpp TerrainDemo.h main.cpp 5 | TerrainDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 6 | TerrainDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 7 | -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AllBulletDemos 4 | // 5 | // Created by Shamyl Zakariya on 5/1/08. 6 | // Copyright Shamyl Zakariya 2008. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **) argv); 14 | } 15 | -------------------------------------------------------------------------------- /Demos/CcdPhysicsDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=CcdPhysicsDemo 2 | 3 | CcdPhysicsDemo_SOURCES=CcdPhysicsDemo.cpp CcdPhysicsDemo.h main.cpp 4 | CcdPhysicsDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL $(CXXFLAGS) 5 | CcdPhysicsDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lBulletDynamics -lBulletCollision -lLinearMath @opengl_LIBS@ 6 | -------------------------------------------------------------------------------- /Demos/ParticlesOpenCL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | IF(BUILD_MINICL_OPENCL_DEMOS) 2 | SUBDIRS( MiniCL ) 3 | ENDIF() 4 | 5 | IF(BUILD_INTEL_OPENCL_DEMOS) 6 | SUBDIRS(Intel) 7 | ENDIF() 8 | 9 | IF(BUILD_AMD_OPENCL_DEMOS) 10 | SUBDIRS(AMD) 11 | ENDIF() 12 | 13 | IF(BUILD_NVIDIA_OPENCL_DEMOS) 14 | SUBDIRS(NVidia) 15 | ENDIF() 16 | 17 | IF(APPLE) 18 | SUBDIRS(Apple) 19 | ENDIF() 20 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_qtdot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_qtdot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_qtdot_h 9 | #define BulletTest_Test_qtdot_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_qtdot(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_qtmul.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_qtmul.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_qtmul_h 9 | #define BulletTest_Test_qtmul_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_qtmul(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3div.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3div.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3div_h 9 | #define BulletTest_Test_v3div_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3div(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3dot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3dot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3dot_h 9 | #define BulletTest_Test_v3dot_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3dot(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /bullet.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: bullet 7 | Description: Bullet Continuous Collision Detection and Physics Library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath 11 | Cflags: -I${includedir}/bullet 12 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_dot3.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_mindot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_dot3_h 9 | #define BulletTest_Test_dot3_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_dot3(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_maxdot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_maxdot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_maxdot_h 9 | #define BulletTest_Test_maxdot_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_maxdot(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_qtnorm.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_qtnorm.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_qtnorm_h 9 | #define BulletTest_Test_qtnorm_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_qtnorm(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3lerp.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3lerp.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3lerp_h 9 | #define BulletTest_Test_v3lerp_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3lerp(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3norm.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3norm.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3norm_h 9 | #define BulletTest_Test_v3norm_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3norm(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3sdiv.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3sdiv.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3sdiv_h 9 | #define BulletTest_Test_v3sdiv_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3sdiv(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3skew.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3skew.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3skew_h 9 | #define BulletTest_Test_v3skew_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3skew(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Demos/Benchmarks/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | project "AppBenchmarks" 3 | 4 | if _OPTIONS["ios"] then 5 | kind "WindowedApp" 6 | else 7 | kind "ConsoleApp" 8 | end 9 | 10 | includedirs {"../../src"} 11 | 12 | links { 13 | "BulletDynamics","BulletCollision", "LinearMath" 14 | } 15 | 16 | language "C++" 17 | 18 | files { 19 | "**.cpp", 20 | "**.h", 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Demos/HelloWorld/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | project "AppHelloWorld" 3 | 4 | if _OPTIONS["ios"] then 5 | kind "WindowedApp" 6 | else 7 | kind "ConsoleApp" 8 | end 9 | 10 | includedirs {"../../src"} 11 | 12 | links { 13 | "BulletDynamics","BulletCollision", "LinearMath" 14 | } 15 | 16 | language "C++" 17 | 18 | files { 19 | "**.cpp", 20 | "**.h", 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3mulM.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3mulM.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3mulM_h 9 | #define BulletTest_Test_3x3mulM_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3mulM(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3cross.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3cross.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3cross_h 9 | #define BulletTest_Test_v3cross_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3cross(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3mulVM.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3mulVM.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3mulVM_h 9 | #define BulletTest_Test_3x3mulVM_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3mulVM(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_btDbvt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_btDbvt.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc., Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_btDbvt_h 9 | #define BulletTest_Test_btDbvt_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_btDbvt(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_mindot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_mindot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_mindot_h 9 | #define BulletTest_Test_mindot_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_mindot(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_qtmulQV3.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_qtmulQV3.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_qtmulQV3_h 9 | #define BulletTest_Test_qtmulQV3_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_qtmulQV3(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_qtmulV3Q.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_qtmulV3Q.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_qtmulV3Q_h 9 | #define BulletTest_Test_qtmulV3Q_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_qtmulV3Q(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3interp.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3interp.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3interp_h 9 | #define BulletTest_Test_v3interp_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3interp(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3rotate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3rotate.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3rotate_h 9 | #define BulletTest_Test_v3rotate_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3rotate(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_v3triple.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_v3triple.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_v3triple_h 9 | #define BulletTest_Test_v3triple_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_v3triple(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SUBDIRS( MiniCL ) 2 | 3 | IF(BUILD_INTEL_OPENCL_DEMOS) 4 | SUBDIRS(Intel) 5 | ENDIF() 6 | 7 | IF(BUILD_AMD_OPENCL_DEMOS) 8 | SUBDIRS(AMD) 9 | ENDIF() 10 | 11 | IF(BUILD_NVIDIA_OPENCL_DEMOS) 12 | SUBDIRS(NVidia) 13 | ENDIF() 14 | 15 | IF(APPLE AND OPENCL_LIBRARY) 16 | SUBDIRS(Apple) 17 | ENDIF() 18 | -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/DXUT/Core/dpiaware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | -------------------------------------------------------------------------------- /Extras/Serialize/BlenderSerialize/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src 2 | ${BULLET_PHYSICS_SOURCE_DIR}/src 3 | ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader 4 | ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BlenderSerialize 5 | ) 6 | 7 | ADD_LIBRARY(BlenderSerialize dna249.cpp dna249-64bit.cpp bBlenderFile.cpp bBlenderFile.h bMain.cpp bMain.h ) 8 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3getRot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3getRot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3getRot_h 9 | #define BulletTest_Test_3x3getRot_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3getRot(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3mulMV.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3mulMV.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3mulMV_h 9 | #define BulletTest_Test_3x3mulMV_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3mulMV(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3setRot.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3setRot.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3setRot_h 9 | #define BulletTest_Test_3x3setRot_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3setRot(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3mulM1M2.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3mulM1M2.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3mulM1M2_h 9 | #define BulletTest_Test_3x3mulM1M2_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3mulM1M2(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/DllMain.cpp: -------------------------------------------------------------------------------- 1 | #define WIN32_LEAN_AND_MEAN 2 | #define NOGDI 3 | #define NOUSER 4 | #define NOKERNEL 5 | #define NOSOUND 6 | #define BLENDFUNCTION void // for mingw & gcc 7 | 8 | #include 9 | 10 | BOOL APIENTRY 11 | DllMain( HANDLE hModule, 12 | DWORD ul_reason_for_call, 13 | LPVOID lpReserved ) 14 | { 15 | return TRUE; 16 | } 17 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/config/SourcePrefix.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_CONFIG_H_INCLUDED 2 | #define CPPUNIT_CONFIG_H_INCLUDED 3 | 4 | #include 5 | 6 | #ifdef _MSC_VER 7 | #pragma warning(disable: 4018 4284 4146) 8 | #if _MSC_VER >= 1400 9 | #pragma warning(disable: 4996) // sprintf is deprecated 10 | #endif 11 | #endif 12 | 13 | 14 | #endif // CPPUNIT_CONFIG_H_INCLUDED 15 | -------------------------------------------------------------------------------- /Demos/TerrainDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "TerrainDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | int main(int argc,char** argv) 6 | { 7 | DemoApplication * demo = btCreateTerrainDemo(); 8 | btAssert(demo && "failed to create terrain demo object"); 9 | 10 | return glutmain(argc, argv, 800, 600, 11 | "Terrain Demo. http://www.continuousphysics.com/Bullet/phpBB2/", 12 | demo); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3transpose.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3transpose.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3transpose_h 9 | #define BulletTest_Test_3x3transpose_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3transpose(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Demos/Raytracer/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Raytracer.h" 3 | #include "GlutStuff.h" 4 | 5 | 6 | int main(int argc,char** argv) 7 | { 8 | Raytracer* raytraceDemo = new Raytracer(); 9 | 10 | raytraceDemo->initPhysics(); 11 | 12 | raytraceDemo->setCameraDistance(6.f); 13 | 14 | return glutmain(argc, argv,640,640,"Bullet GJK Implicit Shape Raytracer Demo",raytraceDemo); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_quat_aos_neon.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_quat_aos_neon.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc., Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_quat_aos_neon_h 9 | #define BulletTest_Test_quat_aos_neon_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_quat_aos_neon(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /lib/readme.txt: -------------------------------------------------------------------------------- 1 | At the moment there are no binary packages from Bullet library. 2 | Once this is done, the libraries will be placed here 3 | 4 | LinearMath 5 | BulletCollision 6 | BulletDynamics 7 | 8 | The C-API will be available in the include folder. 9 | 10 | For now, there is only C++ files, see src/btBulletCollisionCommon.h and src/btBulletDynamicsCommon.h 11 | 12 | http://bullet.googlecode.com 13 | Erwin Coumans 14 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | hasDX11 = findDirectX11() 3 | 4 | if (hasDX11) then 5 | 6 | project "BulletSoftBodyDX11Solvers" 7 | 8 | initDirectX11() 9 | 10 | kind "StaticLib" 11 | 12 | targetdir "../../../../lib" 13 | 14 | includedirs { 15 | ".", 16 | "../../.." 17 | } 18 | files { 19 | "**.cpp", 20 | "**.h" 21 | } 22 | 23 | end 24 | -------------------------------------------------------------------------------- /Test/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | project "AppUnitTest" 3 | 4 | if _OPTIONS["ios"] then 5 | kind "WindowedApp" 6 | else 7 | kind "ConsoleApp" 8 | end 9 | targetdir "bin" 10 | 11 | includedirs {"../src","Source", "Source/Tests"} 12 | 13 | links { 14 | "BulletDynamics","BulletCollision", "LinearMath" 15 | } 16 | 17 | language "C++" 18 | 19 | files { 20 | "Source/**.cpp", 21 | "Source/**.h", 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3timesTranspose.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3timesTranspose.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3timesTranspose_h 9 | #define BulletTest_Test_3x3timesTranspose_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3timesTranspose(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Test/Source/Tests/Test_3x3transposeTimes.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test_3x3transposeTimes.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_Test_3x3transposeTimes_h 9 | #define BulletTest_Test_3x3transposeTimes_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | int Test_3x3transposeTimes(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Demos/ConcaveRaycastDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "ConcaveRaycastDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | 6 | int main(int argc,char** argv) 7 | { 8 | 9 | ConcaveRaycastDemo* concaveRaycastDemo = new ConcaveRaycastDemo(); 10 | concaveRaycastDemo->initPhysics(); 11 | concaveRaycastDemo->setCameraDistance(30.f); 12 | 13 | return glutmain(argc, argv,640,480,"Concave Raycast Demo",concaveRaycastDemo); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Demos/MultiThreadedDemo/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS=MultiThreadedDemo 2 | 3 | MultiThreadedDemo_SOURCES=MultiThreadedDemo.cpp MultiThreadedDemo.h main.cpp 4 | MultiThreadedDemo_CXXFLAGS=-I@top_builddir@/src -I@top_builddir@/Demos/OpenGL -I@top_builddir@/Extras $(CXXFLAGS) 5 | MultiThreadedDemo_LDADD=-L../OpenGL -L../../Extras -L../../src -lbulletmultithreaded -lbulletopenglsupport -lbulletdynamics -lbulletcollision -lbulletmath @opengl_LIBS@ -lpthread 6 | -------------------------------------------------------------------------------- /Extras/sph/fluid_system_host.linkinfo: -------------------------------------------------------------------------------- 1 | --import sRadixSum,%laneid,%ctaid,%nctaid,%smid,A7,%pm3,%pm2,%pm1,__CC-temp__0__,%pm0,%tid,%clock,%warpid,%ntid,%gridid --export _Z8RadixSumP12KeyValuePairjjj,_Z13hashParticlesPcP5uint2i,_Z15insertParticlesPcP5uint2Piii,_Z15computePressurePcPiP5uint2i,_Z25RadixAddOffsetsAndShuffleP12KeyValuePairS0_jji,_Z20insertParticlesRadixPcP5uint2PiS_ii,_Z12computeForcePcPiP5uint2i,_Z15computeForceNbrPci,_Z16advanceParticlesPciff,_Z14RadixPrefixSumv -------------------------------------------------------------------------------- /UnitTests/BulletUnitTests/btCholeskyDecomposition.h: -------------------------------------------------------------------------------- 1 | #ifndef BTCHOLESKYDECOMPOSITION_H 2 | #define BTCHOLESKYDECOMPOSITION_H 3 | 4 | #include "LinearMath/btMatrix3x3.h" 5 | 6 | struct btCholeskyDecomposition 7 | { 8 | enum Result 9 | { 10 | SUCCESS, 11 | FAILURE_SYMMETRY, 12 | FAILURE_POSITIVE_DEFINITE 13 | }; 14 | }; 15 | 16 | int choleskyDecompose(const btMatrix3x3& A, btMatrix3x3& L); 17 | 18 | #endif // BTCHOLESKYDECOMPOSITION_H 19 | 20 | -------------------------------------------------------------------------------- /Demos/GjkConvexCastDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "LinearConvexCastDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | int screenWidth = 640; 6 | int screenHeight = 480; 7 | 8 | int main(int argc,char** argv) 9 | { 10 | 11 | LinearConvexCastDemo* linearCastDemo = new LinearConvexCastDemo(); 12 | 13 | linearCastDemo->initPhysics(); 14 | 15 | 16 | return glutmain(argc, argv,screenWidth,screenHeight,"Linear Convex Cast Demo",linearCastDemo); 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Bullet physics library ported for Cheerp 2 | ======================================== 3 | 4 | Please report bugs on launchpad: 5 | https://bugs.launchpad.net/cheerp 6 | 7 | Installation 8 | ------------ 9 | 10 | ``` 11 | cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/opt/cheerp/share/cmake/Modules/CheerpToolchain.cmake -DBUILD_EXTRAS=OFF -DCMAKE_INSTALL_PREFIX=/opt/cheerp 12 | make 13 | nodejs Demos/HelloWorld/AppHelloWorld.js 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /Demos/ConcaveConvexcastDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "ConcaveConvexcastDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | 6 | int main(int argc,char** argv) 7 | { 8 | 9 | ConcaveConvexcastDemo* concaveConvexcastDemo = new ConcaveConvexcastDemo(); 10 | concaveConvexcastDemo->initPhysics(); 11 | concaveConvexcastDemo->setCameraDistance(30.f); 12 | 13 | return glutmain(argc, argv,640,480,"Concave Convexcast Demo",concaveConvexcastDemo); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Demos/GimpactTestDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "GimpactTestDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | //################################## main ##################################### 6 | int main(int argc,char** argv) 7 | { 8 | 9 | GimpactConcaveDemo* concaveDemo = new GimpactConcaveDemo(); /// This will not be Deleted!!! 10 | concaveDemo->initPhysics(); 11 | 12 | return glutmain(argc, argv,640,480,"DevO,s GIMPACT Test Demo",concaveDemo); 13 | } 14 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestSetUp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | CPPUNIT_NS_BEGIN 4 | 5 | 6 | TestSetUp::TestSetUp( Test *test ) : TestDecorator( test ) 7 | { 8 | } 9 | 10 | 11 | void 12 | TestSetUp::setUp() 13 | { 14 | } 15 | 16 | 17 | void 18 | TestSetUp::tearDown() 19 | { 20 | } 21 | 22 | 23 | void 24 | TestSetUp::run( TestResult *result ) 25 | { 26 | setUp(); 27 | TestDecorator::run(result); 28 | tearDown(); 29 | } 30 | 31 | 32 | CPPUNIT_NS_END 33 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestLeaf.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | CPPUNIT_NS_BEGIN 5 | 6 | 7 | int 8 | TestLeaf::countTestCases() const 9 | { 10 | return 1; 11 | } 12 | 13 | 14 | int 15 | TestLeaf::getChildTestCount() const 16 | { 17 | return 0; 18 | } 19 | 20 | 21 | Test * 22 | TestLeaf::doGetChildTestAt( int index ) const 23 | { 24 | checkIsValidIndex( index ); 25 | return NULL; // never called, checkIsValidIndex() always throw. 26 | } 27 | 28 | CPPUNIT_NS_END 29 | -------------------------------------------------------------------------------- /Extras/sph/cmp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | g++ -O3 -L./common -I./common -L./particles -I./particles -lGL -lglut common/matrix.cpp common/mdebug.cpp common/merror.cpp common/vector.cpp common/mtime.cpp particles/particle.cpp particles/particle_system.cpp GLee.c main.cpp 4 | g++ -g -L./common -I./common -L./particles -I./particles -lGL -lglut common/matrix.cpp common/mdebug.cpp common/merror.cpp common/vector.cpp common/mtime.cpp particles/particle.cpp particles/particle_system.cpp GLee.c main.cpp -o sph_sim.debug 5 | 6 | -------------------------------------------------------------------------------- /Demos/InternalEdgeDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "InternalEdgeDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | #include "GLDebugDrawer.h" 6 | #include "btBulletDynamicsCommon.h" 7 | 8 | 9 | int main(int argc,char** argv) 10 | { 11 | 12 | InternalEdgeDemo* internalEdgeDemo = new InternalEdgeDemo(); 13 | internalEdgeDemo->initPhysics(); 14 | internalEdgeDemo->setCameraDistance(30.f); 15 | 16 | 17 | return glutmain(argc, argv,640,480,"Internal Edge Demo",internalEdgeDemo); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/English.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf270 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \deftab560 5 | \pard\tx560\pardeftab560\qc\pardirnatural 6 | 7 | \f0\b\fs28 \cf0 \CocoaLigature0 Bullet Continuous Collision Detection and Physics Library 8 | \b0\fs22 \ 9 | \ 10 | Copyright (c) 2003-2008 Erwin Coumans \ 11 | {\field{\*\fldinst{HYPERLINK "http://www.bulletphysics.com/"}}{\fldrslt http://www.bulletphysics.com}}} -------------------------------------------------------------------------------- /Demos/OpenGL/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LIBRARIES = libbulletopenglsupport.a 2 | 3 | libbulletopenglsupport_a_SOURCES = \ 4 | DemoApplication.cpp GLDebugDrawer.h GL_Simplex1to4.cpp \ 5 | GLDebugFont.cpp GLDebugFont.h GlutDemoApplication.cpp GlutDemoApplication.h \ 6 | GlutStuff.h \ 7 | DemoApplication.h GL_ShapeDrawer.cpp \ 8 | GL_Simplex1to4.h RenderTexture.cpp \ 9 | DebugCastResult.h GLDebugDrawer.cpp \ 10 | GL_ShapeDrawer.h GlutStuff.cpp RenderTexture.h 11 | 12 | INCLUDES=-I../../src 13 | -------------------------------------------------------------------------------- /Extras/khx2dae/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | hkx2dae converts Havok HKX files to COLLADA Physics .dae files. So Havok tools can be used with any COLLADA Physics enabled application, such as the Bullet physics engine. 3 | Use the patch in combination with the free Havok 5.5 version to add COLLADA Physics export to the Havok SimpleLoad serialization sample (hk550\Demo\Demos\Common\Api\Serialize\SimpleLoad). 4 | 5 | For precompiled binary and further information, visit: 6 | http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=12&t=2218 7 | -------------------------------------------------------------------------------- /Extras/Serialize/makesdna/DNA_rigidbody.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DNA_RIGIDBODY_H 3 | #define DNA_RIGIDBODY_H 4 | 5 | 6 | struct PointerArray 7 | { 8 | int m_size; 9 | int m_capacity; 10 | void *m_data; 11 | }; 12 | 13 | 14 | struct btPhysicsSystem 15 | { 16 | PointerArray m_collisionShapes; 17 | PointerArray m_collisionObjects; 18 | PointerArray m_constraints; 19 | }; 20 | 21 | ///we need this to compute the pointer sizes 22 | struct ListBase 23 | { 24 | void *first; 25 | void *last; 26 | }; 27 | 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Test/Source/btIntDefines.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef BT_INT_DEFINES_H 3 | #define BT_INT_DEFINES_H 4 | 5 | #ifdef __GNUC__ 6 | #include 7 | #elif defined(_MSC_VER) 8 | typedef __int32 int32_t; 9 | typedef __int64 int64_t; 10 | typedef unsigned __int32 uint32_t; 11 | typedef unsigned __int64 uint64_t; 12 | #else 13 | typedef int int32_t; 14 | typedef long long int int64_t; 15 | typedef unsigned int uint32_t; 16 | typedef unsigned long long int uint64_t; 17 | #endif 18 | 19 | #endif //BT_INT_DEFINES_H 20 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/Outputter.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_OUTPUTTER_H 2 | #define CPPUNIT_OUTPUTTER_H 3 | 4 | #include 5 | 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | /*! \brief Abstract outputter to print test result summary. 11 | * \ingroup WritingTestResult 12 | */ 13 | class CPPUNIT_API Outputter 14 | { 15 | public: 16 | /// Destructor. 17 | virtual ~Outputter() {} 18 | 19 | virtual void write() =0; 20 | }; 21 | 22 | 23 | CPPUNIT_NS_END 24 | 25 | 26 | #endif // CPPUNIT_OUTPUTTER_H 27 | -------------------------------------------------------------------------------- /Test/Source/TestList.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestList.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_TestList_h 9 | #define BulletTest_TestList_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | 16 | typedef struct TestDesc 17 | { 18 | const char *name; 19 | int (*test_func)(void); // return 0 for success, non-zero for failure 20 | }TestDesc; 21 | 22 | extern TestDesc gTestList[]; 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by BasicHLSL10.rc 4 | // 5 | #define IDI_MAIN_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 113 12 | #define _APS_NEXT_COMMAND_VALUE 40029 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Demos/NativeClient/premake4.lua: -------------------------------------------------------------------------------- 1 | project "NativeClientTumbler" 2 | 3 | kind "ConsoleApp" 4 | 5 | targetdir "bin_html" 6 | 7 | includedirs { "." } 8 | 9 | --libdirs {} 10 | 11 | links { 12 | "ppapi_gles2", 13 | "ppapi", 14 | "ppapi_cpp", 15 | "ppruntime" 16 | } 17 | 18 | 19 | files { 20 | "cube.cc", 21 | "opengl_context.cc", 22 | "scripting_bridge.cc", 23 | "shader_util.cc", 24 | "transforms.cc", 25 | "tumbler.cc", 26 | "tumbler_module.cc" 27 | } -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/Clean.bat: -------------------------------------------------------------------------------- 1 | RMDIR /S /Q src\debug32 2 | RMDIR /S /Q src\debug64 3 | RMDIR /S /Q src\release32 4 | RMDIR /S /Q src\release64 5 | CD src 6 | DEL *.ncb *.aps *.o *.bak *.user 7 | DEL /A:h *.suo 8 | CD .. 9 | RMDIR /S /Q lib\debug 10 | RMDIR /S /Q examples\debug32 11 | RMDIR /S /Q examples\debug64 12 | RMDIR /S /Q examples\tmp 13 | DEL lib\*.exp 14 | CD examples 15 | DEL *.ncb *.aps *.o *.bak *.user 16 | DEL /A:h *.suo 17 | DEL /S BuildLog.htm 18 | DEL bin\*.obj 19 | DEL bin\*.idb 20 | CD .. 21 | 22 | PAUSE 23 | 24 | 25 | -------------------------------------------------------------------------------- /Demos/VehicleDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "VehicleDemo.h" 3 | #include "GlutStuff.h" 4 | #include "GLDebugDrawer.h" 5 | #include "btBulletDynamicsCommon.h" 6 | GLDebugDrawer gDebugDrawer; 7 | 8 | int main(int argc,char** argv) 9 | { 10 | 11 | VehicleDemo* vehicleDemo = new VehicleDemo; 12 | 13 | vehicleDemo->initPhysics(); 14 | vehicleDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 15 | 16 | return glutmain(argc, argv,640,480,"Bullet Vehicle Demo. http://www.continuousphysics.com/Bullet/phpBB2/", vehicleDemo); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Demos/CollisionInterfaceDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "CollisionInterfaceDemo.h" 3 | #include "GlutStuff.h" 4 | #include "btBulletDynamicsCommon.h" 5 | 6 | int screenWidth = 640; 7 | int screenHeight = 480; 8 | 9 | 10 | int main(int argc,char** argv) 11 | { 12 | CollisionInterfaceDemo* collisionInterfaceDemo = new CollisionInterfaceDemo(); 13 | 14 | collisionInterfaceDemo->initPhysics(); 15 | 16 | collisionInterfaceDemo->clientResetScene(); 17 | 18 | return glutmain(argc, argv,screenWidth,screenHeight,"Collision Interface Demo",collisionInterfaceDemo); 19 | } 20 | -------------------------------------------------------------------------------- /Demos/ConcaveDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "ConcaveDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | #include "GLDebugDrawer.h" 6 | #include "btBulletDynamicsCommon.h" 7 | 8 | GLDebugDrawer gDebugDrawer; 9 | int main(int argc,char** argv) 10 | { 11 | 12 | ConcaveDemo* concaveDemo = new ConcaveDemo(); 13 | concaveDemo->initPhysics(); 14 | concaveDemo->setCameraDistance(30.f); 15 | concaveDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 16 | 17 | return glutmain(argc, argv,640,480,"Static Concave Mesh Demo",concaveDemo); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Test/Source/main.h: -------------------------------------------------------------------------------- 1 | // 2 | // main.h 3 | // BulletTest 4 | // 5 | // Copyright (c) 2011 Apple Inc. 6 | // 7 | 8 | #ifndef BulletTest_main_h 9 | #define BulletTest_main_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | extern int gReportAverageTimes; // if 0, report best times 16 | extern int gExitOnError; // if non-zero, exit as soon an an error is encountered 17 | extern const char *gAppName; // the name of this application 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/PlugInParameters.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if !defined(CPPUNIT_NO_TESTPLUGIN) 4 | 5 | CPPUNIT_NS_BEGIN 6 | 7 | 8 | PlugInParameters::PlugInParameters( const std::string &commandLine ) 9 | : m_commandLine( commandLine ) 10 | { 11 | } 12 | 13 | 14 | PlugInParameters::~PlugInParameters() 15 | { 16 | } 17 | 18 | 19 | std::string 20 | PlugInParameters::getCommandLine() const 21 | { 22 | return m_commandLine; 23 | } 24 | 25 | 26 | CPPUNIT_NS_END 27 | 28 | #endif // !defined(CPPUNIT_NO_TESTPLUGIN) 29 | -------------------------------------------------------------------------------- /Demos/ForkLiftDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "ForkLiftDemo.h" 3 | #include "GlutStuff.h" 4 | #include "GLDebugDrawer.h" 5 | #include "btBulletDynamicsCommon.h" 6 | GLDebugDrawer gDebugDrawer; 7 | 8 | int main(int argc,char** argv) 9 | { 10 | 11 | ForkLiftDemo* pForkLiftDemo = new ForkLiftDemo; 12 | 13 | pForkLiftDemo->initPhysics(); 14 | pForkLiftDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 15 | 16 | return glutmain(argc, argv,1024,768,"Bullet ForkLift Demo. http://www.continuousphysics.com/Bullet/phpBB2/", pForkLiftDemo); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/TestFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_TESTFACTORY_H 2 | #define CPPUNIT_EXTENSIONS_TESTFACTORY_H 3 | 4 | #include 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | 9 | class Test; 10 | 11 | /*! \brief Abstract Test factory. 12 | */ 13 | class CPPUNIT_API TestFactory 14 | { 15 | public: 16 | virtual ~TestFactory() {} 17 | 18 | /*! Makes a new test. 19 | * \return A new Test. 20 | */ 21 | virtual Test* makeTest() = 0; 22 | }; 23 | 24 | 25 | CPPUNIT_NS_END 26 | 27 | #endif // CPPUNIT_EXTENSIONS_TESTFACTORY_H 28 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/ui/text/TestRunner.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_UI_TEXT_TESTRUNNER_H 2 | #define CPPUNIT_UI_TEXT_TESTRUNNER_H 3 | 4 | #include 5 | 6 | 7 | #if defined(CPPUNIT_HAVE_NAMESPACES) 8 | 9 | CPPUNIT_NS_BEGIN 10 | namespace TextUi 11 | { 12 | 13 | /*! Text TestRunner (DEPRECATED). 14 | * \deprecated Use TextTestRunner instead. 15 | */ 16 | typedef TextTestRunner TestRunner; 17 | 18 | } 19 | CPPUNIT_NS_END 20 | 21 | #endif // defined(CPPUNIT_HAVE_NAMESPACES) 22 | 23 | 24 | #endif // CPPUNIT_UI_TEXT_TESTRUNNER_H 25 | -------------------------------------------------------------------------------- /Demos/CharacterDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "CharacterDemo.h" 3 | #include "GlutStuff.h" 4 | #include "GLDebugDrawer.h" 5 | #include "btBulletDynamicsCommon.h" 6 | 7 | GLDebugDrawer gDebugDrawer; 8 | 9 | int main(int argc,char** argv) 10 | { 11 | 12 | CharacterDemo* characterDemo = new CharacterDemo; 13 | 14 | characterDemo->initPhysics(); 15 | characterDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 16 | 17 | return glutmain(argc, argv,640,480,"Bullet Character Demo. http://www.continuousphysics.com/Bullet/phpBB2/", characterDemo); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Demos/ConstraintDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ConstraintDemo.h" 2 | #include "GlutStuff.h" 3 | #include "GLDebugDrawer.h" 4 | 5 | #include "btBulletDynamicsCommon.h" 6 | 7 | int main(int argc,char** argv) 8 | { 9 | 10 | 11 | 12 | ConstraintDemo* constraintDemo = new ConstraintDemo(); 13 | 14 | 15 | constraintDemo->initPhysics(); 16 | constraintDemo->setDebugMode(btIDebugDraw::DBG_DrawConstraints+btIDebugDraw::DBG_DrawConstraintLimits); 17 | 18 | return glutmain(argc, argv,640,480,"Constraint Demo. http://www.continuousphysics.com/Bullet/phpBB2/",constraintDemo); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Demos/GyroscopicDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include "GyroscopicDemo.h" 2 | #include "GlutStuff.h" 3 | #include "GLDebugDrawer.h" 4 | 5 | #include "btBulletDynamicsCommon.h" 6 | 7 | int main(int argc,char** argv) 8 | { 9 | 10 | 11 | 12 | GyroscopicDemo* constraintDemo = new GyroscopicDemo(); 13 | 14 | 15 | constraintDemo->initPhysics(); 16 | constraintDemo->setDebugMode(btIDebugDraw::DBG_DrawConstraints+btIDebugDraw::DBG_DrawConstraintLimits); 17 | 18 | return glutmain(argc, argv,640,480,"Constraint Demo. http://www.continuousphysics.com/Bullet/phpBB2/",constraintDemo); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/portability/CppUnitDeque.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PORTABILITY_CPPUNITDEQUE_H 2 | #define CPPUNIT_PORTABILITY_CPPUNITDEQUE_H 3 | 4 | // The technic used is similar to the wrapper of STLPort. 5 | 6 | #include 7 | #include 8 | 9 | 10 | #if CPPUNIT_STD_NEED_ALLOCATOR 11 | 12 | template 13 | class CppUnitDeque : public std::deque 14 | { 15 | public: 16 | }; 17 | 18 | #else // CPPUNIT_STD_NEED_ALLOCATOR 19 | 20 | #define CppUnitDeque std::deque 21 | 22 | #endif 23 | 24 | #endif // CPPUNIT_PORTABILITY_CPPUNITDEQUE_H 25 | 26 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/portability/CppUnitVector.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PORTABILITY_CPPUNITVECTOR_H 2 | #define CPPUNIT_PORTABILITY_CPPUNITVECTOR_H 3 | 4 | // The technic used is similar to the wrapper of STLPort. 5 | 6 | #include 7 | #include 8 | 9 | 10 | #if CPPUNIT_STD_NEED_ALLOCATOR 11 | 12 | template 13 | class CppUnitVector : public std::vector 14 | { 15 | public: 16 | }; 17 | 18 | #else // CPPUNIT_STD_NEED_ALLOCATOR 19 | 20 | #define CppUnitVector std::vector 21 | 22 | #endif 23 | 24 | #endif // CPPUNIT_PORTABILITY_CPPUNITVECTOR_H 25 | 26 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | hasCL = findOpenCL_AMD() 3 | 4 | if (hasCL) then 5 | 6 | project "BulletSoftBodySolvers_OpenCL_AMD" 7 | 8 | defines { "USE_AMD_OPENCL","CL_PLATFORM_AMD"} 9 | 10 | initOpenCL_AMD() 11 | 12 | kind "StaticLib" 13 | 14 | targetdir "../../../../../lib" 15 | 16 | includedirs { 17 | ".", 18 | "../../../..", 19 | "../../../../../Glut" 20 | } 21 | files { 22 | "../btSoftBodySolver_OpenCL.cpp", 23 | "../btSoftBodySolver_OpenCLSIMDAware.cpp", 24 | "../btSoftBodySolverOutputCLtoGL.cpp" 25 | } 26 | 27 | end 28 | -------------------------------------------------------------------------------- /Demos/VectorAdd_OpenCL/Apple/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # AppVectorAdd is a very basic test OpenCL/MiniCL. 2 | 3 | IF (APPLE) 4 | FIND_LIBRARY(OPENCL_LIBRARY OpenCL DOC "OpenCL lib for OSX") 5 | FIND_PATH(OPENCL_INCLUDE_DIR OpenCL/cl.h DOC "Include for OpenCL on OSX") 6 | ENDIF (APPLE) 7 | 8 | 9 | INCLUDE_DIRECTORIES( 10 | ${BULLET_PHYSICS_SOURCE_DIR}/src 11 | ) 12 | 13 | LINK_LIBRARIES( 14 | LinearMath ${OPENCL_LIBRARY} 15 | ) 16 | 17 | ADD_EXECUTABLE(AppVectorAdd_Apple 18 | ../MiniCL_VectorAdd.cpp 19 | ../VectorAddKernels.cl 20 | ) 21 | 22 | IF (UNIX) 23 | TARGET_LINK_LIBRARIES(AppVectorAdd_Apple pthread) 24 | ENDIF(UNIX) 25 | 26 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Intel/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | hasCL = findOpenCL_Intel() 3 | 4 | if (hasCL) then 5 | 6 | project "BulletSoftBodySolvers_OpenCL_Intel" 7 | 8 | defines { "USE_INTEL_OPENCL","CL_PLATFORM_INTEL"} 9 | 10 | initOpenCL_Intel() 11 | 12 | kind "StaticLib" 13 | 14 | targetdir "../../../../../lib" 15 | 16 | includedirs { 17 | ".", 18 | "../../../..", 19 | "../../../../../Glut" 20 | } 21 | files { 22 | "../btSoftBodySolver_OpenCL.cpp", 23 | "../btSoftBodySolver_OpenCLSIMDAware.cpp", 24 | "../btSoftBodySolverOutputCLtoGL.cpp" 25 | } 26 | 27 | end 28 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | hasCL = findOpenCL_NVIDIA() 3 | 4 | if (hasCL) then 5 | 6 | project "BulletSoftBodySolvers_OpenCL_NVIDIA" 7 | 8 | defines { "USE_NVIDIA_OPENCL","CL_PLATFORM_NVIDIA"} 9 | 10 | initOpenCL_NVIDIA() 11 | 12 | kind "StaticLib" 13 | 14 | targetdir "../../../../../lib" 15 | 16 | includedirs { 17 | ".", 18 | "../../../..", 19 | "../../../../../Glut" 20 | } 21 | files { 22 | "../btSoftBodySolver_OpenCL.cpp", 23 | "../btSoftBodySolver_OpenCLSIMDAware.cpp", 24 | "../btSoftBodySolverOutputCLtoGL.cpp" 25 | } 26 | 27 | end 28 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/Readme.txt: -------------------------------------------------------------------------------- 1 | --- AntTweakBar development library --- 2 | 3 | 4 | AntTweakBar is a small and easy-to-use C/C++ library that allows programmers 5 | to quickly add a light and intuitive GUI into OpenGL and DirectX based 6 | graphic programs to interactively tweak parameters. 7 | 8 | This package includes the development version of the AntTweakBar library 9 | for Windows, GNU/Linux and OSX, and some program examples (sources + binaries). 10 | 11 | For installation and documentation please refer to: 12 | http://www.antisphere.com/Wiki/tools:anttweakbar 13 | 14 | 15 | Philippe Decaudin - http://www.antisphere.com 16 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/RepeatedTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | CPPUNIT_NS_BEGIN 5 | 6 | 7 | // Counts the number of test cases that will be run by this test. 8 | int 9 | RepeatedTest::countTestCases() const 10 | { 11 | return TestDecorator::countTestCases() * m_timesRepeat; 12 | } 13 | 14 | 15 | // Runs a repeated test 16 | void 17 | RepeatedTest::run( TestResult *result ) 18 | { 19 | for ( int n = 0; n < m_timesRepeat; n++ ) 20 | { 21 | if ( result->shouldStop() ) 22 | break; 23 | 24 | TestDecorator::run( result ); 25 | } 26 | } 27 | 28 | 29 | CPPUNIT_NS_END 30 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/Opcode.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Opcode"=.\Opcode.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /Demos/MultiMaterialDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "MultiMaterialDemo.h" 3 | #include "GlutStuff.h" 4 | 5 | #include "GlutStuff.h" 6 | #include "GLDebugDrawer.h" 7 | #include "btBulletDynamicsCommon.h" 8 | 9 | GLDebugDrawer gDebugDrawer; 10 | 11 | int main(int argc,char** argv) 12 | { 13 | 14 | MultiMaterialDemo* multiMaterialDemo = new MultiMaterialDemo(); 15 | multiMaterialDemo->initPhysics(); 16 | multiMaterialDemo->setCameraDistance(30.f); 17 | 18 | multiMaterialDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 19 | 20 | return glutmain(argc, argv,640,480,"Multimaterial Mesh Demo",multiMaterialDemo); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/tools/Algorithm.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TOOLS_ALGORITHM_H_INCLUDED 2 | #define CPPUNIT_TOOLS_ALGORITHM_H_INCLUDED 3 | 4 | #include 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | template 9 | void 10 | removeFromSequence( SequenceType &sequence, 11 | const ValueType &valueToRemove ) 12 | { 13 | for ( unsigned int index =0; index < sequence.size(); ++index ) 14 | { 15 | if ( sequence[ index ] == valueToRemove ) 16 | sequence.erase( sequence.begin() + index ); 17 | } 18 | } 19 | 20 | CPPUNIT_NS_END 21 | 22 | 23 | #endif // CPPUNIT_TOOLS_ALGORITHM_H_INCLUDED 24 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/portability/CppUnitStack.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PORTABILITY_CPPUNITSTACK_H 2 | #define CPPUNIT_PORTABILITY_CPPUNITSTACK_H 3 | 4 | // The technic used is similar to the wrapper of STLPort. 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | #if CPPUNIT_STD_NEED_ALLOCATOR 12 | 13 | template 14 | class CppUnitStack : public std::stack > 16 | { 17 | public: 18 | }; 19 | 20 | #else // CPPUNIT_STD_NEED_ALLOCATOR 21 | 22 | #define CppUnitStack std::stack 23 | 24 | #endif 25 | 26 | #endif // CPPUNIT_PORTABILITY_CPPUNITSTACK_H -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/TestSuiteFactory.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_TESTSUITEFACTORY_H 2 | #define CPPUNIT_EXTENSIONS_TESTSUITEFACTORY_H 3 | 4 | #include 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | 9 | class Test; 10 | 11 | /*! \brief TestFactory for TestFixture that implements a static suite() method. 12 | * \see AutoRegisterSuite. 13 | */ 14 | template 15 | class TestSuiteFactory : public TestFactory 16 | { 17 | public: 18 | virtual Test *makeTest() 19 | { 20 | return TestCaseType::suite(); 21 | } 22 | }; 23 | 24 | 25 | CPPUNIT_NS_END 26 | 27 | #endif // CPPUNIT_EXTENSIONS_TESTSUITEFACTORY_H 28 | -------------------------------------------------------------------------------- /UnitTests/BulletUnitTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE_DIRECTORIES( 3 | ${BULLET_PHYSICS_SOURCE_DIR}/src 4 | ${BULLET_PHYSICS_SOURCE_DIR}/UnitTests/cppunit/include 5 | 6 | 7 | ${VECTOR_MATH_INCLUDE} 8 | ) 9 | 10 | LINK_LIBRARIES( 11 | cppunit 12 | BulletMultiThreaded 13 | BulletSoftBody 14 | BulletDynamics 15 | BulletCollision 16 | LinearMath 17 | ) 18 | 19 | ADD_EXECUTABLE(AppBulletUnitTests 20 | Main.cpp 21 | TestBulletOnly.h 22 | TestLinearMath.h 23 | TestCholeskyDecomposition.cpp 24 | TestCholeskyDecomposition.h 25 | TestPolarDecomposition.cpp 26 | TestPolarDecomposition.h 27 | btCholeskyDecomposition.cpp 28 | btCholeskyDecomposition.h 29 | ) 30 | 31 | 32 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/portability/CppUnitSet.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PORTABILITY_CPPUNITSET_H 2 | #define CPPUNIT_PORTABILITY_CPPUNITSET_H 3 | 4 | // The technic used is similar to the wrapper of STLPort. 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | #if CPPUNIT_STD_NEED_ALLOCATOR 12 | 13 | template 14 | class CppUnitSet : public std::set 16 | ,CPPUNIT_STD_ALLOCATOR> 17 | { 18 | public: 19 | }; 20 | 21 | #else // CPPUNIT_STD_NEED_ALLOCATOR 22 | 23 | #define CppUnitSet std::set 24 | 25 | #endif 26 | 27 | #endif // CPPUNIT_PORTABILITY_CPPUNITSET_H 28 | 29 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/DefaultProtector.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_DEFAULTPROTECTOR_H 2 | #define CPPUNIT_DEFAULTPROTECTOR_H 3 | 4 | #include 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | /*! \brief Default protector that catch all exceptions (Implementation). 9 | * 10 | * Implementation detail. 11 | * \internal This protector catch and generate a failure for the following 12 | * exception types: 13 | * - Exception 14 | * - std::exception 15 | * - ... 16 | */ 17 | class DefaultProtector : public Protector 18 | { 19 | public: 20 | bool protect( const Functor &functor, 21 | const ProtectorContext &context ); 22 | }; 23 | 24 | CPPUNIT_NS_END 25 | 26 | #endif // CPPUNIT_DEFAULTPROTECTOR_H 27 | 28 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateFixedVertexPositions.cl: -------------------------------------------------------------------------------- 1 | MSTRINGIFY( 2 | 3 | __kernel void 4 | UpdateFixedVertexPositions( 5 | const uint numNodes, 6 | __global int * g_anchorIndex, 7 | __global float4 * g_vertexPositions, 8 | __global float4 * g_anchorPositions GUID_ARG) 9 | { 10 | unsigned int nodeID = get_global_id(0); 11 | 12 | if( nodeID < numNodes ) 13 | { 14 | int anchorIndex = g_anchorIndex[nodeID]; 15 | float4 position = g_vertexPositions[nodeID]; 16 | 17 | if ( anchorIndex >= 0 ) 18 | { 19 | float4 anchorPosition = g_anchorPositions[anchorIndex]; 20 | g_vertexPositions[nodeID] = anchorPosition; 21 | } 22 | } 23 | } 24 | 25 | ); 26 | -------------------------------------------------------------------------------- /Demos/NativeClient/opengl_context_ptrs.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef EXAMPLES_TUMBLER_OPENGL_CONTEXT_PTRS_H_ 6 | #define EXAMPLES_TUMBLER_OPENGL_CONTEXT_PTRS_H_ 7 | 8 | // A convenience wrapper for a shared OpenGLContext pointer type. As other 9 | // smart pointer types are needed, add them here. 10 | 11 | #include 12 | 13 | namespace tumbler { 14 | 15 | class OpenGLContext; 16 | 17 | typedef std::tr1::shared_ptr SharedOpenGLContext; 18 | 19 | } // namespace tumbler 20 | 21 | #endif // EXAMPLES_TUMBLER_OPENGL_CONTEXT_PTRS_H_ 22 | 23 | -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/gl_win.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __GL_WIN_HDR__ 2 | #define __GL_WIN_HDR__ 3 | 4 | #ifdef _WIN32//for glut.h 5 | #include 6 | #endif 7 | 8 | //think different 9 | #if defined(__APPLE__) && !defined (VMDMESA) 10 | #include 11 | #include 12 | #include 13 | #include 14 | #else 15 | 16 | 17 | #ifdef _WINDOWS 18 | #include 19 | #include 20 | #include 21 | #else 22 | #include 23 | #endif //_WINDOWS 24 | #endif //APPLE 25 | 26 | 27 | #include 28 | 29 | void goGL(void); 30 | void preInitGL(int argc, char ** argv); 31 | 32 | int getVBO( std::string, int size ); 33 | 34 | #endif //__GL_WIN_HDR__ 35 | -------------------------------------------------------------------------------- /Extras/Serialize/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | IF (BUILD_BLEND_DEMO OR INTERNAL_UPDATE_SERIALIZATION_STRUCTURES) 3 | SUBDIRS(BlenderSerialize ) 4 | ENDIF() 5 | 6 | 7 | IF(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES) 8 | 9 | # makesdna and HeaderGenerator are for advanced use only 10 | # makesdna can re-generate the binary DNA representing the Bullet serialization structures 11 | # Be very careful modifying any of this, otherwise the .bullet format becomes incompatible 12 | 13 | SUBDIRS ( BulletFileLoader BulletXmlWorldImporter BulletWorldImporter HeaderGenerator makesdna) 14 | 15 | ELSE(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES) 16 | 17 | SUBDIRS ( BulletFileLoader BulletXmlWorldImporter BulletWorldImporter ) 18 | 19 | ENDIF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES) 20 | 21 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/portability/CppUnitMap.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PORTABILITY_CPPUNITMAP_H 2 | #define CPPUNIT_PORTABILITY_CPPUNITMAP_H 3 | 4 | // The technic used is similar to the wrapper of STLPort. 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | #if CPPUNIT_STD_NEED_ALLOCATOR 12 | 13 | template 14 | class CppUnitMap : public std::map 17 | ,CPPUNIT_STD_ALLOCATOR> 18 | { 19 | public: 20 | }; 21 | 22 | #else // CPPUNIT_STD_NEED_ALLOCATOR 23 | 24 | #define CppUnitMap std::map 25 | 26 | #endif 27 | 28 | #endif // CPPUNIT_PORTABILITY_CPPUNITMAP_H 29 | 30 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/config/CppUnitApi.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_CONFIG_CPPUNITAPI 2 | #define CPPUNIT_CONFIG_CPPUNITAPI 3 | 4 | #undef CPPUNIT_API 5 | 6 | #ifdef WIN32 7 | 8 | // define CPPUNIT_DLL_BUILD when building CppUnit dll. 9 | #ifdef CPPUNIT_BUILD_DLL 10 | #define CPPUNIT_API __declspec(dllexport) 11 | #endif 12 | 13 | // define CPPUNIT_DLL when linking to CppUnit dll. 14 | #ifdef CPPUNIT_DLL 15 | #define CPPUNIT_API __declspec(dllimport) 16 | #endif 17 | 18 | #ifdef CPPUNIT_API 19 | #undef CPPUNIT_NEED_DLL_DECL 20 | #define CPPUNIT_NEED_DLL_DECL 1 21 | #endif 22 | 23 | #endif 24 | 25 | 26 | #ifndef CPPUNIT_API 27 | #define CPPUNIT_API 28 | #undef CPPUNIT_NEED_DLL_DECL 29 | #define CPPUNIT_NEED_DLL_DECL 0 30 | #endif 31 | 32 | 33 | #endif // CPPUNIT_CONFIG_CPPUNITAPI 34 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/TestSetUp.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_TESTSETUP_H 2 | #define CPPUNIT_EXTENSIONS_TESTSETUP_H 3 | 4 | #include 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | 9 | class Test; 10 | class TestResult; 11 | 12 | /*! \brief Decorates a test by providing a specific setUp() and tearDown(). 13 | */ 14 | class CPPUNIT_API TestSetUp : public TestDecorator 15 | { 16 | public: 17 | TestSetUp( Test *test ); 18 | 19 | void run( TestResult *result ); 20 | 21 | protected: 22 | virtual void setUp(); 23 | virtual void tearDown(); 24 | 25 | private: 26 | TestSetUp( const TestSetUp & ); 27 | void operator =( const TestSetUp & ); 28 | }; 29 | 30 | 31 | CPPUNIT_NS_END 32 | 33 | #endif // CPPUNIT_EXTENSIONS_TESTSETUP_H 34 | 35 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestCaseDecorator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | CPPUNIT_NS_BEGIN 4 | 5 | 6 | TestCaseDecorator::TestCaseDecorator( TestCase *test ) 7 | : TestCase( test->getName() ), 8 | m_test( test ) 9 | { 10 | } 11 | 12 | 13 | TestCaseDecorator::~TestCaseDecorator() 14 | { 15 | delete m_test; 16 | } 17 | 18 | 19 | std::string 20 | TestCaseDecorator::getName() const 21 | { 22 | return m_test->getName(); 23 | } 24 | 25 | 26 | void 27 | TestCaseDecorator::setUp() 28 | { 29 | m_test->setUp(); 30 | } 31 | 32 | 33 | void 34 | TestCaseDecorator::tearDown() 35 | { 36 | m_test->tearDown(); 37 | } 38 | 39 | 40 | void 41 | TestCaseDecorator::runTest() 42 | { 43 | m_test->runTest(); 44 | } 45 | 46 | 47 | CPPUNIT_NS_END 48 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/SynchronizedObject.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | CPPUNIT_NS_BEGIN 5 | 6 | 7 | SynchronizedObject::SynchronizedObject( SynchronizationObject *syncObject ) 8 | : m_syncObject( syncObject == 0 ? new SynchronizationObject() : 9 | syncObject ) 10 | { 11 | } 12 | 13 | 14 | SynchronizedObject::~SynchronizedObject() 15 | { 16 | delete m_syncObject; 17 | } 18 | 19 | 20 | /** Accept a new synchronization object for protection of this instance 21 | * TestResult assumes ownership of the object 22 | */ 23 | void 24 | SynchronizedObject::setSynchronizationObject( SynchronizationObject *syncObject ) 25 | { 26 | delete m_syncObject; 27 | m_syncObject = syncObject; 28 | } 29 | 30 | 31 | CPPUNIT_NS_END 32 | 33 | -------------------------------------------------------------------------------- /Demos/ConvexDecompositionDemo/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "ConvexDecompositionDemo.h" 4 | #include "GlutStuff.h" 5 | #include "GLDebugDrawer.h" 6 | #include "btBulletDynamicsCommon.h" 7 | 8 | 9 | GLDebugDrawer gDebugDrawer; 10 | 11 | int main(int argc,char** argv) 12 | { 13 | const char* filename = "file.obj"; 14 | 15 | 16 | ConvexDecompositionDemo* convexDecompDemo = new ConvexDecompositionDemo(); 17 | 18 | convexDecompDemo->initPhysics(filename); 19 | 20 | convexDecompDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 21 | 22 | 23 | convexDecompDemo->clientResetScene(); 24 | 25 | 26 | 27 | glutmain(argc, argv,640,480,"Bullet Physics Demo. http://www.continuousphysics.com/Bullet/phpBB2/",convexDecompDemo); 28 | 29 | delete convexDecompDemo; 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /Demos/SliderConstraintDemo/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Added by Roman Ponomarev (rponom@gmail.com) 3 | April 04, 2008 4 | */ 5 | #include "SliderConstraintDemo.h" 6 | #include "GlutStuff.h" 7 | 8 | #include "GLDebugDrawer.h" 9 | #include "btBulletDynamicsCommon.h" 10 | 11 | GLDebugDrawer gDebugDrawer; 12 | 13 | int main(int argc,char** argv) 14 | { 15 | 16 | SliderConstraintDemo* sliderConstraintDemo = new SliderConstraintDemo(); 17 | 18 | sliderConstraintDemo->initPhysics(); 19 | sliderConstraintDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); 20 | sliderConstraintDemo->setDebugMode(btIDebugDraw::DBG_DrawConstraints+btIDebugDraw::DBG_DrawConstraintLimits); 21 | 22 | 23 | return glutmain(argc, argv,640,480,"Slider Constraint Demo. http://www.continuousphysics.com/Bullet/phpBB2/", sliderConstraintDemo); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Demos/VectorAdd_OpenCL/NVidia/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INCLUDE_DIRECTORIES( 6 | ${BULLET_PHYSICS_SOURCE_DIR}/src 7 | ${NVIDIA_OPENCL_INCLUDES} 8 | ) 9 | 10 | LINK_LIBRARIES( 11 | LinearMath 12 | ${NVIDIA_OPENCL_LIBRARIES} 13 | ) 14 | 15 | ADD_EXECUTABLE(AppVectorAdd_NVidia 16 | ../MiniCL_VectorAdd.cpp 17 | ../VectorAddKernels.cl 18 | ) 19 | 20 | IF (UNIX) 21 | TARGET_LINK_LIBRARIES(AppVectorAdd_NVidia pthread) 22 | ENDIF(UNIX) 23 | 24 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 25 | SET_TARGET_PROPERTIES(AppVectorAdd_NVidia PROPERTIES DEBUG_POSTFIX "_Debug") 26 | SET_TARGET_PROPERTIES(AppVectorAdd_NVidia PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 27 | SET_TARGET_PROPERTIES(AppVectorAdd_NVidia PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 28 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/AdditionalMessage.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | CPPUNIT_NS_BEGIN 5 | 6 | 7 | AdditionalMessage::AdditionalMessage() 8 | { 9 | } 10 | 11 | 12 | AdditionalMessage::AdditionalMessage( const std::string &detail1 ) 13 | { 14 | if ( !detail1.empty() ) 15 | addDetail( detail1 ); 16 | } 17 | 18 | 19 | AdditionalMessage::AdditionalMessage( const char *detail1 ) 20 | { 21 | if ( detail1 && !std::string( detail1 ).empty() ) 22 | addDetail( std::string(detail1) ); 23 | } 24 | 25 | 26 | AdditionalMessage::AdditionalMessage( const Message &other ) 27 | : SuperClass( other ) 28 | { 29 | } 30 | 31 | 32 | AdditionalMessage & 33 | AdditionalMessage::operator =( const Message &other ) 34 | { 35 | SuperClass::operator =( other ); 36 | 37 | return *this; 38 | } 39 | 40 | 41 | CPPUNIT_NS_END 42 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestSuccessListener.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | CPPUNIT_NS_BEGIN 5 | 6 | 7 | TestSuccessListener::TestSuccessListener( SynchronizationObject *syncObject ) 8 | : SynchronizedObject( syncObject ) 9 | , m_success( true ) 10 | { 11 | } 12 | 13 | 14 | TestSuccessListener::~TestSuccessListener() 15 | { 16 | } 17 | 18 | 19 | void 20 | TestSuccessListener::reset() 21 | { 22 | ExclusiveZone zone( m_syncObject ); 23 | m_success = true; 24 | } 25 | 26 | 27 | void 28 | TestSuccessListener::addFailure( const TestFailure & ) 29 | { 30 | ExclusiveZone zone( m_syncObject ); 31 | m_success = false; 32 | } 33 | 34 | 35 | bool 36 | TestSuccessListener::wasSuccessful() const 37 | { 38 | ExclusiveZone zone( m_syncObject ); 39 | return m_success; 40 | } 41 | 42 | 43 | CPPUNIT_NS_END 44 | 45 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositionsFromVelocities.cl: -------------------------------------------------------------------------------- 1 | 2 | MSTRINGIFY( 3 | 4 | 5 | 6 | 7 | __kernel void 8 | UpdatePositionsFromVelocitiesKernel( 9 | const int numNodes, 10 | const float solverSDT, 11 | __global float4 * g_vertexVelocities, 12 | __global float4 * g_vertexPreviousPositions, 13 | __global float4 * g_vertexCurrentPosition GUID_ARG) 14 | { 15 | int vertexID = get_global_id(0); 16 | if( vertexID < numNodes ) 17 | { 18 | float4 previousPosition = g_vertexPreviousPositions[vertexID]; 19 | float4 velocity = g_vertexVelocities[vertexID]; 20 | 21 | float4 newPosition = previousPosition + velocity*solverSDT; 22 | 23 | g_vertexCurrentPosition[vertexID] = newPosition; 24 | g_vertexPreviousPositions[vertexID] = newPosition; 25 | } 26 | } 27 | 28 | ); -------------------------------------------------------------------------------- /Demos/NativeClient/bin_html/bind.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /** 6 | * @fileoverview This class implements an extension to Function object that 7 | * lets you bind a scope for |this| to a function. 8 | */ 9 | 10 | /** 11 | * Bind a scope to a function. Used to bind an object to |this| for event 12 | * handlers. 13 | * @param {!Object} scope The scope in which the function executes. |scope| 14 | * becomes |this| during function execution. 15 | * @return {function} the bound version of the original function. 16 | */ 17 | Function.prototype.bind = function(scope) { 18 | var boundContext = this; 19 | return function() { 20 | return boundContext.apply(scope, arguments); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestNamer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | 9 | #if CPPUNIT_HAVE_RTTI 10 | TestNamer::TestNamer( const std::type_info &typeInfo ) 11 | { 12 | m_fixtureName = TypeInfoHelper::getClassName( typeInfo ); 13 | } 14 | #endif 15 | 16 | 17 | TestNamer::TestNamer( const std::string &fixtureName ) 18 | : m_fixtureName( fixtureName ) 19 | { 20 | } 21 | 22 | 23 | TestNamer::~TestNamer() 24 | { 25 | } 26 | 27 | 28 | std::string 29 | TestNamer::getFixtureName() const 30 | { 31 | return m_fixtureName; 32 | } 33 | 34 | 35 | std::string 36 | TestNamer::getTestNameFor( const std::string &testMethodName ) const 37 | { 38 | return getFixtureName() + "::" + testMethodName; 39 | } 40 | 41 | 42 | 43 | 44 | CPPUNIT_NS_END 45 | -------------------------------------------------------------------------------- /Demos/HelloWorld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # HelloWorld is a minimal sample creating, stepping and deleting a Bullet dynamics world 2 | 3 | INCLUDE_DIRECTORIES( 4 | ${BULLET_PHYSICS_SOURCE_DIR}/src 5 | ) 6 | 7 | LINK_LIBRARIES( 8 | BulletDynamics BulletCollision LinearMath 9 | ) 10 | 11 | IF (WIN32) 12 | ADD_EXECUTABLE(AppHelloWorld 13 | HelloWorld.cpp 14 | ${BULLET_PHYSICS_SOURCE_DIR}/build/bullet.rc 15 | ) 16 | ELSE() 17 | ADD_EXECUTABLE(AppHelloWorld 18 | HelloWorld.cpp 19 | ) 20 | ENDIF() 21 | 22 | 23 | 24 | 25 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 26 | SET_TARGET_PROPERTIES(AppHelloWorld PROPERTIES DEBUG_POSTFIX "_Debug") 27 | SET_TARGET_PROPERTIES(AppHelloWorld PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 28 | SET_TARGET_PROPERTIES(AppHelloWorld PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 29 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) -------------------------------------------------------------------------------- /Demos/OpenPL_Demo/OpenPL_Demo.c: -------------------------------------------------------------------------------- 1 | 2 | #include "Bullet-C-Api.h" 3 | 4 | 5 | int main() 6 | { 7 | float timeStep = 1.f/60.f; 8 | 9 | /* initialize */ 10 | plPhysicsSdkHandle sdk = plNewBulletSdk(); 11 | 12 | plDynamicsWorldHandle world = plCreateDynamicsWorld(sdk); 13 | 14 | 15 | float radius = 1.f; 16 | plCollisionShapeHandle collisionShape = plNewSphereShape(radius); 17 | 18 | void* user_data = 0;/* can point to a graphics object */ 19 | 20 | float mass = 1.f; 21 | 22 | plRigidBodyHandle body = plCreateRigidBody(user_data, mass, collisionShape ); 23 | 24 | plAddRigidBody(world, body); 25 | 26 | 27 | 28 | plStepSimulation(world,0.1f); 29 | 30 | /* cleanup */ 31 | 32 | plRemoveRigidBody(world, body); 33 | 34 | 35 | plDeleteRigidBody(body); 36 | 37 | plDeleteShape( collisionShape); 38 | 39 | plDeleteDynamicsWorld( world); 40 | 41 | plDeletePhysicsSdk(sdk); 42 | 43 | return 0; 44 | } -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/XmlOutputterHook.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | CPPUNIT_NS_BEGIN 5 | 6 | 7 | void 8 | XmlOutputterHook::beginDocument( XmlDocument * ) 9 | { 10 | } 11 | 12 | 13 | void 14 | XmlOutputterHook::endDocument( XmlDocument * ) 15 | { 16 | } 17 | 18 | 19 | void 20 | XmlOutputterHook::failTestAdded( XmlDocument *, 21 | XmlElement *, 22 | Test *, 23 | TestFailure * ) 24 | { 25 | } 26 | 27 | 28 | void 29 | XmlOutputterHook::successfulTestAdded( XmlDocument *, 30 | XmlElement *, 31 | Test * ) 32 | { 33 | } 34 | 35 | 36 | void 37 | XmlOutputterHook::statisticsAdded( XmlDocument *, 38 | XmlElement * ) 39 | { 40 | } 41 | 42 | 43 | CPPUNIT_NS_END 44 | 45 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/plugin/PlugInParameters.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PLUGIN_PARAMETERS 2 | #define CPPUNIT_PLUGIN_PARAMETERS 3 | 4 | #include 5 | 6 | #if !defined(CPPUNIT_NO_TESTPLUGIN) 7 | 8 | #include 9 | #include 10 | 11 | CPPUNIT_NS_BEGIN 12 | 13 | /*! \brief Test plug-ins parameters. 14 | */ 15 | class CPPUNIT_API PlugInParameters 16 | { 17 | public: 18 | /// Constructs plug-in parameters from the specified command-line. 19 | PlugInParameters( const std::string &commandLine = "" ); 20 | 21 | virtual ~PlugInParameters(); 22 | 23 | /// Returns the command line that was passed on construction. 24 | std::string getCommandLine() const; 25 | 26 | private: 27 | std::string m_commandLine; 28 | }; 29 | 30 | 31 | CPPUNIT_NS_END 32 | 33 | #endif // !defined(CPPUNIT_NO_TESTPLUGIN) 34 | 35 | 36 | #endif // CPPUNIT_PLUGIN_PARAMETERS 37 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/ProtectorContext.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PROTECTORCONTEXT_H 2 | #define CPPUNIT_PROTECTORCONTEXT_H 3 | 4 | #include 5 | #include 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | class Test; 10 | class TestResult; 11 | 12 | 13 | /*! \brief Protector context (Implementation). 14 | * Implementation detail. 15 | * \internal Context use to report failure in Protector. 16 | */ 17 | class CPPUNIT_API ProtectorContext 18 | { 19 | public: 20 | ProtectorContext( Test *test, 21 | TestResult *result, 22 | const std::string &shortDescription ) 23 | : m_test( test ) 24 | , m_result( result ) 25 | , m_shortDescription( shortDescription ) 26 | { 27 | } 28 | 29 | Test *m_test; 30 | TestResult *m_result; 31 | std::string m_shortDescription; 32 | }; 33 | 34 | 35 | CPPUNIT_NS_END 36 | 37 | #endif // CPPUNIT_PROTECTORCONTEXT_H 38 | 39 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestDecorator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | CPPUNIT_NS_BEGIN 4 | 5 | 6 | TestDecorator::TestDecorator( Test *test ) 7 | : m_test( test) 8 | { 9 | } 10 | 11 | 12 | TestDecorator::~TestDecorator() 13 | { 14 | delete m_test; 15 | } 16 | 17 | 18 | int 19 | TestDecorator::countTestCases() const 20 | { 21 | return m_test->countTestCases(); 22 | } 23 | 24 | 25 | void 26 | TestDecorator::run( TestResult *result ) 27 | { 28 | m_test->run(result); 29 | } 30 | 31 | 32 | std::string 33 | TestDecorator::getName() const 34 | { 35 | return m_test->getName(); 36 | } 37 | 38 | 39 | int 40 | TestDecorator::getChildTestCount() const 41 | { 42 | return m_test->getChildTestCount(); 43 | } 44 | 45 | 46 | Test * 47 | TestDecorator::doGetChildTestAt( int index ) const 48 | { 49 | return m_test->getChildTestAt( index ); 50 | } 51 | 52 | 53 | CPPUNIT_NS_END 54 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TextTestProgressListener.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | 9 | TextTestProgressListener::TextTestProgressListener() 10 | { 11 | } 12 | 13 | 14 | TextTestProgressListener::~TextTestProgressListener() 15 | { 16 | } 17 | 18 | 19 | void 20 | TextTestProgressListener::startTest( Test * ) 21 | { 22 | stdCOut() << "."; 23 | stdCOut().flush(); 24 | } 25 | 26 | 27 | void 28 | TextTestProgressListener::addFailure( const TestFailure &failure ) 29 | { 30 | stdCOut() << ( failure.isError() ? "E" : "F" ); 31 | stdCOut().flush(); 32 | } 33 | 34 | 35 | void 36 | TextTestProgressListener::endTestRun( Test *, 37 | TestResult * ) 38 | { 39 | stdCOut() << "\n"; 40 | stdCOut().flush(); 41 | } 42 | 43 | 44 | CPPUNIT_NS_END 45 | 46 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/TypeInfoHelper.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TYPEINFOHELPER_H 2 | #define CPPUNIT_TYPEINFOHELPER_H 3 | 4 | #include 5 | 6 | #if CPPUNIT_HAVE_RTTI 7 | 8 | #include 9 | #include 10 | 11 | CPPUNIT_NS_BEGIN 12 | 13 | 14 | /**! \brief Helper to use type_info. 15 | */ 16 | class CPPUNIT_API TypeInfoHelper 17 | { 18 | public: 19 | /*! \brief Get the class name of the specified type_info. 20 | * \param info Info which the class name is extracted from. 21 | * \return The string returned by type_info::name() without 22 | * the "class" prefix. If the name is not prefixed 23 | * by "class", it is returned as this. 24 | */ 25 | static std::string getClassName( const std::type_info &info ); 26 | }; 27 | 28 | 29 | CPPUNIT_NS_END 30 | 31 | #endif // CPPUNIT_HAVE_RTTI 32 | 33 | #endif // CPPUNIT_TYPEINFOHELPER_H 34 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/tools/StringTools.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TOOLS_STRINGTOOLS_H 2 | #define CPPUNIT_TOOLS_STRINGTOOLS_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | CPPUNIT_NS_BEGIN 10 | 11 | 12 | /*! \brief Tool functions to manipulate string. 13 | */ 14 | struct StringTools 15 | { 16 | 17 | typedef CppUnitVector Strings; 18 | 19 | static std::string CPPUNIT_API toString( int value ); 20 | 21 | static std::string CPPUNIT_API toString( double value ); 22 | 23 | static Strings CPPUNIT_API split( const std::string &text, 24 | char separator ); 25 | 26 | static std::string CPPUNIT_API wrap( const std::string &text, 27 | int wrapColumn = CPPUNIT_WRAP_COLUMN ); 28 | 29 | }; 30 | 31 | 32 | CPPUNIT_NS_END 33 | 34 | #endif // CPPUNIT_TOOLS_STRINGTOOLS_H 35 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/DXUT/Optional/DXUTres.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------------- 2 | // File: dxutres.h 3 | // 4 | // Functions to create DXUT media from arrays in memory 5 | // 6 | // Copyright (c) Microsoft Corp. All rights reserved. 7 | //----------------------------------------------------------------------------- 8 | #pragma once 9 | #ifndef DXUT_RES_H 10 | #define DXUT_RES_H 11 | 12 | HRESULT WINAPI DXUTCreateGUITextureFromInternalArray9( LPDIRECT3DDEVICE9 pd3dDevice, IDirect3DTexture9** ppTexture, 13 | D3DXIMAGE_INFO* pInfo ); 14 | HRESULT WINAPI DXUTCreateGUITextureFromInternalArray11( ID3D11Device* pd3dDevice, ID3D11Texture2D** ppTexture, 15 | D3DX11_IMAGE_INFO* pInfo ); 16 | HRESULT WINAPI DXUTCreateArrowMeshFromInternalArray( LPDIRECT3DDEVICE9 pd3dDevice, ID3DXMesh** ppMesh ); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Glut/EmptyGL/GL/egl_cpx.h: -------------------------------------------------------------------------------- 1 | // todo - implement these as you see fit. 2 | inline GLint glRenderMode(GLenum a0) { return GL_RENDER; }; // ymmv. should return previous mode 3 | inline GLenum glGetError() { return GL_NO_ERROR; }; 4 | inline GLboolean glIsList(GLuint a0) { return GL_TRUE; }; 5 | inline GLuint glGenLists(GLsizei a0) { return (GLuint)a0; }; 6 | inline const GLubyte* glGetString(GLenum a0) { return (const GLubyte *)"egl-xyzzy"; }; 7 | inline GLboolean glIsEnabled(GLenum a0) { return GL_TRUE; }; 8 | inline GLboolean glAreTexturesResident(GLsizei a0,const GLuint * a1,GLboolean * a2) { return GL_TRUE; }; 9 | inline GLboolean glIsTexture(GLuint a0) { return GL_TRUE; }; 10 | inline void glGetBooleanv(GLenum a0,GLboolean * a1) { *a1 = GL_TRUE; }; 11 | inline void glGetDoublev(GLenum a0,GLdouble * a1) { *a1 = 0.0; }; 12 | inline void glGetFloatv(GLenum a0,GLfloat * a1) { *a1 = 0.0f; }; 13 | inline void glGetIntegerv(GLenum a0,GLint * a1) { *a1 = 0; }; 14 | -------------------------------------------------------------------------------- /Demos/OpenCLClothDemo/CLClothDemo.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CLClothDemo", "CLClothDemo.vcproj", "{A61906AF-B5DE-454E-99F6-B653C250D221}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {A61906AF-B5DE-454E-99F6-B653C250D221}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {A61906AF-B5DE-454E-99F6-B653C250D221}.Debug|Win32.Build.0 = Debug|Win32 14 | {A61906AF-B5DE-454E-99F6-B653C250D221}.Release|Win32.ActiveCfg = Release|Win32 15 | {A61906AF-B5DE-454E-99F6-B653C250D221}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/TestCaseDecorator.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_TESTCASEDECORATOR_H 2 | #define CPPUNIT_EXTENSIONS_TESTCASEDECORATOR_H 3 | 4 | #include 5 | #include 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | /*! \brief Decorator for Test cases. 11 | * 12 | * TestCaseDecorator provides an alternate means to extend functionality 13 | * of a test class without subclassing the test. Instead, one can 14 | * subclass the decorater and use it to wrap the test class. 15 | * 16 | * Does not assume ownership of the test it decorates 17 | */ 18 | class CPPUNIT_API TestCaseDecorator : public TestCase 19 | { 20 | public: 21 | TestCaseDecorator( TestCase *test ); 22 | ~TestCaseDecorator(); 23 | 24 | std::string getName() const; 25 | 26 | void setUp(); 27 | 28 | void tearDown(); 29 | 30 | void runTest(); 31 | 32 | protected: 33 | TestCase *m_test; 34 | }; 35 | 36 | 37 | CPPUNIT_NS_END 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/Opcode.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Opcode", "Opcode.vcproj", "{4B23B91D-D4D6-4ED6-9583-FE6CC3730F51}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {4B23B91D-D4D6-4ED6-9583-FE6CC3730F51}.Debug.ActiveCfg = Debug|Win32 13 | {4B23B91D-D4D6-4ED6-9583-FE6CC3730F51}.Debug.Build.0 = Debug|Win32 14 | {4B23B91D-D4D6-4ED6-9583-FE6CC3730F51}.Release.ActiveCfg = Release|Win32 15 | {4B23B91D-D4D6-4ED6-9583-FE6CC3730F51}.Release.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | BulletIcon 11 | CFBundleIdentifier 12 | org.bullet.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/UnixDynamicLibraryManager.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | 10 | CPPUNIT_NS_BEGIN 11 | 12 | 13 | DynamicLibraryManager::LibraryHandle 14 | DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) 15 | { 16 | return ::dlopen( libraryName.c_str(), RTLD_NOW | RTLD_GLOBAL ); 17 | } 18 | 19 | 20 | void 21 | DynamicLibraryManager::doReleaseLibrary() 22 | { 23 | ::dlclose( m_libraryHandle); 24 | } 25 | 26 | 27 | DynamicLibraryManager::Symbol 28 | DynamicLibraryManager::doFindSymbol( const std::string &symbol ) 29 | { 30 | return ::dlsym ( m_libraryHandle, symbol.c_str() ); 31 | } 32 | 33 | 34 | std::string 35 | DynamicLibraryManager::getLastErrorDetail() const 36 | { 37 | return ""; 38 | } 39 | 40 | 41 | CPPUNIT_NS_END 42 | 43 | 44 | #endif // defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) 45 | -------------------------------------------------------------------------------- /Extras/Serialize/ReadBulletSample/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE_DIRECTORIES( 3 | ${BULLET_PHYSICS_SOURCE_DIR}/src 4 | ) 5 | 6 | LINK_LIBRARIES( 7 | BulletFileLoader 8 | ) 9 | IF (WIN32) 10 | SET(ADDITIONAL_SRC 11 | ${BULLET_PHYSICS_SOURCE_DIR}/build/bullet.rc 12 | ) 13 | ENDIF() 14 | 15 | SET(READBULLET_SRC 16 | main.cpp 17 | BulletDataExtractor.cpp 18 | BulletDataExtractor.h 19 | ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btSerializer.cpp 20 | ${BULLET_PHYSICS_SOURCE_DIR}/src/LinearMath/btAlignedAllocator.cpp 21 | ) 22 | 23 | ADD_EXECUTABLE(AppReadBulletSample 24 | ${READBULLET_SRC} 25 | ${ADDITIONAL_SRC} 26 | ) 27 | 28 | 29 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 30 | SET_TARGET_PROPERTIES(AppReadBulletSample PROPERTIES DEBUG_POSTFIX "_Debug") 31 | SET_TARGET_PROPERTIES(AppReadBulletSample PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 32 | SET_TARGET_PROPERTIES(AppReadBulletSample PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 33 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) -------------------------------------------------------------------------------- /UnitTests/BulletUnitTests/btCholeskyDecomposition.cpp: -------------------------------------------------------------------------------- 1 | #include "btCholeskyDecomposition.h" 2 | 3 | int choleskyDecompose(const btMatrix3x3& A, btMatrix3x3& L) 4 | { 5 | // TODO Check that the A matrix is symmetric 6 | 7 | // Iterate over the elements of the upper triangle of A 8 | for (unsigned int i = 0; i < 3; ++i) 9 | { 10 | for (unsigned int j = i; j < 3; ++j) 11 | { 12 | btScalar sum = A[i][j]; 13 | for (unsigned int k = 0; k < i; ++k) 14 | { 15 | sum -= L[i][k] * L[j][k]; 16 | } 17 | 18 | if (i != j) 19 | { 20 | L[j][i] = sum / L[i][i]; 21 | } 22 | else 23 | { 24 | if (sum <= btScalar(0)) 25 | { 26 | return btCholeskyDecomposition::FAILURE_POSITIVE_DEFINITE; 27 | } 28 | 29 | L[i][i] = sqrt(sum); 30 | } 31 | } 32 | } 33 | 34 | L[0][1] = btScalar(0); 35 | L[0][2] = btScalar(0); 36 | L[1][2] = btScalar(0); 37 | 38 | return btCholeskyDecomposition::SUCCESS; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Demos/DX11ClothDemo/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | hasDX11 = findDirectX11() 3 | 4 | if (hasDX11) then 5 | 6 | project "App_DX11ClothDemo" 7 | 8 | initDirectX11() 9 | 10 | language "C++" 11 | 12 | defines { "UNICODE","_UNICODE"} 13 | 14 | kind "WindowedApp" 15 | flags { "WinMain" } 16 | 17 | targetdir "../.." 18 | includedirs { 19 | "../../src", 20 | "DXUT/Core", 21 | "DXUT/Optional" 22 | } 23 | 24 | links { 25 | "LinearMath","BulletCollision","BulletDynamics", "BulletSoftBody", "BulletSoftBodyDX11Solvers" 26 | } 27 | files { 28 | "DXUT/Core/DXUT.cpp", 29 | "DXUT/Optional/DXUTcamera.cpp", 30 | "DXUT/Core/DXUTDevice11.cpp", 31 | "DXUT/Core/DXUTDevice9.cpp", 32 | "DXUT/Optional/DXUTgui.cpp", 33 | "DXUT/Core/DXUTmisc.cpp", 34 | "DXUT/Optional/DXUTres.cpp", 35 | "DXUT/Optional/DXUTsettingsdlg.cpp", 36 | "DXUT/Optional/SDKmesh.cpp", 37 | "DXUT/Optional/SDKmisc.cpp", 38 | "cloth_renderer.cpp" 39 | } 40 | 41 | end -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/RepeatedTest.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_REPEATEDTEST_H 2 | #define CPPUNIT_EXTENSIONS_REPEATEDTEST_H 3 | 4 | #include 5 | #include 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | class Test; 11 | class TestResult; 12 | 13 | 14 | /*! \brief Decorator that runs a test repeatedly. 15 | * 16 | * Does not assume ownership of the test it decorates 17 | */ 18 | class CPPUNIT_API RepeatedTest : public TestDecorator 19 | { 20 | public: 21 | RepeatedTest( Test *test, 22 | int timesRepeat ) : 23 | TestDecorator( test ), 24 | m_timesRepeat(timesRepeat) 25 | { 26 | } 27 | 28 | void run( TestResult *result ); 29 | 30 | int countTestCases() const; 31 | 32 | private: 33 | RepeatedTest( const RepeatedTest & ); 34 | void operator=( const RepeatedTest & ); 35 | 36 | const int m_timesRepeat; 37 | }; 38 | 39 | 40 | CPPUNIT_NS_END 41 | 42 | 43 | #endif // CPPUNIT_EXTENSIONS_REPEATEDTEST_H 44 | -------------------------------------------------------------------------------- /Demos/Gpu2dDemo/oecakeLoader.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OE_CAKE_LOADER_H 3 | #define OE_CAKE_LOADER_H 4 | 5 | #include "btBulletDynamicsCommon.h" 6 | 7 | 8 | class BasicOECakeReader 9 | { 10 | int m_materialType; 11 | int m_particleObjectIndex; 12 | int m_particleColor; 13 | btAlignedObjectArray m_particlePositions; 14 | btAlignedObjectArray m_particleRadii; 15 | 16 | void addParticle(int materialType, int pIndex, int pColor, float pPosX, float pPosY, float radius=1); 17 | 18 | virtual void addNewCollisionShape(int numParticles, btVector3* particlePositions, btScalar* radii, int materialType, int objectIndex,int color ); 19 | 20 | int processLine(char * buffer, int size); 21 | 22 | void convertParticleGroup(); 23 | 24 | public: 25 | 26 | BasicOECakeReader() 27 | { 28 | } 29 | 30 | bool processFile(char * fileName); 31 | 32 | virtual void createBodyForCompoundShape(btCompoundShape* compound,bool addConstraint,const btTransform& worldTransform, btScalar mass) = 0; 33 | 34 | }; 35 | #endif //OE_CAKE_LOADER_H 36 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/License.txt: -------------------------------------------------------------------------------- 1 | --- AntTweakBar license --- 2 | 3 | Copyright (C) 2005-2012 Philippe Decaudin 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 7 | use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, including 10 | commercial applications, and to alter it and redistribute it freely, subject to 11 | the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not claim 14 | that you wrote the original software. If you use this software in a product, 15 | an acknowledgment in the product documentation would be appreciated but is not 16 | required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source distribution. 22 | 23 | 24 | http://www.antisphere.com 25 | -------------------------------------------------------------------------------- /Demos/ParticlesOpenCL/btParticlesSharedDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org 3 | Copyright (C) 2006 - 2009 Sony Computer Entertainment Inc. 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 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/TestSuccessListener.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TESTSUCCESSLISTENER_H 2 | #define CPPUNIT_TESTSUCCESSLISTENER_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | CPPUNIT_NS_BEGIN 9 | 10 | 11 | /*! \brief TestListener that checks if any test case failed. 12 | * \ingroup TrackingTestExecution 13 | */ 14 | class CPPUNIT_API TestSuccessListener : public TestListener, 15 | public SynchronizedObject 16 | { 17 | public: 18 | /*! Constructs a TestSuccessListener object. 19 | */ 20 | TestSuccessListener( SynchronizationObject *syncObject = 0 ); 21 | 22 | /// Destructor. 23 | virtual ~TestSuccessListener(); 24 | 25 | virtual void reset(); 26 | 27 | void addFailure( const TestFailure &failure ); 28 | 29 | /// Returns whether the entire test was successful or not. 30 | virtual bool wasSuccessful() const; 31 | 32 | private: 33 | bool m_success; 34 | }; 35 | 36 | 37 | CPPUNIT_NS_END 38 | 39 | #endif // CPPUNIT_TESTSUCCESSLISTENER_H 40 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/BriefTestProgressListener.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | BriefTestProgressListener::BriefTestProgressListener() 11 | : m_lastTestFailed( false ) 12 | { 13 | } 14 | 15 | 16 | BriefTestProgressListener::~BriefTestProgressListener() 17 | { 18 | } 19 | 20 | 21 | void 22 | BriefTestProgressListener::startTest( Test *test ) 23 | { 24 | stdCOut() << test->getName(); 25 | stdCOut().flush(); 26 | 27 | m_lastTestFailed = false; 28 | } 29 | 30 | 31 | void 32 | BriefTestProgressListener::addFailure( const TestFailure &failure ) 33 | { 34 | stdCOut() << " : " << (failure.isError() ? "error" : "assertion"); 35 | m_lastTestFailed = true; 36 | } 37 | 38 | 39 | void 40 | BriefTestProgressListener::endTest( Test * ) 41 | { 42 | if ( !m_lastTestFailed ) 43 | stdCOut() << " : OK"; 44 | stdCOut() << "\n"; 45 | } 46 | 47 | 48 | CPPUNIT_NS_END 49 | 50 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/CDTestFramework.txt: -------------------------------------------------------------------------------- 1 | 2 | CD Test Framework 3 | ================= 4 | 5 | This is a very small app used to test various collision detection (CD) algorithms. 6 | It will be first used as a demo/sample for Opcode 1.3 (a lot of people requested this), 7 | and then I will also include benchmarks against competing libraries (Bullet, GIMPACT, etc). 8 | 9 | Update April 2, 2008 10 | Erwin Coumans added Bullet support for broadphase test (SAP, MultiSAP, other tests follow) 11 | This CDTestFramework is now included in Bullet/Extras under the ZLib license. 12 | 13 | Current version includes tests for: 14 | - sphere vs mesh queries 15 | - OBB vs mesh queries 16 | - capsule vs mesh queries 17 | - complete box pruning 18 | - bipartite box pruning 19 | 20 | 21 | Pierre Terdiman 22 | March 16, 2007 23 | 24 | External libs used: 25 | 26 | Opcode 1.3 (http://www.codercorner.com/Opcode.htm) 27 | AntTweakBar (http://www.antisphere.com/Wiki/tools:anttweakbar) 28 | Bullet Physics Library (http://bulletphysics.com) 29 | 30 | Contact email: 31 | pierre@codercorner.com -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | Bullet Physics Library is an open source project with help from the community at the Physics Forum 3 | See the forum at http://bulletphysics.com 4 | 5 | The project was started by Erwin Coumans 6 | 7 | Following people contributed to Bullet 8 | (random order, please let us know on the forum if your name should be in this list) 9 | 10 | Gino van den Bergen: LinearMath classes 11 | Christer Ericson: parts of the voronoi simplex solver 12 | Simon Hobbs: 3d axis sweep and prune, Extras/SATCollision, separating axis theorem + SIMD code 13 | Dirk Gregorius: generic D6 constraint 14 | Erin Catto: accumulated impulse in sequential impulse 15 | Nathanael Presson: EPA penetration depth calculation 16 | Francisco Leon: GIMPACT Concave Concave collision 17 | Joerg Henrichs: make buildsystem (work in progress) 18 | Eric Sunshine: jam + msvcgen buildsystem 19 | Steve Baker: GPU physics and general implementation improvements 20 | Jay Lee: Double precision support 21 | KleMiX, aka Vsevolod Klementjev, managed version, rewritten in C# for XNA 22 | Erwin Coumans: most other source code 23 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.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 | 19 | 20 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TextTestResult.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | CPPUNIT_NS_BEGIN 10 | 11 | 12 | TextTestResult::TextTestResult() 13 | { 14 | addListener( this ); 15 | } 16 | 17 | 18 | void 19 | TextTestResult::addFailure( const TestFailure &failure ) 20 | { 21 | TestResultCollector::addFailure( failure ); 22 | stdCOut() << ( failure.isError() ? "E" : "F" ); 23 | } 24 | 25 | 26 | void 27 | TextTestResult::startTest( Test *test ) 28 | { 29 | TestResultCollector::startTest (test); 30 | stdCOut() << "."; 31 | } 32 | 33 | 34 | void 35 | TextTestResult::print( OStream &stream ) 36 | { 37 | TextOutputter outputter( this, stream ); 38 | outputter.write(); 39 | } 40 | 41 | 42 | OStream & 43 | operator <<( OStream &stream, 44 | TextTestResult &result ) 45 | { 46 | result.print (stream); return stream; 47 | } 48 | 49 | 50 | CPPUNIT_NS_END 51 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /Extras/Serialize/ReadBulletSample/BulletDataExtractor.h: -------------------------------------------------------------------------------- 1 | #ifndef BULLET_DATA_EXTRACTOR_H 2 | #define BULLET_DATA_EXTRACTOR_H 3 | 4 | 5 | #include "../BulletFileLoader/autogenerated/bullet.h" 6 | 7 | namespace bParse 8 | { 9 | class btBulletFile; 10 | }; 11 | 12 | class btBulletDataExtractor 13 | { 14 | public: 15 | 16 | btBulletDataExtractor(); 17 | 18 | virtual ~btBulletDataExtractor(); 19 | 20 | virtual void convertAllObjects(bParse::btBulletFile* bulletFile); 21 | 22 | virtual void* convertCollisionShape( Bullet::btCollisionShapeData* shapeData ); 23 | 24 | virtual void* createPlaneShape( const Bullet::btVector3FloatData& planeNormal, float planeConstant, const Bullet::btVector3FloatData& localScaling); 25 | 26 | virtual void* createBoxShape( const Bullet::btVector3FloatData& halfDimensions, const Bullet::btVector3FloatData& localScaling, float collisionMargin); 27 | 28 | virtual void* createSphereShape( float radius, const Bullet::btVector3FloatData& localScaling, float collisionMargin); 29 | 30 | }; 31 | 32 | #endif //BULLET_DATA_EXTRACTOR_H -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/d3d10vs2003.h: -------------------------------------------------------------------------------- 1 | // Workaround to include D3D10.h with VS2003 2 | #ifndef __out 3 | #define __out 4 | #endif 5 | #ifndef __in 6 | #define __in 7 | #endif 8 | #ifndef __inout 9 | #define __inout 10 | #endif 11 | #ifndef __in_opt 12 | #define __in_opt 13 | #endif 14 | #ifndef __out_opt 15 | #define __out_opt 16 | #endif 17 | #ifndef __inout_opt 18 | #define __inout_opt 19 | #endif 20 | #ifndef __in_ecount 21 | #define __in_ecount(x) 22 | #endif 23 | #ifndef __in_ecount_opt 24 | #define __in_ecount_opt(x) 25 | #endif 26 | #ifndef __out_ecount 27 | #define __out_ecount(x) 28 | #endif 29 | #ifndef __out_ecount_opt 30 | #define __out_ecount_opt(x) 31 | #endif 32 | #ifndef __inout_ecount 33 | #define __inout_ecount(x) 34 | #endif 35 | #ifndef __inout_ecount_opt 36 | #define __inout_ecount_opt(x) 37 | #endif 38 | #ifndef __in_bcount_opt 39 | #define __in_bcount_opt(x) 40 | #endif 41 | #ifndef __out_bcount_opt 42 | #define __out_bcount_opt(x) 43 | #endif 44 | #ifndef __inout_bcount_opt 45 | #define __inout_bcount_opt(x) 46 | #endif 47 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/DefaultProtector.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "DefaultProtector.h" 4 | 5 | 6 | CPPUNIT_NS_BEGIN 7 | 8 | 9 | bool 10 | DefaultProtector::protect( const Functor &functor, 11 | const ProtectorContext &context ) 12 | { 13 | try 14 | { 15 | return functor(); 16 | } 17 | catch ( Exception &failure ) 18 | { 19 | reportFailure( context, failure ); 20 | } 21 | catch ( std::exception &e ) 22 | { 23 | std::string shortDescription( "uncaught exception of type " ); 24 | #if CPPUNIT_USE_TYPEINFO_NAME 25 | shortDescription += TypeInfoHelper::getClassName( typeid(e) ); 26 | #else 27 | shortDescription += "std::exception (or derived)."; 28 | #endif 29 | Message message( shortDescription, e.what() ); 30 | reportError( context, message ); 31 | } 32 | catch ( ... ) 33 | { 34 | reportError( context, 35 | Message( "uncaught exception of unknown type") ); 36 | } 37 | 38 | return false; 39 | } 40 | 41 | 42 | CPPUNIT_NS_END 43 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/CDTestFramework.h: -------------------------------------------------------------------------------- 1 | /* 2 | CDTestFramework http://codercorner.com 3 | Copyright (c) 2007-2008 Pierre Terdiman, pierre@codercorner.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 | 17 | #ifndef CDTESTFRAMEWORK_H 18 | #define CDTESTFRAMEWORK_H 19 | 20 | #endif // CDTESTFRAMEWORK_H 21 | -------------------------------------------------------------------------------- /Extras/sph/fluids/fluid.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | FLUIDS v.1 - SPH Fluid Simulator for CPU and GPU 3 | Copyright (C) 2009. Rama Hoetzlein, http://www.rchoetzlein.com 4 | 5 | ZLib license 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | */ 22 | #include "fluid.h" 23 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/Opcode/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * OPCODE - Optimized Collision Detection 3 | * http://www.codercorner.com/Opcode.htm 4 | * 5 | * Copyright (c) 2001-2008 Pierre Terdiman, pierre@codercorner.com 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 | 18 | //#define ICE_MAIN 19 | #include "Stdafx.h" 20 | -------------------------------------------------------------------------------- /Extras/sph/common/matrix.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | FLUIDS v.1 - SPH Fluid Simulator for CPU and GPU 3 | Copyright (C) 2009. Rama Hoetzlein, http://www.rchoetzlein.com 4 | 5 | ZLib license 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | */ 22 | #include "matrix.h" 23 | 24 | -------------------------------------------------------------------------------- /Extras/sph/common/particle.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | FLUIDS v.1 - SPH Fluid Simulator for CPU and GPU 3 | Copyright (C) 2009. Rama Hoetzlein, http://www.rchoetzlein.com 4 | 5 | ZLib license 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | */ 22 | 23 | #include "particle.h" -------------------------------------------------------------------------------- /Glut/EmptyGL/GL/glu.h: -------------------------------------------------------------------------------- 1 | #ifndef EMPTY_GLU 2 | #define EMPTY_GLU 3 | 4 | inline void gluOrtho2D( int a,int b, int c ,int d ) { } ; 5 | inline void gluLookAt( 6 | GLfloat a,GLfloat b, GLfloat c, 7 | GLfloat d,GLfloat e, GLfloat f, 8 | GLfloat g,GLfloat h, GLfloat i ) { }; 9 | 10 | #define GLU_FILL 1 11 | #define GLU_SMOOTH 2 12 | 13 | typedef int GLUquadric; 14 | typedef GLUquadric GLUquadricObj; 15 | 16 | inline GLUquadric *gluNewQuadric() { return (GLUquadric *)1; }; 17 | inline void gluQuadricDrawStyle( GLUquadric *o, int mode) {}; 18 | inline void gluQuadricNormals( GLUquadric *o, int mode) {}; 19 | inline void gluDeleteQuadric( GLUquadric *q) {}; 20 | inline void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops) {}; 21 | inline void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks) {}; 22 | inline int gluBuild2DMipmaps (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data) { return 0;} 23 | #endif 24 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/XmlInputHelper.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_XMLINPUTHELPER_H 2 | #define CPPUNIT_EXTENSIONS_XMLINPUTHELPER_H 3 | 4 | #include 5 | 6 | 7 | /*! \brief Adds a parameterized test method to the suite. 8 | * \param testMethod Name of the method of the test case to add to the 9 | * suite. The signature of the method must be of 10 | * type: void testMethod(std::istream& param_in, std::istream& exp_in); 11 | * \see CPPUNIT_TEST_SUITE. 12 | */ 13 | #define CPPUNIT_TEST_XML( testMethod) \ 14 | CPPUNIT_TEST_ADD( new CppUnit::ParameterizedTestCase( \ 15 | context.getTestNameFor( #testMethod ), \ 16 | #testMethod, \ 17 | &TestFixtureType::testMethod, \ 18 | context.makeFixture(), \ 19 | context.getStringProperty( std::string("XmlFileName") ) ) ) 20 | 21 | 22 | 23 | #endif // CPPUNIT_EXTENSIONS_XMLINPUTHELPER_H -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/TextTestResult.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TEXTTESTRESULT_H 2 | #define CPPUNIT_TEXTTESTRESULT_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | CPPUNIT_NS_BEGIN 9 | 10 | 11 | class SourceLine; 12 | class Exception; 13 | class Test; 14 | 15 | /*! \brief Holds printable test result (DEPRECATED). 16 | * \ingroup TrackingTestExecution 17 | * 18 | * deprecated Use class TextTestProgressListener and TextOutputter instead. 19 | */ 20 | class CPPUNIT_API TextTestResult : public TestResult, 21 | public TestResultCollector 22 | { 23 | public: 24 | TextTestResult(); 25 | 26 | virtual void addFailure( const TestFailure &failure ); 27 | virtual void startTest( Test *test ); 28 | virtual void print( OStream &stream ); 29 | }; 30 | 31 | /** insertion operator for easy output */ 32 | CPPUNIT_API OStream &operator <<( OStream &stream, 33 | TextTestResult &result ); 34 | 35 | CPPUNIT_NS_END 36 | 37 | #endif // CPPUNIT_TEXTTESTRESULT_H 38 | 39 | 40 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | This is a modified CDTestFramework to test Bullet's dynamic AABB tree against a SAP. It's the same demo as here: http://bulletphysics.com/ftp/pub/test/physics/demos/CDTestFramework2.70.zip 3 | 4 | But I added an extra challenger: http://www.codercorner.com/Code/SweepAndPrune2.rar. This is the code described in this document: http://www.codercorner.com/SAP.pdf 5 | 6 | So there are 4 tests: 7 | - OPCODE's "box pruning" 8 | - Bullet's Multi SAP 9 | - Bullet's dbvt (dynamic AABB tree) 10 | - OPCODE's array-based SAP 11 | 12 | For 8192 boxes and 10% of them moving, OPCODE's SAP is roughly as fast as dbvt (and twice faster than Bullet's SAP on my machine). For less boxes (say 1024 or 2048), OPCODE's SAP is faster than dbvt. Figures and "winner" vary a lot depending on the number of objects and how many of them are moving each frame. 13 | 14 | If you're interested you can see for yourself: 15 | - download Bullet 2.70 16 | - replace the content of this directory with the new files: \bullet-2.70\bullet-2.70\Extras\CDTestFramework 17 | 18 | 19 | Cheers, 20 | 21 | - Pierre Terdiman 22 | August 31, 2008 23 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2011 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 | All files in the Bullet/src folder are under this Zlib license. 17 | Files in the Extras and Demos folder may have a different license, see the respective files. 18 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/TestLeaf.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TESTLEAF_H 2 | #define CPPUNIT_TESTLEAF_H 3 | 4 | #include 5 | 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | /*! \brief A single test object. 11 | * 12 | * Base class for single test case: a test that doesn't have any children. 13 | * 14 | */ 15 | class CPPUNIT_API TestLeaf: public Test 16 | { 17 | public: 18 | /*! Returns 1 as the default number of test cases invoked by run(). 19 | * 20 | * You may override this method when many test cases are invoked (RepeatedTest 21 | * for example). 22 | * 23 | * \return 1. 24 | * \see Test::countTestCases(). 25 | */ 26 | int countTestCases() const; 27 | 28 | /*! Returns the number of child of this test case: 0. 29 | * 30 | * You should never override this method: a TestLeaf as no children by definition. 31 | * 32 | * \return 0. 33 | */ 34 | int getChildTestCount() const; 35 | 36 | /*! Always throws std::out_of_range. 37 | * \see Test::doGetChildTestAt(). 38 | */ 39 | Test *doGetChildTestAt( int index ) const; 40 | }; 41 | 42 | CPPUNIT_NS_END 43 | 44 | #endif // CPPUNIT_TESTLEAF_H 45 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/Integrate.cl: -------------------------------------------------------------------------------- 1 | MSTRINGIFY( 2 | 3 | // Node indices for each link 4 | 5 | 6 | 7 | __kernel void 8 | IntegrateKernel( 9 | const int numNodes, 10 | const float solverdt, 11 | __global float * g_vertexInverseMasses, 12 | __global float4 * g_vertexPositions, 13 | __global float4 * g_vertexVelocity, 14 | __global float4 * g_vertexPreviousPositions, 15 | __global float4 * g_vertexForceAccumulator GUID_ARG) 16 | { 17 | int nodeID = get_global_id(0); 18 | if( nodeID < numNodes ) 19 | { 20 | float4 position = g_vertexPositions[nodeID]; 21 | float4 velocity = g_vertexVelocity[nodeID]; 22 | float4 force = g_vertexForceAccumulator[nodeID]; 23 | float inverseMass = g_vertexInverseMasses[nodeID]; 24 | 25 | g_vertexPreviousPositions[nodeID] = position; 26 | velocity += force * inverseMass * solverdt; 27 | position += velocity * solverdt; 28 | 29 | g_vertexForceAccumulator[nodeID] = (float4)(0.f, 0.f, 0.f, 0.0f); 30 | g_vertexPositions[nodeID] = position; 31 | g_vertexVelocity[nodeID] = velocity; 32 | } 33 | } 34 | 35 | ); -------------------------------------------------------------------------------- /Demos/VectorAdd_OpenCL/AMD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | INCLUDE_DIRECTORIES( 4 | ${BULLET_PHYSICS_SOURCE_DIR}/src 5 | ${AMD_OPENCL_INCLUDES} 6 | ) 7 | 8 | LINK_LIBRARIES( 9 | BulletMultiThreaded LinearMath 10 | ${CMAKE_ATISTREAMSDK_LIBRARY} 11 | ) 12 | 13 | ADD_EXECUTABLE(AppVectorAdd_AMD 14 | ../MiniCL_VectorAdd.cpp 15 | ../VectorAddKernels.cl 16 | ) 17 | 18 | IF (UNIX) 19 | TARGET_LINK_LIBRARIES(AppVectorAdd_AMD pthread) 20 | ENDIF(UNIX) 21 | 22 | IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 23 | ADD_CUSTOM_COMMAND( 24 | TARGET AppVectorAdd_AMD 25 | POST_BUILD 26 | COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/VectorAdd_OpenCL/VectorAddKernels.cl ${CMAKE_CURRENT_BINARY_DIR} 27 | ) 28 | ENDIF() 29 | 30 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 31 | SET_TARGET_PROPERTIES(AppVectorAdd_AMD PROPERTIES DEBUG_POSTFIX "_Debug") 32 | SET_TARGET_PROPERTIES(AppVectorAdd_AMD PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 33 | SET_TARGET_PROPERTIES(AppVectorAdd_AMD PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 34 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 35 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/TestComposite.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TESTCOMPSITE_H // -*- C++ -*- 2 | #define CPPUNIT_TESTCOMPSITE_H 3 | 4 | #include 5 | #include 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | /*! \brief A Composite of Tests. 11 | * 12 | * Base class for all test composites. Subclass this class if you need to implement 13 | * a custom TestSuite. 14 | * 15 | * \see Test, TestSuite. 16 | */ 17 | class CPPUNIT_API TestComposite : public Test 18 | { 19 | public: 20 | TestComposite( const std::string &name = "" ); 21 | 22 | ~TestComposite(); 23 | 24 | void run( TestResult *result ); 25 | 26 | int countTestCases() const; 27 | 28 | std::string getName() const; 29 | 30 | private: 31 | TestComposite( const TestComposite &other ); 32 | TestComposite &operator =( const TestComposite &other ); 33 | 34 | virtual void doStartSuite( TestResult *controller ); 35 | virtual void doRunChildTests( TestResult *controller ); 36 | virtual void doEndSuite( TestResult *controller ); 37 | 38 | private: 39 | const std::string m_name; 40 | }; 41 | 42 | 43 | CPPUNIT_NS_END 44 | 45 | #endif // CPPUNIT_TESTCOMPSITE_H 46 | -------------------------------------------------------------------------------- /Extras/sph/fluids_2005.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fluids_2005", "fluids_2005.vcproj", "{644E4AC1-416D-4567-A68B-D66CA9FCFD9C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | EmuDebug|Win32 = EmuDebug|Win32 10 | Release|Win32 = Release|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {644E4AC1-416D-4567-A68B-D66CA9FCFD9C}.Debug|Win32.ActiveCfg = Debug|Win32 14 | {644E4AC1-416D-4567-A68B-D66CA9FCFD9C}.Debug|Win32.Build.0 = Debug|Win32 15 | {644E4AC1-416D-4567-A68B-D66CA9FCFD9C}.EmuDebug|Win32.ActiveCfg = EmuDebug|Win32 16 | {644E4AC1-416D-4567-A68B-D66CA9FCFD9C}.EmuDebug|Win32.Build.0 = EmuDebug|Win32 17 | {644E4AC1-416D-4567-A68B-D66CA9FCFD9C}.Release|Win32.ActiveCfg = Release|Win32 18 | {644E4AC1-416D-4567-A68B-D66CA9FCFD9C}.Release|Win32.Build.0 = Release|Win32 19 | EndGlobalSection 20 | GlobalSection(SolutionProperties) = preSolution 21 | HideSolutionNode = FALSE 22 | EndGlobalSection 23 | EndGlobal 24 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/btThreadSupportInterface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2007 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 "btThreadSupportInterface.h" 17 | 18 | btThreadSupportInterface::~btThreadSupportInterface() 19 | { 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/AntTweakBar/src/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by AntTweakBar.rc 4 | // 5 | #define IDC_CURSOR1 101 6 | #define IDC_CURSOR2 102 7 | #define IDC_CURSOR3 103 8 | #define IDC_CURSOR4 104 9 | #define IDC_CURSOR5 105 10 | #define IDC_CURSOR6 106 11 | #define IDC_CURSOR7 107 12 | #define IDC_CURSOR8 108 13 | #define IDC_CURSOR9 109 14 | #define IDC_CURSOR10 110 15 | #define IDC_CURSOR11 111 16 | #define IDC_CURSOR12 112 17 | #define IDC_CURSOR13 113 18 | #define IDC_CURSOR14 114 19 | 20 | // Next default values for new objects 21 | // 22 | #ifdef APSTUDIO_INVOKED 23 | #ifndef APSTUDIO_READONLY_SYMBOLS 24 | #define _APS_NEXT_RESOURCE_VALUE 115 25 | #define _APS_NEXT_COMMAND_VALUE 40001 26 | #define _APS_NEXT_CONTROL_VALUE 1001 27 | #define _APS_NEXT_SYMED_VALUE 101 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositionsFromVelocities.hlsl: -------------------------------------------------------------------------------- 1 | MSTRINGIFY( 2 | 3 | cbuffer UpdatePositionsFromVelocitiesCB : register( b0 ) 4 | { 5 | int numNodes; 6 | float solverSDT; 7 | int padding1; 8 | int padding2; 9 | }; 10 | 11 | 12 | StructuredBuffer g_vertexVelocities : register( t0 ); 13 | 14 | RWStructuredBuffer g_vertexPreviousPositions : register( u0 ); 15 | RWStructuredBuffer g_vertexCurrentPosition : register( u1 ); 16 | 17 | 18 | [numthreads(128, 1, 1)] 19 | void 20 | UpdatePositionsFromVelocitiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) 21 | { 22 | int vertexID = DTid.x; 23 | if( vertexID < numNodes ) 24 | { 25 | float3 previousPosition = g_vertexPreviousPositions[vertexID].xyz; 26 | float3 velocity = g_vertexVelocities[vertexID].xyz; 27 | 28 | float3 newPosition = previousPosition + velocity*solverSDT; 29 | 30 | g_vertexCurrentPosition[vertexID] = float4(newPosition, 0.f); 31 | g_vertexPreviousPositions[vertexID] = float4(newPosition, 0.f); 32 | } 33 | } 34 | 35 | ); -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/BriefTestProgressListener.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_BRIEFTESTPROGRESSLISTENER_H 2 | #define CPPUNIT_BRIEFTESTPROGRESSLISTENER_H 3 | 4 | #include 5 | 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | /*! \brief TestListener that prints the name of each test before running it. 11 | * \ingroup TrackingTestExecution 12 | */ 13 | class CPPUNIT_API BriefTestProgressListener : public TestListener 14 | { 15 | public: 16 | /*! Constructs a BriefTestProgressListener object. 17 | */ 18 | BriefTestProgressListener(); 19 | 20 | /// Destructor. 21 | virtual ~BriefTestProgressListener(); 22 | 23 | void startTest( Test *test ); 24 | 25 | void addFailure( const TestFailure &failure ); 26 | 27 | void endTest( Test *test ); 28 | 29 | private: 30 | /// Prevents the use of the copy constructor. 31 | BriefTestProgressListener( const BriefTestProgressListener © ); 32 | 33 | /// Prevents the use of the copy operator. 34 | void operator =( const BriefTestProgressListener © ); 35 | 36 | private: 37 | bool m_lastTestFailed; 38 | }; 39 | 40 | 41 | CPPUNIT_NS_END 42 | 43 | #endif // CPPUNIT_BRIEFTESTPROGRESSLISTENER_H 44 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/extensions/TestDecorator.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_EXTENSIONS_TESTDECORATOR_H 2 | #define CPPUNIT_EXTENSIONS_TESTDECORATOR_H 3 | 4 | #include 5 | #include 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | class TestResult; 11 | 12 | 13 | /*! \brief Decorator for Tests. 14 | * 15 | * TestDecorator provides an alternate means to extend functionality 16 | * of a test class without subclassing the test. Instead, one can 17 | * subclass the decorater and use it to wrap the test class. 18 | * 19 | * Does not assume ownership of the test it decorates 20 | */ 21 | class CPPUNIT_API TestDecorator : public Test 22 | { 23 | public: 24 | TestDecorator( Test *test ); 25 | ~TestDecorator(); 26 | 27 | int countTestCases() const; 28 | 29 | std::string getName() const; 30 | 31 | void run( TestResult *result ); 32 | 33 | int getChildTestCount() const; 34 | 35 | protected: 36 | Test *doGetChildTestAt( int index ) const; 37 | 38 | Test *m_test; 39 | 40 | private: 41 | TestDecorator( const TestDecorator &); 42 | void operator =( const TestDecorator & ); 43 | }; 44 | 45 | 46 | CPPUNIT_NS_END 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /Extras/CDTestFramework/stdafx.h: -------------------------------------------------------------------------------- 1 | /* 2 | CDTestFramework http://codercorner.com 3 | Copyright (c) 2007-2008 Pierre Terdiman, pierre@codercorner.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 17 | #include // For _alloca 18 | #include 19 | #include "GL/glut.h" 20 | #include "AntTweakBar.h" 21 | 22 | #include "Opcode.h" 23 | using namespace Opcode; 24 | -------------------------------------------------------------------------------- /Extras/sph/common/particle.h: -------------------------------------------------------------------------------- 1 | /* 2 | FLUIDS v.1 - SPH Fluid Simulator for CPU and GPU 3 | Copyright (C) 2009. Rama Hoetzlein, http://www.rchoetzlein.com 4 | 5 | ZLib license 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | */ 22 | #ifndef DEF_PARTICLE 23 | #define DEF_PARTICLE 24 | 25 | #include "vector.h" 26 | 27 | 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /UnitTests/cppunit/include/cppunit/TextTestProgressListener.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_TEXTTESTPROGRESSLISTENER_H 2 | #define CPPUNIT_TEXTTESTPROGRESSLISTENER_H 3 | 4 | #include 5 | 6 | 7 | CPPUNIT_NS_BEGIN 8 | 9 | 10 | /*! 11 | * \brief TestListener that show the status of each TestCase test result. 12 | * \ingroup TrackingTestExecution 13 | */ 14 | class CPPUNIT_API TextTestProgressListener : public TestListener 15 | { 16 | public: 17 | /*! Constructs a TextTestProgressListener object. 18 | */ 19 | TextTestProgressListener(); 20 | 21 | /// Destructor. 22 | virtual ~TextTestProgressListener(); 23 | 24 | void startTest( Test *test ); 25 | 26 | void addFailure( const TestFailure &failure ); 27 | 28 | void endTestRun( Test *test, 29 | TestResult *eventManager ); 30 | 31 | private: 32 | /// Prevents the use of the copy constructor. 33 | TextTestProgressListener( const TextTestProgressListener © ); 34 | 35 | /// Prevents the use of the copy operator. 36 | void operator =( const TextTestProgressListener © ); 37 | 38 | private: 39 | }; 40 | 41 | 42 | CPPUNIT_NS_END 43 | 44 | #endif // CPPUNIT_TEXTTESTPROGRESSLISTENER_H 45 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/DynamicLibraryManagerException.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if !defined(CPPUNIT_NO_TESTPLUGIN) 4 | 5 | CPPUNIT_NS_BEGIN 6 | 7 | 8 | DynamicLibraryManagerException::DynamicLibraryManagerException( 9 | const std::string &libraryName, 10 | const std::string &errorDetail, 11 | Cause cause ) 12 | : std::runtime_error( "" ), 13 | m_cause( cause ) 14 | { 15 | if ( cause == loadingFailed ) 16 | m_message = "Failed to load dynamic library: " + libraryName + "\n" + 17 | errorDetail; 18 | else 19 | m_message = "Symbol [" + errorDetail + "] not found in dynamic libary:" + 20 | libraryName; 21 | } 22 | 23 | 24 | DynamicLibraryManagerException::Cause 25 | DynamicLibraryManagerException::getCause() const 26 | { 27 | return m_cause; 28 | } 29 | 30 | 31 | const char * 32 | DynamicLibraryManagerException::what() const throw() 33 | { 34 | return m_message.c_str(); 35 | } 36 | 37 | 38 | CPPUNIT_NS_END 39 | 40 | 41 | #endif // !defined(CPPUNIT_NO_TESTPLUGIN) 42 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestPlugInDefaultImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if !defined(CPPUNIT_NO_TESTPLUGIN) 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | CPPUNIT_NS_BEGIN 11 | 12 | 13 | TestPlugInDefaultImpl::TestPlugInDefaultImpl() 14 | { 15 | } 16 | 17 | 18 | TestPlugInDefaultImpl::~TestPlugInDefaultImpl() 19 | { 20 | } 21 | 22 | 23 | void 24 | TestPlugInDefaultImpl::initialize( TestFactoryRegistry *, 25 | const PlugInParameters & ) 26 | { 27 | } 28 | 29 | 30 | void 31 | TestPlugInDefaultImpl::addListener( TestResult * ) 32 | { 33 | } 34 | 35 | 36 | void 37 | TestPlugInDefaultImpl::removeListener( TestResult * ) 38 | { 39 | } 40 | 41 | 42 | void 43 | TestPlugInDefaultImpl::addXmlOutputterHooks( XmlOutputter * ) 44 | { 45 | } 46 | 47 | 48 | void 49 | TestPlugInDefaultImpl::removeXmlOutputterHooks() 50 | { 51 | } 52 | 53 | 54 | void 55 | TestPlugInDefaultImpl::uninitialize( TestFactoryRegistry * ) 56 | { 57 | } 58 | 59 | 60 | CPPUNIT_NS_END 61 | 62 | 63 | #endif // !defined(CPPUNIT_NO_TESTPLUGIN) 64 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/TestSuite.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | CPPUNIT_NS_BEGIN 6 | 7 | 8 | /// Default constructor 9 | TestSuite::TestSuite( std::string name ) 10 | : TestComposite( name ) 11 | { 12 | } 13 | 14 | 15 | /// Destructor 16 | TestSuite::~TestSuite() 17 | { 18 | deleteContents(); 19 | } 20 | 21 | 22 | /// Deletes all tests in the suite. 23 | void 24 | TestSuite::deleteContents() 25 | { 26 | int childCount = getChildTestCount(); 27 | for ( int index =0; index < childCount; ++index ) 28 | delete getChildTestAt( index ); 29 | 30 | m_tests.clear(); 31 | } 32 | 33 | 34 | /// Adds a test to the suite. 35 | void 36 | TestSuite::addTest( Test *test ) 37 | { 38 | m_tests.push_back( test ); 39 | } 40 | 41 | 42 | const CppUnitVector & 43 | TestSuite::getTests() const 44 | { 45 | return m_tests; 46 | } 47 | 48 | 49 | int 50 | TestSuite::getChildTestCount() const 51 | { 52 | return m_tests.size(); 53 | } 54 | 55 | 56 | Test * 57 | TestSuite::doGetChildTestAt( int index ) const 58 | { 59 | return m_tests[index]; 60 | } 61 | 62 | 63 | CPPUNIT_NS_END 64 | 65 | -------------------------------------------------------------------------------- /Extras/AllBulletDemosOSX/src/toolkit/BTFullscreenWindow.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 | #import 17 | 18 | 19 | @interface BTFullScreenWindow : NSWindow { 20 | 21 | } 22 | 23 | - (id) initForScreen: (NSScreen *) screen; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /Demos/OpenGL/GLDebugDrawer.h: -------------------------------------------------------------------------------- 1 | #ifndef GL_DEBUG_DRAWER_H 2 | #define GL_DEBUG_DRAWER_H 3 | 4 | #include "LinearMath/btIDebugDraw.h" 5 | 6 | 7 | 8 | class GLDebugDrawer : public btIDebugDraw 9 | { 10 | int m_debugMode; 11 | 12 | public: 13 | 14 | GLDebugDrawer(); 15 | virtual ~GLDebugDrawer(); 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 | 23 | virtual void drawTriangle(const btVector3& a,const btVector3& b,const btVector3& c,const btVector3& color,btScalar alpha); 24 | 25 | virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color); 26 | 27 | virtual void reportErrorWarning(const char* warningString); 28 | 29 | virtual void draw3dText(const btVector3& location,const char* textString); 30 | 31 | virtual void setDebugMode(int debugMode); 32 | 33 | virtual int getDebugMode() const { return m_debugMode;} 34 | 35 | }; 36 | 37 | #endif//GL_DEBUG_DRAWER_H 38 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositions.cl: -------------------------------------------------------------------------------- 1 | MSTRINGIFY( 2 | 3 | __kernel void 4 | updateVelocitiesFromPositionsWithoutVelocitiesKernel( 5 | const int numNodes, 6 | const float isolverdt, 7 | __global float4 * g_vertexPositions, 8 | __global float4 * g_vertexPreviousPositions, 9 | __global int * g_vertexClothIndices, 10 | __global float * g_clothDampingFactor, 11 | __global float4 * g_vertexVelocities, 12 | __global float4 * g_vertexForces GUID_ARG) 13 | 14 | { 15 | int nodeID = get_global_id(0); 16 | if( nodeID < numNodes ) 17 | { 18 | float4 position = g_vertexPositions[nodeID]; 19 | float4 previousPosition = g_vertexPreviousPositions[nodeID]; 20 | float4 velocity = g_vertexVelocities[nodeID]; 21 | int clothIndex = g_vertexClothIndices[nodeID]; 22 | float dampingFactor = g_clothDampingFactor[clothIndex]; 23 | float velocityCoefficient = (1.f - dampingFactor); 24 | 25 | float4 difference = position - previousPosition; 26 | 27 | velocity = difference*velocityCoefficient*isolverdt; 28 | 29 | g_vertexVelocities[nodeID] = velocity; 30 | g_vertexForces[nodeID] = (float4)(0.f, 0.f, 0.f, 0.f); 31 | } 32 | } 33 | 34 | ); -------------------------------------------------------------------------------- /Demos/VectorAdd_OpenCL/MiniCL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # AppMiniCLVectorAdd is a very basic test for MiniCL. 2 | 3 | 4 | ADD_DEFINITIONS(-DUSE_MINICL) 5 | 6 | INCLUDE_DIRECTORIES( 7 | ${BULLET_PHYSICS_SOURCE_DIR}/src 8 | ) 9 | 10 | LINK_LIBRARIES( 11 | MiniCL 12 | BulletMultiThreaded 13 | LinearMath 14 | ) 15 | 16 | ADD_EXECUTABLE(AppVectorAdd_Mini 17 | ../MiniCL_VectorAdd.cpp 18 | ../VectorAddKernels.cl 19 | ) 20 | 21 | IF (UNIX) 22 | TARGET_LINK_LIBRARIES(AppVectorAdd_Mini pthread) 23 | ENDIF(UNIX) 24 | 25 | 26 | IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 27 | ADD_CUSTOM_COMMAND( 28 | TARGET AppVectorAdd_Mini 29 | POST_BUILD 30 | COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/VectorAdd_OpenCL/VectorAddKernels.cl ${CMAKE_CURRENT_BINARY_DIR} 31 | ) 32 | ENDIF() 33 | 34 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 35 | SET_TARGET_PROPERTIES(AppVectorAdd_Mini PROPERTIES DEBUG_POSTFIX "_Debug") 36 | SET_TARGET_PROPERTIES(AppVectorAdd_Mini PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 37 | SET_TARGET_PROPERTIES(AppVectorAdd_Mini PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 38 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/BeOsDynamicLibraryManager.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined(CPPUNIT_HAVE_BEOS_DLL_LOADER) 4 | #include 5 | 6 | #include 7 | 8 | 9 | CPPUNIT_NS_BEGIN 10 | 11 | 12 | DynamicLibraryManager::LibraryHandle 13 | DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) 14 | { 15 | return (LibraryHandle)::load_add_on( libraryName.c_str() ); 16 | } 17 | 18 | 19 | void 20 | DynamicLibraryManager::doReleaseLibrary() 21 | { 22 | ::unload_add_on( (image_id)m_libraryHandle ); 23 | } 24 | 25 | 26 | DynamicLibraryManager::Symbol 27 | DynamicLibraryManager::doFindSymbol( const std::string &symbol ) 28 | { 29 | void *symbolPointer; 30 | if ( ::get_image_symbol( (image_id)m_libraryHandle, 31 | symbol.c_str(), 32 | B_SYMBOL_TYPE_TEXT, 33 | &symbolPointer ) == B_OK ) 34 | return symnolPointer; 35 | return NULL; 36 | } 37 | 38 | 39 | std::string 40 | DynamicLibraryManager::getLastErrorDetail() const 41 | { 42 | return ""; 43 | } 44 | 45 | 46 | CPPUNIT_NS_END 47 | 48 | 49 | #endif // defined(CPPUNIT_HAVE_BEOS_DLL_LOADER) 50 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/PrepareLinks.cl: -------------------------------------------------------------------------------- 1 | MSTRINGIFY( 2 | 3 | 4 | 5 | __kernel void 6 | PrepareLinksKernel( 7 | const int numLinks, 8 | __global int2 * g_linksVertexIndices, 9 | __global float * g_linksMassLSC, 10 | __global float4 * g_nodesPreviousPosition, 11 | __global float * g_linksLengthRatio, 12 | __global float4 * g_linksCurrentLength GUID_ARG) 13 | { 14 | int linkID = get_global_id(0); 15 | if( linkID < numLinks ) 16 | { 17 | 18 | int2 nodeIndices = g_linksVertexIndices[linkID]; 19 | int node0 = nodeIndices.x; 20 | int node1 = nodeIndices.y; 21 | 22 | float4 nodePreviousPosition0 = g_nodesPreviousPosition[node0]; 23 | float4 nodePreviousPosition1 = g_nodesPreviousPosition[node1]; 24 | 25 | float massLSC = g_linksMassLSC[linkID]; 26 | 27 | float4 linkCurrentLength = nodePreviousPosition1 - nodePreviousPosition0; 28 | linkCurrentLength.w = 0.f; 29 | 30 | float linkLengthRatio = dot(linkCurrentLength, linkCurrentLength)*massLSC; 31 | linkLengthRatio = 1.0f/linkLengthRatio; 32 | 33 | g_linksCurrentLength[linkID] = linkCurrentLength; 34 | g_linksLengthRatio[linkID] = linkLengthRatio; 35 | } 36 | } 37 | 38 | ); -------------------------------------------------------------------------------- /Demos/SoftDemo/AMD/premake4.lua: -------------------------------------------------------------------------------- 1 | 2 | hasCL = findOpenCL_AMD() 3 | 4 | if (hasCL) then 5 | 6 | project "AppSoftBodyDemo_AMD" 7 | 8 | defines { "USE_AMD_OPENCL","CL_PLATFORM_AMD"} 9 | 10 | initOpenCL_AMD() 11 | 12 | language "C++" 13 | 14 | kind "ConsoleApp" 15 | targetdir "../../.." 16 | 17 | libdirs {"../../../Glut"} 18 | 19 | links { 20 | "LinearMath", 21 | "BulletCollision", 22 | "BulletDynamics", 23 | "BulletSoftBody", 24 | "BulletSoftBodySolvers_OpenCL_AMD", 25 | "OpenGLSupport", 26 | "opengl32" 27 | } 28 | 29 | configuration "x64" 30 | links { 31 | "glut64", 32 | "glew64s" 33 | } 34 | configuration "x32" 35 | links { 36 | "glut32", 37 | "glew32s" 38 | } 39 | 40 | configuration{} 41 | 42 | 43 | includedirs { 44 | "../../SharedOpenCL", 45 | "../../../src", 46 | "../../../Glut", 47 | "../../OpenGL" 48 | } 49 | 50 | files { 51 | "../SoftDemo.cpp", 52 | "../SoftDemo.h", 53 | "../main.cpp", 54 | "../../SharedOpenCL/btOpenCLUtils.cpp", 55 | "../../SharedOpenCL/btOpenCLUtils.h", 56 | "../../SharedOpenCL/btOpenCLInclude.h" 57 | } 58 | 59 | end -------------------------------------------------------------------------------- /Demos/VehicleDemo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This is basically the overall name of the project in Visual Studio this is the name of the Solution File 2 | 3 | 4 | # For every executable you have with a main method you should have an add_executable line below. 5 | # For every add executable line you should list every .cpp and .h file you have associated with that executable. 6 | 7 | 8 | 9 | # You shouldn't have to modify anything below this line 10 | ######################################################## 11 | 12 | 13 | 14 | INCLUDE_DIRECTORIES( 15 | ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 16 | ) 17 | 18 | LINK_LIBRARIES( 19 | OpenGLSupport BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} 20 | ) 21 | 22 | ADD_EXECUTABLE(AppVehicleDemo 23 | VehicleDemo.cpp 24 | main.cpp 25 | ) 26 | 27 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 28 | SET_TARGET_PROPERTIES(AppVehicleDemo PROPERTIES DEBUG_POSTFIX "_Debug") 29 | SET_TARGET_PROPERTIES(AppVehicleDemo PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 30 | SET_TARGET_PROPERTIES(AppVehicleDemo PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 31 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) -------------------------------------------------------------------------------- /Demos/Gpu3dDemo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This is basically the overall name of the project in Visual Studio this is the name of the Solution File 2 | 3 | 4 | # For every executable you have with a main method you should have an add_executable line below. 5 | # For every add executable line you should list every .cpp and .h file you have associated with that executable. 6 | 7 | 8 | # This is the variable for Windows. I use this to define the root of my directory structure. 9 | SET(GLUT_ROOT ${BULLET_PHYSICS_SOURCE_DIR}/Glut) 10 | 11 | # You shouldn't have to modify anything below this line 12 | ######################################################## 13 | 14 | INCLUDE_DIRECTORIES( 15 | ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 16 | ) 17 | 18 | LINK_LIBRARIES( 19 | OpenGLSupport BulletMultiThreaded BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} 20 | ) 21 | 22 | ADD_EXECUTABLE(AppGpu3dDemo 23 | main.cpp 24 | BasicDemo3d.cpp 25 | BasicDemo3d.h 26 | btGpuDemo3dSharedTypes.h 27 | btGpuDemo3dCpuFunc.cpp 28 | btGpuDemoDynamicsWorld3D.cpp 29 | btGpuDemoDynamicsWorld3D.h 30 | btGpuDemo3dSharedCode.h 31 | btGpuDemo3dSharedDefs.h 32 | ) 33 | 34 | 35 | -------------------------------------------------------------------------------- /Extras/Serialize/HeaderGenerator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | PROJECT(GEN) 3 | FILE(GLOB cpp_SRC "*.cpp") 4 | FILE(GLOB h_SRC "*.h") 5 | 6 | 7 | SET(includes 8 | . 9 | ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader 10 | ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BlenderSerialize 11 | ${BULLET_PHYSICS_SOURCE_DIR}/src 12 | ) 13 | 14 | 15 | LINK_LIBRARIES( 16 | BulletFileLoader BlenderSerialize LinearMath 17 | ) 18 | 19 | INCLUDE_DIRECTORIES(${includes}) 20 | 21 | SET(Main_LIBS LinearMath) 22 | 23 | ADD_EXECUTABLE(HeaderGenerator ${cpp_SRC} ${h_SRC}) 24 | 25 | IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 26 | ADD_CUSTOM_COMMAND( 27 | TARGET HeaderGenerator 28 | POST_BUILD 29 | COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/HeaderGenerator/createDnaString.bat ${CMAKE_CURRENT_BINARY_DIR}/createDnaString.bat 30 | COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/HeaderGenerator/bulletGenerate.py ${CMAKE_CURRENT_BINARY_DIR}/bulletGenerate.py 31 | ) 32 | ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 33 | -------------------------------------------------------------------------------- /BulletLicense.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2010 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 | Free for commercial use, please report projects in the forum at http://www.bulletphysics.org 17 | 18 | In case you want to display a Bullet logo in your software: you can download the Bullet logo in various vector formats and high resolution at the download section in http://bullet.googlecode.com 19 | -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/ShlDynamicLibraryManager.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined(CPPUNIT_HAVE_UNIX_SHL_LOADER) 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | 10 | CPPUNIT_NS_BEGIN 11 | 12 | 13 | DynamicLibraryManager::LibraryHandle 14 | DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) 15 | { 16 | return ::shl_load(libraryName.c_str(), BIND_IMMEDIATE, 0L); 17 | } 18 | 19 | 20 | void 21 | DynamicLibraryManager::doReleaseLibrary() 22 | { 23 | ::shl_unload( (shl_t)m_libraryHandle); 24 | } 25 | 26 | 27 | DynamicLibraryManager::Symbol 28 | DynamicLibraryManager::doFindSymbol( const std::string &symbol ) 29 | { 30 | DynamicLibraryManager::Symbol L_symaddr = 0; 31 | if ( ::shl_findsym( (shl_t*)(&m_libraryHandle), 32 | symbol.c_str(), 33 | TYPE_UNDEFINED, 34 | &L_symaddr ) == 0 ) 35 | { 36 | return L_symaddr; 37 | } 38 | 39 | return 0; 40 | } 41 | 42 | 43 | std::string 44 | DynamicLibraryManager::getLastErrorDetail() const 45 | { 46 | return ""; 47 | } 48 | 49 | 50 | CPPUNIT_NS_END 51 | 52 | 53 | #endif // defined(CPPUNIT_HAVE_UNIX_SHL_LOADER) 54 | -------------------------------------------------------------------------------- /UnitTests/cppunit/src/cppunit/ProtectorChain.h: -------------------------------------------------------------------------------- 1 | #ifndef CPPUNIT_PROTECTORCHAIN_H 2 | #define CPPUNIT_PROTECTORCHAIN_H 3 | 4 | #include 5 | #include 6 | 7 | #if CPPUNIT_NEED_DLL_DECL 8 | #pragma warning( push ) 9 | #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z 10 | #endif 11 | 12 | 13 | CPPUNIT_NS_BEGIN 14 | 15 | /*! \brief Protector chain (Implementation). 16 | * Implementation detail. 17 | * \internal Protector that protect a Functor using a chain of nested Protector. 18 | */ 19 | class CPPUNIT_API ProtectorChain : public Protector 20 | { 21 | public: 22 | ~ProtectorChain(); 23 | 24 | void push( Protector *protector ); 25 | 26 | void pop(); 27 | 28 | int count() const; 29 | 30 | bool protect( const Functor &functor, 31 | const ProtectorContext &context ); 32 | 33 | private: 34 | class ProtectFunctor; 35 | 36 | private: 37 | typedef CppUnitDeque Protectors; 38 | Protectors m_protectors; 39 | 40 | typedef CppUnitDeque Functors; 41 | }; 42 | 43 | 44 | CPPUNIT_NS_END 45 | 46 | #if CPPUNIT_NEED_DLL_DECL 47 | #pragma warning( pop ) 48 | #endif 49 | 50 | #endif // CPPUNIT_PROTECTORCHAIN_H 51 | 52 | -------------------------------------------------------------------------------- /Demos/BasicDemo/Win32BasicDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "BasicDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new BasicDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/Box2dDemo/Win32Box2dDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "Box2dDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new Box2dDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/MultiMaterialDemo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This is basically the overall name of the project in Visual Studio this is the name of the Solution File 2 | 3 | 4 | # For every executable you have with a main method you should have an add_executable line below. 5 | # For every add executable line you should list every .cpp and .h file you have associated with that executable. 6 | 7 | 8 | 9 | # You shouldn't have to modify anything below this line 10 | ######################################################## 11 | 12 | 13 | INCLUDE_DIRECTORIES( 14 | ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 15 | ) 16 | 17 | LINK_LIBRARIES( 18 | OpenGLSupport BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} 19 | ) 20 | 21 | ADD_EXECUTABLE(AppMultiMaterialDemo 22 | MultiMaterialDemo.cpp 23 | main.cpp 24 | ) 25 | 26 | 27 | IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) 28 | SET_TARGET_PROPERTIES(AppMultiMaterialDemo PROPERTIES DEBUG_POSTFIX "_Debug") 29 | SET_TARGET_PROPERTIES(AppMultiMaterialDemo PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") 30 | SET_TARGET_PROPERTIES(AppMultiMaterialDemo PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") 31 | ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /Demos/ConcaveDemo/Win32ConcaveDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "ConcaveDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new ConcaveDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/Benchmarks/Win32BenchmarkDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "BenchmarkDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new BenchmarkDemo(1); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/SerializeDemo/Win32SerializeDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2010 Erwin Coumans http://bulletphysics.org 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 | #include "SerializeDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new SerializeDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/TerrainDemo/TerrainDemo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006,2008 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 | #ifndef TERRAIN_DEMO_H 16 | #define TERRAIN_DEMO_H 17 | 18 | 19 | #include "GlutDemoApplication.h" 20 | 21 | 22 | // all we need to expose publicly is the factory method! 23 | GlutDemoApplication * btCreateTerrainDemo(void); 24 | 25 | 26 | #endif //TERRAIN_DEMO_H 27 | 28 | -------------------------------------------------------------------------------- /Demos/ConstraintDemo/Win32ConstraintDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "ConstraintDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new ConstraintDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/GimpactTestDemo/Win32GimpactDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "GimpactTestDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new GimpactConcaveDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/GenericJointDemo/Win32GenericJointDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "GenericJointDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new GenericJointDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/Gpu2dDemo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This is basically the overall name of the project in Visual Studio this is the name of the Solution File 2 | 3 | 4 | # For every executable you have with a main method you should have an add_executable line below. 5 | # For every add executable line you should list every .cpp and .h file you have associated with that executable. 6 | 7 | 8 | # This is the variable for Windows. I use this to define the root of my directory structure. 9 | SET(GLUT_ROOT ${BULLET_PHYSICS_SOURCE_DIR}/Glut) 10 | 11 | # You shouldn't have to modify anything below this line 12 | ######################################################## 13 | 14 | INCLUDE_DIRECTORIES( 15 | ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL 16 | ) 17 | 18 | LINK_LIBRARIES( 19 | OpenGLSupport BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} 20 | ) 21 | 22 | ADD_EXECUTABLE(AppGpu2dDemo 23 | main.cpp 24 | BasicDemo.cpp 25 | BasicDemo.h 26 | btGpuDemoPairCache.cpp 27 | btGpuDemoPairCache.h 28 | btGpuDemo2dSharedTypes.h 29 | btGpuDemo2dCpuFunc.cpp 30 | btGpuDemoDynamicsWorld.cpp 31 | btGpuDemoDynamicsWorld.h 32 | oecakeLoader.cpp 33 | oecakeLoader.h 34 | btGpuDemo2dSharedCode.h 35 | btGpuDemo2dSharedDefs.h 36 | ) 37 | 38 | 39 | -------------------------------------------------------------------------------- /Demos/InternalEdgeDemo/Win32InternalEdgeDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "InternalEdgeDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new InternalEdgeDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/RaytestDemo/Win32RaytestDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 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 | #include "BasicDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new BasicDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/FractureDemo/Win32FractureDemo.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WINDOWS 2 | /* 3 | Bullet Continuous Collision Detection and Physics Library 4 | Copyright (c) 2003-2011 Erwin Coumans http://bulletphysics.org 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 | #include "FractureDemo.h" 18 | 19 | ///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo 20 | DemoApplication* createDemo() 21 | { 22 | return new FractureDemo(); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Demos/NativeClient/shader_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Some simple helper functions that load shaders and create program objects. 6 | 7 | #ifndef EXAMPLES_TUMBLER_SHADER_UTIL_H_ 8 | #define EXAMPLES_TUMBLER_SHADER_UTIL_H_ 9 | 10 | #include 11 | 12 | namespace shader_util { 13 | 14 | // Load and compile a shader. |type| can be one of GL_VERTEX_SHADER or 15 | // GL_FRAGMENT_SHADER. Returns a non-0 value representing the compiled 16 | // shader on success, 0 on failure. The caller is responsible for deleting 17 | // the returned shader using glDeleteShader(). 18 | GLuint CreateShaderOfType(GLenum type, const char *shader_src); 19 | 20 | // Load and compile the vertex and fragment shaders, then link these together 21 | // into a complete program. Returns a non-0 value representing the program on, 22 | // success or 0 on failure. The caller is responsible for deleting the 23 | // returned program using glDeleteProgram(). 24 | GLuint CreateProgramFromVertexAndFragmentShaders( 25 | const char *vertex_shader_src, const char *fragment_shader_src); 26 | 27 | } // namespace shader_util 28 | 29 | #endif // EXAMPLES_TUMBLER_SHADER_UTIL_H_ 30 | --------------------------------------------------------------------------------