Revert last merge from trunk
authorAndre Susano Pinto <andresusanopinto@gmail.com>
Fri, 19 Sep 2008 12:05:45 +0000 (12:05 +0000)
committerAndre Susano Pinto <andresusanopinto@gmail.com>
Fri, 19 Sep 2008 12:05:45 +0000 (12:05 +0000)
svn merge -r 16539:16538 https://svn.blender.org/svnroot/bf-blender/branches/soc-2008-jaguarandi/

737 files changed:
CMake/macros.cmake
CMakeLists.txt
blenderplayer/CMakeLists.txt
config/darwin-config.py
config/linux2-config.py
extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj
extern/bullet2/readme.txt
extern/bullet2/src/Bullet-C-Api.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.h [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h [deleted file]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h
extern/bullet2/src/BulletCollision/CMakeLists.txt
extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h
extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btMaterial.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h
extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btShapeHull.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btShapeHull.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h
extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp [deleted file]
extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h [deleted file]
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp [deleted file]
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h [deleted file]
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
extern/bullet2/src/BulletDynamics/CMakeLists.txt
extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp [deleted file]
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h [deleted file]
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp [deleted file]
extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h [deleted file]
extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h
extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp
extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h
extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h
extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h
extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h
extern/bullet2/src/BulletSoftBody/CMakeLists.txt [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBody.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBody.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp [deleted file]
extern/bullet2/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h [deleted file]
extern/bullet2/src/BulletSoftBody/btSparseSDF.h [deleted file]
extern/bullet2/src/LinearMath/CMakeLists.txt
extern/bullet2/src/LinearMath/btAabbUtil2.h
extern/bullet2/src/LinearMath/btAlignedAllocator.cpp
extern/bullet2/src/LinearMath/btAlignedAllocator.h
extern/bullet2/src/LinearMath/btAlignedObjectArray.h
extern/bullet2/src/LinearMath/btConvexHull.h [deleted file]
extern/bullet2/src/LinearMath/btDefaultMotionState.h
extern/bullet2/src/LinearMath/btGeometryUtil.cpp
extern/bullet2/src/LinearMath/btGeometryUtil.h
extern/bullet2/src/LinearMath/btIDebugDraw.h
extern/bullet2/src/LinearMath/btMatrix3x3.h
extern/bullet2/src/LinearMath/btMinMax.h
extern/bullet2/src/LinearMath/btMotionState.h
extern/bullet2/src/LinearMath/btPoolAllocator.h [deleted file]
extern/bullet2/src/LinearMath/btQuadWord.h
extern/bullet2/src/LinearMath/btQuaternion.h
extern/bullet2/src/LinearMath/btQuickprof.cpp
extern/bullet2/src/LinearMath/btQuickprof.h
extern/bullet2/src/LinearMath/btScalar.h
extern/bullet2/src/LinearMath/btStackAlloc.h
extern/bullet2/src/LinearMath/btTransform.h
extern/bullet2/src/LinearMath/btTransformUtil.h
extern/bullet2/src/LinearMath/btVector3.h
extern/bullet2/src/SConscript
extern/bullet2/src/btBulletCollisionCommon.h
extern/bullet2/src/btBulletDynamicsCommon.h
extern/glew/SConscript
extern/glew/include/GL/glew.h
extern/glew/src/glew.c
intern/SoundSystem/SoundDefines.h
intern/SoundSystem/openal/SND_OpenALDevice.cpp
intern/ghost/GHOST_ISystem.h
intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_SystemCarbon.cpp
intern/ghost/intern/GHOST_SystemCarbon.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.h
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp
intern/ghost/intern/GHOST_WindowX11.h
intern/guardedalloc/MEM_guardedalloc.h
intern/guardedalloc/intern/mallocn.c
intern/iksolver/CMakeLists.txt
intern/iksolver/SConscript
intern/memutil/MEM_Allocator.h
intern/memutil/MEM_CacheLimiter.h
intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
intern/moto/include/GEN_Map.h
intern/moto/include/MT_Matrix4x4.h
intern/moto/include/MT_Matrix4x4.inl
intern/opennl/superlu/BLO_sys_types.h
projectfiles_vc7/blender/BPY_python/BPY_python.vcproj
projectfiles_vc7/blender/blender.sln
projectfiles_vc7/blender/blender.vcproj
projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj
projectfiles_vc7/blender/gpu/BL_gpu.vcproj [deleted file]
projectfiles_vc7/blender/nodes/nodes.vcproj
projectfiles_vc7/blender/radiosity/BRA_radiosity.vcproj
projectfiles_vc7/blender/src/BL_src.vcproj
projectfiles_vc7/gameengine/blenderhook/KX_blenderhook.vcproj
projectfiles_vc7/gameengine/converter/KX_converter.vcproj
projectfiles_vc7/gameengine/expression/EXP_expressions.vcproj
projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj
projectfiles_vc7/gameengine/gameplayer/ghost/GP_ghost.vcproj
projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
projectfiles_vc7/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
projectfiles_vc7/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.vcproj
release/datafiles/blenderbuttons
release/scripts/mesh_cleanup.py
release/scripts/object_find.py
release/scripts/sysinfo.py
source/Makefile
source/blender/CMakeLists.txt
source/blender/Makefile
source/blender/SConscript
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/BKE_bad_level_calls.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_colortools.h
source/blender/blenkernel/BKE_global.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_suggestions.h [deleted file]
source/blender/blenkernel/BKE_text.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/Makefile
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/suggestions.c [deleted file]
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenlib/BLI_arithb.h
source/blender/blenlib/BLI_blenlib.h
source/blender/blenlib/BLI_kdopbvh.h
source/blender/blenlib/SConscript
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/arithb.c
source/blender/blenlib/intern/util.c
source/blender/blenloader/BLO_readfile.h
source/blender/blenloader/BLO_sys_types.h
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/gpu/CMakeLists.txt [deleted file]
source/blender/gpu/GPU_draw.h [deleted file]
source/blender/gpu/GPU_extensions.h [deleted file]
source/blender/gpu/GPU_material.h [deleted file]
source/blender/gpu/Makefile [deleted file]
source/blender/gpu/SConscript [deleted file]
source/blender/gpu/intern/Makefile [deleted file]
source/blender/gpu/intern/gpu_codegen.c [deleted file]
source/blender/gpu/intern/gpu_codegen.h [deleted file]
source/blender/gpu/intern/gpu_draw.c [deleted file]
source/blender/gpu/intern/gpu_extensions.c [deleted file]
source/blender/gpu/intern/gpu_material.c [deleted file]
source/blender/gpu/intern/gpu_shader_material.glsl [deleted file]
source/blender/gpu/intern/gpu_shader_material.glsl.c [deleted file]
source/blender/gpu/intern/gpu_shader_vertex.glsl [deleted file]
source/blender/gpu/intern/gpu_shader_vertex.glsl.c [deleted file]
source/blender/imbuf/intern/bmp.c
source/blender/imbuf/intern/dds/ColorBlock.cpp
source/blender/imbuf/intern/dds/ColorBlock.h
source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
source/blender/imbuf/intern/dds/DirectDrawSurface.h
source/blender/imbuf/intern/dds/dds_api.cpp
source/blender/include/BDR_drawmesh.h
source/blender/include/BDR_drawobject.h
source/blender/include/BDR_gpencil.h
source/blender/include/BDR_imagepaint.h
source/blender/include/BIF_drawseq.h
source/blender/include/BIF_drawtext.h
source/blender/include/BIF_editaction.h
source/blender/include/BIF_editarmature.h
source/blender/include/BIF_editview.h
source/blender/include/BIF_gl.h
source/blender/include/BIF_glutil.h
source/blender/include/BIF_keyframing.h [deleted file]
source/blender/include/BIF_keyval.h
source/blender/include/BIF_meshlaplacian.h
source/blender/include/BIF_meshtools.h
source/blender/include/BIF_resources.h
source/blender/include/BIF_space.h
source/blender/include/BSE_drawipo.h
source/blender/include/BSE_drawview.h
source/blender/include/BSE_editipo.h
source/blender/include/blendef.h
source/blender/include/transform.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_brush_types.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesdna/DNA_group_types.h
source/blender/makesdna/DNA_image_types.h
source/blender/makesdna/DNA_ipo_types.h
source/blender/makesdna/DNA_lamp_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_meshdata_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_sensor_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_text_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesdna/DNA_world_types.h
source/blender/nodes/CMakeLists.txt
source/blender/nodes/SConscript
source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c
source/blender/nodes/intern/CMP_nodes/Makefile
source/blender/nodes/intern/Makefile
source/blender/nodes/intern/SHD_nodes/Makefile
source/blender/nodes/intern/SHD_nodes/SHD_camera.c
source/blender/nodes/intern/SHD_nodes/SHD_curves.c
source/blender/nodes/intern/SHD_nodes/SHD_geom.c
source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c
source/blender/nodes/intern/SHD_nodes/SHD_invert.c
source/blender/nodes/intern/SHD_nodes/SHD_mapping.c
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/nodes/intern/SHD_nodes/SHD_math.c
source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
source/blender/nodes/intern/SHD_nodes/SHD_normal.c
source/blender/nodes/intern/SHD_nodes/SHD_output.c
source/blender/nodes/intern/SHD_nodes/SHD_rgb.c
source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c
source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c
source/blender/nodes/intern/SHD_nodes/SHD_texture.c
source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c
source/blender/nodes/intern/SHD_nodes/SHD_value.c
source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c
source/blender/nodes/intern/SHD_util.h
source/blender/python/BPY_extern.h
source/blender/python/BPY_interface.c
source/blender/python/BPY_menus.c
source/blender/python/BPY_menus.h
source/blender/python/CMakeLists.txt
source/blender/python/SConscript
source/blender/python/api2_2x/BGL.h
source/blender/python/api2_2x/Blender.c
source/blender/python/api2_2x/Camera.c
source/blender/python/api2_2x/Constraint.c
source/blender/python/api2_2x/Draw.c
source/blender/python/api2_2x/Group.c
source/blender/python/api2_2x/Image.c
source/blender/python/api2_2x/Ipo.c
source/blender/python/api2_2x/Ipocurve.c
source/blender/python/api2_2x/Lamp.c
source/blender/python/api2_2x/MTex.c
source/blender/python/api2_2x/MTex.h
source/blender/python/api2_2x/Makefile
source/blender/python/api2_2x/Material.c
source/blender/python/api2_2x/Mathutils.c
source/blender/python/api2_2x/Mathutils.h
source/blender/python/api2_2x/Mesh.c
source/blender/python/api2_2x/Object.c
source/blender/python/api2_2x/Particle.c
source/blender/python/api2_2x/Pose.c
source/blender/python/api2_2x/Text.c
source/blender/python/api2_2x/Text.h
source/blender/python/api2_2x/Texture.c
source/blender/python/api2_2x/Window.c
source/blender/python/api2_2x/World.c
source/blender/python/api2_2x/bpy_data.c
source/blender/python/api2_2x/doc/Draw.py
source/blender/python/api2_2x/doc/Group.py
source/blender/python/api2_2x/doc/Lamp.py
source/blender/python/api2_2x/doc/Material.py
source/blender/python/api2_2x/doc/Mesh.py
source/blender/python/api2_2x/doc/Text.py
source/blender/python/api2_2x/doc/Texture.py
source/blender/python/api2_2x/doc/World.py
source/blender/python/api2_2x/gen_utils.h
source/blender/python/api2_2x/sceneSequence.c
source/blender/radiosity/CMakeLists.txt
source/blender/radiosity/SConscript
source/blender/radiosity/intern/source/Makefile
source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/zbuf.c
source/blender/src/CMakeLists.txt
source/blender/src/Makefile
source/blender/src/SConscript
source/blender/src/blenderbuttons.c
source/blender/src/buttons_editing.c
source/blender/src/buttons_logic.c
source/blender/src/buttons_object.c
source/blender/src/buttons_scene.c
source/blender/src/buttons_shading.c
source/blender/src/drawaction.c
source/blender/src/drawarmature.c
source/blender/src/drawgpencil.c
source/blender/src/drawimage.c
source/blender/src/drawipo.c
source/blender/src/drawmesh.c
source/blender/src/drawobject.c
source/blender/src/drawseq.c
source/blender/src/drawtext.c
source/blender/src/drawview.c
source/blender/src/editaction.c
source/blender/src/editarmature.c
source/blender/src/editdeform.c
source/blender/src/editface.c
source/blender/src/editipo.c
source/blender/src/editipo_lib.c
source/blender/src/editipo_mods.c
source/blender/src/editkey.c
source/blender/src/editlattice.c
source/blender/src/editmesh.c
source/blender/src/editmesh_add.c
source/blender/src/editmesh_loop.c
source/blender/src/editmesh_mods.c
source/blender/src/editmesh_tools.c
source/blender/src/editmode_undo.c
source/blender/src/editnode.c
source/blender/src/editobject.c
source/blender/src/editscreen.c
source/blender/src/editsound.c
source/blender/src/editview.c
source/blender/src/filesel.c
source/blender/src/glutil.c
source/blender/src/gpencil.c
source/blender/src/header_image.c
source/blender/src/header_info.c
source/blender/src/header_ipo.c
source/blender/src/header_node.c
source/blender/src/header_text.c
source/blender/src/header_view3d.c
source/blender/src/headerbuttons.c
source/blender/src/imagepaint.c
source/blender/src/keyframing.c [deleted file]
source/blender/src/keyval.c
source/blender/src/meshlaplacian.c
source/blender/src/meshtools.c
source/blender/src/mywindow.c
source/blender/src/playanim.c
source/blender/src/poselib.c
source/blender/src/poseobject.c
source/blender/src/previewrender.c
source/blender/src/renderwin.c
source/blender/src/resources.c
source/blender/src/sculptmode.c
source/blender/src/sequence.c
source/blender/src/space.c
source/blender/src/toets.c
source/blender/src/toolbox.c
source/blender/src/transform_conversions.c
source/blender/src/transform_generics.c
source/blender/src/transform_numinput.c
source/blender/src/transform_orientations.c
source/blender/src/usiblender.c
source/blender/src/verse_image.c
source/blender/src/view.c
source/blender/yafray/intern/export_File.cpp
source/blender/yafray/intern/export_Plugin.cpp
source/creator/CMakeLists.txt
source/creator/Makefile
source/creator/SConscript
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/BlenderRoutines/KX_BlenderGL.h
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h
source/gameengine/BlenderRoutines/Makefile
source/gameengine/BlenderRoutines/SConscript
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_ArmatureObject.h
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_DeformableGameObject.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_MeshDeformer.h
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/BL_ShapeDeformer.cpp
source/gameengine/Converter/BL_ShapeDeformer.h
source/gameengine/Converter/BL_SkinDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.h
source/gameengine/Converter/BL_SkinMeshObject.cpp
source/gameengine/Converter/BL_SkinMeshObject.h
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Converter/KX_ConvertSensors.cpp
source/gameengine/Converter/Makefile
source/gameengine/Converter/SConscript
source/gameengine/Expressions/Makefile
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/Value.cpp
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/Joystick/SCA_Joystick.h
source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h
source/gameengine/GameLogic/Makefile
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_ISensor.h
source/gameengine/GameLogic/SCA_JoystickManager.cpp
source/gameengine/GameLogic/SCA_JoystickManager.h
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.h
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_LogicManager.cpp
source/gameengine/GameLogic/SCA_LogicManager.h
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_PythonController.h
source/gameengine/GamePlayer/CMakeLists.txt
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
source/gameengine/GamePlayer/common/GPC_RenderTools.h
source/gameengine/GamePlayer/common/Makefile
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/common/unix/GPU_PolygonMaterial.h
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.h
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/GamePlayer/ghost/Makefile
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/BL_BlenderShader.cpp
source/gameengine/Ketsji/BL_BlenderShader.h
source/gameengine/Ketsji/BL_Material.h
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/BL_Shader.h
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.h
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.h
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameActuator.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_ISceneConverter.h
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.h
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_Light.h
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MeshProxy.h
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.h
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.h
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInit.h
source/gameengine/Ketsji/KX_RayCast.cpp
source/gameengine/Ketsji/KX_RayCast.h
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_RaySensor.h
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.h
source/gameengine/Ketsji/Makefile
source/gameengine/Ketsji/SConscript
source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
source/gameengine/Physics/Bullet/Makefile
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/gameengine/PyDoc/GameKeys.py
source/gameengine/PyDoc/GameLogic.py
source/gameengine/PyDoc/KX_GameObject.py
source/gameengine/PyDoc/KX_MeshProxy.py
source/gameengine/PyDoc/KX_ObjectActuator.py
source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
source/gameengine/PyDoc/KX_SCA_ReplaceMeshActuator.py
source/gameengine/PyDoc/KX_TrackToActuator.py
source/gameengine/PyDoc/Rasterizer.py
source/gameengine/PyDoc/SCA_DelaySensor.py
source/gameengine/PyDoc/SCA_ISensor.py
source/gameengine/Rasterizer/Makefile
source/gameengine/Rasterizer/RAS_BucketManager.cpp
source/gameengine/Rasterizer/RAS_BucketManager.h
source/gameengine/Rasterizer/RAS_FramingManager.h
source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
source/gameengine/Rasterizer/RAS_IRasterizer.h
source/gameengine/Rasterizer/RAS_IRenderTools.cpp
source/gameengine/Rasterizer/RAS_IRenderTools.h
source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
source/gameengine/Rasterizer/RAS_MaterialBucket.h
source/gameengine/Rasterizer/RAS_MeshObject.cpp
source/gameengine/Rasterizer/RAS_MeshObject.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/RAS_Polygon.cpp
source/gameengine/Rasterizer/RAS_Polygon.h
source/gameengine/Rasterizer/RAS_TexVert.cpp
source/gameengine/Rasterizer/RAS_TexVert.h
source/gameengine/Rasterizer/SConscript
source/kernel/gen_system/GEN_Map.h
source/nan_definitions.mk
tools/Blender.py
tools/btools.py

index 95799a2..6b6837d 100644 (file)
@@ -38,10 +38,6 @@ MACRO(BLENDERLIB
 ENDMACRO(BLENDERLIB)
 
 MACRO(SETUP_LIBDIRS)
-  # see "cmake --help-policy CMP0003"
-  if(COMMAND cmake_policy)
-    CMAKE_POLICY(SET CMP0003 NEW)
-  endif(COMMAND cmake_policy)
   LINK_DIRECTORIES(${PYTHON_LIBPATH} ${SDL_LIBPATH} ${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${ICONV_LIBPATH} ${OPENEXR_LIBPATH} ${QUICKTIME_LIBPATH} ${FFMPEG_LIBPATH})
   IF(WITH_INTERNATIONAL)
     LINK_DIRECTORIES(${GETTEXT_LIBPATH})
index 4c1b863..5b86ca8 100644 (file)
@@ -64,7 +64,6 @@ OPTION(WITH_OPENEXR           "Enable OpenEXR Support (http://www.openexr.com)"       ON)
 OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
 OPTION(WITH_OPENAL             "Enable OpenAL Support (http://www.openal.org)"         ON)
 OPTION(WITH_OPENMP             "Enable OpenMP (has to be supported by the compiler)"   OFF)
-OPTION(WITH_WEBPLUGIN          "Enable Web Plugin (Mozilla-Unix only)"                 OFF)
 
 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
   MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
@@ -249,11 +248,7 @@ IF(WIN32)
   
   SET(GETTEXT ${LIBDIR}/gettext)
   SET(GETTEXT_INC ${GETTEXT}/include)
-  IF(CMAKE_CL_64)
-       SET(GETTEXT_LIB gettextlib)
-  ELSE(CMAKE_CL_64)
-       SET(GETTEXT_LIB gnu_gettext)
-  ENDIF(CMAKE_CL_64)
+  SET(GETTEXT_LIB gnu_gettext)
   SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
 
   SET(FREETYPE ${LIBDIR}/freetype)
@@ -284,12 +279,7 @@ IF(WIN32)
   SET(FFMPEG_LIB avcodec-51 avformat-52 avdevice-52 avutil-49 swscale-0)
   SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
 
-  IF(CMAKE_CL_64)
-  SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
-  ELSE(CMAKE_CL_64)
   SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
-  ENDIF(CMAKE_CL_64)
-  
   IF(WITH_OPENAL)
     SET(LLIBS ${LLIBS} dxguid)
   ENDIF(WITH_OPENAL)
@@ -327,7 +317,7 @@ IF(WIN32)
   SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
   IF(CMAKE_CL_64)
-  SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
+  SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib;MSVCRT.lib ")
   ELSE(CMAKE_CL_64)
   SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
   ENDIF(CMAKE_CL_64)
@@ -457,13 +447,6 @@ SUBDIRS(
 # Blender Application
 SUBDIRS(source/creator)
 
-#-----------------------------------------------------------------------------
-# Blender WebPlugin
-IF(WITH_WEBPLUGIN) 
-  SET(MOZILLA_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
-  SET(WITH_PLAYER ON)
-ENDIF(WITH_WEBPLUGIN)
-
 #-----------------------------------------------------------------------------
 # Blender Player
 IF(WITH_PLAYER)
index 9786b7e..d906395 100644 (file)
@@ -86,12 +86,10 @@ IF(UNIX)
     bf_oglrasterizer 
     bf_expressions 
     bf_scenegraph 
-       bf_IK
     bf_moto 
     bf_soundsystem 
     bf_kernel 
     bf_nodes
-       bf_gpu
     bf_imbuf
     bf_avi 
     kx_network 
index 48455d2..8fd6c32 100644 (file)
@@ -143,6 +143,7 @@ BF_FTGL_LIB = 'extern_ftgl'
 
 WITH_BF_GAMEENGINE='true'
 WITH_BF_PLAYER='true'
+WITH_BF_GLEXT= '1'
 
 WITH_BF_ODE = 'false'
 BF_ODE = LIBDIR + '/ode'
index 36cbac6..fe43253 100644 (file)
@@ -6,12 +6,10 @@ BF_VERSE_INCLUDE = "#extern/verse/dist"
 
 BF_PYTHON = '/usr'
 BF_PYTHON_VERSION = '2.5'
-WITH_BF_STATICPYTHON = 'false'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
 
 WITH_BF_OPENAL = 'true'
 BF_OPENAL = '/usr'
index 7a6b58b..6de2fd3 100644 (file)
@@ -394,24 +394,12 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSequentialImpulseConstraintSolver.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSliderConstraint.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSliderConstraint.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSolve2LinearConstraint.cpp">
                                        </File>
                                        <File
                                                RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSolve2LinearConstraint.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSolverBody.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btSolverConstraint.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btTypedConstraint.cpp">
                                        </File>
@@ -422,12 +410,6 @@ ECHO Done
                                <Filter
                                        Name="Dynamics"
                                        Filter="">
-                                       <File
-                                               RelativePath="..\..\src\BulletDynamics\Dynamics\btContinuousDynamicsWorld.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletDynamics\Dynamics\btContinuousDynamicsWorld.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletDynamics\Dynamics\btDiscreteDynamicsWorld.cpp">
                                        </File>
@@ -500,45 +482,18 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btCollisionAlgorithm.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btDbvt.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btDbvt.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btDbvtBroadphase.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btDbvtBroadphase.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btDispatcher.cpp">
                                        </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btDispatcher.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btMultiSapBroadphase.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btMultiSapBroadphase.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btOverlappingPairCache.cpp">
                                        </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btOverlappingPairCache.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btOverlappingPairCallback.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btQuantizedBvh.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btQuantizedBvh.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\BroadphaseCollision\btSimpleBroadphase.cpp">
                                        </File>
@@ -579,12 +534,6 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\NarrowPhaseCollision\btGjkEpa.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\NarrowPhaseCollision\btGjkEpa2.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\NarrowPhaseCollision\btGjkEpa2.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\NarrowPhaseCollision\btGjkEpaPenetrationDepthSolver.cpp">
                                        </File>
@@ -640,21 +589,6 @@ ECHO Done
                                <Filter
                                        Name="CollisionDispatch"
                                        Filter="">
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btBoxBoxCollisionAlgorithm.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btBoxBoxCollisionAlgorithm.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btBoxBoxDetector.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btBoxBoxDetector.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btCollisionConfiguration.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionDispatch\btCollisionCreateFunc.h">
                                        </File>
@@ -694,18 +628,6 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionDispatch\btConvexConvexAlgorithm.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btConvexPlaneCollisionAlgorithm.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btConvexPlaneCollisionAlgorithm.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btDefaultCollisionConfiguration.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionDispatch\btDefaultCollisionConfiguration.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionDispatch\btEmptyCollisionAlgorithm.cpp">
                                        </File>
@@ -809,12 +731,6 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btConvexHullShape.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btConvexInternalShape.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btConvexInternalShape.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btConvexShape.cpp">
                                        </File>
@@ -845,21 +761,12 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btHeightfieldTerrainShape.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btMaterial.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btMinkowskiSumShape.cpp">
                                        </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btMinkowskiSumShape.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btMultimaterialTriangleMeshShape.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btMultimaterialTriangleMeshShape.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btMultiSphereShape.cpp">
                                        </File>
@@ -878,18 +785,6 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btPolyhedralConvexShape.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btScaledBvhTriangleMeshShape.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btScaledBvhTriangleMeshShape.h">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btShapeHull.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btShapeHull.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btSphereShape.cpp">
                                        </File>
@@ -932,12 +827,6 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexArray.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexMaterialArray.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btTriangleIndexVertexMaterialArray.h">
-                                       </File>
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btTriangleMesh.cpp">
                                        </File>
@@ -953,12 +842,6 @@ ECHO Done
                                        <File
                                                RelativePath="..\..\src\BulletCollision\CollisionShapes\btTriangleShape.h">
                                        </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btUniformScalingShape.cpp">
-                                       </File>
-                                       <File
-                                               RelativePath="..\..\src\BulletCollision\CollisionShapes\btUniformScalingShape.h">
-                                       </File>
                                </Filter>
                        </Filter>
                        <Filter
@@ -976,9 +859,6 @@ ECHO Done
                                <File
                                        RelativePath="..\..\src\LinearMath\btAlignedObjectArray.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\src\LinearMath\btConvexHull.h">
-                               </File>
                                <File
                                        RelativePath="..\..\src\LinearMath\btDefaultMotionState.h">
                                </File>
@@ -1006,9 +886,6 @@ ECHO Done
                                <File
                                        RelativePath="..\..\src\LinearMath\btPoint3.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\src\LinearMath\btPoolAllocator.h">
-                               </File>
                                <File
                                        RelativePath="..\..\src\LinearMath\btQuadWord.h">
                                </File>
@@ -1027,6 +904,9 @@ ECHO Done
                                <File
                                        RelativePath="..\..\src\LinearMath\btScalar.h">
                                </File>
+                               <File
+                                       RelativePath="..\..\src\LinearMath\btSimdMinMax.h">
+                               </File>
                                <File
                                        RelativePath="..\..\src\LinearMath\btStackAlloc.h">
                                </File>
index 02430cb..4d1a4c1 100644 (file)
@@ -1,8 +1,3 @@
-***
-Apply bullet_compound_raycast.patch if not already applied in Bullet source
-This patch is needed to return correct raycast results on compound shape.
-/ben
-
 
 *** These files in extern/bullet2 are NOT part of the Blender build yet ***
 
index 8074aed..078dcae 100644 (file)
@@ -23,153 +23,15 @@ subject to the following restrictions:
 #ifndef BULLET_C_API_H
 #define BULLET_C_API_H
 
-#define PL_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
-
-#ifdef BT_USE_DOUBLE_PRECISION
-typedef double plReal;
-#else
-typedef float  plReal;
-#endif
-
-typedef plReal plVector3[3];
-typedef plReal plQuaternion[4];
-
 #ifdef __cplusplus
 extern "C" { 
 #endif
 
-/*     Particular physics SDK */
-       PL_DECLARE_HANDLE(plPhysicsSdkHandle);
-
-/*     Dynamics world, belonging to some physics SDK */
-       PL_DECLARE_HANDLE(plDynamicsWorldHandle);
-
-/* Rigid Body that can be part of a Dynamics World */  
-       PL_DECLARE_HANDLE(plRigidBodyHandle);
-
-/*     Collision Shape/Geometry, property of a Rigid Body */
-       PL_DECLARE_HANDLE(plCollisionShapeHandle);
-
-/* Constraint for Rigid Bodies */
-       PL_DECLARE_HANDLE(plConstraintHandle);
-
-/* Triangle Mesh interface */
-       PL_DECLARE_HANDLE(plMeshInterfaceHandle);
-
-/* Broadphase Scene/Proxy Handles */
-       PL_DECLARE_HANDLE(plCollisionBroadphaseHandle);
-       PL_DECLARE_HANDLE(plBroadphaseProxyHandle);
-       PL_DECLARE_HANDLE(plCollisionWorldHandle);
-
-/*
-       Create and Delete a Physics SDK 
-*/
-
-       extern  plPhysicsSdkHandle      plNewBulletSdk(); //this could be also another sdk, like ODE, PhysX etc.
-       extern  void            plDeletePhysicsSdk(plPhysicsSdkHandle   physicsSdk);
-
-/* Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
-
-       typedef void(*btBroadphaseCallback)(void* clientData, void* object1,void* object2);
-
-       extern plCollisionBroadphaseHandle      plCreateSapBroadphase(btBroadphaseCallback beginCallback,btBroadphaseCallback endCallback);
-
-       extern void     plDestroyBroadphase(plCollisionBroadphaseHandle bp);
-
-       extern  plBroadphaseProxyHandle plCreateProxy(plCollisionBroadphaseHandle bp, void* clientData, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ);
-
-       extern void plDestroyProxy(plCollisionBroadphaseHandle bp, plBroadphaseProxyHandle proxyHandle);
-
-       extern void plSetBoundingBox(plBroadphaseProxyHandle proxyHandle, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ);
-
-/* todo: add pair cache support with queries like add/remove/find pair */
-       
-       extern plCollisionWorldHandle plCreateCollisionWorld(plPhysicsSdkHandle physicsSdk);
-
-/* todo: add/remove objects */
-       
-
-/* Dynamics World */
-
-       extern  plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdk);
-
-       extern  void           plDeleteDynamicsWorld(plDynamicsWorldHandle world);
-
-       extern  void    plStepSimulation(plDynamicsWorldHandle, plReal  timeStep);
-
-       extern  void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object);
-
-       extern  void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object);
-
-
-/* Rigid Body  */
-
-       extern  plRigidBodyHandle plCreateRigidBody(    void* user_data,  float mass, plCollisionShapeHandle cshape );
-
-       extern  void plDeleteRigidBody(plRigidBodyHandle body);
-
-
-/* Collision Shape definition */
-
-       extern  plCollisionShapeHandle plNewSphereShape(plReal radius);
-       extern  plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z);
-       extern  plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height); 
-       extern  plCollisionShapeHandle plNewConeShape(plReal radius, plReal height);
-       extern  plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height);
-       extern  plCollisionShapeHandle plNewCompoundShape();
-       extern  void    plAddChildShape(plCollisionShapeHandle compoundShape,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOrn);
-
-       extern  void plDeleteShape(plCollisionShapeHandle shape);
-
-       /* Convex Meshes */
-       extern  plCollisionShapeHandle plNewConvexHullShape();
-       extern  void            plAddVertex(plCollisionShapeHandle convexHull, plReal x,plReal y,plReal z);
-/* Concave static triangle meshes */
-       extern  plMeshInterfaceHandle              plNewMeshInterface();
-       extern  void            plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2);
-       extern  plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle);
-
-       extern  void plSetScaling(plCollisionShapeHandle shape, plVector3 scaling);
-
-/* SOLID has Response Callback/Table/Management */
-/* PhysX has Triggers, User Callbacks and filtering */
-/* ODE has the typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); */
-
-/*     typedef void plUpdatedPositionCallback(void* userData, plRigidBodyHandle        rbHandle, plVector3 pos); */
-/*     typedef void plUpdatedOrientationCallback(void* userData, plRigidBodyHandle     rbHandle, plQuaternion orientation); */
-
-       /* get world transform */
-       extern void     plGetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix);
-       extern void     plGetPosition(plRigidBodyHandle object,plVector3 position);
-       extern void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation);
-
-       /* set world transform (position/orientation) */
-       extern  void plSetPosition(plRigidBodyHandle object, const plVector3 position);
-       extern  void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation);
-       extern  void plSetEuler(plReal yaw,plReal pitch,plReal roll, plQuaternion orient);
-
-       typedef struct plRayCastResult {
-               plRigidBodyHandle               m_body;  
-               plCollisionShapeHandle  m_shape;                
-               plVector3                               m_positionWorld;                
-               plVector3                               m_normalWorld;
-       } plRayCastResult;
-
-       extern  int plRayCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plRayCastResult res);
-
-       /* Sweep API */
-
-       /* extern  plRigidBodyHandle plObjectCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal); */
-
-       /* Continuous Collision Detection API */
-       
-       // needed for source/blender/blenkernel/intern/collision.c
-       double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]);
+double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]);
 
 #ifdef __cplusplus
 }
 #endif
 
