Skip to content

Commit

Permalink
Merge branch 'release-3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
crabmusket committed Jun 24, 2015
2 parents cda7097 + 0759fe5 commit d84bd0f
Show file tree
Hide file tree
Showing 2,761 changed files with 423,771 additions and 26,554 deletions.
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@

# Set to always use Windows line endings
*.cs text eol=crlf

# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
*.cpp text
*.hpp text
*.ppm text
*.nsh text
*.nlf text
*.command
*.txt
*.ini
27 changes: 23 additions & 4 deletions Engine/lib/bullet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
SET(MSVC_INCREMENTAL_DEFAULT ON)

PROJECT(BULLET_PHYSICS)
SET(BULLET_VERSION 2.81)
SET(BULLET_VERSION 2.82)

IF(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
Expand Down Expand Up @@ -113,7 +113,7 @@ IF (BUILD_MULTITHREADING)
ELSE(CMAKE_CL_64)
SET(CMAKE_NVSDKCOMPUTE_LIBPATH ${NVIDIA_OPENCL_BASE_DIR}/lib/Win32 )
ENDIF(CMAKE_CL_64)
SET(NVIDIA_OPENCL_LIBRARIES ${CMAKE_NVSDKCOMPUTE_LIBPATH}/OpenCL.lib)
SET(NVIDIA_OPENCL_LIBRARIES ${CMAKE_NVSDKCOMPUTE_LIBPATH}/OpenCL.lib)

OPTION(BUILD_NVIDIA_OPENCL_DEMOS "Build OpenCL demos for NVidia (GPU)" ON)
ELSE()
Expand Down Expand Up @@ -214,9 +214,13 @@ IF(MSVC)
ENDFOREACH(flag_var)
ENDIF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)

OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
IF (USE_MSVC_SSE)
IF (CMAKE_CL_64)
ADD_DEFINITIONS(-D_WIN64)
ELSE()
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
IF (USE_MSVC_SSE)
ADD_DEFINITIONS(/arch:SSE)
ENDIF()
ENDIF()
OPTION(USE_MSVC_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF (USE_MSVC_FAST_FLOATINGPOINT)
Expand Down Expand Up @@ -418,3 +422,18 @@ OPTION(BUILD_UNIT_TESTS "Build Unit Tests" OFF)
IF (BUILD_UNIT_TESTS)
SUBDIRS(UnitTests)
ENDIF()

set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet )
list (APPEND BULLET_LIBRARIES LinearMath)
list (APPEND BULLET_LIBRARIES BulletCollisions)
list (APPEND BULLET_LIBRARIES BulletDynamics)
list (APPEND BULLET_LIBRARIES BulletSoftBody)
set (BULLET_USE_FILE ${CMAKE_INSTALL_PREFIX}/${BULLET_CONFIG_CMAKE_PATH}/UseBullet.cmake)
configure_file ( ${CMAKE_SOURCE_DIR}/BulletConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
@ONLY ESCAPE_QUOTES
)
install ( FILES ${CMAKE_SOURCE_DIR}/UseBullet.cmake
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
DESTINATION ${BULLET_CONFIG_CMAKE_PATH}
)
17 changes: 17 additions & 0 deletions Engine/lib/bullet/COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2011 Erwin Coumans http://bulletphysics.org

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.
*/

All files in the Bullet/src folder are under this Zlib license.
Files in the Extras and Demos folder may have a different license, see the respective files.
4 changes: 4 additions & 0 deletions Engine/lib/bullet/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Primary author and maintainer: Erwin Coumans
This ChangeLog is incomplete, for an up-to-date list of all fixed issues see http://bullet.googlecode.com
using http://tinyurl.com/yabmjjj

2013 October 23
- Bullet 2.82 release
- See docs/BulletQuickstart.pdf or issue tracked for details.

2012 September 10
- Bullet 2.81 release preparation

Expand Down
8 changes: 5 additions & 3 deletions Engine/lib/bullet/RELEASING.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ This document details the steps necessary to package a release of Bullet.

1) Preparing for release:

update VERSION in several places
update ChangeLog
regenerate MSVC project files
update VERSION in several places (/VERSION file, /CMakeLists.txt, /configure.ac, /src/LinearMath/btScalar.h, /src/LinearMath/btSerializer.h around line 441)
re-generate serialization structures, if they changed (/src/LinearMath/btSerializer.cpp using makesdna)
update ChangeLog with larger/important changes
regenerate MSVC project files using build/vs_all.bat
create a Subversion tag revision in bullet.googlecode.com/svn/tags/bullet-<VERSION>