-
 #endif //BULLET_C_API_H
 
index d7eea33..be4a115 100644 (file)
 
 #include <assert.h>
 
-btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache)
-:btAxisSweep3Internal<unsigned short int>(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache)
+#ifdef DEBUG_BROADPHASE
+#include <stdio.h>
+void btAxisSweep3::debugPrintAxis(int axis, bool checkCardinality)
 {
-       // 1 handle is reserved as sentinel
-       btAssert(maxHandles > 1 && maxHandles < 32767);
+       int numEdges = m_pHandles[0].m_maxEdges[axis];
+       printf("SAP Axis %d, numEdges=%d\n",axis,numEdges);
+
+       int i;
+       for (i=0;i<numEdges+1;i++)
+       {
+               Edge* pEdge = m_pEdges[axis] + i;
+               Handle* pHandlePrev = getHandle(pEdge->m_handle);
+               int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis];
+               char beginOrEnd;
+               beginOrEnd=pEdge->IsMax()?'E':'B';
+               printf("        [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex);
+       }
+
+       if (checkCardinality)
+               assert(numEdges == m_numHandles*2+1);
+}
+#endif //DEBUG_BROADPHASE
+
 
+btBroadphaseProxy*     btAxisSweep3::createProxy(  const btVector3& min,  const btVector3& max,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask)
+{
+               (void)shapeType;
+               BP_FP_INT_TYPE handleId = addHandle(min,max, userPtr,collisionFilterGroup,collisionFilterMask);
+               
+               Handle* handle = getHandle(handleId);
+                               
+               return handle;
 }
 
+void   btAxisSweep3::destroyProxy(btBroadphaseProxy* proxy)
+{
+       Handle* handle = static_cast<Handle*>(proxy);
+       removeHandle(handle->m_handleId);
+}
 
-bt32BitAxisSweep3::bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache )
-:btAxisSweep3Internal<unsigned int>(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache)
+void   btAxisSweep3::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax)
 {
+       Handle* handle = static_cast<Handle*>(proxy);
+       updateHandle(handle->m_handleId,aabbMin,aabbMax);
+
+}
+
+
+
+
+
+
+btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, int maxHandles)
+:btOverlappingPairCache()
+{
+       m_invalidPair = 0;
+       //assert(bounds.HasVolume());
+
        // 1 handle is reserved as sentinel
-       btAssert(maxHandles > 1 && maxHandles < 2147483647);
+       btAssert(maxHandles > 1 && maxHandles < BP_MAX_HANDLES);
+
+       // init bounds
+       m_worldAabbMin = worldAabbMin;
+       m_worldAabbMax = worldAabbMax;
+
+       btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin;
+
+       BP_FP_INT_TYPE  maxInt = BP_HANDLE_SENTINEL;
+
+       m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize;
+
+       // allocate handles buffer and put all handles on free list
+       m_pHandles = new Handle[maxHandles];
+       m_maxHandles = maxHandles;
+       m_numHandles = 0;
+
+       // handle 0 is reserved as the null index, and is also used as the sentinel
+       m_firstFreeHandle = 1;
+       {
+               for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++)
+                       m_pHandles[i].SetNextFree(i + 1);
+               m_pHandles[maxHandles - 1].SetNextFree(0);
+       }
+
+       {
+       // allocate edge buffers
+       for (int i = 0; i < 3; i++)
+               m_pEdges[i] = new Edge[maxHandles * 2];
+       }
+       //removed overlap management
+
+       // make boundary sentinels
+       
+       m_pHandles[0].m_clientObject = 0;
+
+       for (int axis = 0; axis < 3; axis++)
+       {
+               m_pHandles[0].m_minEdges[axis] = 0;
+               m_pHandles[0].m_maxEdges[axis] = 1;
+
+               m_pEdges[axis][0].m_pos = 0;
+               m_pEdges[axis][0].m_handle = 0;
+               m_pEdges[axis][1].m_pos = BP_HANDLE_SENTINEL;
+               m_pEdges[axis][1].m_handle = 0;
+#ifdef DEBUG_BROADPHASE
+               debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+
+       }
+
+}
+
+btAxisSweep3::~btAxisSweep3()
+{
+       
+       for (int i = 2; i >= 0; i--)
+               delete[] m_pEdges[i];
+       delete[] m_pHandles;
+}
+
+void btAxisSweep3::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const
+{
+       btPoint3 clampedPoint(point);
+       
+
+
+       clampedPoint.setMax(m_worldAabbMin);
+       clampedPoint.setMin(m_worldAabbMax);
+
+       btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize;
+       out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & BP_HANDLE_MASK) | isMax);
+       out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & BP_HANDLE_MASK) | isMax);
+       out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & BP_HANDLE_MASK) | isMax);
+       
+}
+
+
+
+BP_FP_INT_TYPE btAxisSweep3::allocHandle()
+{
+       assert(m_firstFreeHandle);
+
+       BP_FP_INT_TYPE handle = m_firstFreeHandle;
+       m_firstFreeHandle = getHandle(handle)->GetNextFree();
+       m_numHandles++;
+
+       return handle;
+}
+
+void btAxisSweep3::freeHandle(BP_FP_INT_TYPE handle)
+{
+       assert(handle > 0 && handle < m_maxHandles);
+
+       getHandle(handle)->SetNextFree(m_firstFreeHandle);
+       m_firstFreeHandle = handle;
+
+       m_numHandles--;
+}
+
+
+
+BP_FP_INT_TYPE btAxisSweep3::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask)
+{
+       // quantize the bounds
+       BP_FP_INT_TYPE min[3], max[3];
+       quantize(min, aabbMin, 0);
+       quantize(max, aabbMax, 1);
+
+       // allocate a handle
+       BP_FP_INT_TYPE handle = allocHandle();
+       assert(handle!= 0xcdcd);
+
+       Handle* pHandle = getHandle(handle);
+       
+       pHandle->m_handleId = handle;
+       //pHandle->m_pOverlaps = 0;
+       pHandle->m_clientObject = pOwner;
+       pHandle->m_collisionFilterGroup = collisionFilterGroup;
+       pHandle->m_collisionFilterMask = collisionFilterMask;
+
+       // compute current limit of edge arrays
+       BP_FP_INT_TYPE limit = m_numHandles * 2;
+
+       
+       // insert new edges just inside the max boundary edge
+       for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++)
+       {
+
+               m_pHandles[0].m_maxEdges[axis] += 2;
+
+               m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1];
+
+               m_pEdges[axis][limit - 1].m_pos = min[axis];
+               m_pEdges[axis][limit - 1].m_handle = handle;
+
+               m_pEdges[axis][limit].m_pos = max[axis];
+               m_pEdges[axis][limit].m_handle = handle;
+
+               pHandle->m_minEdges[axis] = limit - 1;
+               pHandle->m_maxEdges[axis] = limit;
+       }
+
+       // now sort the new edges to their correct position
+       sortMinDown(0, pHandle->m_minEdges[0], false);
+       sortMaxDown(0, pHandle->m_maxEdges[0], false);
+       sortMinDown(1, pHandle->m_minEdges[1], false);
+       sortMaxDown(1, pHandle->m_maxEdges[1], false);
+       sortMinDown(2, pHandle->m_minEdges[2], true);
+       sortMaxDown(2, pHandle->m_maxEdges[2], true);
+
+
+       return handle;
+}
+
+
+void btAxisSweep3::removeHandle(BP_FP_INT_TYPE handle)
+{
+       
+       Handle* pHandle = getHandle(handle);
+
+       //explicitly remove the pairs containing the proxy
+       //we could do it also in the sortMinUp (passing true)
+       //todo: compare performance
+       removeOverlappingPairsContainingProxy(pHandle);
+
+
+       // compute current limit of edge arrays
+       int limit = m_numHandles * 2;
+       
+       int axis;
+
+       for (axis = 0;axis<3;axis++)
+       {
+               m_pHandles[0].m_maxEdges[axis] -= 2;
+       }
+
+       // remove the edges by sorting them up to the end of the list
+       for ( axis = 0; axis < 3; axis++)
+       {
+               Edge* pEdges = m_pEdges[axis];
+               BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis];
+               pEdges[max].m_pos = BP_HANDLE_SENTINEL;
+
+               sortMaxUp(axis,max,false);
+
+
+               BP_FP_INT_TYPE i = pHandle->m_minEdges[axis];
+               pEdges[i].m_pos = BP_HANDLE_SENTINEL;
+
+
+               sortMinUp(axis,i,false);
+
+               pEdges[limit-1].m_handle = 0;
+               pEdges[limit-1].m_pos = BP_HANDLE_SENTINEL;
+               
+#ifdef DEBUG_BROADPHASE
+                       debugPrintAxis(axis,false);
+#endif //DEBUG_BROADPHASE
+
+
+       }
+
+
+       // free the handle
+       freeHandle(handle);
+
+       
+}
+
+extern int gOverlappingPairs;
+
+
+void   btAxisSweep3::refreshOverlappingPairs()
+{
+
+}
+void   btAxisSweep3::processAllOverlappingPairs(btOverlapCallback* callback)
+{
+
+       //perform a sort, to find duplicates and to sort 'invalid' pairs to the end
+       m_overlappingPairArray.heapSort(btBroadphasePairSortPredicate());
+
+       //remove the 'invalid' ones
+#ifdef USE_POPBACK_REMOVAL
+       while (m_invalidPair>0)
+       {
+               m_invalidPair--;
+               m_overlappingPairArray.pop_back();
+       }
+#else  
+       m_overlappingPairArray.resize(m_overlappingPairArray.size() - m_invalidPair);
+       m_invalidPair = 0;
+#endif
+
+       
+       int i;
+
+       btBroadphasePair previousPair;
+       previousPair.m_pProxy0 = 0;
+       previousPair.m_pProxy1 = 0;
+       previousPair.m_algorithm = 0;
+       
+       
+       for (i=0;i<m_overlappingPairArray.size();i++)
+       {
+       
+               btBroadphasePair& pair = m_overlappingPairArray[i];
+
+               bool isDuplicate = (pair == previousPair);
+
+               previousPair = pair;
+
+               bool needsRemoval = false;
+
+               if (!isDuplicate)
+               {
+                       bool hasOverlap = testOverlap(pair.m_pProxy0,pair.m_pProxy1);
+
+                       if (hasOverlap)
+                       {
+                               needsRemoval = callback->processOverlap(pair);
+                       } else
+                       {
+                               needsRemoval = true;
+                       }
+               } else
+               {
+                       //remove duplicate
+                       needsRemoval = true;
+                       //should have no algorithm
+                       btAssert(!pair.m_algorithm);
+               }
+               
+               if (needsRemoval)
+               {
+                       cleanOverlappingPair(pair);
+
+       //              m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
+       //              m_overlappingPairArray.pop_back();
+                       pair.m_pProxy0 = 0;
+                       pair.m_pProxy1 = 0;
+                       m_invalidPair++;
+                       gOverlappingPairs--;
+               } 
+               
+       }
+}
+
+
+bool btAxisSweep3::testOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+{
+       const Handle* pHandleA = static_cast<Handle*>(proxy0);
+       const Handle* pHandleB = static_cast<Handle*>(proxy1);
+       
+       //optimization 1: check the array index (memory address), instead of the m_pos
+
+       for (int axis = 0; axis < 3; axis++)
+       { 
+               if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || 
+                       pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) 
+               { 
+                       return false; 
+               } 
+       } 
+       return true;
+}
+
+bool btAxisSweep3::testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB)
+{
+       //optimization 1: check the array index (memory address), instead of the m_pos
+
+       for (int axis = 0; axis < 3; axis++)
+       { 
+               if (axis != ignoreAxis)
+               {
+                       if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || 
+                               pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) 
+                       { 
+                               return false; 
+                       } 
+               }
+       } 
+
+       //optimization 2: only 2 axis need to be tested (conflicts with 'delayed removal' optimization)
+
+       /*for (int axis = 0; axis < 3; axis++)
+       {
+               if (m_pEdges[axis][pHandleA->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleB->m_minEdges[axis]].m_pos ||
+                       m_pEdges[axis][pHandleB->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleA->m_minEdges[axis]].m_pos)
+               {
+                       return false;
+               }
+       }
+       */
+
+       return true;
+}
+
+void btAxisSweep3::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax)
+{
+//     assert(bounds.IsFinite());
+       //assert(bounds.HasVolume());
+
+       Handle* pHandle = getHandle(handle);
+
+       // quantize the new bounds
+       BP_FP_INT_TYPE min[3], max[3];
+       quantize(min, aabbMin, 0);
+       quantize(max, aabbMax, 1);
+
+       // update changed edges
+       for (int axis = 0; axis < 3; axis++)
+       {
+               BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis];
+               BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis];
+
+               int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos;
+               int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos;
+
+               m_pEdges[axis][emin].m_pos = min[axis];
+               m_pEdges[axis][emax].m_pos = max[axis];
+
+               // expand (only adds overlaps)
+               if (dmin < 0)
+                       sortMinDown(axis, emin);
+
+               if (dmax > 0)
+                       sortMaxUp(axis, emax);
+
+               // shrink (only removes overlaps)
+               if (dmin > 0)
+                       sortMinUp(axis, emin);
+
+               if (dmax < 0)
+                       sortMaxDown(axis, emax);
+
+#ifdef DEBUG_BROADPHASE
+       debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+       }
+
+       
+}
+
+
+
+
+// sorting a min edge downwards can only ever *add* overlaps
+void btAxisSweep3::sortMinDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps)
+{
+
+       Edge* pEdge = m_pEdges[axis] + edge;
+       Edge* pPrev = pEdge - 1;
+       Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+       while (pEdge->m_pos < pPrev->m_pos)
+       {
+               Handle* pHandlePrev = getHandle(pPrev->m_handle);
+
+               if (pPrev->IsMax())
+               {
+                       // if previous edge is a maximum check the bounds and add an overlap if necessary
+                       if (updateOverlaps && testOverlap(axis,pHandleEdge, pHandlePrev))
+                       {
+                               addOverlappingPair(pHandleEdge,pHandlePrev);
+
+                               //AddOverlap(pEdge->m_handle, pPrev->m_handle);
+
+                       }
+
+                       // update edge reference in other handle
+                       pHandlePrev->m_maxEdges[axis]++;
+               }
+               else
+                       pHandlePrev->m_minEdges[axis]++;
+
+               pHandleEdge->m_minEdges[axis]--;
+
+               // swap the edges
+               Edge swap = *pEdge;
+               *pEdge = *pPrev;
+               *pPrev = swap;
+
+               // decrement
+               pEdge--;
+               pPrev--;
+       }
+
+#ifdef DEBUG_BROADPHASE
+       debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+
+}
+
+// sorting a min edge upwards can only ever *remove* overlaps
+void btAxisSweep3::sortMinUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps)
+{
+       Edge* pEdge = m_pEdges[axis] + edge;
+       Edge* pNext = pEdge + 1;
+       Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+       while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos))
+       {
+               Handle* pHandleNext = getHandle(pNext->m_handle);
+
+               if (pNext->IsMax())
+               {
+                       // if next edge is maximum remove any overlap between the two handles
+                       if (updateOverlaps)
+                       {
+                               /*
+                               Handle* handle0 = getHandle(pEdge->m_handle);
+                               Handle* handle1 = getHandle(pNext->m_handle);
+                               btBroadphasePair tmpPair(*handle0,*handle1);
+                               removeOverlappingPair(tmpPair);
+                               */
+
+                       }
+
+                       // update edge reference in other handle
+                       pHandleNext->m_maxEdges[axis]--;
+               }
+               else
+                       pHandleNext->m_minEdges[axis]--;
+
+               pHandleEdge->m_minEdges[axis]++;
+
+               // swap the edges
+               Edge swap = *pEdge;
+               *pEdge = *pNext;
+               *pNext = swap;
+
+               // increment
+               pEdge++;
+               pNext++;
+       }
+
+
+}
+
+// sorting a max edge downwards can only ever *remove* overlaps
+void btAxisSweep3::sortMaxDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps)
+{
+
+       Edge* pEdge = m_pEdges[axis] + edge;
+       Edge* pPrev = pEdge - 1;
+       Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+       while (pEdge->m_pos < pPrev->m_pos)
+       {
+               Handle* pHandlePrev = getHandle(pPrev->m_handle);
+
+               if (!pPrev->IsMax())
+               {
+                       // if previous edge was a minimum remove any overlap between the two handles
+                       if (updateOverlaps)
+                       {
+                               //this is done during the overlappingpairarray iteration/narrowphase collision
+                               /*
+                               Handle* handle0 = getHandle(pEdge->m_handle);
+                               Handle* handle1 = getHandle(pPrev->m_handle);
+                               btBroadphasePair* pair = findPair(handle0,handle1);
+                               //assert(pair);
+
+                               if (pair)
+                               {
+                                       removeOverlappingPair(*pair);
+                               }
+                               */
+
+                       }
+
+                       // update edge reference in other handle
+                       pHandlePrev->m_minEdges[axis]++;;
+               }
+               else
+                       pHandlePrev->m_maxEdges[axis]++;
+
+               pHandleEdge->m_maxEdges[axis]--;
+
+               // swap the edges
+               Edge swap = *pEdge;
+               *pEdge = *pPrev;
+               *pPrev = swap;
+
+               // decrement
+               pEdge--;
+               pPrev--;
+       }
+
+       
+#ifdef DEBUG_BROADPHASE
+       debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+
+}
+
+// sorting a max edge upwards can only ever *add* overlaps
+void btAxisSweep3::sortMaxUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps)
+{
+       Edge* pEdge = m_pEdges[axis] + edge;
+       Edge* pNext = pEdge + 1;
+       Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+       while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos))
+       {
+               Handle* pHandleNext = getHandle(pNext->m_handle);
+
+               if (!pNext->IsMax())
+               {
+                       // if next edge is a minimum check the bounds and add an overlap if necessary
+                       if (updateOverlaps && testOverlap(axis, pHandleEdge, pHandleNext))
+                       {
+                               Handle* handle0 = getHandle(pEdge->m_handle);
+                               Handle* handle1 = getHandle(pNext->m_handle);
+                               addOverlappingPair(handle0,handle1);
+                       }
+
+                       // update edge reference in other handle
+                       pHandleNext->m_minEdges[axis]--;
+               }
+               else
+                       pHandleNext->m_maxEdges[axis]--;
+
+               pHandleEdge->m_maxEdges[axis]++;
+
+               // swap the edges
+               Edge swap = *pEdge;
+               *pEdge = *pNext;
+               *pNext = swap;
+
+               // increment
+               pEdge++;
+               pNext++;
+       }
+       
 }