2) Generating the release .zip:
Do an SVN export on a Windows machine into the directory: bullet-X.YY
Expand Down
2 changes: 1 addition & 1 deletion Engine/lib/bullet/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.81
2.82
6 changes: 3 additions & 3 deletions Engine/lib/bullet/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ AC_PREREQ([2.54])
#----------------------------------------------------------------------------
AC_INIT(
[bullet],
[2.81],
[bullet@erwincoumans.com])
[2.82],
[erwin.coumans@gmail.com])
AC_CANONICAL_HOST
AC_CONFIG_SRCDIR([configure.ac])
AM_INIT_AUTOMAKE
Expand Down Expand Up @@ -163,7 +163,7 @@ CXXFLAGS="$ARCH_SPECIFIC_CFLAGS $CXXFLAGS $CFLAGS"
#----------------------------------------------------------------------------
# Emit generated files.
#----------------------------------------------------------------------------
AC_CONFIG_FILES([bullet.pc Makefile Demos/Makefile Demos/SoftDemo/Makefile Demos/AllBulletDemos/Makefile Demos/MultiThreadedDemo/Makefile Demos/OpenGL/Makefile Demos/BasicDemo/Makefile Demos/CcdPhysicsDemo/Makefile Demos/VehicleDemo/Makefile Demos/TerrainDemo/Makefile src/Makefile Extras/Makefile])
AC_CONFIG_FILES([bullet.pc Makefile Demos/Makefile Demos/SoftDemo/Makefile Demos/AllBulletDemos/Makefile Demos/MultiThreadedDemo/Makefile Demos/OpenGL/Makefile Demos/ForkLiftDemo/Makefile Demos/FeatherstoneMultiBodyDemo/Makefile Demos/BasicDemo/Makefile Demos/CcdPhysicsDemo/Makefile Demos/VehicleDemo/Makefile Demos/TerrainDemo/Makefile src/Makefile Extras/Makefile])
AC_OUTPUT