index d0ad09a..57bbb36 100644 (file)
 #ifndef AXIS_SWEEP_3_H
 #define AXIS_SWEEP_3_H
 
-#include "LinearMath/btPoint3.h"
-#include "LinearMath/btVector3.h"
+#include "../../LinearMath/btPoint3.h"
+#include "../../LinearMath/btVector3.h"
 #include "btOverlappingPairCache.h"
-#include "btBroadphaseInterface.h"
 #include "btBroadphaseProxy.h"
-#include "btOverlappingPairCallback.h"
+
+
+//Enable BP_USE_FIXEDPOINT_INT_32 if you need more then 32767 objects
+//#define BP_USE_FIXEDPOINT_INT_32 1
+
+#ifdef BP_USE_FIXEDPOINT_INT_32
+       #define BP_FP_INT_TYPE unsigned int
+       #define BP_MAX_HANDLES 1500000 //arbitrary maximum number of handles
+       #define BP_HANDLE_SENTINEL 0x7fffffff
+       #define BP_HANDLE_MASK  0xfffffffe
+#else
+       #define BP_FP_INT_TYPE unsigned short int
+       #define BP_MAX_HANDLES 32767
+       #define BP_HANDLE_SENTINEL 0xffff
+       #define BP_HANDLE_MASK  0xfffe
+#endif //BP_USE_FIXEDPOINT_INT_32
 
 //#define DEBUG_BROADPHASE 1
-#define USE_OVERLAP_TEST_ON_REMOVES 1
 
-/// The internal templace class btAxisSweep3Internal implements the sweep and prune broadphase.
-/// It uses quantized integers to represent the begin and end points for each of the 3 axis.
-/// Dont use this class directly, use btAxisSweep3 or bt32BitAxisSweep3 instead.
-template <typename BP_FP_INT_TYPE>
-class btAxisSweep3Internal : public btBroadphaseInterface
+/// btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase.
+/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using integer coordinates instead of floats.
+/// The testOverlap check is optimized to check the array index, rather then the actual AABB coordinates/pos
+class btAxisSweep3 : public btOverlappingPairCache
 {
-protected:
-
-       BP_FP_INT_TYPE  m_bpHandleMask;
-       BP_FP_INT_TYPE  m_handleSentinel;
 
 public:
        
@@ -49,57 +57,47 @@ public:
                BP_FP_INT_TYPE m_pos;                   // low bit is min/max
                BP_FP_INT_TYPE m_handle;
 
-               BP_FP_INT_TYPE IsMax() const {return static_cast<BP_FP_INT_TYPE>(m_pos & 1);}
+               BP_FP_INT_TYPE IsMax() const {return m_pos & 1;}
        };
 
 public:
-       class   Handle : public btBroadphaseProxy
+       class Handle : public btBroadphaseProxy
        {
        public:
-       BT_DECLARE_ALIGNED_ALLOCATOR();
-       
+               
                // indexes into the edge arrays
                BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3];            // 6 * 2 = 12
-//             BP_FP_INT_TYPE m_uniqueId;
+               BP_FP_INT_TYPE m_handleId;
                BP_FP_INT_TYPE m_pad;
                
                //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject
        
-               SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;}
-               SIMD_FORCE_INLINE BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];}
+               inline void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;}
+               inline BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];}
        };              // 24 bytes + 24 for Edge structures = 44 bytes total per entry
 
        
-protected:
+private:
        btPoint3 m_worldAabbMin;                                                // overall system bounds
        btPoint3 m_worldAabbMax;                                                // overall system bounds
 
        btVector3 m_quantize;                                           // scaling factor for quantization
 
        BP_FP_INT_TYPE m_numHandles;                                            // number of active handles
-       BP_FP_INT_TYPE m_maxHandles;                                            // max number of handles
+       int m_maxHandles;                                               // max number of handles
        Handle* m_pHandles;                                             // handles pool
-       
        BP_FP_INT_TYPE m_firstFreeHandle;               // free handles list
 
        Edge* m_pEdges[3];                                              // edge arrays for the 3 axes (each array has m_maxHandles * 2 + 2 sentinel entries)
-       void* m_pEdgesRawPtr[3];
-
-       btOverlappingPairCache* m_pairCache;
-
-       ///btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
-       btOverlappingPairCallback* m_userPairCallback;
-       
-       bool    m_ownsPairCache;
 
-       int     m_invalidPair;
+       int m_invalidPair;
 
        // allocation/deallocation
        BP_FP_INT_TYPE allocHandle();
        void freeHandle(BP_FP_INT_TYPE handle);
        
 
-       bool testOverlap2D(const Handle* pHandleA, const Handle* pHandleB,int axis0,int axis1);
+       bool testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB);
 
 #ifdef DEBUG_BROADPHASE
        void debugPrintAxis(int axis,bool checkCardinality=true);
@@ -110,803 +108,29 @@ protected:
 
        void quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const;
 
-       void sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
-       void sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
-       void sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
-       void sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
+       void sortMinDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true);
+       void sortMinUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true);
+       void sortMaxDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true);
+       void sortMaxUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true);
 
 public:
+       btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, int maxHandles = 16384);
+       virtual ~btAxisSweep3();
 
-       btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0);
-
-       virtual ~btAxisSweep3Internal();
-
-       BP_FP_INT_TYPE getNumHandles() const
-       {
-               return m_numHandles;
-       }
-
-       virtual void    calculateOverlappingPairs(btDispatcher* dispatcher);
+       virtual void    refreshOverlappingPairs();
        
-       BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
-       void removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher);
-       void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher);
-       SIMD_FORCE_INLINE Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;}
+       BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask);
+       void removeHandle(BP_FP_INT_TYPE handle);
+       void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax);
+       inline Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;}
 
        void    processAllOverlappingPairs(btOverlapCallback* callback);
 
        //Broadphase Interface
-       virtual btBroadphaseProxy*      createProxy(  const btVector3& aabbMin,  const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
-       virtual void    destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
-       virtual void    setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
-       
-       bool    testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
-
-       btOverlappingPairCache* getOverlappingPairCache()
-       {
-               return m_pairCache;
-       }
-       const btOverlappingPairCache*   getOverlappingPairCache() const
-       {
-               return m_pairCache;
-       }
-
-       void    setOverlappingPairUserCallback(btOverlappingPairCallback* pairCallback)
-       {
-               m_userPairCallback = pairCallback;
-       }
-       const btOverlappingPairCallback*        getOverlappingPairUserCallback() const
-       {
-               return m_userPairCallback;
-       }
-
-       ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
-       ///will add some transform later
-       virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
-       {
-               aabbMin = m_worldAabbMin;
-               aabbMax = m_worldAabbMax;
-       }
-
-       virtual void    printStats()
-       {
-/*             printf("btAxisSweep3.h\n");
-               printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_maxHandles);
-               printf("aabbMin=%f,%f,%f,aabbMax=%f,%f,%f\n",m_worldAabbMin.getX(),m_worldAabbMin.getY(),m_worldAabbMin.getZ(),
-                       m_worldAabbMax.getX(),m_worldAabbMax.getY(),m_worldAabbMax.getZ());
-                       */
-
-       }
-
-};
-
-////////////////////////////////////////////////////////////////////
-
-
-
-
-#ifdef DEBUG_BROADPHASE
-#include <stdio.h>
-
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3<BP_FP_INT_TYPE>::debugPrintAxis(int axis, bool checkCardinality)
-{
-       int numEdges = m_pHandles[0].m_maxEdges[axis];
-       printf("SAP Axis %d, numEdges=%d\n",axis,numEdges);
-
-       int i;
-       for (i=0;i<numEdges+1;i++)
-       {
-               Edge* pEdge = m_pEdges[axis] + i;
-               Handle* pHandlePrev = getHandle(pEdge->m_handle);
-               int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis];
-               char beginOrEnd;
-               beginOrEnd=pEdge->IsMax()?'E':'B';
-               printf("        [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex);
-       }
-
-       if (checkCardinality)
-               assert(numEdges == m_numHandles*2+1);
-}
-#endif //DEBUG_BROADPHASE
-
-template <typename BP_FP_INT_TYPE>
-btBroadphaseProxy*     btAxisSweep3Internal<BP_FP_INT_TYPE>::createProxy(  const btVector3& aabbMin,  const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy)
-{
-               (void)shapeType;
-               BP_FP_INT_TYPE handleId = addHandle(aabbMin,aabbMax, userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,multiSapProxy);
-               
-               Handle* handle = getHandle(handleId);
-                               
-               return handle;
-}
-
-
-
-template <typename BP_FP_INT_TYPE>
-void   btAxisSweep3Internal<BP_FP_INT_TYPE>::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
-{
-       Handle* handle = static_cast<Handle*>(proxy);
-       removeHandle(static_cast<BP_FP_INT_TYPE>(handle->m_uniqueId), dispatcher);
-}
-
-template <typename BP_FP_INT_TYPE>
-void   btAxisSweep3Internal<BP_FP_INT_TYPE>::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher)
-{
-       Handle* handle = static_cast<Handle*>(proxy);
-       updateHandle(static_cast<BP_FP_INT_TYPE>(handle->m_uniqueId), aabbMin, aabbMax,dispatcher);
-
-}
-
-
-
-
-
-template <typename BP_FP_INT_TYPE>
-btAxisSweep3Internal<BP_FP_INT_TYPE>::btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE userMaxHandles, btOverlappingPairCache* pairCache )
-:m_bpHandleMask(handleMask),
-m_handleSentinel(handleSentinel),
-m_pairCache(pairCache),
-m_userPairCallback(0),
-m_ownsPairCache(false),
-m_invalidPair(0)
-{
-       BP_FP_INT_TYPE maxHandles = static_cast<BP_FP_INT_TYPE>(userMaxHandles+1);//need to add one sentinel handle
-
-       if (!m_pairCache)
-       {
-               void* ptr = btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16);
-               m_pairCache = new(ptr) btHashedOverlappingPairCache();
-               m_ownsPairCache = true;
-       }
-
-       //assert(bounds.HasVolume());
-
-       // init bounds
-       m_worldAabbMin = worldAabbMin;
-       m_worldAabbMax = worldAabbMax;
-
-       btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin;
-
-       BP_FP_INT_TYPE  maxInt = m_handleSentinel;
-
-       m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize;
-
-       // allocate handles buffer, using btAlignedAlloc, and put all handles on free list
-       m_pHandles = new Handle[maxHandles];
-       
-       m_maxHandles = maxHandles;
-       m_numHandles = 0;
-
-       // handle 0 is reserved as the null index, and is also used as the sentinel
-       m_firstFreeHandle = 1;
-       {
-               for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++)
-                       m_pHandles[i].SetNextFree(static_cast<BP_FP_INT_TYPE>(i + 1));
-               m_pHandles[maxHandles - 1].SetNextFree(0);
-       }
-
-       {
-               // allocate edge buffers
-               for (int i = 0; i < 3; i++)
-               {
-                       m_pEdgesRawPtr[i] = btAlignedAlloc(sizeof(Edge)*maxHandles*2,16);
-                       m_pEdges[i] = new(m_pEdgesRawPtr[i]) Edge[maxHandles * 2];
-               }
-       }
-       //removed overlap management
-
-       // make boundary sentinels
-       
-       m_pHandles[0].m_clientObject = 0;
-
-       for (int axis = 0; axis < 3; axis++)
-       {
-               m_pHandles[0].m_minEdges[axis] = 0;
-               m_pHandles[0].m_maxEdges[axis] = 1;
-
-               m_pEdges[axis][0].m_pos = 0;
-               m_pEdges[axis][0].m_handle = 0;
-               m_pEdges[axis][1].m_pos = m_handleSentinel;
-               m_pEdges[axis][1].m_handle = 0;
-#ifdef DEBUG_BROADPHASE
-               debugPrintAxis(axis);
-#endif //DEBUG_BROADPHASE
-
-       }
-
-}
-
-template <typename BP_FP_INT_TYPE>
-btAxisSweep3Internal<BP_FP_INT_TYPE>::~btAxisSweep3Internal()
-{
-       
-       for (int i = 2; i >= 0; i--)
-       {
-               btAlignedFree(m_pEdgesRawPtr[i]);
-       }
-       delete [] m_pHandles;
-
-       if (m_ownsPairCache)
-       {
-               m_pairCache->~btOverlappingPairCache();
-               btAlignedFree(m_pairCache);
-       }
-}
-
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const
-{
-       btPoint3 clampedPoint(point);
-       
-
-
-       clampedPoint.setMax(m_worldAabbMin);
-       clampedPoint.setMin(m_worldAabbMax);
-
-       btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize;
-       out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & m_bpHandleMask) | isMax);
-       out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & m_bpHandleMask) | isMax);
-       out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & m_bpHandleMask) | isMax);
-       
-}
-
-
-template <typename BP_FP_INT_TYPE>
-BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::allocHandle()
-{
-       assert(m_firstFreeHandle);
-
-       BP_FP_INT_TYPE handle = m_firstFreeHandle;
-       m_firstFreeHandle = getHandle(handle)->GetNextFree();
-       m_numHandles++;
-
-       return handle;
-}
-
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::freeHandle(BP_FP_INT_TYPE handle)
-{
-       assert(handle > 0 && handle < m_maxHandles);
-
-       getHandle(handle)->SetNextFree(m_firstFreeHandle);
-       m_firstFreeHandle = handle;
-
-       m_numHandles--;
-}
-
-
-template <typename BP_FP_INT_TYPE>
-BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy)
-{
-       // quantize the bounds
-       BP_FP_INT_TYPE min[3], max[3];
-       quantize(min, aabbMin, 0);
-       quantize(max, aabbMax, 1);
-
-       // allocate a handle
-       BP_FP_INT_TYPE handle = allocHandle();
-       
-
-       Handle* pHandle = getHandle(handle);
-       
-       pHandle->m_uniqueId = static_cast<int>(handle);
-       //pHandle->m_pOverlaps = 0;
-       pHandle->m_clientObject = pOwner;
-       pHandle->m_collisionFilterGroup = collisionFilterGroup;
-       pHandle->m_collisionFilterMask = collisionFilterMask;
-       pHandle->m_multiSapParentProxy = multiSapProxy;
-
-       // compute current limit of edge arrays
-       BP_FP_INT_TYPE limit = static_cast<BP_FP_INT_TYPE>(m_numHandles * 2);
-
-       
-       // insert new edges just inside the max boundary edge
-       for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++)
-       {
-
-               m_pHandles[0].m_maxEdges[axis] += 2;
-
-               m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1];
-
-               m_pEdges[axis][limit - 1].m_pos = min[axis];
-               m_pEdges[axis][limit - 1].m_handle = handle;
-
-               m_pEdges[axis][limit].m_pos = max[axis];
-               m_pEdges[axis][limit].m_handle = handle;
-
-               pHandle->m_minEdges[axis] = static_cast<BP_FP_INT_TYPE>(limit - 1);
-               pHandle->m_maxEdges[axis] = limit;
-       }
-
-       // now sort the new edges to their correct position
-       sortMinDown(0, pHandle->m_minEdges[0], dispatcher,false);
-       sortMaxDown(0, pHandle->m_maxEdges[0], dispatcher,false);
-       sortMinDown(1, pHandle->m_minEdges[1], dispatcher,false);
-       sortMaxDown(1, pHandle->m_maxEdges[1], dispatcher,false);
-       sortMinDown(2, pHandle->m_minEdges[2], dispatcher,true);
-       sortMaxDown(2, pHandle->m_maxEdges[2], dispatcher,true);
-
-
-       return handle;
-}
-
-
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher)
-{
-
-       Handle* pHandle = getHandle(handle);
-
-       //explicitly remove the pairs containing the proxy
-       //we could do it also in the sortMinUp (passing true)
-       //todo: compare performance
-       if (!m_pairCache->hasDeferredRemoval())
-       {
-               m_pairCache->removeOverlappingPairsContainingProxy(pHandle,dispatcher);
-       }
-
-       // compute current limit of edge arrays
-       int limit = static_cast<int>(m_numHandles * 2);
-       
-       int axis;
-
-       for (axis = 0;axis<3;axis++)
-       {
-               m_pHandles[0].m_maxEdges[axis] -= 2;
-       }
-
-       // remove the edges by sorting them up to the end of the list
-       for ( axis = 0; axis < 3; axis++)
-       {
-               Edge* pEdges = m_pEdges[axis];
-               BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis];
-               pEdges[max].m_pos = m_handleSentinel;
-
-               sortMaxUp(axis,max,dispatcher,false);
-
-
-               BP_FP_INT_TYPE i = pHandle->m_minEdges[axis];
-               pEdges[i].m_pos = m_handleSentinel;
-
-
-               sortMinUp(axis,i,dispatcher,false);
-
-               pEdges[limit-1].m_handle = 0;
-               pEdges[limit-1].m_pos = m_handleSentinel;
-               
-#ifdef DEBUG_BROADPHASE
-                       debugPrintAxis(axis,false);
-#endif //DEBUG_BROADPHASE
-
-
-       }
-
-
-       // free the handle
-       freeHandle(handle);
-
-       
-}
-
-extern int gOverlappingPairs;
-//#include <stdio.h>
-
-template <typename BP_FP_INT_TYPE>
-void   btAxisSweep3Internal<BP_FP_INT_TYPE>::calculateOverlappingPairs(btDispatcher* dispatcher)
-{
-
-       if (m_pairCache->hasDeferredRemoval())
-       {
-       
-               btBroadphasePairArray&  overlappingPairArray = m_pairCache->getOverlappingPairArray();
-
-               //perform a sort, to find duplicates and to sort 'invalid' pairs to the end
-               overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
-
-               overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
-               m_invalidPair = 0;
-
-               
-               int i;
-
-               btBroadphasePair previousPair;
-               previousPair.m_pProxy0 = 0;
-               previousPair.m_pProxy1 = 0;
-               previousPair.m_algorithm = 0;
-               
-               
-               for (i=0;i<overlappingPairArray.size();i++)
-               {
-               
-                       btBroadphasePair& pair = overlappingPairArray[i];
-
-                       bool isDuplicate = (pair == previousPair);
-
-                       previousPair = pair;
-
-                       bool needsRemoval = false;
-
-                       if (!isDuplicate)
-                       {
-                               bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
-
-                               if (hasOverlap)
-                               {
-                                       needsRemoval = false;//callback->processOverlap(pair);
-                               } else
-                               {
-                                       needsRemoval = true;
-                               }
-                       } else
-                       {
-                               //remove duplicate
-                               needsRemoval = true;
-                               //should have no algorithm
-                               btAssert(!pair.m_algorithm);
-                       }
-                       
-                       if (needsRemoval)
-                       {
-                               m_pairCache->cleanOverlappingPair(pair,dispatcher);
-
-               //              m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
-               //              m_overlappingPairArray.pop_back();
-                               pair.m_pProxy0 = 0;
-                               pair.m_pProxy1 = 0;
-                               m_invalidPair++;
-                               gOverlappingPairs--;
-                       } 
-                       
-               }
-
-       ///if you don't like to skip the invalid pairs in the array, execute following code:
-       #define CLEAN_INVALID_PAIRS 1
-       #ifdef CLEAN_INVALID_PAIRS
-
-               //perform a sort, to sort 'invalid' pairs to the end
-               overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
-
-               overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
-               m_invalidPair = 0;
-       #endif//CLEAN_INVALID_PAIRS
-               
-               //printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size());
-       }
-
-
-
-       
-
-}
-
-
-template <typename BP_FP_INT_TYPE>
-bool btAxisSweep3Internal<BP_FP_INT_TYPE>::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
-{
-       const Handle* pHandleA = static_cast<Handle*>(proxy0);
-       const Handle* pHandleB = static_cast<Handle*>(proxy1);
-       
-       //optimization 1: check the array index (memory address), instead of the m_pos
-
-       for (int axis = 0; axis < 3; axis++)
-       { 
-               if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || 
-                       pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) 
-               { 
-                       return false; 
-               } 
-       } 
-       return true;
-}
-
-template <typename BP_FP_INT_TYPE>
-bool btAxisSweep3Internal<BP_FP_INT_TYPE>::testOverlap2D(const Handle* pHandleA, const Handle* pHandleB,int axis0,int axis1)
-{
-       //optimization 1: check the array index (memory address), instead of the m_pos
-
-       if (pHandleA->m_maxEdges[axis0] < pHandleB->m_minEdges[axis0] || 
-               pHandleB->m_maxEdges[axis0] < pHandleA->m_minEdges[axis0] ||
-               pHandleA->m_maxEdges[axis1] < pHandleB->m_minEdges[axis1] ||
-               pHandleB->m_maxEdges[axis1] < pHandleA->m_minEdges[axis1]) 
-       { 
-               return false; 
-       } 
-       return true;
-}
-
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher)
-{
-//     assert(bounds.IsFinite());
-       //assert(bounds.HasVolume());
-
-       Handle* pHandle = getHandle(handle);
-
-       // quantize the new bounds
-       BP_FP_INT_TYPE min[3], max[3];
-       quantize(min, aabbMin, 0);
-       quantize(max, aabbMax, 1);
-
-       // update changed edges
-       for (int axis = 0; axis < 3; axis++)
-       {
-               BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis];
-               BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis];
-
-               int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos;
-               int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos;
-
-               m_pEdges[axis][emin].m_pos = min[axis];
-               m_pEdges[axis][emax].m_pos = max[axis];
-
-               // expand (only adds overlaps)
-               if (dmin < 0)
-                       sortMinDown(axis, emin,dispatcher,true);
-
-               if (dmax > 0)
-                       sortMaxUp(axis, emax,dispatcher,true);
-
-               // shrink (only removes overlaps)
-               if (dmin > 0)
-                       sortMinUp(axis, emin,dispatcher,true);
-
-               if (dmax < 0)
-                       sortMaxDown(axis, emax,dispatcher,true);
-
-#ifdef DEBUG_BROADPHASE
-       debugPrintAxis(axis);
-#endif //DEBUG_BROADPHASE
-       }
-
-       
-}
-
-
-
-
-// sorting a min edge downwards can only ever *add* overlaps
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* /* dispatcher */, bool updateOverlaps)
-{
-
-       Edge* pEdge = m_pEdges[axis] + edge;
-       Edge* pPrev = pEdge - 1;
-       Handle* pHandleEdge = getHandle(pEdge->m_handle);
-
-       while (pEdge->m_pos < pPrev->m_pos)
-       {
-               Handle* pHandlePrev = getHandle(pPrev->m_handle);
-
-               if (pPrev->IsMax())
-               {
-                       // if previous edge is a maximum check the bounds and add an overlap if necessary
-                       const int axis1 = (1  << axis) & 3;
-                       const int axis2 = (1  << axis1) & 3;
-                       if (updateOverlaps && testOverlap2D(pHandleEdge, pHandlePrev,axis1,axis2))
-                       {
-                               m_pairCache->addOverlappingPair(pHandleEdge,pHandlePrev);
-                               if (m_userPairCallback)
-                                       m_userPairCallback->addOverlappingPair(pHandleEdge,pHandlePrev);
-
-                               //AddOverlap(pEdge->m_handle, pPrev->m_handle);
-
-                       }
-
-                       // update edge reference in other handle
-                       pHandlePrev->m_maxEdges[axis]++;
-               }
-               else
-                       pHandlePrev->m_minEdges[axis]++;
-
-               pHandleEdge->m_minEdges[axis]--;
-
-               // swap the edges
-               Edge swap = *pEdge;
-               *pEdge = *pPrev;
-               *pPrev = swap;
-
-               // decrement
-               pEdge--;
-               pPrev--;
-       }
-
-#ifdef DEBUG_BROADPHASE
-       debugPrintAxis(axis);
-#endif //DEBUG_BROADPHASE
-
-}
-
-// sorting a min edge upwards can only ever *remove* overlaps
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps)
-{
-       Edge* pEdge = m_pEdges[axis] + edge;
-       Edge* pNext = pEdge + 1;
-       Handle* pHandleEdge = getHandle(pEdge->m_handle);
-
-       while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos))
-       {
-               Handle* pHandleNext = getHandle(pNext->m_handle);
-
-               if (pNext->IsMax())
-               {
-                       Handle* handle0 = getHandle(pEdge->m_handle);
-                       Handle* handle1 = getHandle(pNext->m_handle);
-                       const int axis1 = (1  << axis) & 3;
-                       const int axis2 = (1  << axis1) & 3;
-                       
-                       // if next edge is maximum remove any overlap between the two handles
-                       if (updateOverlaps 
-#ifdef USE_OVERLAP_TEST_ON_REMOVES
-                               && testOverlap2D(handle0,handle1,axis1,axis2)
-#endif //USE_OVERLAP_TEST_ON_REMOVES
-                               )
-                       {
-                               
-
-                               m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher); 
-                               if (m_userPairCallback)
-                                       m_userPairCallback->removeOverlappingPair(handle0,handle1,dispatcher);
-                               
-                       }
-
-
-                       // update edge reference in other handle
-                       pHandleNext->m_maxEdges[axis]--;
-               }
-               else
-                       pHandleNext->m_minEdges[axis]--;
-
-               pHandleEdge->m_minEdges[axis]++;
-
-               // swap the edges
-               Edge swap = *pEdge;
-               *pEdge = *pNext;
-               *pNext = swap;
-
-               // increment
-               pEdge++;
-               pNext++;
-       }
-
-
-}
-
-// sorting a max edge downwards can only ever *remove* overlaps
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps)
-{
-
-       Edge* pEdge = m_pEdges[axis] + edge;
-       Edge* pPrev = pEdge - 1;
-       Handle* pHandleEdge = getHandle(pEdge->m_handle);
-
-       while (pEdge->m_pos < pPrev->m_pos)
-       {
-               Handle* pHandlePrev = getHandle(pPrev->m_handle);
-
-               if (!pPrev->IsMax())
-               {
-                       // if previous edge was a minimum remove any overlap between the two handles
-                       Handle* handle0 = getHandle(pEdge->m_handle);
-                       Handle* handle1 = getHandle(pPrev->m_handle);
-                       const int axis1 = (1  << axis) & 3;
-                       const int axis2 = (1  << axis1) & 3;
-
-                       if (updateOverlaps  
-#ifdef USE_OVERLAP_TEST_ON_REMOVES
-                               && testOverlap2D(handle0,handle1,axis1,axis2)
-#endif //USE_OVERLAP_TEST_ON_REMOVES
-                               )
-                       {
-                               //this is done during the overlappingpairarray iteration/narrowphase collision
-
-                               
-                               m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher);
-                               if (m_userPairCallback)
-                                       m_userPairCallback->removeOverlappingPair(handle0,handle1,dispatcher);
-                       
-
-
-                       }
-
-                       // update edge reference in other handle
-                       pHandlePrev->m_minEdges[axis]++;;
-               }
-               else
-                       pHandlePrev->m_maxEdges[axis]++;
-
-               pHandleEdge->m_maxEdges[axis]--;
-
-               // swap the edges
-               Edge swap = *pEdge;
-               *pEdge = *pPrev;
-               *pPrev = swap;
-
-               // decrement
-               pEdge--;
-               pPrev--;
-       }
-
-       
-#ifdef DEBUG_BROADPHASE
-       debugPrintAxis(axis);
-#endif //DEBUG_BROADPHASE
-
-}
-
-// sorting a max edge upwards can only ever *add* overlaps
-template <typename BP_FP_INT_TYPE>
-void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* /* dispatcher */, bool updateOverlaps)
-{
-       Edge* pEdge = m_pEdges[axis] + edge;
-       Edge* pNext = pEdge + 1;
-       Handle* pHandleEdge = getHandle(pEdge->m_handle);
-
-       while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos))
-       {
-               Handle* pHandleNext = getHandle(pNext->m_handle);
-
-               const int axis1 = (1  << axis) & 3;
-               const int axis2 = (1  << axis1) & 3;
-
-               if (!pNext->IsMax())
-               {
-                       // if next edge is a minimum check the bounds and add an overlap if necessary
-                       if (updateOverlaps && testOverlap2D(pHandleEdge, pHandleNext,axis1,axis2))
-                       {
-                               Handle* handle0 = getHandle(pEdge->m_handle);
-                               Handle* handle1 = getHandle(pNext->m_handle);
-                               m_pairCache->addOverlappingPair(handle0,handle1);
-                               if (m_userPairCallback)
-                                       m_userPairCallback->addOverlappingPair(handle0,handle1);
-                       }
-
-                       // update edge reference in other handle
-                       pHandleNext->m_minEdges[axis]--;
-               }
-               else
-                       pHandleNext->m_maxEdges[axis]--;
-
-               pHandleEdge->m_maxEdges[axis]++;
-
-               // swap the edges
-               Edge swap = *pEdge;
-               *pEdge = *pNext;
-               *pNext = swap;
-
-               // increment
-               pEdge++;
-               pNext++;
-       }
-       
-}
-
-
-
-////////////////////////////////////////////////////////////////////
-
-
-/// The btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase.
-/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using 16 bit integer coordinates instead of floats.
-/// For large worlds and many objects, use bt32BitAxisSweep3 or btDbvtBroadphase instead. bt32BitAxisSweep3 has higher precision and allows more then 16384 objects at the cost of more memory and bit of performance.
-class btAxisSweep3 : public btAxisSweep3Internal<unsigned short int>
-{
-public:
-
-       btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0);
-
-};
-
-/// The bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune.
-/// This comes at the cost of more memory per handle, and a bit slower performance.
-/// It uses arrays rather then lists for storage of the 3 axis.
-class bt32BitAxisSweep3 : public btAxisSweep3Internal<unsigned int>
-{
-public:
-
-       bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0);
+       virtual btBroadphaseProxy*      createProxy(  const btVector3& min,  const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask);
+       virtual void    destroyProxy(btBroadphaseProxy* proxy);
+       virtual void    setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax);
+       bool testOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
 
 };
 