AC_MSG_NOTICE([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class btOverlappingPairCache;
struct btCollisionObjectWrapper;

class btPersistentManifold;
class btStackAlloc;
class btPoolAllocator;

struct btDispatcherInfo
Expand All @@ -47,8 +46,7 @@ struct btDispatcherInfo
m_useEpa(true),
m_allowedCcdPenetration(btScalar(0.04)),
m_useConvexConservativeDistanceUtil(false),
m_convexConservativeDistanceThreshold(0.0f),
m_stackAllocator(0)
m_convexConservativeDistanceThreshold(0.0f)
{

}
Expand All @@ -64,7 +62,6 @@ struct btDispatcherInfo
btScalar m_allowedCcdPenetration;
bool m_useConvexConservativeDistanceUtil;
btScalar m_convexConservativeDistanceThreshold;
btStackAlloc* m_stackAllocator;
};

///The btDispatcher interface class can be used in combination with broadphase to dispatch calculations for overlapping pairs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ btHashedOverlappingPairCache::~btHashedOverlappingPairCache()

void btHashedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher)
{
if (pair.m_algorithm)
if (pair.m_algorithm && dispatcher)
{
{
pair.m_algorithm->~btCollisionAlgorithm();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ class btHashedOverlappingPairCache : public btOverlappingPairCache
btOverlapFilterCallback* m_overlapFilterCallback;
bool m_blockedForChanges;

protected:

btAlignedObjectArray<int> m_hashTable;
btAlignedObjectArray<int> m_next;
btOverlappingPairCallback* m_ghostPairCallback;


public:
btHashedOverlappingPairCache();
Expand Down Expand Up @@ -265,11 +271,6 @@ class btHashedOverlappingPairCache : public btOverlappingPairCache
virtual void sortOverlappingPairs(btDispatcher* dispatcher);


protected:

btAlignedObjectArray<int> m_hashTable;
btAlignedObjectArray<int> m_next;
btOverlappingPairCallback* m_ghostPairCallback;

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,25 @@ void btQuantizedBvh::setQuantizationValues(const btVector3& bvhAabbMin,const btV
m_bvhAabbMax = bvhAabbMax + clampValue;
btVector3 aabbSize = m_bvhAabbMax - m_bvhAabbMin;
m_bvhQuantization = btVector3(btScalar(65533.0),btScalar(65533.0),btScalar(65533.0)) / aabbSize;

m_useQuantization = true;

{
unsigned short vecIn[3];
btVector3 v;
{
quantize(vecIn,m_bvhAabbMin,false);
v = unQuantize(vecIn);
m_bvhAabbMin.setMin(v-clampValue);
}
{
quantize(vecIn,m_bvhAabbMax,true);
v = unQuantize(vecIn);
m_bvhAabbMax.setMax(v+clampValue);
}
aabbSize = m_bvhAabbMax - m_bvhAabbMin;
m_bvhQuantization = btVector3(btScalar(65533.0),btScalar(65533.0),btScalar(65533.0)) / aabbSize;
}
}


Expand Down
9 changes: 8 additions & 1 deletion Engine/lib/bullet/src/BulletCollision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ SET(BulletCollision_SRCS
CollisionDispatch/btCollisionObject.cpp
CollisionDispatch/btCollisionWorld.cpp
CollisionDispatch/btCompoundCollisionAlgorithm.cpp
CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp
CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
CollisionDispatch/btConvexConvexAlgorithm.cpp
CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
CollisionDispatch/btDefaultCollisionConfiguration.cpp
CollisionDispatch/btEmptyCollisionAlgorithm.cpp
CollisionDispatch/btGhostObject.cpp
CollisionDispatch/btHashedSimplePairCache.cpp
CollisionDispatch/btInternalEdgeUtility.cpp
CollisionDispatch/btInternalEdgeUtility.h
CollisionDispatch/btManifoldResult.cpp
Expand Down Expand Up @@ -122,15 +124,18 @@ SET(CollisionDispatch_HDRS
CollisionDispatch/btCollisionCreateFunc.h
CollisionDispatch/btCollisionDispatcher.h
CollisionDispatch/btCollisionObject.h
CollisionDispatch/btCollisionObjectWrapper.h
CollisionDispatch/btCollisionWorld.h
CollisionDispatch/btCompoundCollisionAlgorithm.h
CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h
CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
CollisionDispatch/btConvexConvexAlgorithm.h
CollisionDispatch/btConvex2dConvex2dAlgorithm.h
CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
CollisionDispatch/btDefaultCollisionConfiguration.h
CollisionDispatch/btEmptyCollisionAlgorithm.h
CollisionDispatch/btGhostObject.h
CollisionDispatch/btHashedSimplePairCache.h
CollisionDispatch/btManifoldResult.h
CollisionDispatch/btSimulationIslandManager.h
CollisionDispatch/btSphereBoxCollisionAlgorithm.h
Expand Down Expand Up @@ -255,7 +260,9 @@ IF (INSTALL_LIBS)
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
INSTALL(TARGETS BulletCollision DESTINATION .)
ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
INSTALL(TARGETS BulletCollision DESTINATION lib${LIB_SUFFIX})
INSTALL(TARGETS BulletCollision RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
INSTALL(FILES ../btBulletCollisionCommon.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ subject to the following restrictions:

struct btCollisionAlgorithmCreateFunc;

class btStackAlloc;
class btPoolAllocator;

///btCollisionConfiguration allows to configure Bullet collision detection
Expand All @@ -38,7 +37,6 @@ class btCollisionConfiguration

virtual btPoolAllocator* getCollisionAlgorithmPool() = 0;

virtual btStackAlloc* getStackAllocator() = 0;

virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ void btCollisionDispatcher::defaultNearCallback(btBroadphasePair& collisionPair,

if (dispatcher.needsCollision(colObj0,colObj1))
{
btCollisionObjectWrapper obj0Wrap(0,colObj0->getCollisionShape(),colObj0,colObj0->getWorldTransform());
btCollisionObjectWrapper obj1Wrap(0,colObj1->getCollisionShape(),colObj1,colObj1->getWorldTransform());
btCollisionObjectWrapper obj0Wrap(0,colObj0->getCollisionShape(),colObj0,colObj0->getWorldTransform(),-1,-1);
btCollisionObjectWrapper obj1Wrap(0,colObj1->getCollisionShape(),colObj1,colObj1->getWorldTransform(),-1,-1);


//dispatcher will keep algorithms persistent in the collision pair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ btCollisionObject::btCollisionObject()
m_hitFraction(btScalar(1.)),
m_ccdSweptSphereRadius(btScalar(0.)),
m_ccdMotionThreshold(btScalar(0.)),
m_checkCollideWith(false)
m_checkCollideWith(false),
m_updateRevision(0)
{
m_worldTransform.setIdentity();
}
Expand Down
Loading

0 comments on commit d84bd0f

Please sign in to comment.