index 200ac36..b6ace03 100644 (file)
@@ -20,34 +20,20 @@ subject to the following restrictions:
 
 struct btDispatcherInfo;
 class btDispatcher;
-#include "btBroadphaseProxy.h"
-class btOverlappingPairCache;
+struct btBroadphaseProxy;
+#include "../../LinearMath/btVector3.h"
 
-#include "LinearMath/btVector3.h"
-
-///The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
-///Some implementations for this broadphase interface include btAxisSweep3, bt32BitAxisSweep3 and btDbvtBroadphase.
-///The actual overlapping pair management, storage, adding and removing of pairs is dealt by the btOverlappingPairCache class.
+///BroadphaseInterface for aabb-overlapping object pairs
 class btBroadphaseInterface
 {
 public:
        virtual ~btBroadphaseInterface() {}
 
-       virtual btBroadphaseProxy*      createProxy(  const btVector3& aabbMin,  const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy) =0;
-       virtual void    destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0;
-       virtual void    setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0;
+       virtual btBroadphaseProxy*      createProxy(  const btVector3& min,  const btVector3& max,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask) =0;
+       virtual void    destroyProxy(btBroadphaseProxy* proxy)=0;
+       virtual void    setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax)=0;
+       virtual void    cleanProxyFromPairs(btBroadphaseProxy* proxy)=0;
        
-       ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
-       virtual void    calculateOverlappingPairs(btDispatcher* dispatcher)=0;
-
-       virtual btOverlappingPairCache* getOverlappingPairCache()=0;
-       virtual const btOverlappingPairCache*   getOverlappingPairCache() const =0;
-
-       ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
-       ///will add some transform later
-       virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const =0;
-
-       virtual void    printStats() = 0;
 
 };
 
index e0bb67f..40d9748 100644 (file)
@@ -16,8 +16,7 @@ subject to the following restrictions:
 #ifndef BROADPHASE_PROXY_H
 #define BROADPHASE_PROXY_H
 
-#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
-#include "LinearMath/btAlignedAllocator.h"
+#include "../../LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
 
 
 /// btDispatcher uses these types
@@ -39,7 +38,6 @@ IMPLICIT_CONVEX_SHAPES_START_HERE,
        CONE_SHAPE_PROXYTYPE,
        CONVEX_SHAPE_PROXYTYPE,
        CYLINDER_SHAPE_PROXYTYPE,
-       UNIFORM_SCALING_SHAPE_PROXYTYPE,
        MINKOWSKI_SUM_SHAPE_PROXYTYPE,
        MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE,
 //concave shapes
@@ -52,8 +50,6 @@ CONCAVE_SHAPES_START_HERE,
        TERRAIN_SHAPE_PROXYTYPE,
 ///Used for GIMPACT Trimesh integration
        GIMPACT_SHAPE_PROXYTYPE,
-///Multimaterial mesh
-    MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE,
        
        EMPTY_SHAPE_PROXYTYPE,
        STATIC_PLANE_PROXYTYPE,
@@ -61,18 +57,13 @@ CONCAVE_SHAPES_END_HERE,
 
        COMPOUND_SHAPE_PROXYTYPE,
 
-       SOFTBODY_SHAPE_PROXYTYPE,
-
        MAX_BROADPHASE_COLLISION_TYPES
 };
 
 
-///The btBroadphaseProxy is the main class that can be used with the Bullet broadphases. 
-///It stores collision shape type information, collision filter information and a client object, typically a btCollisionObject or btRigidBody.
-ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy
+///btBroadphaseProxy
+struct btBroadphaseProxy
 {
-
-BT_DECLARE_ALIGNED_ALLOCATOR();
        
        ///optional filtering to cull potential collisions
        enum CollisionFilterGroups
@@ -82,60 +73,44 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
                KinematicFilter = 4,
                DebrisFilter = 8,
                        SensorTrigger = 16,
-               AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
+               AllFilter = DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
        };
 
        //Usually the client btCollisionObject or Rigidbody class
        void*   m_clientObject;
-
        short int m_collisionFilterGroup;
        short int m_collisionFilterMask;
 
-       void*   m_multiSapParentProxy;          
-
-
-       int                     m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
-
-       SIMD_FORCE_INLINE int getUid() const
-       {
-               return m_uniqueId;
-       }
-
        //used for memory pools
-       btBroadphaseProxy() :m_clientObject(0),m_multiSapParentProxy(0)
-       {
-       }
+       btBroadphaseProxy() :m_clientObject(0){}
 
-       btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
+       btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask)
                :m_clientObject(userPtr),
                m_collisionFilterGroup(collisionFilterGroup),
                m_collisionFilterMask(collisionFilterMask)
        {
-               m_multiSapParentProxy = multiSapParentProxy;
        }
 
-       
-
-       static SIMD_FORCE_INLINE bool isPolyhedral(int proxyType)
+       static inline bool isPolyhedral(int proxyType)
        {
                return (proxyType  < IMPLICIT_CONVEX_SHAPES_START_HERE);
        }
 
-       static SIMD_FORCE_INLINE bool   isConvex(int proxyType)
+       static inline bool      isConvex(int proxyType)
        {
                return (proxyType < CONCAVE_SHAPES_START_HERE);
        }
 
-       static SIMD_FORCE_INLINE bool   isConcave(int proxyType)
+       static inline bool      isConcave(int proxyType)
        {
                return ((proxyType > CONCAVE_SHAPES_START_HERE) &&
                        (proxyType < CONCAVE_SHAPES_END_HERE));
        }
-       static SIMD_FORCE_INLINE bool   isCompound(int proxyType)
+       static inline bool      isCompound(int proxyType)
        {
                return (proxyType == COMPOUND_SHAPE_PROXYTYPE);
        }
-       static SIMD_FORCE_INLINE bool isInfinite(int proxyType)
+       static inline bool isInfinite(int proxyType)
        {
                return (proxyType == STATIC_PLANE_PROXYTYPE);
        }
@@ -149,9 +124,8 @@ struct btBroadphaseProxy;
 
 
 
-///The btBroadphasePair class contains a pair of aabb-overlapping objects.
-///A btDispatcher can search a btCollisionAlgorithm that performs exact/narrowphase collision detection on the actual collision shapes.
-ATTRIBUTE_ALIGNED16(struct) btBroadphasePair
+/// contains a pair of aabb-overlapping objects
+struct btBroadphasePair
 {
        btBroadphasePair ()
                :
@@ -162,8 +136,6 @@ ATTRIBUTE_ALIGNED16(struct) btBroadphasePair
        {
        }
 
-BT_DECLARE_ALIGNED_ALLOCATOR();
-
        btBroadphasePair(const btBroadphasePair& other)
                :               m_pProxy0(other.m_pProxy0),
                                m_pProxy1(other.m_pProxy1),
@@ -209,7 +181,6 @@ SIMD_FORCE_INLINE bool operator<(const btBroadphasePair& a, const btBroadphasePa
 */
 
 
-
 class btBroadphasePairSortPredicate
 {
        public:
index c95d1be..2ad0c86 100644 (file)
@@ -18,6 +18,6 @@ subject to the following restrictions:
 
 btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
 {
-       m_dispatcher = ci.m_dispatcher1;
+       m_dispatcher = ci.m_dispatcher;
 }
 
index 1618ad9..55cec38 100644 (file)
@@ -16,8 +16,7 @@ subject to the following restrictions:
 #ifndef COLLISION_ALGORITHM_H
 #define COLLISION_ALGORITHM_H
 
-#include "LinearMath/btScalar.h"
-#include "LinearMath/btAlignedObjectArray.h"
+#include "../../LinearMath/btScalar.h"
 
 struct btBroadphaseProxy;
 class btDispatcher;
@@ -26,22 +25,21 @@ class btCollisionObject;
 struct btDispatcherInfo;
 class  btPersistentManifold;
 
-typedef btAlignedObjectArray<btPersistentManifold*>    btManifoldArray;
 
 struct btCollisionAlgorithmConstructionInfo
 {
        btCollisionAlgorithmConstructionInfo()
-               :m_dispatcher1(0),
+               :m_dispatcher(0),
                m_manifold(0)
        {
        }
        btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int temp)
-               :m_dispatcher1(dispatcher)
+               :m_dispatcher(dispatcher)
        {
                (void)temp;
        }
 
-       btDispatcher*   m_dispatcher1;
+       btDispatcher*   m_dispatcher;
        btPersistentManifold*   m_manifold;
 
        int     getDispatcherId();
@@ -73,7 +71,6 @@ public:
 
        virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0;
 
-       virtual void    getAllContactManifolds(btManifoldArray& manifoldArray) = 0;
 };
 
 
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp
deleted file mode 100644 (file)
index 7c41c8d..0000000
+++ /dev/null
@@ -1,1289 +0,0 @@
-/*
-Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from the use of this software.
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
-subject to the following restrictions:
-
-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.
-2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-3. This notice may not be removed or altered from any source distribution.
-*/
-///btDbvt implementation by Nathanael Presson
-
-#include "btDbvt.h"
-
-//
-typedef btAlignedObjectArray<btDbvtNode*>                      tNodeArray;
-typedef btAlignedObjectArray<const btDbvtNode*>        tConstNodeArray;
-
-//
-struct btDbvtNodeEnumerator : btDbvt::ICollide
-{
-tConstNodeArray        nodes;
-void Process(const btDbvtNode* n) { nodes.push_back(n); }
-};
-
-//
-static DBVT_INLINE int                 indexof(const btDbvtNode* node)
-{
-return(node->parent->childs[1]==node);
-}
-
-//
-static DBVT_INLINE btDbvtVolume        merge(  const btDbvtVolume& a,
-                                                                               const btDbvtVolume& b)
-{
-#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE
-DBVT_ALIGN char locals[sizeof(btDbvtAabbMm)];
-btDbvtVolume&  res=*(btDbvtVolume*)locals;
-#else
-btDbvtVolume   res;
-#endif
-Merge(a,b,res);
-return(res);
-}
-
-// volume+edge lengths
-static DBVT_INLINE btScalar            size(const btDbvtVolume& a)
-{
-const btVector3        edges=a.Lengths();
-return(        edges.x()*edges.y()*edges.z()+
-               edges.x()+edges.y()+edges.z());
-}
-
-//
-static void                                            getmaxdepth(const btDbvtNode* node,int depth,int& maxdepth)
-{
-if(node->isinternal())
-       {
-       getmaxdepth(node->childs[0],depth+1,maxdepth);
-       getmaxdepth(node->childs[0],depth+1,maxdepth);
-       } else maxdepth=btMax(maxdepth,depth);
-}
-
-//
-static DBVT_INLINE void                        deletenode(     btDbvt* pdbvt,
-                                                                                       btDbvtNode* node)
-{
-btAlignedFree(pdbvt->m_free);
-pdbvt->m_free=node;
-}
-       
-//
-static void                                            recursedeletenode(      btDbvt* pdbvt,
-                                                                                                       btDbvtNode* node)
-{
-if(!node->isleaf())
-       {
-       recursedeletenode(pdbvt,node->childs[0]);
-       recursedeletenode(pdbvt,node->childs[1]);
-       }
-if(node==pdbvt->m_root) pdbvt->m_root=0;
-deletenode(pdbvt,node);
-}
-
-//
-static DBVT_INLINE btDbvtNode* createnode(     btDbvt* pdbvt,
-                                                                                       btDbvtNode* parent,
-                                                                                       void* data)
-{
-btDbvtNode*    node;
-if(pdbvt->m_free)
-       { node=pdbvt->m_free;pdbvt->m_free=0; }
-       else
-       { node=new(btAlignedAlloc(sizeof(btDbvtNode),16)) btDbvtNode(); }
-node->parent   =       parent;
-node->data             =       data;
-node->childs[1]        =       0;
-return(node);
-}
-
-//
-static DBVT_INLINE btDbvtNode* createnode(     btDbvt* pdbvt,
-                                                                                       btDbvtNode* parent,
-                                                                                       const btDbvtVolume& volume,
-                                                                                       void* data)
-{
-btDbvtNode*    node=createnode(pdbvt,parent,data);
-node->volume=volume;
-return(node);
-}
-
-//
-static DBVT_INLINE btDbvtNode* createnode(     btDbvt* pdbvt,
-                                                                                       btDbvtNode* parent,
-                                                                                       const btDbvtVolume& volume0,
-                                                                                       const btDbvtVolume& volume1,
-                                                                                       void* data)
-{
-btDbvtNode*    node=createnode(pdbvt,parent,data);
-Merge(volume0,volume1,node->volume);
-return(node);
-}
-
-//
-static void                                            insertleaf(     btDbvt* pdbvt,
-                                                                                       btDbvtNode* root,
-                                                                                       btDbvtNode* leaf)
-{
-if(!pdbvt->m_root)
-       {
-       pdbvt->m_root   =       leaf;
-       leaf->parent    =       0;
-       }
-       else
-       {
-       if(!root->isleaf())
-               {
-               do      {
-                       root=root->childs[Select(       leaf->volume,
-                                                                               root->childs[0]->volume,
-                                                                               root->childs[1]->volume)];
-                       } while(!root->isleaf());
-               }
-       btDbvtNode*     prev=root->parent;
-       btDbvtNode*     node=createnode(pdbvt,prev,leaf->volume,root->volume,0);
-       if(prev)
-               {
-               prev->childs[indexof(root)]     =       node;
-               node->childs[0]                         =       root;root->parent=node;
-               node->childs[1]                         =       leaf;leaf->parent=node;
-               do      {
-                       if(!prev->volume.Contain(node->volume))
-                               Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume);
-                               else
-                               break;
-                       node=prev;
-                       } while(0!=(prev=node->parent));
-               }
-               else
-               {
-               node->childs[0] =       root;root->parent=node;
-               node->childs[1] =       leaf;leaf->parent=node;
-               pdbvt->m_root   =       node;
-               }
-       }
-}
-       
-//
-static btDbvtNode*                             removeleaf(     btDbvt* pdbvt,
-                                                                                       btDbvtNode* leaf)
-{
-if(leaf==pdbvt->m_root)
-       {
-       pdbvt->m_root=0;
-       return(0);
-       }
-       else
-       {
-       btDbvtNode*     parent=leaf->parent;
-       btDbvtNode*     prev=parent->parent;
-       btDbvtNode*     sibling=parent->childs[1-indexof(leaf)];                        
-       if(prev)
-               {
-               prev->childs[indexof(parent)]=sibling;
-               sibling->parent=prev;
-               deletenode(pdbvt,parent);
-               while(prev)
-                       {
-                       const btDbvtVolume      pb=prev->volume;
-                       Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume);
-                       if(NotEqual(pb,prev->volume))
-                               {
-                               prev=prev->parent;
-                               } else break;
-                       }
-               return(prev?prev:pdbvt->m_root);
-               }
-               else
-               {                                                               
-               pdbvt->m_root=sibling;
-               sibling->parent=0;
-               deletenode(pdbvt,parent);
-               return(pdbvt->m_root);
-               }                       
-       }
-}
-
-//
-static void                                            fetchleaves(btDbvt* pdbvt,
-                                                                                       btDbvtNode* root,
-                                                                                       tNodeArray& leaves,
-                                                                                       int depth=-1)
-{
-if(root->isinternal()&&depth)
-       {
-       fetchleaves(pdbvt,root->childs[0],leaves,depth-1);
-       fetchleaves(pdbvt,root->childs[1],leaves,depth-1);
-       deletenode(pdbvt,root);
-       }
-       else
-       {
-       leaves.push_back(root);
-       }
-}
-
-//
-static void                                            split(  const tNodeArray& leaves,
-                                                                               tNodeArray& left,
-                                                                               tNodeArray& right,
-                                                                               const btVector3& org,
-                                                                               const btVector3& axis)
-{
-left.resize(0);
-right.resize(0);
-for(int i=0,ni=leaves.size();i<ni;++i)
-       {
-       if(dot(axis,leaves[i]->volume.Center()-org)<0)
-               left.push_back(leaves[i]);
-               else
-               right.push_back(leaves[i]);
-       }
-}
-
-//
-static btDbvtVolume                            bounds( const tNodeArray& leaves)
-{
-#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE
-DBVT_ALIGN char        locals[sizeof(btDbvtVolume)];
-btDbvtVolume&  volume=*(btDbvtVolume*)locals;
-volume=leaves[0]->volume;
-#else
-btDbvtVolume volume=leaves[0]->volume;
-#endif
-for(int i=1,ni=leaves.size();i<ni;++i)
-       {
-       Merge(volume,leaves[i]->volume,volume);
-       }
-return(volume);
-}
-
-//
-static void                                            bottomup(       btDbvt* pdbvt,
-                                                                                       tNodeArray& leaves)
-{
-while(leaves.size()>1)
-       {
-       btScalar        minsize=SIMD_INFINITY;
-       int                     minidx[2]={-1,-1};
-       for(int i=0;i<leaves.size();++i)
-               {
-               for(int j=i+1;j<leaves.size();++j)
-                       {
-                       const btScalar  sz=size(merge(leaves[i]->volume,leaves[j]->volume));
-                       if(sz<minsize)
-                               {
-                               minsize         =       sz;
-                               minidx[0]       =       i;
-                               minidx[1]       =       j;
-                               }
-                       }
-               }
-       btDbvtNode*     n[]     =       {leaves[minidx[0]],leaves[minidx[1]]};
-       btDbvtNode*     p       =       createnode(pdbvt,0,n[0]->volume,n[1]->volume,0);
-       p->childs[0]            =       n[0];
-       p->childs[1]            =       n[1];
-       n[0]->parent            =       p;
-       n[1]->parent            =       p;
-       leaves[minidx[0]]       =       p;
-       leaves.swap(minidx[1],leaves.size()-1);
-       leaves.pop_back();
-       }
-}
-
-//
-static btDbvtNode*                     topdown(btDbvt* pdbvt,
-                                                                       tNodeArray& leaves,
-                                                                       int bu_treshold)
-{
-static const btVector3 axis[]={btVector3(1,0,0),
-                                                               btVector3(0,1,0),
-                                                               btVector3(0,0,1)};
-if(leaves.size()>1)
-       {
-       if(leaves.size()>bu_treshold)
-               {
-               const btDbvtVolume      vol=bounds(leaves);
-               const btVector3                 org=vol.Center();
-               tNodeArray                              sets[2];
-               int                                             bestaxis=-1;
-               int                                             bestmidp=leaves.size();
-               int                                             splitcount[3][2]={{0,0},{0,0},{0,0}};
-               int i;
-               for( i=0;i<leaves.size();++i)
-                       {
-                       const btVector3 x=leaves[i]->volume.Center()-org;
-                       for(int j=0;j<3;++j)
-                               {
-                               ++splitcount[j][dot(x,axis[j])>0?1:0];
-                               }
-                       }
-               for( i=0;i<3;++i)
-                       {
-                       if((splitcount[i][0]>0)&&(splitcount[i][1]>0))
-                               {
-                               const int       midp=(int)btFabs(btScalar(splitcount[i][0]-splitcount[i][1]));
-                               if(midp<bestmidp)
-                                       {
-                                       bestaxis=i;
-                                       bestmidp=midp;
-                                       }
-                               }
-                       }
-               if(bestaxis>=0)
-                       {
-                       sets[0].reserve(splitcount[bestaxis][0]);
-                       sets[1].reserve(splitcount[bestaxis][1]);
-                       split(leaves,sets[0],sets[1],org,axis[bestaxis]);
-                       }
-                       else
-                       {
-                       sets[0].reserve(leaves.size()/2+1);
-                       sets[1].reserve(leaves.size()/2);
-                       for(int i=0,ni=leaves.size();i<ni;++i)
-                               {
-                               sets[i&1].push_back(leaves[i]);
-                               }
-                       }
-               btDbvtNode*     node=createnode(pdbvt,0,vol,0);
-               node->childs[0]=topdown(pdbvt,sets[0],bu_treshold);
-               node->childs[1]=topdown(pdbvt,sets[1],bu_treshold);
-               node->childs[0]->parent=node;
-               node->childs[1]->parent=node;
-               return(node);
-               }
-               else
-               {
-               bottomup(pdbvt,leaves);
-               return(leaves[0]);
-               }
-       }
-return(leaves[0]);
-}
-
-//
-static DBVT_INLINE btDbvtNode* sort(btDbvtNode* n,btDbvtNode*& r)
-{
-btDbvtNode*    p=n->parent;
-btAssert(n->isinternal());
-if(p>n)
-       {
-       const int               i=indexof(n);
-       const int               j=1-i;
-       btDbvtNode*     s=p->childs[j];
-       btDbvtNode*     q=p->parent;
-       btAssert(n==p->childs[i]);
-       if(q) q->childs[indexof(p)]=n; else r=n;
-       s->parent=n;
-       p->parent=n;
-       n->parent=q;
-       p->childs[0]=n->childs[0];
-       p->childs[1]=n->childs[1];
-       n->childs[0]->parent=p;
-       n->childs[1]->parent=p;
-       n->childs[i]=p;
-       n->childs[j]=s;
-       btSwap(p->volume,n->volume);
-       return(p);
-       }
-return(n);
-}
-
-//
-static DBVT_INLINE btDbvtNode* walkup(btDbvtNode* n,int count)
-{
-while(n&&(count--)) n=n->parent;
-return(n);
-}
-
-//
-// Api
-//
-
-//
-                               btDbvt::btDbvt()
-{
-m_root         =       0;
-m_free         =       0;
-m_lkhd         =       -1;
-m_leaves       =       0;
-m_opath                =       0;
-}
-
-//
-                               btDbvt::~btDbvt()
-{
-clear();
-}
-
-//
-void                   btDbvt::clear()
-{
-if(m_root)     recursedeletenode(this,m_root);
-btAlignedFree(m_free);
-m_free=0;
-}
-
-//
-void                   btDbvt::optimizeBottomUp()
-{
-if(m_root)
-       {
-       tNodeArray leaves;
-       leaves.reserve(m_leaves);
-       fetchleaves(this,m_root,leaves);
-       bottomup(this,leaves);
-       m_root=leaves[0];
-       }
-}
-
-//
-void                   btDbvt::optimizeTopDown(int bu_treshold)
-{
-if(m_root)
-       {
-       tNodeArray      leaves;
-       leaves.reserve(m_leaves);
-       fetchleaves(this,m_root,leaves);
-       m_root=topdown(this,leaves,bu_treshold);
-       }
-}
-
-//
-void                   btDbvt::optimizeIncremental(int passes)
-{
-if(passes<0) passes=m_leaves;
-if(m_root&&(passes>0))
-       {
-       do      {
-               btDbvtNode*             node=m_root;
-               unsigned        bit=0;
-               while(node->isinternal())
-                       {
-                       node=sort(node,m_root)->childs[(m_opath>>bit)&1];
-                       bit=(bit+1)&(sizeof(unsigned)*8-1);
-                       }
-               update(node);
-               ++m_opath;
-               } while(--passes);
-       }
-}
-
-//
-btDbvtNode*    btDbvt::insert(const btDbvtVolume& volume,void* data)
-{
-btDbvtNode*    leaf=createnode(this,0,volume,data);
-insertleaf(this,m_root,leaf);
-++m_leaves;
-return(leaf);
-}
-
-//
-void                   btDbvt::update(btDbvtNode* leaf,int lookahead)
-{
-btDbvtNode*    root=removeleaf(this,leaf);
-if(root)
-       {
-       if(lookahead>=0)
-               {
-               for(int i=0;(i<lookahead)&&root->parent;++i)
-                       {
-                       root=root->parent;
-                       }
-               } else root=m_root;
-       }
-insertleaf(this,root,leaf);
-}
-
-//
-void                   btDbvt::update(btDbvtNode* leaf,const btDbvtVolume& volume)
-{
-btDbvtNode*    root=removeleaf(this,leaf);
-if(root)
-       {
-       if(m_lkhd>=0)
-               {
-               for(int i=0;(i<m_lkhd)&&root->parent;++i)
-                       {
-                       root=root->parent;
-                       }
-               } else root=m_root;
-       }
-leaf->volume=volume;
-insertleaf(this,root,leaf);
-}
-
-//
-bool                   btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity,btScalar margin)
-{
-if(leaf->volume.Contain(volume)) return(false);
-volume.Expand(btVector3(margin,margin,margin));
-volume.SignedExpand(velocity);
-update(leaf,volume);
-return(true);
-}
-
-//
-bool                   btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity)
-{
-if(leaf->volume.Contain(volume)) return(false);
-volume.SignedExpand(velocity);
-update(leaf,volume);
-return(true);
-}
-
-//
-bool                   btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,btScalar margin)
-{
-if(leaf->volume.Contain(volume)) return(false);
-volume.Expand(btVector3(margin,margin,margin));
-update(leaf,volume);
-return(true);
-}
-
-//
-void                   btDbvt::remove(btDbvtNode* leaf)
-{
-removeleaf(this,leaf);
-deletenode(this,leaf);
---m_leaves;
-}
-
-//
-void                   btDbvt::write(IWriter* iwriter) const
-{
-btDbvtNodeEnumerator   nodes;
-nodes.nodes.reserve(m_leaves*2);
-enumNodes(m_root,nodes);
-iwriter->Prepare(m_root,nodes.nodes.size());
-for(int i=0;i<nodes.nodes.size();++i)
-       {
-       const btDbvtNode* n=nodes.nodes[i];
-       int                     p=-1;
-       if(n->parent) p=nodes.nodes.findLinearSearch(n->parent);
-       if(n->isinternal())
-               {
-               const int       c0=nodes.nodes.findLinearSearch(n->childs[0]);
-               const int       c1=nodes.nodes.findLinearSearch(n->childs[1]);
-               iwriter->WriteNode(n,i,p,c0,c1);
-               }
-               else
-               {
-               iwriter->WriteLeaf(n,i,p);
-               }       
-       }
-}
-
-//
-void                   btDbvt::clone(btDbvt& dest,IClone* iclone) const
-{
-dest.clear();
-if(m_root!=0)
-       {       
-       btAlignedObjectArray<sStkCLN>   stack;
-       stack.reserve(m_leaves);
-       stack.push_back(sStkCLN(m_root,0));
-       do      {
-               const int               i=stack.size()-1;
-               const sStkCLN   e=stack[i];
-               btDbvtNode*                     n=createnode(&dest,e.parent,e.node->volume,e.node->data);
-               stack.pop_back();
-               if(e.parent!=0)
-                       e.parent->childs[i&1]=n;
-                       else
-                       dest.m_root=n;
-               if(e.node->isinternal())
-                       {
-                       stack.push_back(sStkCLN(e.node->childs[0],n));
-                       stack.push_back(sStkCLN(e.node->childs[1],n));
-                       }
-                       else
-                       {
-                       iclone->CloneLeaf(n);
-                       }
-               } while(stack.size()>0);
-       }
-}
-
-//
-int                            btDbvt::maxdepth(const btDbvtNode* node)
-{
-int    depth=0;
-if(node) getmaxdepth(node,1,depth);
-return(depth);
-}
-
-//
-int                            btDbvt::countLeaves(const btDbvtNode* node)
-{
-if(node->isinternal())
-       return(countLeaves(node->childs[0])+countLeaves(node->childs[1]));
-       else
-       return(1);
-}
-
-//
-void                   btDbvt::extractLeaves(const btDbvtNode* node,btAlignedObjectArray<const btDbvtNode*>& leaves)
-{
-if(node->isinternal())
-       {
-       extractLeaves(node->childs[0],leaves);
-       extractLeaves(node->childs[1],leaves);
-       }
-       else
-       {
-       leaves.push_back(node);
-       }       
-}
-
-//
-#if DBVT_ENABLE_BENCHMARK
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "LinearMath/btQuickProf.h"
-
-/*
-q6600,2.4ghz
-
-/Ox /Ob2 /Oi /Ot /I "." /I "..\.." /I "..\..\src" /D "NDEBUG" /D "_LIB" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32"
-/GF /FD /MT /GS- /Gy /arch:SSE2 /Zc:wchar_t- /Fp"..\..\out\release8\build\libbulletcollision\libbulletcollision.pch"
-/Fo"..\..\out\release8\build\libbulletcollision\\"
-/Fd"..\..\out\release8\build\libbulletcollision\bulletcollision.pdb"
-/W3 /nologo /c /Wp64 /Zi /errorReport:prompt
-
-Benchmarking dbvt...
-        World scale: 100.000000
-        Extents base: 1.000000
-        Extents range: 4.000000
-        Leaves: 8192
-        sizeof(btDbvtVolume): 32 bytes
-        sizeof(btDbvtNode):   44 bytes
-[1] btDbvtVolume intersections: 3499 ms (-1%)
-[2] btDbvtVolume merges: 1934 ms (0%)
-[3] btDbvt::collideTT: 5485 ms (-21%)
-[4] btDbvt::collideTT self: 2814 ms (-20%)
-[5] btDbvt::collideTT xform: 7379 ms (-1%)
-[6] btDbvt::collideTT xform,self: 7270 ms (-2%)
-[7] btDbvt::collideRAY: 6314 ms (0%),(332143 r/s)
-[8] insert/remove: 2093 ms (0%),(1001983 ir/s)
-[9] updates (teleport): 1879 ms (-3%),(1116100 u/s)
-[10] updates (jitter): 1244 ms (-4%),(1685813 u/s)
-[11] optimize (incremental): 2514 ms (0%),(1668000 o/s)
-[12] btDbvtVolume notequal: 3659 ms (0%)
-[13] culling(OCL+fullsort): 2218 ms (0%),(461 t/s)
-[14] culling(OCL+qsort): 3688 ms (5%),(2221 t/s)
-[15] culling(KDOP+qsort): 1139 ms (-1%),(7192 t/s)
-[16] insert/remove batch(256): 5092 ms (0%),(823704 bir/s)
-[17] btDbvtVolume select: 3419 ms (0%)
-*/
-
-struct btDbvtBenchmark
-{
-struct NilPolicy : btDbvt::ICollide
-       {
-       NilPolicy() : m_pcount(0),m_depth(-SIMD_INFINITY),m_checksort(true)             {}
-       void    Process(const btDbvtNode*,const btDbvtNode*)                            { ++m_pcount; }
-       void    Process(const btDbvtNode*)                                                                      { ++m_pcount; }
-       void    Process(const btDbvtNode*,btScalar depth)
-               {
-               ++m_pcount;
-               if(m_checksort)
-                       { if(depth>=m_depth) m_depth=depth; else printf("wrong depth: %f (should be >= %f)\r\n",depth,m_depth); }
-               }
-       int                     m_pcount;
-       btScalar        m_depth;
-       bool            m_checksort;
-       };
-struct P14 : btDbvt::ICollide
-       {
-       struct Node
-               {
-               const btDbvtNode*       leaf;
-               btScalar                        depth;
-               };
-       void Process(const btDbvtNode* leaf,btScalar depth)
-               {
-               Node    n;
-               n.leaf  =       leaf;
-               n.depth =       depth;
-               }
-       static int sortfnc(const Node& a,const Node& b)
-               {
-               if(a.depth<b.depth) return(+1);
-               if(a.depth>b.depth) return(-1);
-               return(0);
-               }
-       btAlignedObjectArray<Node>              m_nodes;
-       };
-struct P15 : btDbvt::ICollide
-       {
-       struct Node
-               {
-               const btDbvtNode*       leaf;
-               btScalar                        depth;
-               };
-       void Process(const btDbvtNode* leaf)
-               {
-               Node    n;
-               n.leaf  =       leaf;
-               n.depth =       dot(leaf->volume.Center(),m_axis);
-               }
-       static int sortfnc(const Node& a,const Node& b)
-               {
-               if(a.depth<b.depth) return(+1);
-               if(a.depth>b.depth) return(-1);
-               return(0);
-               }
-       btAlignedObjectArray<Node>              m_nodes;
-       btVector3                                               m_axis;
-       };
-static btScalar                        RandUnit()
-       {
-       return(rand()/(btScalar)RAND_MAX);
-       }
-static btVector3               RandVector3()
-       {
-       return(btVector3(RandUnit(),RandUnit(),RandUnit()));
-       }
-static btVector3               RandVector3(btScalar cs)
-       {
-       return(RandVector3()*cs-btVector3(cs,cs,cs)/2);
-       }
-static btDbvtVolume    RandVolume(btScalar cs,btScalar eb,btScalar es)
-       {
-       return(btDbvtVolume::FromCE(RandVector3(cs),btVector3(eb,eb,eb)+RandVector3()*es));
-       }
-static btTransform             RandTransform(btScalar cs)
-       {
-       btTransform     t;
-       t.setOrigin(RandVector3(cs));
-       t.setRotation(btQuaternion(RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2).normalized());
-       return(t);
-       }
-static void                            RandTree(btScalar cs,btScalar eb,btScalar es,int leaves,btDbvt& dbvt)
-       {
-       dbvt.clear();
-       for(int i=0;i<leaves;++i)
-               {
-               dbvt.insert(RandVolume(cs,eb,es),0);
-               }
-       }
-};
-
-void                   btDbvt::benchmark()
-{
-static const btScalar  cfgVolumeCenterScale            =       100;
-static const btScalar  cfgVolumeExentsBase                     =       1;
-static const btScalar  cfgVolumeExentsScale            =       4;
-static const int               cfgLeaves                                       =       8192;
-static const bool              cfgEnable                                       =       true;
-
-//[1] btDbvtVolume intersections
-bool                                   cfgBenchmark1_Enable            =       cfgEnable;
-static const int               cfgBenchmark1_Iterations        =       8;
-static const int               cfgBenchmark1_Reference         =       3499;
-//[2] btDbvtVolume merges
-bool                                   cfgBenchmark2_Enable            =       cfgEnable;
-static const int               cfgBenchmark2_Iterations        =       4;
-static const int               cfgBenchmark2_Reference         =       1945;
-//[3] btDbvt::collideTT
-bool                                   cfgBenchmark3_Enable            =       cfgEnable;
-static const int               cfgBenchmark3_Iterations        =       512;
-static const int               cfgBenchmark3_Reference         =       5485;
-//[4] btDbvt::collideTT self
-bool                                   cfgBenchmark4_Enable            =       cfgEnable;
-static const int               cfgBenchmark4_Iterations        =       512;
-static const int               cfgBenchmark4_Reference         =       2814;
-//[5] btDbvt::collideTT xform
-bool                                   cfgBenchmark5_Enable            =       cfgEnable;
-static const int               cfgBenchmark5_Iterations        =       512;
-static const btScalar  cfgBenchmark5_OffsetScale       =       2;
-static const int               cfgBenchmark5_Reference         =       7379;
-//[6] btDbvt::collideTT xform,self
-bool                                   cfgBenchmark6_Enable            =       cfgEnable;
-static const int               cfgBenchmark6_Iterations        =       512;
-static const btScalar  cfgBenchmark6_OffsetScale      &