Bullet-C-Api.h   Bullet-C-Api.h 
skipping to change at line 68 skipping to change at line 68
/** Broadphase Scene/Proxy Handles (C-API)*/ /** Broadphase Scene/Proxy Handles (C-API)*/
PL_DECLARE_HANDLE(plCollisionBroadphaseHandle); PL_DECLARE_HANDLE(plCollisionBroadphaseHandle);
PL_DECLARE_HANDLE(plBroadphaseProxyHandle); PL_DECLARE_HANDLE(plBroadphaseProxyHandle);
PL_DECLARE_HANDLE(plCollisionWorldHandle); PL_DECLARE_HANDLE(plCollisionWorldHandle);
/** /**
Create and Delete a Physics SDK Create and Delete a Physics SDK
*/ */
extern plPhysicsSdkHandle plNewBulletSdk(); //this could be al so another sdk, like ODE, PhysX etc. extern plPhysicsSdkHandle plNewBulletSdk(void); //this could b e also another sdk, like ODE, PhysX etc.
extern void plDeletePhysicsSdk(plPhysicsSdkHandle phys icsSdk); extern void plDeletePhysicsSdk(plPhysicsSdkHandle phys icsSdk);
/** Collision World, not strictly necessary, you can also just create a Dyn amics World with Rigid Bodies which internally manages the Collision World with Collision Objects */ /** Collision World, not strictly necessary, you can also just create a Dyn amics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
typedef void(*btBroadphaseCallback)(void* clientData, void* object1, void* object2); typedef void(*btBroadphaseCallback)(void* clientData, void* object1, void* object2);
extern plCollisionBroadphaseHandle plCreateSapBroadphase(btBroa dphaseCallback beginCallback,btBroadphaseCallback endCallback); extern plCollisionBroadphaseHandle plCreateSapBroadphase(btBroa dphaseCallback beginCallback,btBroadphaseCallback endCallback);
extern void plDestroyBroadphase(plCollisionBroadphaseHandle bp); extern void plDestroyBroadphase(plCollisionBroadphaseHandle bp);
skipping to change at line 116 skipping to change at line 116
extern void plDeleteRigidBody(plRigidBodyHandle body); extern void plDeleteRigidBody(plRigidBodyHandle body);
/* Collision Shape definition */ /* Collision Shape definition */
extern plCollisionShapeHandle plNewSphereShape(plReal radius); extern plCollisionShapeHandle plNewSphereShape(plReal radius);
extern plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plR eal z); extern plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plR eal z);
extern plCollisionShapeHandle plNewCapsuleShape(plReal radius, plRe al height); extern plCollisionShapeHandle plNewCapsuleShape(plReal radius, plRe al height);
extern plCollisionShapeHandle plNewConeShape(plReal radius, plReal height); extern plCollisionShapeHandle plNewConeShape(plReal radius, plReal height);
extern plCollisionShapeHandle plNewCylinderShape(plReal radius, plR eal height); extern plCollisionShapeHandle plNewCylinderShape(plReal radius, plR eal height);
extern plCollisionShapeHandle plNewCompoundShape(); extern plCollisionShapeHandle plNewCompoundShape(void);
extern void plAddChildShape(plCollisionShapeHandle compoundShape ,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOr n); extern void plAddChildShape(plCollisionShapeHandle compoundShape ,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOr n);
extern void plDeleteShape(plCollisionShapeHandle shape); extern void plDeleteShape(plCollisionShapeHandle shape);
/* Convex Meshes */ /* Convex Meshes */
extern plCollisionShapeHandle plNewConvexHullShape(); extern plCollisionShapeHandle plNewConvexHullShape(void);
extern void plAddVertex(plCollisionShapeHandle convexHul l, plReal x,plReal y,plReal z); extern void plAddVertex(plCollisionShapeHandle convexHul l, plReal x,plReal y,plReal z);
/* Concave static triangle meshes */ /* Concave static triangle meshes */
extern plMeshInterfaceHandle plNewMeshInterface(); extern plMeshInterfaceHandle plNewMeshInterface(void);
extern void plAddTriangle(plMeshInterfaceHandle meshHand le, plVector3 v0,plVector3 v1,plVector3 v2); extern void plAddTriangle(plMeshInterfaceHandle meshHand le, plVector3 v0,plVector3 v1,plVector3 v2);
extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshIn terfaceHandle); extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshIn terfaceHandle);
extern void plSetScaling(plCollisionShapeHandle shape, plVector3 sc aling); extern void plSetScaling(plCollisionShapeHandle shape, plVector3 sc aling);
/* SOLID has Response Callback/Table/Management */ /* SOLID has Response Callback/Table/Management */
/* PhysX has Triggers, User Callbacks and filtering */ /* PhysX has Triggers, User Callbacks and filtering */
/* ODE has the typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); */ /* ODE has the typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); */
/* typedef void plUpdatedPositionCallback(void* userData, plRigidBodyHa ndle rbHandle, plVector3 pos); */ /* typedef void plUpdatedPositionCallback(void* userData, plRigidBodyHa ndle rbHandle, plVector3 pos); */
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 SphereTriangleDetector.h   SphereTriangleDetector.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SPHERE_TRIANGLE_DETECTOR_H #ifndef BT_SPHERE_TRIANGLE_DETECTOR_H
#define SPHERE_TRIANGLE_DETECTOR_H #define BT_SPHERE_TRIANGLE_DETECTOR_H
#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorI nterface.h" #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorI nterface.h"
class btSphereShape; class btSphereShape;
class btTriangleShape; class btTriangleShape;
/// sphere-triangle to match the btDiscreteCollisionDetectorInterface /// sphere-triangle to match the btDiscreteCollisionDetectorInterface
struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface
{ {
virtual void getClosestPoints(const ClosestPointInput& input,Resu lt& output,class btIDebugDraw* debugDraw,bool swapResults=false); virtual void getClosestPoints(const ClosestPointInput& input,Resu lt& output,class btIDebugDraw* debugDraw,bool swapResults=false);
skipping to change at line 45 skipping to change at line 45
private: private:
bool pointInTriangle(const btVector3 vertices[], const btVector3 &no rmal, btVector3 *p ); bool pointInTriangle(const btVector3 vertices[], const btVector3 &no rmal, btVector3 *p );
bool facecontains(const btVector3 &p,const btVector3* vertices,btVec tor3& normal); bool facecontains(const btVector3 &p,const btVector3* vertices,btVec tor3& normal);
btSphereShape* m_sphere; btSphereShape* m_sphere;
btTriangleShape* m_triangle; btTriangleShape* m_triangle;
btScalar m_contactBreakingThreshold; btScalar m_contactBreakingThreshold;
}; };
#endif //SPHERE_TRIANGLE_DETECTOR_H #endif //BT_SPHERE_TRIANGLE_DETECTOR_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btAabbUtil2.h   btAabbUtil2.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef AABB_UTIL2 #ifndef BT_AABB_UTIL2
#define AABB_UTIL2 #define BT_AABB_UTIL2
#include "btTransform.h" #include "btTransform.h"
#include "btVector3.h" #include "btVector3.h"
#include "btMinMax.h" #include "btMinMax.h"
SIMD_FORCE_INLINE void AabbExpand (btVector3& aabbMin, SIMD_FORCE_INLINE void AabbExpand (btVector3& aabbMin,
btVector3 & aabbMax, btVector3 & aabbMax,
const btV ector3& expansionMin, const btV ector3& expansionMin,
const btV ector3& expansionMax) const btV ector3& expansionMax)
{ {
skipping to change at line 223 skipping to change at line 223
SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(const u nsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsign ed short int* aabbMin2,const unsigned short int* aabbMax2) SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(const u nsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsign ed short int* aabbMin2,const unsigned short int* aabbMax2)
{ {
bool overlap = true; bool overlap = true;
overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMi n2[0]) ? false : overlap; overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMi n2[0]) ? false : overlap;
overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMi n2[2]) ? false : overlap; overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMi n2[2]) ? false : overlap;
overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMi n2[1]) ? false : overlap; overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMi n2[1]) ? false : overlap;
return overlap; return overlap;
} }
#endif //USE_BANCHLESS #endif //USE_BANCHLESS
#endif #endif //BT_AABB_UTIL2
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btAlignedObjectArray.h   btAlignedObjectArray.h 
skipping to change at line 394 skipping to change at line 394
n = n - 1; n = n - 1;
/* restore a[1..i-1] heap */ /* restore a[1..i-1] heap */
downHeap(m_data, 1, n, CompareFunc); downHeap(m_data, 1, n, CompareFunc);
} }
} }
///non-recursive binary search, assumes sorted array ///non-recursive binary search, assumes sorted array
int findBinarySearch(const T& key) const int findBinarySearch(const T& key) const
{ {
int first = 0; int first = 0;
int last = size(); int last = size()-1;
//assume sorted array //assume sorted array
while (first <= last) { while (first <= last) {
int mid = (first + last) / 2; // compute mid point. int mid = (first + last) / 2; // compute mid point.
if (key > m_data[mid]) if (key > m_data[mid])
first = mid + 1; // repeat search in top ha lf. first = mid + 1; // repeat search in top ha lf.
else if (key < m_data[mid]) else if (key < m_data[mid])
last = mid - 1; // repeat search in bottom h alf. last = mid - 1; // repeat search in bottom h alf.
else else
return mid; // found it. return position ///// return mid; // found it. return position /////
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 btAxisSweep3.h   btAxisSweep3.h 
skipping to change at line 19 skipping to change at line 19
// This software is provided 'as-is', without any express or implied warran ty. In no event will the authors be held liable for any damages arising fro m the use of this software. // This software is provided 'as-is', without any express or implied warran ty. In no event will the authors be held liable for any damages arising fro m the use of this software.
// //
// Permission is granted to anyone to use this software for any purpose, in cluding commercial applications, and to alter it and redistribute it freely , subject to the following restrictions: // Permission is granted to anyone to use this software for any purpose, in cluding 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 p roduct, an acknowledgment in the product documentation would be appreciated but is not required. // 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 p roduct, 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. // 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 distributio n. // 3. This notice may not be removed or altered from any source distributio n.
#ifndef AXIS_SWEEP_3_H #ifndef BT_AXIS_SWEEP_3_H
#define AXIS_SWEEP_3_H #define BT_AXIS_SWEEP_3_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btOverlappingPairCache.h" #include "btOverlappingPairCache.h"
#include "btBroadphaseInterface.h" #include "btBroadphaseInterface.h"
#include "btBroadphaseProxy.h" #include "btBroadphaseProxy.h"
#include "btOverlappingPairCallback.h" #include "btOverlappingPairCallback.h"
#include "btDbvtBroadphase.h" #include "btDbvtBroadphase.h"
//#define DEBUG_BROADPHASE 1 //#define DEBUG_BROADPHASE 1
#define USE_OVERLAP_TEST_ON_REMOVES 1 #define USE_OVERLAP_TEST_ON_REMOVES 1
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBox2dBox2dCollisionAlgorithm.h   btBox2dBox2dCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BOX_2D_BOX_2D__COLLISION_ALGORITHM_H #ifndef BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
#define BOX_2D_BOX_2D__COLLISION_ALGORITHM_H #define BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. h" #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
///box-box collision detection ///box-box collision detection
class btBox2dBox2dCollisionAlgorithm : public btActivatingCollisionAlgorith m class btBox2dBox2dCollisionAlgorithm : public btActivatingCollisionAlgorith m
skipping to change at line 64 skipping to change at line 64
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
int bbsize = sizeof(btBox2dBox2dCollisionAlgorithm); int bbsize = sizeof(btBox2dBox2dCollisionAlgorithm);
void* ptr = ci.m_dispatcher1->allocateCollisionAlgor ithm(bbsize); void* ptr = ci.m_dispatcher1->allocateCollisionAlgor ithm(bbsize);
return new(ptr) btBox2dBox2dCollisionAlgorithm(0,ci, body0,body1); return new(ptr) btBox2dBox2dCollisionAlgorithm(0,ci, body0,body1);
} }
}; };
}; };
#endif //BOX_2D_BOX_2D__COLLISION_ALGORITHM_H #endif //BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBox2dShape.h   btBox2dShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OBB_BOX_2D_SHAPE_H #ifndef BT_OBB_BOX_2D_SHAPE_H
#define OBB_BOX_2D_SHAPE_H #define BT_OBB_BOX_2D_SHAPE_H
#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h" #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btMinMax.h" #include "LinearMath/btMinMax.h"
///The btBox2dShape is a box primitive around the origin, its sides axis al igned with length specified by half extents, in local shape coordinates. Wh en used as part of a btCollisionObject or btRigidBody it will be an oriente d box in world space. ///The btBox2dShape is a box primitive around the origin, its sides axis al igned with length specified by half extents, in local shape coordinates. Wh en used as part of a btCollisionObject or btRigidBody it will be an oriente d box in world space.
class btBox2dShape: public btPolyhedralConvexShape class btBox2dShape: public btPolyhedralConvexShape
{ {
skipping to change at line 336 skipping to change at line 336
case 5: case 5:
penetrationVector.setValue(btScalar(0.),btScalar(0.) ,btScalar(-1.)); penetrationVector.setValue(btScalar(0.),btScalar(0.) ,btScalar(-1.));
break; break;
default: default:
btAssert(0); btAssert(0);
} }
} }
}; };
#endif //OBB_BOX_2D_SHAPE_H #endif //BT_OBB_BOX_2D_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBoxBoxCollisionAlgorithm.h   btBoxBoxCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BOX_BOX__COLLISION_ALGORITHM_H #ifndef BT_BOX_BOX__COLLISION_ALGORITHM_H
#define BOX_BOX__COLLISION_ALGORITHM_H #define BT_BOX_BOX__COLLISION_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
///box-box collision detection ///box-box collision detection
class btBoxBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm class btBoxBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm
skipping to change at line 64 skipping to change at line 64
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
int bbsize = sizeof(btBoxBoxCollisionAlgorithm); int bbsize = sizeof(btBoxBoxCollisionAlgorithm);
void* ptr = ci.m_dispatcher1->allocateCollisionAlgor ithm(bbsize); void* ptr = ci.m_dispatcher1->allocateCollisionAlgor ithm(bbsize);
return new(ptr) btBoxBoxCollisionAlgorithm(0,ci,body 0,body1); return new(ptr) btBoxBoxCollisionAlgorithm(0,ci,body 0,body1);
} }
}; };
}; };
#endif //BOX_BOX__COLLISION_ALGORITHM_H #endif //BT_BOX_BOX__COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBoxBoxDetector.h   btBoxBoxDetector.h 
skipping to change at line 19 skipping to change at line 19
This software is provided 'as-is', without any express or implied warranty. 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 th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BOX_BOX_DETECTOR_H #ifndef BT_BOX_BOX_DETECTOR_H
#define BOX_BOX_DETECTOR_H #define BT_BOX_BOX_DETECTOR_H
class btBoxShape; class btBoxShape;
#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorI nterface.h" #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorI nterface.h"
/// btBoxBoxDetector wraps the ODE box-box collision detector /// btBoxBoxDetector wraps the ODE box-box collision detector
/// re-distributed under the Zlib license with permission from Russell L. S mith /// re-distributed under the Zlib license with permission from Russell L. S mith
struct btBoxBoxDetector : public btDiscreteCollisionDetectorInterface struct btBoxBoxDetector : public btDiscreteCollisionDetectorInterface
{ {
btBoxShape* m_box1; btBoxShape* m_box1;
btBoxShape* m_box2; btBoxShape* m_box2;
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBoxShape.h   btBoxShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OBB_BOX_MINKOWSKI_H #ifndef BT_OBB_BOX_MINKOWSKI_H
#define OBB_BOX_MINKOWSKI_H #define BT_OBB_BOX_MINKOWSKI_H
#include "btPolyhedralConvexShape.h" #include "btPolyhedralConvexShape.h"
#include "btCollisionMargin.h" #include "btCollisionMargin.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btMinMax.h" #include "LinearMath/btMinMax.h"
///The btBoxShape is a box primitive around the origin, its sides axis alig ned with length specified by half extents, in local shape coordinates. When used as part of a btCollisionObject or btRigidBody it will be an oriented box in world space. ///The btBoxShape is a box primitive around the origin, its sides axis alig ned with length specified by half extents, in local shape coordinates. When used as part of a btCollisionObject or btRigidBody it will be an oriented box in world space.
class btBoxShape: public btPolyhedralConvexShape class btBoxShape: public btPolyhedralConvexShape
{ {
skipping to change at line 141 skipping to change at line 141
return 8; return 8;
} }
virtual int getNumEdges() const virtual int getNumEdges() const
{ {
return 12; return 12;
} }
virtual void getVertex(int i,btVector3& vtx) const virtual void getVertex(int i,btVector3& vtx) const
{ {
btVector3 halfExtents = getHalfExtentsWithoutMargin(); btVector3 halfExtents = getHalfExtentsWithMargin();
vtx = btVector3( vtx = btVector3(
halfExtents.x() * (1-(i&1)) - halfExtents.x( ) * (i&1), halfExtents.x() * (1-(i&1)) - halfExtents.x( ) * (i&1),
halfExtents.y() * (1-((i&2)>>1)) - halfExten ts.y() * ((i&2)>>1), halfExtents.y() * (1-((i&2)>>1)) - halfExten ts.y() * ((i&2)>>1),
halfExtents.z() * (1-((i&4)>>2)) - halfExten ts.z() * ((i&4)>>2)); halfExtents.z() * (1-((i&4)>>2)) - halfExten ts.z() * ((i&4)>>2));
} }
virtual void getPlaneEquation(btVector4& plane,int i) const virtual void getPlaneEquation(btVector4& plane,int i) const
{ {
btVector3 halfExtents = getHalfExtentsWithoutMargin(); btVector3 halfExtents = getHalfExtentsWithoutMargin();
skipping to change at line 301 skipping to change at line 301
case 5: case 5:
penetrationVector.setValue(btScalar(0.),btScalar(0.) ,btScalar(-1.)); penetrationVector.setValue(btScalar(0.),btScalar(0.) ,btScalar(-1.));
break; break;
default: default:
btAssert(0); btAssert(0);
} }
} }
}; };
#endif //OBB_BOX_MINKOWSKI_H #endif //BT_OBB_BOX_MINKOWSKI_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 btBroadphaseInterface.h   btBroadphaseInterface.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BROADPHASE_INTERFACE_H #ifndef BT_BROADPHASE_INTERFACE_H
#define BROADPHASE_INTERFACE_H #define BT_BROADPHASE_INTERFACE_H
struct btDispatcherInfo; struct btDispatcherInfo;
class btDispatcher; class btDispatcher;
#include "btBroadphaseProxy.h" #include "btBroadphaseProxy.h"
class btOverlappingPairCache; class btOverlappingPairCache;
struct btBroadphaseAabbCallback struct btBroadphaseAabbCallback
{ {
virtual ~btBroadphaseAabbCallback() {} virtual ~btBroadphaseAabbCallback() {}
skipping to change at line 77 skipping to change at line 77
///will add some transform later ///will add some transform later
virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax ) const =0; virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax ) const =0;
///reset broadphase internal structures, to ensure determinism/repro ducability ///reset broadphase internal structures, to ensure determinism/repro ducability
virtual void resetPool(btDispatcher* dispatcher) { (void) dispatcher ; }; virtual void resetPool(btDispatcher* dispatcher) { (void) dispatcher ; };
virtual void printStats() = 0; virtual void printStats() = 0;
}; };
#endif //BROADPHASE_INTERFACE_H #endif //BT_BROADPHASE_INTERFACE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBroadphaseProxy.h   btBroadphaseProxy.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BROADPHASE_PROXY_H #ifndef BT_BROADPHASE_PROXY_H
#define BROADPHASE_PROXY_H #define BT_BROADPHASE_PROXY_H
#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE #include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btAlignedAllocator.h" #include "LinearMath/btAlignedAllocator.h"
/// btDispatcher uses these types /// btDispatcher uses these types
/// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and co ncave /// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and co ncave
/// to facilitate type checking /// to facilitate type checking
/// CUSTOM_POLYHEDRAL_SHAPE_TYPE,CUSTOM_CONVEX_SHAPE_TYPE and CUSTOM_CONCAV E_SHAPE_TYPE can be used to extend Bullet without modifying source code /// CUSTOM_POLYHEDRAL_SHAPE_TYPE,CUSTOM_CONVEX_SHAPE_TYPE and CUSTOM_CONCAV E_SHAPE_TYPE can be used to extend Bullet without modifying source code
enum BroadphaseNativeTypes enum BroadphaseNativeTypes
skipping to change at line 258 skipping to change at line 258
(a.m_pProxy0 == b.m_pProxy0 && uidA1 > uidB1 ) || (a.m_pProxy0 == b.m_pProxy0 && uidA1 > uidB1 ) ||
(a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 = = b.m_pProxy1 && a.m_algorithm > b.m_algorithm); (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 = = b.m_pProxy1 && a.m_algorithm > b.m_algorithm);
} }
}; };
SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadp hasePair& b) SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadp hasePair& b)
{ {
return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1) ; return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1) ;
} }
#endif //BROADPHASE_PROXY_H #endif //BT_BROADPHASE_PROXY_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btBulletCollisionCommon.h   btBulletCollisionCommon.h 
skipping to change at line 36 skipping to change at line 36
#include "BulletCollision/CollisionShapes/btBoxShape.h" #include "BulletCollision/CollisionShapes/btBoxShape.h"
#include "BulletCollision/CollisionShapes/btSphereShape.h" #include "BulletCollision/CollisionShapes/btSphereShape.h"
#include "BulletCollision/CollisionShapes/btCapsuleShape.h" #include "BulletCollision/CollisionShapes/btCapsuleShape.h"
#include "BulletCollision/CollisionShapes/btCylinderShape.h" #include "BulletCollision/CollisionShapes/btCylinderShape.h"
#include "BulletCollision/CollisionShapes/btConeShape.h" #include "BulletCollision/CollisionShapes/btConeShape.h"
#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h" #include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
#include "BulletCollision/CollisionShapes/btConvexHullShape.h" #include "BulletCollision/CollisionShapes/btConvexHullShape.h"
#include "BulletCollision/CollisionShapes/btTriangleMesh.h" #include "BulletCollision/CollisionShapes/btTriangleMesh.h"
#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h" #include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
#include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h"
#include "BulletCollision/CollisionShapes/btTetrahedronShape.h" #include "BulletCollision/CollisionShapes/btTetrahedronShape.h"
#include "BulletCollision/CollisionShapes/btEmptyShape.h" #include "BulletCollision/CollisionShapes/btEmptyShape.h"
#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" #include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
#include "BulletCollision/CollisionShapes/btUniformScalingShape.h" #include "BulletCollision/CollisionShapes/btUniformScalingShape.h"
///Narrowphase Collision Detector ///Narrowphase Collision Detector
#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorith m.h" #include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorith m.h"
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 btBvhTriangleMeshShape.h   btBvhTriangleMeshShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BVH_TRIANGLE_MESH_SHAPE_H #ifndef BT_BVH_TRIANGLE_MESH_SHAPE_H
#define BVH_TRIANGLE_MESH_SHAPE_H #define BT_BVH_TRIANGLE_MESH_SHAPE_H
#include "btTriangleMeshShape.h" #include "btTriangleMeshShape.h"
#include "btOptimizedBvh.h" #include "btOptimizedBvh.h"
#include "LinearMath/btAlignedAllocator.h" #include "LinearMath/btAlignedAllocator.h"
#include "btTriangleInfoMap.h" #include "btTriangleInfoMap.h"
///The btBvhTriangleMeshShape is a static-triangle mesh shape with several optimizations, such as bounding volume hierarchy and cache friendly travers al for PlayStation 3 Cell SPU. It is recommended to enable useQuantizedAabb Compression for better memory usage. ///The btBvhTriangleMeshShape is a static-triangle mesh shape with several optimizations, such as bounding volume hierarchy and cache friendly travers al for PlayStation 3 Cell SPU. It is recommended to enable useQuantizedAabb Compression for better memory usage.
///It takes a triangle mesh as input, for example a btTriangleMesh or btTri angleIndexVertexArray. The btBvhTriangleMeshShape class allows for triangle mesh deformations by a refit or partialRefit method. ///It takes a triangle mesh as input, for example a btTriangleMesh or btTri angleIndexVertexArray. The btBvhTriangleMeshShape class allows for triangle mesh deformations by a refit or partialRefit method.
///Instead of building the bounding volume hierarchy acceleration structure , it is also possible to serialize (save) and deserialize (load) the struct ure from disk. ///Instead of building the bounding volume hierarchy acceleration structure , it is also possible to serialize (save) and deserialize (load) the struct ure from disk.
///See Demos\ConcaveDemo\ConcavePhysicsDemo.cpp for an example. ///See Demos\ConcaveDemo\ConcavePhysicsDemo.cpp for an example.
skipping to change at line 42 skipping to change at line 42
btTriangleInfoMap* m_triangleInfoMap; btTriangleInfoMap* m_triangleInfoMap;
bool m_useQuantizedAabbCompression; bool m_useQuantizedAabbCompression;
bool m_ownsBvh; bool m_ownsBvh;
bool m_pad[11];////need padding due to alignment bool m_pad[11];////need padding due to alignment
public: public:
BT_DECLARE_ALIGNED_ALLOCATOR(); BT_DECLARE_ALIGNED_ALLOCATOR();
btBvhTriangleMeshShape() : btTriangleMeshShape(0),m_bvh(0),m_triangl eInfoMap(0),m_ownsBvh(false) {m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;} ;
btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true); btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true);
///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb
btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bv hAabbMax, bool buildBvh = true); btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bv hAabbMax, bool buildBvh = true);
virtual ~btBvhTriangleMeshShape(); virtual ~btBvhTriangleMeshShape();
bool getOwnsBvh () const bool getOwnsBvh () const
{ {
return m_ownsBvh; return m_ownsBvh;
skipping to change at line 133 skipping to change at line 132
char m_pad3[4]; char m_pad3[4];
}; };
SIMD_FORCE_INLINE int btBvhTriangleMeshShape::calculateSerializeBu fferSize() const SIMD_FORCE_INLINE int btBvhTriangleMeshShape::calculateSerializeBu fferSize() const
{ {
return sizeof(btTriangleMeshShapeData); return sizeof(btTriangleMeshShapeData);
} }
#endif //BVH_TRIANGLE_MESH_SHAPE_H #endif //BT_BVH_TRIANGLE_MESH_SHAPE_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 btCharacterControllerInterface.h   btCharacterControllerInterface.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CHARACTER_CONTROLLER_INTERFACE_H #ifndef BT_CHARACTER_CONTROLLER_INTERFACE_H
#define CHARACTER_CONTROLLER_INTERFACE_H #define BT_CHARACTER_CONTROLLER_INTERFACE_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "BulletDynamics/Dynamics/btActionInterface.h" #include "BulletDynamics/Dynamics/btActionInterface.h"
class btCollisionShape; class btCollisionShape;
class btRigidBody; class btRigidBody;
class btCollisionWorld; class btCollisionWorld;
class btCharacterControllerInterface : public btActionInterface class btCharacterControllerInterface : public btActionInterface
{ {
skipping to change at line 45 skipping to change at line 45
virtual void warp (const btVector3& origin) = 0; virtual void warp (const btVector3& origin) = 0;
virtual void preStep ( btCollisionWorld* collisionWorld) = 0; virtual void preStep ( btCollisionWorld* collisionWorld) = 0;
virtual void playerStep (btCollisionWorld* collisionWorld, btScal ar dt) = 0; virtual void playerStep (btCollisionWorld* collisionWorld, btScal ar dt) = 0;
virtual bool canJump () const = 0; virtual bool canJump () const = 0;
virtual void jump () = 0; virtual void jump () = 0;
virtual bool onGround () const = 0; virtual bool onGround () const = 0;
}; };
#endif #endif //BT_CHARACTER_CONTROLLER_INTERFACE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCollisionAlgorithm.h   btCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COLLISION_ALGORITHM_H #ifndef BT_COLLISION_ALGORITHM_H
#define COLLISION_ALGORITHM_H #define BT_COLLISION_ALGORITHM_H
#include "LinearMath/btScalar.h" #include "LinearMath/btScalar.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
struct btBroadphaseProxy; struct btBroadphaseProxy;
class btDispatcher; class btDispatcher;
class btManifoldResult; class btManifoldResult;
class btCollisionObject; class btCollisionObject;
struct btDispatcherInfo; struct btDispatcherInfo;
class btPersistentManifold; class btPersistentManifold;
skipping to change at line 47 skipping to change at line 47
} }
btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int te mp) btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int te mp)
:m_dispatcher1(dispatcher) :m_dispatcher1(dispatcher)
{ {
(void)temp; (void)temp;
} }
btDispatcher* m_dispatcher1; btDispatcher* m_dispatcher1;
btPersistentManifold* m_manifold; btPersistentManifold* m_manifold;
int getDispatcherId(); // int getDispatcherId();
}; };
///btCollisionAlgorithm is an collision interface that is compatible with t he Broadphase and btDispatcher. ///btCollisionAlgorithm is an collision interface that is compatible with t he Broadphase and btDispatcher.
///It is persistent over frames ///It is persistent over frames
class btCollisionAlgorithm class btCollisionAlgorithm
{ {
protected: protected:
btDispatcher* m_dispatcher; btDispatcher* m_dispatcher;
protected: protected:
int getDispatcherId(); // int getDispatcherId();
public: public:
btCollisionAlgorithm() {}; btCollisionAlgorithm() {};
btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) ; btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) ;
virtual ~btCollisionAlgorithm() {}; virtual ~btCollisionAlgorithm() {};
virtual void processCollision (btCollisionObject* body0,btCollisionO bject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultO ut) = 0; virtual void processCollision (btCollisionObject* body0,btCollisionO bject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultO ut) = 0;
virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCo llisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0; virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCo llisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0;
virtual void getAllContactManifolds(btManifoldArray& manifoldArra y) = 0; virtual void getAllContactManifolds(btManifoldArray& manifoldArra y) = 0;
}; };
#endif //COLLISION_ALGORITHM_H #endif //BT_COLLISION_ALGORITHM_H
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 btCollisionCreateFunc.h   btCollisionCreateFunc.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COLLISION_CREATE_FUNC #ifndef BT_COLLISION_CREATE_FUNC
#define COLLISION_CREATE_FUNC #define BT_COLLISION_CREATE_FUNC
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
class btCollisionAlgorithm; class btCollisionAlgorithm;
class btCollisionObject; class btCollisionObject;
struct btCollisionAlgorithmConstructionInfo; struct btCollisionAlgorithmConstructionInfo;
///Used by the btCollisionDispatcher to register and create instances for b tCollisionAlgorithm ///Used by the btCollisionDispatcher to register and create instances for b tCollisionAlgorithm
struct btCollisionAlgorithmCreateFunc struct btCollisionAlgorithmCreateFunc
{ {
skipping to change at line 44 skipping to change at line 44
virtual ~btCollisionAlgorithmCreateFunc(){}; virtual ~btCollisionAlgorithmCreateFunc(){};
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAl gorithmConstructionInfo& , btCollisionObject* body0,btCollisionObject* body 1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAl gorithmConstructionInfo& , btCollisionObject* body0,btCollisionObject* body 1)
{ {
(void)body0; (void)body0;
(void)body1; (void)body1;
return 0; return 0;
} }
}; };
#endif //COLLISION_CREATE_FUNC #endif //BT_COLLISION_CREATE_FUNC
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCollisionDispatcher.h   btCollisionDispatcher.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COLLISION__DISPATCHER_H #ifndef BT_COLLISION__DISPATCHER_H
#define COLLISION__DISPATCHER_H #define BT_COLLISION__DISPATCHER_H
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
#include "BulletCollision/CollisionDispatch/btManifoldResult.h" #include "BulletCollision/CollisionDispatch/btManifoldResult.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
class btIDebugDraw; class btIDebugDraw;
skipping to change at line 44 skipping to change at line 44
#define USE_DISPATCH_REGISTRY_ARRAY 1 #define USE_DISPATCH_REGISTRY_ARRAY 1
class btCollisionDispatcher; class btCollisionDispatcher;
///user can override this nearcallback for collision filtering and more fin egrained control over collision detection ///user can override this nearcallback for collision filtering and more fin egrained control over collision detection
typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollision Dispatcher& dispatcher, const btDispatcherInfo& dispatchInfo); typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollision Dispatcher& dispatcher, const btDispatcherInfo& dispatchInfo);
///btCollisionDispatcher supports algorithms that handle ConvexConvex and C onvexConcave collision pairs. ///btCollisionDispatcher supports algorithms that handle ConvexConvex and C onvexConcave collision pairs.
///Time of Impact, Closest Points and Penetration Depth. ///Time of Impact, Closest Points and Penetration Depth.
class btCollisionDispatcher : public btDispatcher class btCollisionDispatcher : public btDispatcher
{ {
protected:
int m_dispatcherFlags; int m_dispatcherFlags;
btAlignedObjectArray<btPersistentManifold*> m_manifoldsPtr; btAlignedObjectArray<btPersistentManifold*> m_manifoldsPtr;
btManifoldResult m_defaultManifoldResult; btManifoldResult m_defaultManifoldResult;
btNearCallback m_nearCallback; btNearCallback m_nearCallback;
btPoolAllocator* m_collisionAlgorithmPoolAllocator; btPoolAllocator* m_collisionAlgorithmPoolAllocator;
skipping to change at line 65 skipping to change at line 68
btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLL ISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES]; btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLL ISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES];
btCollisionConfiguration* m_collisionConfiguration; btCollisionConfiguration* m_collisionConfiguration;
public: public:
enum DispatcherFlags enum DispatcherFlags
{ {
CD_STATIC_STATIC_REPORTED = 1, CD_STATIC_STATIC_REPORTED = 1,
CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2 CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2,
CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION = 4
}; };
int getDispatcherFlags() const int getDispatcherFlags() const
{ {
return m_dispatcherFlags; return m_dispatcherFlags;
} }
void setDispatcherFlags(int flags) void setDispatcherFlags(int flags)
{ {
(void) flags; m_dispatcherFlags = flags;
m_dispatcherFlags = 0;
} }
///registerCollisionCreateFunc allows registration of custom/alterna tive collision create functions ///registerCollisionCreateFunc allows registration of custom/alterna tive collision create functions
void registerCollisionCreateFunc(int proxyType0,int proxyType1, b tCollisionAlgorithmCreateFunc* createFunc); void registerCollisionCreateFunc(int proxyType0,int proxyType1, b tCollisionAlgorithmCreateFunc* createFunc);
int getNumManifolds() const int getNumManifolds() const
{ {
return int( m_manifoldsPtr.size()); return int( m_manifoldsPtr.size());
} }
skipping to change at line 152 skipping to change at line 155
const btCollisionConfiguration* getCollisionConfiguration() const const btCollisionConfiguration* getCollisionConfiguration() const
{ {
return m_collisionConfiguration; return m_collisionConfiguration;
} }
void setCollisionConfiguration(btCollisionConfiguration* config) void setCollisionConfiguration(btCollisionConfiguration* config)
{ {
m_collisionConfiguration = config; m_collisionConfiguration = config;
} }
virtual btPoolAllocator* getInternalManifoldPool()
{
return m_persistentManifoldPoolAllocator;
}
virtual const btPoolAllocator* getInternalManifoldPool() const
{
return m_persistentManifoldPoolAllocator;
}
}; };
#endif //COLLISION__DISPATCHER_H #endif //BT_COLLISION__DISPATCHER_H
 End of changes. 6 change blocks. 
5 lines changed or deleted 18 lines changed or added


 btCollisionMargin.h   btCollisionMargin.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COLLISION_MARGIN_H #ifndef BT_COLLISION_MARGIN_H
#define COLLISION_MARGIN_H #define BT_COLLISION_MARGIN_H
//used by Gjk and some other algorithms //used by Gjk and some other algorithms
#define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar( 0.01) #define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar( 0.01)
#endif //COLLISION_MARGIN_H #endif //BT_COLLISION_MARGIN_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCollisionObject.h   btCollisionObject.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COLLISION_OBJECT_H #ifndef BT_COLLISION_OBJECT_H
#define COLLISION_OBJECT_H #define BT_COLLISION_OBJECT_H
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
//island management, m_activationState1 //island management, m_activationState1
#define ACTIVE_TAG 1 #define ACTIVE_TAG 1
#define ISLAND_SLEEPING 2 #define ISLAND_SLEEPING 2
#define WANTS_DEACTIVATION 3 #define WANTS_DEACTIVATION 3
#define DISABLE_DEACTIVATION 4 #define DISABLE_DEACTIVATION 4
#define DISABLE_SIMULATION 5 #define DISABLE_SIMULATION 5
skipping to change at line 512 skipping to change at line 512
int m_activationState1; int m_activationState1;
int m_internalType; int m_internalType;
int m_checkCollideWith; int m_checkCollideWith;
}; };
SIMD_FORCE_INLINE int btCollisionObject::calculateSerializeBufferS ize() const SIMD_FORCE_INLINE int btCollisionObject::calculateSerializeBufferS ize() const
{ {
return sizeof(btCollisionObjectData); return sizeof(btCollisionObjectData);
} }
#endif //COLLISION_OBJECT_H #endif //BT_COLLISION_OBJECT_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCollisionShape.h   btCollisionShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COLLISION_SHAPE_H #ifndef BT_COLLISION_SHAPE_H
#define COLLISION_SHAPE_H #define BT_COLLISION_SHAPE_H
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btMatrix3x3.h" #include "LinearMath/btMatrix3x3.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for th e shape types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for th e shape types
class btSerializer; class btSerializer;
///The btCollisionShape class provides an interface for collision shapes th at can be shared among btCollisionObjects. ///The btCollisionShape class provides an interface for collision shapes th at can be shared among btCollisionObjects.
class btCollisionShape class btCollisionShape
{ {
skipping to change at line 140 skipping to change at line 140
char *m_name; char *m_name;
int m_shapeType; int m_shapeType;
char m_padding[4]; char m_padding[4];
}; };
SIMD_FORCE_INLINE int btCollisionShape::calculateSerializeBufferSi ze() const SIMD_FORCE_INLINE int btCollisionShape::calculateSerializeBufferSi ze() const
{ {
return sizeof(btCollisionShapeData); return sizeof(btCollisionShapeData);
} }
#endif //COLLISION_SHAPE_H #endif //BT_COLLISION_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCollisionWorld.h   btCollisionWorld.h 
skipping to change at line 62 skipping to change at line 62
* Bullet Collision Detection can also be used without the Dynamics/Extras. * Bullet Collision Detection can also be used without the Dynamics/Extras.
* Check out btCollisionWorld and btCollisionObject, and the CollisionInter faceDemo. * Check out btCollisionWorld and btCollisionObject, and the CollisionInter faceDemo.
* @subsection step6 Step 6 : Use Snippets like the GJK Closest Point calcu lation. * @subsection step6 Step 6 : Use Snippets like the GJK Closest Point calcu lation.
* Bullet has been designed in a modular way keeping dependencies to a mini mum. The ConvexHullDistance demo demonstrates direct use of btGjkPairDetect or. * Bullet has been designed in a modular way keeping dependencies to a mini mum. The ConvexHullDistance demo demonstrates direct use of btGjkPairDetect or.
* *
* @section copyright Copyright * @section copyright Copyright
* For up-to-data information and copyright and contributors list check out the Bullet_User_Manual.pdf * For up-to-data information and copyright and contributors list check out the Bullet_User_Manual.pdf
* *
*/ */
#ifndef COLLISION_WORLD_H #ifndef BT_COLLISION_WORLD_H
#define COLLISION_WORLD_H #define BT_COLLISION_WORLD_H
class btStackAlloc; class btStackAlloc;
class btCollisionShape; class btCollisionShape;
class btConvexShape; class btConvexShape;
class btBroadphaseInterface; class btBroadphaseInterface;
class btSerializer; class btSerializer;
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "btCollisionObject.h" #include "btCollisionObject.h"
skipping to change at line 494 skipping to change at line 494
void setForceUpdateAllAabbs( bool forceUpdateAllAabbs) void setForceUpdateAllAabbs( bool forceUpdateAllAabbs)
{ {
m_forceUpdateAllAabbs = forceUpdateAllAabbs; m_forceUpdateAllAabbs = forceUpdateAllAabbs;
} }
///Preliminary serialization test for Bullet 2.76. Loading those fil es requires a separate parser (Bullet/Demos/SerializeDemo) ///Preliminary serialization test for Bullet 2.76. Loading those fil es requires a separate parser (Bullet/Demos/SerializeDemo)
virtual void serialize(btSerializer* serializer); virtual void serialize(btSerializer* serializer);
}; };
#endif //COLLISION_WORLD_H #endif //BT_COLLISION_WORLD_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCompoundCollisionAlgorithm.h   btCompoundCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COMPOUND_COLLISION_ALGORITHM_H #ifndef BT_COMPOUND_COLLISION_ALGORITHM_H
#define COMPOUND_COLLISION_ALGORITHM_H #define BT_COMPOUND_COLLISION_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
class btDispatcher; class btDispatcher;
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "btCollisionCreateFunc.h" #include "btCollisionCreateFunc.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
skipping to change at line 86 skipping to change at line 86
{ {
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btCompoundCollisionAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btCompoundCollisionAlgorithm));
return new(mem) btCompoundCollisionAlgorithm(ci,body 0,body1,true); return new(mem) btCompoundCollisionAlgorithm(ci,body 0,body1,true);
} }
}; };
}; };
#endif //COMPOUND_COLLISION_ALGORITHM_H #endif //BT_COMPOUND_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCompoundShape.h   btCompoundShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef COMPOUND_SHAPE_H #ifndef BT_COMPOUND_SHAPE_H
#define COMPOUND_SHAPE_H #define BT_COMPOUND_SHAPE_H
#include "btCollisionShape.h" #include "btCollisionShape.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btMatrix3x3.h" #include "LinearMath/btMatrix3x3.h"
#include "btCollisionMargin.h" #include "btCollisionMargin.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
//class btOptimizedBvh; //class btOptimizedBvh;
skipping to change at line 108 skipping to change at line 108
btTransform& getChildTransform(int index) btTransform& getChildTransform(int index)
{ {
return m_children[index].m_transform; return m_children[index].m_transform;
} }
const btTransform& getChildTransform(int index) const const btTransform& getChildTransform(int index) const
{ {
return m_children[index].m_transform; return m_children[index].m_transform;
} }
///set a new transform for a child, and update internal data structu res (local aabb and dynamic tree) ///set a new transform for a child, and update internal data structu res (local aabb and dynamic tree)
void updateChildTransform(int childIndex, const btTransform& newC hildTransform); void updateChildTransform(int childIndex, const btTransform& newC hildTransform, bool shouldRecalculateLocalAabb = true);
btCompoundShapeChild* getChildList() btCompoundShapeChild* getChildList()
{ {
return &m_children[0]; return &m_children[0];
} }
///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVecto r3& aabbMax) const; virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVecto r3& aabbMax) const;
/** Re-calculate the local Aabb. Is called at the end of removeChild Shapes. /** Re-calculate the local Aabb. Is called at the end of removeChild Shapes.
skipping to change at line 144 skipping to change at line 144
} }
virtual btScalar getMargin() const virtual btScalar getMargin() const
{ {
return m_collisionMargin; return m_collisionMargin;
} }
virtual const char* getName()const virtual const char* getName()const
{ {
return "Compound"; return "Compound";
} }
btDbvt* getDynamicAa const btDbvt* getDynamicAabbTree() const
bbTree() {
return m_dynamicAabbTree;
}
btDbvt* getDynamicAabbTree()
{ {
return m_dynamicAabbTree; return m_dynamicAabbTree;
} }
void createAabbTreeFromChildren(); void createAabbTreeFromChildren();
///computes the exact moment of inertia and the transform from the c oordinate system defined by the principal axes of the moment of inertia ///computes the exact moment of inertia and the transform from the c oordinate system defined by the principal axes of the moment of inertia
///and the center of mass to the current coordinate system. "masses" points to an array of masses of the children. The resulting transform ///and the center of mass to the current coordinate system. "masses" points to an array of masses of the children. The resulting transform
///"principal" has to be applied inversely to all children transform s in order for the local coordinate system of the compound ///"principal" has to be applied inversely to all children transform s in order for the local coordinate system of the compound
///shape to be centered at the center of mass and to coincide with t he principal axes. This also necessitates a correction of the world transfo rm ///shape to be centered at the center of mass and to coincide with t he principal axes. This also necessitates a correction of the world transfo rm
skipping to change at line 197 skipping to change at line 202
float m_collisionMargin; float m_collisionMargin;
}; };
SIMD_FORCE_INLINE int btCompoundShape::calculateSerializeBufferSiz e() const SIMD_FORCE_INLINE int btCompoundShape::calculateSerializeBufferSiz e() const
{ {
return sizeof(btCompoundShapeData); return sizeof(btCompoundShapeData);
} }
#endif //COMPOUND_SHAPE_H #endif //BT_COMPOUND_SHAPE_H
 End of changes. 4 change blocks. 
5 lines changed or deleted 9 lines changed or added


 btConcaveShape.h   btConcaveShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONCAVE_SHAPE_H #ifndef BT_CONCAVE_SHAPE_H
#define CONCAVE_SHAPE_H #define BT_CONCAVE_SHAPE_H
#include "btCollisionShape.h" #include "btCollisionShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
#include "btTriangleCallback.h" #include "btTriangleCallback.h"
/// PHY_ScalarType enumerates possible scalar types. /// PHY_ScalarType enumerates possible scalar types.
/// See the btStridingMeshInterface or btHeightfieldTerrainShape for its us e /// See the btStridingMeshInterface or btHeightfieldTerrainShape for its us e
typedef enum PHY_ScalarType { typedef enum PHY_ScalarType {
PHY_FLOAT, PHY_FLOAT,
PHY_DOUBLE, PHY_DOUBLE,
skipping to change at line 58 skipping to change at line 58
virtual btScalar getMargin() const { virtual btScalar getMargin() const {
return m_collisionMargin; return m_collisionMargin;
} }
virtual void setMargin(btScalar collisionMargin) virtual void setMargin(btScalar collisionMargin)
{ {
m_collisionMargin = collisionMargin; m_collisionMargin = collisionMargin;
} }
}; };
#endif //CONCAVE_SHAPE_H #endif //BT_CONCAVE_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConeShape.h   btConeShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONE_MINKOWSKI_H #ifndef BT_CONE_MINKOWSKI_H
#define CONE_MINKOWSKI_H #define BT_CONE_MINKOWSKI_H
#include "btConvexInternalShape.h" #include "btConvexInternalShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
///The btConeShape implements a cone shape primitive, centered around the o rigin and aligned with the Y axis. The btConeShapeX is aligned around the X axis and btConeShapeZ around the Z axis. ///The btConeShape implements a cone shape primitive, centered around the o rigin and aligned with the Y axis. The btConeShapeX is aligned around the X axis and btConeShapeZ around the Z axis.
class btConeShape : public btConvexInternalShape class btConeShape : public btConvexInternalShape
{ {
btScalar m_sinAngle; btScalar m_sinAngle;
skipping to change at line 81 skipping to change at line 81
return "Cone"; return "Cone";
} }
///choose upAxis index ///choose upAxis index
void setConeUpIndex(int upIndex); void setConeUpIndex(int upIndex);
int getConeUpIndex() const int getConeUpIndex() const
{ {
return m_coneIndices[1]; return m_coneIndices[1];
} }
virtual void setLocalScaling(const btVector3& scaling);
}; };
///btConeShape implements a Cone shape, around the X axis ///btConeShape implements a Cone shape, around the X axis
class btConeShapeX : public btConeShape class btConeShapeX : public btConeShape
{ {
public: public:
btConeShapeX(btScalar radius,btScalar height); btConeShapeX(btScalar radius,btScalar height);
}; };
///btConeShapeZ implements a Cone shape, around the Z axis ///btConeShapeZ implements a Cone shape, around the Z axis
class btConeShapeZ : public btConeShape class btConeShapeZ : public btConeShape
{ {
public: public:
btConeShapeZ(btScalar radius,btScalar height); btConeShapeZ(btScalar radius,btScalar height);
}; };
#endif //CONE_MINKOWSKI_H #endif //BT_CONE_MINKOWSKI_H
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added


 btConeTwistConstraint.h   btConeTwistConstraint.h 
skipping to change at line 32 skipping to change at line 32
It is a fixed translation, 3 degree-of-freedom (DOF) rotational "joint". It is a fixed translation, 3 degree-of-freedom (DOF) rotational "joint".
It divides the 3 rotational DOFs into swing (movement within a cone) and tw ist. It divides the 3 rotational DOFs into swing (movement within a cone) and tw ist.
Swing is divided into swing1 and swing2 which can have different limits, gi ving an elliptical shape. Swing is divided into swing1 and swing2 which can have different limits, gi ving an elliptical shape.
(Note: the cone's base isn't flat, so this ellipse is "embedded" on the sur face of a sphere.) (Note: the cone's base isn't flat, so this ellipse is "embedded" on the sur face of a sphere.)
In the contraint's frame of reference: In the contraint's frame of reference:
twist is along the x-axis, twist is along the x-axis,
and swing 1 and 2 are along the z and y axes respectively. and swing 1 and 2 are along the z and y axes respectively.
*/ */
#ifndef CONETWISTCONSTRAINT_H #ifndef BT_CONETWISTCONSTRAINT_H
#define CONETWISTCONSTRAINT_H #define BT_CONETWISTCONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btJacobianEntry.h" #include "btJacobianEntry.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
class btRigidBody; class btRigidBody;
enum btConeTwistFlags enum btConeTwistFlags
{ {
BT_CONETWIST_FLAGS_LIN_CFM = 1, BT_CONETWIST_FLAGS_LIN_CFM = 1,
skipping to change at line 265 skipping to change at line 265
void setMotorTarget(const btQuaternion &q); void setMotorTarget(const btQuaternion &q);
// same as above, but q is the desired rotation of frameA wrt frameB in constraint space // same as above, but q is the desired rotation of frameA wrt frameB in constraint space
void setMotorTargetInConstraintSpace(const btQuaternion &q); void setMotorTargetInConstraintSpace(const btQuaternion &q);
btVector3 GetPointForAngle(btScalar fAngleInRadians, btScalar fLengt h) const; btVector3 GetPointForAngle(btScalar fAngleInRadians, btScalar fLengt h) const;
///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
///If no axis is provided, it uses the default axis for this constra int. ///If no axis is provided, it uses the default axis for this constra int.
virtual void setParam(int num, btScalar value, int axis = -1); virtual void setParam(int num, btScalar value, int axis = -1);
virtual void setFrames(const btTransform& frameA, const btTransform&
frameB);
const btTransform& getFrameOffsetA() const
{
return m_rbAFrame;
}
const btTransform& getFrameOffsetB() const
{
return m_rbBFrame;
}
///return the local value of parameter ///return the local value of parameter
virtual btScalar getParam(int num, int axis = -1) const; virtual btScalar getParam(int num, int axis = -1) const;
virtual int calculateSerializeBufferSize() const; virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur e) ///fills the dataBuffer and returns the struct name (and 0 on failur e)
virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const; virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const;
}; };
skipping to change at line 322 skipping to change at line 335
cone->m_swingSpan2 = float(m_swingSpan2); cone->m_swingSpan2 = float(m_swingSpan2);
cone->m_twistSpan = float(m_twistSpan); cone->m_twistSpan = float(m_twistSpan);
cone->m_limitSoftness = float(m_limitSoftness); cone->m_limitSoftness = float(m_limitSoftness);
cone->m_biasFactor = float(m_biasFactor); cone->m_biasFactor = float(m_biasFactor);
cone->m_relaxationFactor = float(m_relaxationFactor); cone->m_relaxationFactor = float(m_relaxationFactor);
cone->m_damping = float(m_damping); cone->m_damping = float(m_damping);
return "btConeTwistConstraintData"; return "btConeTwistConstraintData";
} }
#endif //CONETWISTCONSTRAINT_H #endif //BT_CONETWISTCONSTRAINT_H
 End of changes. 3 change blocks. 
2 lines changed or deleted 16 lines changed or added


 btConstraintSolver.h   btConstraintSolver.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONSTRAINT_SOLVER_H #ifndef BT_CONSTRAINT_SOLVER_H
#define CONSTRAINT_SOLVER_H #define BT_CONSTRAINT_SOLVER_H
#include "LinearMath/btScalar.h" #include "LinearMath/btScalar.h"
class btPersistentManifold; class btPersistentManifold;
class btRigidBody; class btRigidBody;
class btCollisionObject; class btCollisionObject;
class btTypedConstraint; class btTypedConstraint;
struct btContactSolverInfo; struct btContactSolverInfo;
struct btBroadphaseProxy; struct btBroadphaseProxy;
class btIDebugDraw; class btIDebugDraw;
skipping to change at line 49 skipping to change at line 49
///solve a group of constraints ///solve a group of constraints
virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies ,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** const raints,int numConstraints, const btContactSolverInfo& info,class btIDebugDr aw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher) = 0; virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies ,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** const raints,int numConstraints, const btContactSolverInfo& info,class btIDebugDr aw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher) = 0;
virtual void allSolved (const btContactSolverInfo& /* info */,class btIDebugDraw* /* debugDrawer */, btStackAlloc* /* stackAlloc */) {;} virtual void allSolved (const btContactSolverInfo& /* info */,class btIDebugDraw* /* debugDrawer */, btStackAlloc* /* stackAlloc */) {;}
///clear internal cached data and reset random seed ///clear internal cached data and reset random seed
virtual void reset() = 0; virtual void reset() = 0;
}; };
#endif //CONSTRAINT_SOLVER_H #endif //BT_CONSTRAINT_SOLVER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btContactConstraint.h   btContactConstraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONTACT_CONSTRAINT_H #ifndef BT_CONTACT_CONSTRAINT_H
#define CONTACT_CONSTRAINT_H #define BT_CONTACT_CONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btJacobianEntry.h" #include "btJacobianEntry.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
///btContactConstraint can be automatically created to solve contact constr aints using the unified btTypedConstraint interface ///btContactConstraint can be automatically created to solve contact constr aints using the unified btTypedConstraint interface
ATTRIBUTE_ALIGNED16(class) btContactConstraint : public btTypedConstraint ATTRIBUTE_ALIGNED16(class) btContactConstraint : public btTypedConstraint
{ {
protected: protected:
skipping to change at line 58 skipping to change at line 58
virtual void getInfo1 (btConstraintInfo1* info); virtual void getInfo1 (btConstraintInfo1* info);
virtual void getInfo2 (btConstraintInfo2* info); virtual void getInfo2 (btConstraintInfo2* info);
///obsolete methods ///obsolete methods
virtual void buildJacobian(); virtual void buildJacobian();
}; };
///very basic collision resolution without friction
btScalar resolveSingleCollision(btRigidBody* body1, class btCollisionObject
* colObj2, const btVector3& contactPositionWorld,const btVector3& contactNo
rmalOnB, const struct btContactSolverInfo& solverInfo,btScalar distance);
///resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects ///resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects
void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1, void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1,
btRigidBody& body2, const btVector3& pos2, btRigidBody& body2, const btVector3& pos2,
btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep); btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep);
#endif //CONTACT_CONSTRAINT_H #endif //BT_CONTACT_CONSTRAINT_H
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added


 btContactSolverInfo.h   btContactSolverInfo.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONTACT_SOLVER_INFO #ifndef BT_CONTACT_SOLVER_INFO
#define CONTACT_SOLVER_INFO #define BT_CONTACT_SOLVER_INFO
enum btSolverMode enum btSolverMode
{ {
SOLVER_RANDMIZE_ORDER = 1, SOLVER_RANDMIZE_ORDER = 1,
SOLVER_FRICTION_SEPARATE = 2, SOLVER_FRICTION_SEPARATE = 2,
SOLVER_USE_WARMSTARTING = 4, SOLVER_USE_WARMSTARTING = 4,
SOLVER_USE_FRICTION_WARMSTARTING = 8, SOLVER_USE_FRICTION_WARMSTARTING = 8,
SOLVER_USE_2_FRICTION_DIRECTIONS = 16, SOLVER_USE_2_FRICTION_DIRECTIONS = 16,
SOLVER_ENABLE_FRICTION_DIRECTION_CACHING = 32, SOLVER_ENABLE_FRICTION_DIRECTION_CACHING = 32,
SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION = 64, SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION = 64,
skipping to change at line 83 skipping to change at line 83
m_splitImpulse = false; m_splitImpulse = false;
m_splitImpulsePenetrationThreshold = -0.02f; m_splitImpulsePenetrationThreshold = -0.02f;
m_linearSlop = btScalar(0.0); m_linearSlop = btScalar(0.0);
m_warmstartingFactor=btScalar(0.85); m_warmstartingFactor=btScalar(0.85);
m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SO LVER_RANDMIZE_ORDER; m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SO LVER_RANDMIZE_ORDER;
m_restingContactRestitutionThreshold = 2;//resting contact l ifetime threshold to disable restitution m_restingContactRestitutionThreshold = 2;//resting contact l ifetime threshold to disable restitution
m_minimumSolverBatchSize = 128; //try to combine islands unt il the amount of constraints reaches this limit m_minimumSolverBatchSize = 128; //try to combine islands unt il the amount of constraints reaches this limit
} }
}; };
#endif //CONTACT_SOLVER_INFO #endif //BT_CONTACT_SOLVER_INFO
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btContinuousConvexCollision.h   btContinuousConvexCollision.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONTINUOUS_COLLISION_CONVEX_CAST_H #ifndef BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
#define CONTINUOUS_COLLISION_CONVEX_CAST_H #define BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
#include "btConvexCast.h" #include "btConvexCast.h"
#include "btSimplexSolverInterface.h" #include "btSimplexSolverInterface.h"
class btConvexPenetrationDepthSolver; class btConvexPenetrationDepthSolver;
class btConvexShape; class btConvexShape;
class btStaticPlaneShape;
/// btContinuousConvexCollision implements angular and linear time of impac t for convex objects. /// btContinuousConvexCollision implements angular and linear time of impac t for convex objects.
/// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis). /// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis).
/// Algorithm operates in worldspace, in order to keep inbetween motion glo bally consistent. /// Algorithm operates in worldspace, in order to keep inbetween motion glo bally consistent.
/// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops /// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops
class btContinuousConvexCollision : public btConvexCast class btContinuousConvexCollision : public btConvexCast
{ {
btSimplexSolverInterface* m_simplexSolver; btSimplexSolverInterface* m_simplexSolver;
btConvexPenetrationDepthSolver* m_penetrationDepthSolver; btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
const btConvexShape* m_convexA; const btConvexShape* m_convexA;
const btConvexShape* m_convexB; //second object is either a convex or a plane (code sharing)
const btConvexShape* m_convexB1;
const btStaticPlaneShape* m_planeShape;
void computeClosestPoints( const btTransform& transA, const btTransf
orm& transB,struct btPointCollector& pointCollector);
public: public:
btContinuousConvexCollision (const btConvexShape* shapeA,const btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConve xPenetrationDepthSolver* penetrationDepthSolver); btContinuousConvexCollision (const btConvexShape* shapeA,const btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConve xPenetrationDepthSolver* penetrationDepthSolver);
btContinuousConvexCollision(const btConvexShape* shapeA,const
btStaticPlaneShape* plane );
virtual bool calcTimeOfImpact( virtual bool calcTimeOfImpact(
const btTransform& fromA, const btTransform& fromA,
const btTransform& toA, const btTransform& toA,
const btTransform& fromB, const btTransform& fromB,
const btTransform& toB, const btTransform& toB,
CastResult& result); CastResult& result);
}; };
#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H #endif //BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
 End of changes. 5 change blocks. 
3 lines changed or deleted 12 lines changed or added


 btConvex2dConvex2dAlgorithm.h   btConvex2dConvex2dAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_2D_CONVEX_2D_ALGORITHM_H #ifndef BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
#define CONVEX_2D_CONVEX_2D_ALGORITHM_H #define BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. h" #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. h"
#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" #include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUti l #include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUti l
skipping to change at line 89 skipping to change at line 89
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btConvex2dConvex2dAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btConvex2dConvex2dAlgorithm));
return new(mem) btConvex2dConvex2dAlgorithm(ci.m_man ifold,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations ,m_minimumPointsPerturbationThreshold); return new(mem) btConvex2dConvex2dAlgorithm(ci.m_man ifold,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations ,m_minimumPointsPerturbationThreshold);
} }
}; };
}; };
#endif //CONVEX_2D_CONVEX_2D_ALGORITHM_H #endif //BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvex2dShape.h   btConvex2dShape.h 
skipping to change at line 22 skipping to change at line 22
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BT_CONVEX_2D_SHAPE_H #ifndef BT_CONVEX_2D_SHAPE_H
#define BT_CONVEX_2D_SHAPE_H #define BT_CONVEX_2D_SHAPE_H
#include "BulletCollision/CollisionShapes/btConvexShape.h" #include "BulletCollision/CollisionShapes/btConvexShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
///The btConvex2dShape allows to use arbitrary convex shapes are 2d convex shapes, with the Z component assumed to be 0. ///The btConvex2dShape allows to use arbitrary convex shapes as 2d convex s hapes, with the Z component assumed to be 0.
///For 2d boxes, the btBox2dShape is recommended. ///For 2d boxes, the btBox2dShape is recommended.
class btConvex2dShape : public btConvexShape class btConvex2dShape : public btConvexShape
{ {
btConvexShape* m_childConvexShape; btConvexShape* m_childConvexShape;
public: public:
btConvex2dShape( btConvexShape* convexChildShape); btConvex2dShape( btConvexShape* convexChildShape);
virtual ~btConvex2dShape(); virtual ~btConvex2dShape();
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 btConvexCast.h   btConvexCast.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_CAST_H #ifndef BT_CONVEX_CAST_H
#define CONVEX_CAST_H #define BT_CONVEX_CAST_H
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btScalar.h" #include "LinearMath/btScalar.h"
class btMinkowskiSumShape; class btMinkowskiSumShape;
#include "LinearMath/btIDebugDraw.h" #include "LinearMath/btIDebugDraw.h"
/// btConvexCast is an interface for Casting /// btConvexCast is an interface for Casting
class btConvexCast class btConvexCast
{ {
skipping to change at line 40 skipping to change at line 40
virtual ~btConvexCast(); virtual ~btConvexCast();
///RayResult stores the closest result ///RayResult stores the closest result
/// alternatively, add a callback method to decide about closest/all results /// alternatively, add a callback method to decide about closest/all results
struct CastResult struct CastResult
{ {
//virtual bool addRayResult(const btVector3& normal,btScala r fraction) = 0; //virtual bool addRayResult(const btVector3& normal,btScala r fraction) = 0;
virtual void DebugDraw(btScalar fraction) {(void)fra ction;} virtual void DebugDraw(btScalar fraction) {(void)fra ction;}
virtual void drawCoordSystem(const btTransform& trans) {( void)trans;} virtual void drawCoordSystem(const btTransform& trans) {( void)trans;}
virtual void reportFailure(int errNo, int numIterations) {(void)errNo;(void)numIterations;}
CastResult() CastResult()
:m_fraction(btScalar(BT_LARGE_FLOAT)), :m_fraction(btScalar(BT_LARGE_FLOAT)),
m_debugDrawer(0), m_debugDrawer(0),
m_allowedPenetration(btScalar(0)) m_allowedPenetration(btScalar(0))
{ {
} }
virtual ~CastResult() {}; virtual ~CastResult() {};
btTransform m_hitTransformA; btTransform m_hitTransformA;
skipping to change at line 69 skipping to change at line 69
/// cast a convex against another convex object /// cast a convex against another convex object
virtual bool calcTimeOfImpact( virtual bool calcTimeOfImpact(
const btTransform& fromA, const btTransform& fromA,
const btTransform& toA, const btTransform& toA,
const btTransform& fromB, const btTransform& fromB,
const btTransform& toB, const btTransform& toB,
CastResult& result) = 0; CastResult& result) = 0;
}; };
#endif //CONVEX_CAST_H #endif //BT_CONVEX_CAST_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 btConvexConcaveCollisionAlgorithm.h   btConvexConcaveCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_CONCAVE_COLLISION_ALGORITHM_H #ifndef BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
#define CONVEX_CONCAVE_COLLISION_ALGORITHM_H #define BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/CollisionShapes/btTriangleCallback.h" #include "BulletCollision/CollisionShapes/btTriangleCallback.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
class btDispatcher; class btDispatcher;
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "btCollisionCreateFunc.h" #include "btCollisionCreateFunc.h"
skipping to change at line 110 skipping to change at line 110
{ {
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btConvexConcaveCollisionAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btConvexConcaveCollisionAlgorithm));
return new(mem) btConvexConcaveCollisionAlgorithm(ci ,body0,body1,true); return new(mem) btConvexConcaveCollisionAlgorithm(ci ,body0,body1,true);
} }
}; };
}; };
#endif //CONVEX_CONCAVE_COLLISION_ALGORITHM_H #endif //BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexConvexAlgorithm.h   btConvexConvexAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_CONVEX_ALGORITHM_H #ifndef BT_CONVEX_CONVEX_ALGORITHM_H
#define CONVEX_CONVEX_ALGORITHM_H #define BT_CONVEX_CONVEX_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" #include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
#include "btCollisionCreateFunc.h" #include "btCollisionCreateFunc.h"
#include "btCollisionDispatcher.h" #include "btCollisionDispatcher.h"
#include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUti l #include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUti l
skipping to change at line 102 skipping to change at line 102
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btConvexConvexAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btConvexConvexAlgorithm));
return new(mem) btConvexConvexAlgorithm(ci.m_manifol d,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations,m_m inimumPointsPerturbationThreshold); return new(mem) btConvexConvexAlgorithm(ci.m_manifol d,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations,m_m inimumPointsPerturbationThreshold);
} }
}; };
}; };
#endif //CONVEX_CONVEX_ALGORITHM_H #endif //BT_CONVEX_CONVEX_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexHull.h   btConvexHull.h 
skipping to change at line 19 skipping to change at line 19
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
///includes modifications/improvements by John Ratcliff, see BringOutYourDe ad below. ///includes modifications/improvements by John Ratcliff, see BringOutYourDe ad below.
#ifndef CD_HULL_H #ifndef BT_CD_HULL_H
#define CD_HULL_H #define BT_CD_HULL_H
#include "btVector3.h" #include "btVector3.h"
#include "btAlignedObjectArray.h" #include "btAlignedObjectArray.h"
typedef btAlignedObjectArray<unsigned int> TUIntArray; typedef btAlignedObjectArray<unsigned int> TUIntArray;
class HullResult class HullResult
{ {
public: public:
HullResult(void) HullResult(void)
skipping to change at line 232 skipping to change at line 232
bool CleanupVertices(unsigned int svcount, bool CleanupVertices(unsigned int svcount,
const btVector3* svertices, const btVector3* svertices,
unsigned int stride, unsigned int stride,
unsigned int &vcount, // output number of verti ces unsigned int &vcount, // output number of verti ces
btVector3* vertices, // location to store the r esults. btVector3* vertices, // location to store the r esults.
btScalar normalepsilon, btScalar normalepsilon,
btVector3& scale); btVector3& scale);
}; };
#endif #endif //BT_CD_HULL_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexHullShape.h   btConvexHullShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_HULL_SHAPE_H #ifndef BT_CONVEX_HULL_SHAPE_H
#define CONVEX_HULL_SHAPE_H #define BT_CONVEX_HULL_SHAPE_H
#include "btPolyhedralConvexShape.h" #include "btPolyhedralConvexShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
///The btConvexHullShape implements an implicit convex hull of an array of vertices. ///The btConvexHullShape implements an implicit convex hull of an array of vertices.
///Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex. ///Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex.
ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexAab bCachingShape ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexAab bCachingShape
{ {
btAlignedObjectArray<btVector3> m_unscaledPoints; btAlignedObjectArray<btVector3> m_unscaledPoints;
skipping to change at line 108 skipping to change at line 108
int m_numUnscaledPoints; int m_numUnscaledPoints;
char m_padding3[4]; char m_padding3[4];
}; };
SIMD_FORCE_INLINE int btConvexHullShape::calculateSerializeBufferS ize() const SIMD_FORCE_INLINE int btConvexHullShape::calculateSerializeBufferS ize() const
{ {
return sizeof(btConvexHullShapeData); return sizeof(btConvexHullShapeData);
} }
#endif //CONVEX_HULL_SHAPE_H #endif //BT_CONVEX_HULL_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexPenetrationDepthSolver.h   btConvexPenetrationDepthSolver.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef __CONVEX_PENETRATION_DEPTH_H #ifndef BT_CONVEX_PENETRATION_DEPTH_H
#define __CONVEX_PENETRATION_DEPTH_H #define BT_CONVEX_PENETRATION_DEPTH_H
class btStackAlloc; class btStackAlloc;
class btVector3; class btVector3;
#include "btSimplexSolverInterface.h" #include "btSimplexSolverInterface.h"
class btConvexShape; class btConvexShape;
class btTransform; class btTransform;
///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. ///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
class btConvexPenetrationDepthSolver class btConvexPenetrationDepthSolver
{ {
skipping to change at line 39 skipping to change at line 39
virtual ~btConvexPenetrationDepthSolver() {}; virtual ~btConvexPenetrationDepthSolver() {};
virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
const btConvexShape* convexA,const btConvexShape* convexB, const btConvexShape* convexA,const btConvexShape* convexB,
const btTransform& transA,const btTr ansform& transB, const btTransform& transA,const btTr ansform& transB,
btVector3& v, btVector3& pa, btVector3& pb, btVector3& v, btVector3& pa, btVector3& pb,
class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
) = 0; ) = 0;
}; };
#endif //CONVEX_PENETRATION_DEPTH_H #endif //BT_CONVEX_PENETRATION_DEPTH_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexPlaneCollisionAlgorithm.h   btConvexPlaneCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_PLANE_COLLISION_ALGORITHM_H #ifndef BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
#define CONVEX_PLANE_COLLISION_ALGORITHM_H #define BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
#include "btCollisionDispatcher.h" #include "btCollisionDispatcher.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
/// btSphereBoxCollisionAlgorithm provides sphere-box collision detection. /// btSphereBoxCollisionAlgorithm provides sphere-box collision detection.
skipping to change at line 83 skipping to change at line 83
return new(mem) btConvexPlaneCollisionAlgori thm(0,ci,body0,body1,false,m_numPerturbationIterations,m_minimumPointsPertu rbationThreshold); return new(mem) btConvexPlaneCollisionAlgori thm(0,ci,body0,body1,false,m_numPerturbationIterations,m_minimumPointsPertu rbationThreshold);
} else } else
{ {
return new(mem) btConvexPlaneCollisionAlgori thm(0,ci,body0,body1,true,m_numPerturbationIterations,m_minimumPointsPertur bationThreshold); return new(mem) btConvexPlaneCollisionAlgori thm(0,ci,body0,body1,true,m_numPerturbationIterations,m_minimumPointsPertur bationThreshold);
} }
} }
}; };
}; };
#endif //CONVEX_PLANE_COLLISION_ALGORITHM_H #endif //BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexShape.h   btConvexShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_SHAPE_INTERFACE1 #ifndef BT_CONVEX_SHAPE_INTERFACE1
#define CONVEX_SHAPE_INTERFACE1 #define BT_CONVEX_SHAPE_INTERFACE1
#include "btCollisionShape.h" #include "btCollisionShape.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btMatrix3x3.h" #include "LinearMath/btMatrix3x3.h"
#include "btCollisionMargin.h" #include "btCollisionMargin.h"
#include "LinearMath/btAlignedAllocator.h" #include "LinearMath/btAlignedAllocator.h"
#define MAX_PREFERRED_PENETRATION_DIRECTIONS 10 #define MAX_PREFERRED_PENETRATION_DIRECTIONS 10
skipping to change at line 75 skipping to change at line 75
virtual void setMargin(btScalar margin)=0; virtual void setMargin(btScalar margin)=0;
virtual btScalar getMargin() const=0; virtual btScalar getMargin() const=0;
virtual int getNumPreferredPenetrationDirections() const =0; virtual int getNumPreferredPenetrationDirections() const =0;
virtual void getPreferredPenetrationDirection(int index, btVector 3& penetrationVector) const=0; virtual void getPreferredPenetrationDirection(int index, btVector 3& penetrationVector) const=0;
}; };
#endif //CONVEX_SHAPE_INTERFACE1 #endif //BT_CONVEX_SHAPE_INTERFACE1
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btConvexTriangleMeshShape.h   btConvexTriangleMeshShape.h 
skipping to change at line 15 skipping to change at line 15
This software is provided 'as-is', without any express or implied warranty. 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 th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CONVEX_TRIANGLEMESH_SHAPE_H #ifndef BT_CONVEX_TRIANGLEMESH_SHAPE_H
#define CONVEX_TRIANGLEMESH_SHAPE_H #define BT_CONVEX_TRIANGLEMESH_SHAPE_H
#include "btPolyhedralConvexShape.h" #include "btPolyhedralConvexShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
/// The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good as btConvexHullShape. /// The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good as btConvexHullShape.
/// A small benefit of this class is that it uses the btStridingMeshInterfa ce, so you can avoid the duplication of the triangle mesh data. Nevertheles s, most users should use the much better performing btConvexHullShape inste ad. /// A small benefit of this class is that it uses the btStridingMeshInterfa ce, so you can avoid the duplication of the triangle mesh data. Nevertheles s, most users should use the much better performing btConvexHullShape inste ad.
class btConvexTriangleMeshShape : public btPolyhedralConvexAabbCachingShape class btConvexTriangleMeshShape : public btPolyhedralConvexAabbCachingShape
{ {
class btStridingMeshInterface* m_stridingMesh; class btStridingMeshInterface* m_stridingMesh;
skipping to change at line 67 skipping to change at line 67
///computes the exact moment of inertia and the transform from the c oordinate system defined by the principal axes of the moment of inertia ///computes the exact moment of inertia and the transform from the c oordinate system defined by the principal axes of the moment of inertia
///and the center of mass to the current coordinate system. A mass o f 1 is assumed, for other masses just multiply the computed "inertia" ///and the center of mass to the current coordinate system. A mass o f 1 is assumed, for other masses just multiply the computed "inertia"
///by the mass. The resulting transform "principal" has to be applie d inversely to the mesh in order for the local coordinate system of the ///by the mass. The resulting transform "principal" has to be applie d inversely to the mesh in order for the local coordinate system of the
///shape to be centered at the center of mass and to coincide with t he principal axes. This also necessitates a correction of the world transfo rm ///shape to be centered at the center of mass and to coincide with t he principal axes. This also necessitates a correction of the world transfo rm
///of the collision object by the principal transform. This method a lso computes the volume of the convex mesh. ///of the collision object by the principal transform. This method a lso computes the volume of the convex mesh.
void calculatePrincipalAxisTransform(btTransform& principal, btVecto r3& inertia, btScalar& volume) const; void calculatePrincipalAxisTransform(btTransform& principal, btVecto r3& inertia, btScalar& volume) const;
}; };
#endif //CONVEX_TRIANGLEMESH_SHAPE_H #endif //BT_CONVEX_TRIANGLEMESH_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btCylinderShape.h   btCylinderShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef CYLINDER_MINKOWSKI_H #ifndef BT_CYLINDER_MINKOWSKI_H
#define CYLINDER_MINKOWSKI_H #define BT_CYLINDER_MINKOWSKI_H
#include "btBoxShape.h" #include "btBoxShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
/// The btCylinderShape class implements a cylinder shape primitive, center ed around the origin. Its central axis aligned with the Y axis. btCylinderS hapeX is aligned with the X axis and btCylinderShapeZ around the Z axis. /// The btCylinderShape class implements a cylinder shape primitive, center ed around the origin. Its central axis aligned with the Y axis. btCylinderS hapeX is aligned with the X axis and btCylinderShapeZ around the Z axis.
class btCylinderShape : public btConvexInternalShape class btCylinderShape : public btConvexInternalShape
{ {
skipping to change at line 195 skipping to change at line 195
{ {
btCylinderShapeData* shapeData = (btCylinderShapeData*) dataBuffer; btCylinderShapeData* shapeData = (btCylinderShapeData*) dataBuffer;
btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeDa ta,serializer); btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeDa ta,serializer);
shapeData->m_upAxis = m_upAxis; shapeData->m_upAxis = m_upAxis;
return "btCylinderShapeData"; return "btCylinderShapeData";
} }
#endif //CYLINDER_MINKOWSKI_H #endif //BT_CYLINDER_MINKOWSKI_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btDefaultMotionState.h   btDefaultMotionState.h 
#ifndef DEFAULT_MOTION_STATE_H #ifndef BT_DEFAULT_MOTION_STATE_H
#define DEFAULT_MOTION_STATE_H #define BT_DEFAULT_MOTION_STATE_H
#include "btMotionState.h" #include "btMotionState.h"
///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets. ///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets.
struct btDefaultMotionState : public btMotionState struct btDefaultMotionState : public btMotionState
{ {
btTransform m_graphicsWorldTrans; btTransform m_graphicsWorldTrans;
btTransform m_centerOfMassOffset; btTransform m_centerOfMassOffset;
btTransform m_startWorldTrans; btTransform m_startWorldTrans;
void* m_userPointer; void* m_userPointer;
skipping to change at line 38 skipping to change at line 38
///synchronizes world transform from physics to user ///synchronizes world transform from physics to user
///Bullet only calls the update of worldtransform for active objects ///Bullet only calls the update of worldtransform for active objects
virtual void setWorldTransform(const btTransform& centerOfMassWor ldTrans) virtual void setWorldTransform(const btTransform& centerOfMassWor ldTrans)
{ {
m_graphicsWorldTrans = centerOfMassWorldTrans * m_ce nterOfMassOffset ; m_graphicsWorldTrans = centerOfMassWorldTrans * m_ce nterOfMassOffset ;
} }
}; };
#endif //DEFAULT_MOTION_STATE_H #endif //BT_DEFAULT_MOTION_STATE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btDiscreteCollisionDetectorInterface.h   btDiscreteCollisionDetectorInterface.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef DISCRETE_COLLISION_DETECTOR1_INTERFACE_H #ifndef BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
#define DISCRETE_COLLISION_DETECTOR1_INTERFACE_H #define BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
class btStackAlloc; class btStackAlloc;
/// This interface is made to be used by an iterative approach to do TimeOf Impact calculations /// This interface is made to be used by an iterative approach to do TimeOf Impact calculations
/// This interface allows to query for closest points and penetration depth between two (convex) objects /// This interface allows to query for closest points and penetration depth between two (convex) objects
/// the closest point is on the second object (B), and the normal points fr om the surface on B towards A. /// the closest point is on the second object (B), and the normal points fr om the surface on B towards A.
/// distance is between closest points on B and closest point on A. So you can calculate closest point on A /// distance is between closest points on B and closest point on A. So you can calculate closest point on A
/// by taking closestPointInA = closestPointInB + m_distance * m_normalOnSu rfaceB /// by taking closestPointInA = closestPointInB + m_distance * m_normalOnSu rfaceB
struct btDiscreteCollisionDetectorInterface struct btDiscreteCollisionDetectorInterface
skipping to change at line 88 skipping to change at line 89
{ {
if (depth < m_distance) if (depth < m_distance)
{ {
m_normalOnSurfaceB = normalOnBInWorld; m_normalOnSurfaceB = normalOnBInWorld;
m_closestPointInB = pointInWorld; m_closestPointInB = pointInWorld;
m_distance = depth; m_distance = depth;
} }
} }
}; };
#endif //DISCRETE_COLLISION_DETECTOR_INTERFACE1_H #endif //BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 btDiscreteDynamicsWorld.h   btDiscreteDynamicsWorld.h 
skipping to change at line 63 skipping to change at line 63
bool m_synchronizeAllMotionStates; bool m_synchronizeAllMotionStates;
btAlignedObjectArray<btActionInterface*> m_actions; btAlignedObjectArray<btActionInterface*> m_actions;
int m_profileTimings; int m_profileTimings;
virtual void predictUnconstraintMotion(btScalar timeStep); virtual void predictUnconstraintMotion(btScalar timeStep);
virtual void integrateTransforms(btScalar timeStep); virtual void integrateTransforms(btScalar timeStep);
virtual void addSpeculativeContacts(btScalar timeStep);
virtual void calculateSimulationIslands(); virtual void calculateSimulationIslands();
virtual void solveConstraints(btContactSolverInfo& solverInfo); virtual void solveConstraints(btContactSolverInfo& solverInfo);
void updateActivationState(btScalar timeStep); void updateActivationState(btScalar timeStep);
void updateActions(btScalar timeStep); void updateActions(btScalar timeStep);
void startProfiling(btScalar timeStep); void startProfiling(btScalar timeStep);
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 btDispatcher.h   btDispatcher.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef _DISPATCHER_H #ifndef BT_DISPATCHER_H
#define _DISPATCHER_H #define BT_DISPATCHER_H
#include "LinearMath/btScalar.h" #include "LinearMath/btScalar.h"
class btCollisionAlgorithm; class btCollisionAlgorithm;
struct btBroadphaseProxy; struct btBroadphaseProxy;
class btRigidBody; class btRigidBody;
class btCollisionObject; class btCollisionObject;
class btOverlappingPairCache; class btOverlappingPairCache;
class btPersistentManifold; class btPersistentManifold;
class btStackAlloc; class btStackAlloc;
class btPoolAllocator;
struct btDispatcherInfo struct btDispatcherInfo
{ {
enum DispatchFunc enum DispatchFunc
{ {
DISPATCH_DISCRETE = 1, DISPATCH_DISCRETE = 1,
DISPATCH_CONTINUOUS DISPATCH_CONTINUOUS
}; };
btDispatcherInfo() btDispatcherInfo()
:m_timeStep(btScalar(0.)), :m_timeStep(btScalar(0.)),
m_stepCount(0), m_stepCount(0),
m_dispatchFunc(DISPATCH_DISCRETE), m_dispatchFunc(DISPATCH_DISCRETE),
m_timeOfImpact(btScalar(1.)), m_timeOfImpact(btScalar(1.)),
m_useContinuous(false), m_useContinuous(true),
m_debugDraw(0), m_debugDraw(0),
m_enableSatConvex(false), m_enableSatConvex(false),
m_enableSPU(true), m_enableSPU(true),
m_useEpa(true), m_useEpa(true),
m_allowedCcdPenetration(btScalar(0.04)), m_allowedCcdPenetration(btScalar(0.04)),
m_useConvexConservativeDistanceUtil(false), m_useConvexConservativeDistanceUtil(false),
m_convexConservativeDistanceThreshold(0.0f), m_convexConservativeDistanceThreshold(0.0f),
m_convexMaxDistanceUseCPT(false),
m_stackAllocator(0) m_stackAllocator(0)
{ {
} }
btScalar m_timeStep; btScalar m_timeStep;
int m_stepCount; int m_stepCount;
int m_dispatchFunc; int m_dispatchFunc;
mutable btScalar m_timeOfImpact; mutable btScalar m_timeOfImpact;
bool m_useContinuous; bool m_useContinuous;
class btIDebugDraw* m_debugDraw; class btIDebugDraw* m_debugDraw;
bool m_enableSatConvex; bool m_enableSatConvex;
bool m_enableSPU; bool m_enableSPU;
bool m_useEpa; bool m_useEpa;
btScalar m_allowedCcdPenetration; btScalar m_allowedCcdPenetration;
bool m_useConvexConservativeDistanceUtil; bool m_useConvexConservativeDistanceUtil;
btScalar m_convexConservativeDistanceThreshold; btScalar m_convexConservativeDistanceThreshold;
bool m_convexMaxDistanceUseCPT;
btStackAlloc* m_stackAllocator; btStackAlloc* m_stackAllocator;
}; };
///The btDispatcher interface class can be used in combination with broadph ase to dispatch calculations for overlapping pairs. ///The btDispatcher interface class can be used in combination with broadph ase to dispatch calculations for overlapping pairs.
///For example for pairwise collision detection, calculating contact points stored in btPersistentManifold or user callbacks (game logic). ///For example for pairwise collision detection, calculating contact points stored in btPersistentManifold or user callbacks (game logic).
class btDispatcher class btDispatcher
{ {
public: public:
virtual ~btDispatcher() ; virtual ~btDispatcher() ;
skipping to change at line 99 skipping to change at line 97
virtual bool needsResponse(btCollisionObject* body0,btCollisionOb ject* body1)=0; virtual bool needsResponse(btCollisionObject* body0,btCollisionOb ject* body1)=0;
virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pa irCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) =0; virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pa irCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) =0;
virtual int getNumManifolds() const = 0; virtual int getNumManifolds() const = 0;
virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0; virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0;
virtual btPersistentManifold** getInternalManifoldPointer() = 0; virtual btPersistentManifold** getInternalManifoldPointer() = 0;
virtual btPoolAllocator* getInternalManifoldPool() = 0;
virtual const btPoolAllocator* getInternalManifoldPool() const = 0;
virtual void* allocateCollisionAlgorithm(int size) = 0; virtual void* allocateCollisionAlgorithm(int size) = 0;
virtual void freeCollisionAlgorithm(void* ptr) = 0; virtual void freeCollisionAlgorithm(void* ptr) = 0;
}; };
#endif //_DISPATCHER_H #endif //BT_DISPATCHER_H
 End of changes. 7 change blocks. 
6 lines changed or deleted 8 lines changed or added


 btDynamicsWorld.h   btDynamicsWorld.h 
skipping to change at line 34 skipping to change at line 34
class btConstraintSolver; class btConstraintSolver;
class btDynamicsWorld; class btDynamicsWorld;
/// Type for the callback for each tick /// Type for the callback for each tick
typedef void (*btInternalTickCallback)(btDynamicsWorld *world, btScalar tim eStep); typedef void (*btInternalTickCallback)(btDynamicsWorld *world, btScalar tim eStep);
enum btDynamicsWorldType enum btDynamicsWorldType
{ {
BT_SIMPLE_DYNAMICS_WORLD=1, BT_SIMPLE_DYNAMICS_WORLD=1,
BT_DISCRETE_DYNAMICS_WORLD=2, BT_DISCRETE_DYNAMICS_WORLD=2,
BT_CONTINUOUS_DYNAMICS_WORLD=3 BT_CONTINUOUS_DYNAMICS_WORLD=3,
BT_SOFT_RIGID_DYNAMICS_WORLD=4
}; };
///The btDynamicsWorld is the interface class for several dynamics implemen tation, basic, discrete, parallel, and continuous etc. ///The btDynamicsWorld is the interface class for several dynamics implemen tation, basic, discrete, parallel, and continuous etc.
class btDynamicsWorld : public btCollisionWorld class btDynamicsWorld : public btCollisionWorld
{ {
protected: protected:
btInternalTickCallback m_internalTickCallback; btInternalTickCallback m_internalTickCallback;
btInternalTickCallback m_internalPreTickCallback; btInternalTickCallback m_internalPreTickCallback;
void* m_worldUserInfo; void* m_worldUserInfo;
skipping to change at line 87 skipping to change at line 88
//once a rigidbody is added to the dynamics world, it will g et this gravity assigned //once a rigidbody is added to the dynamics world, it will g et this gravity assigned
//existing rigidbodies in the world get gravity assigned too , during this method //existing rigidbodies in the world get gravity assigned too , during this method
virtual void setGravity(const btVector3& gravity) = 0; virtual void setGravity(const btVector3& gravity) = 0;
virtual btVector3 getGravity () const = 0; virtual btVector3 getGravity () const = 0;
virtual void synchronizeMotionStates() = 0; virtual void synchronizeMotionStates() = 0;
virtual void addRigidBody(btRigidBody* body) = 0; virtual void addRigidBody(btRigidBody* body) = 0;
virtual void addRigidBody(btRigidBody* body, short group,
short mask) = 0;
virtual void removeRigidBody(btRigidBody* body) = 0; virtual void removeRigidBody(btRigidBody* body) = 0;
virtual void setConstraintSolver(btConstraintSolver* solv er) = 0; virtual void setConstraintSolver(btConstraintSolver* solv er) = 0;
virtual btConstraintSolver* getConstraintSolver() = 0; virtual btConstraintSolver* getConstraintSolver() = 0;
virtual int getNumConstraints() const { retu rn 0; } virtual int getNumConstraints() const { retu rn 0; }
virtual btTypedConstraint* getConstraint(int index) { (void)index; return 0; } virtual btTypedConstraint* getConstraint(int index) { (void)index; return 0; }
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 btEmptyCollisionAlgorithm.h   btEmptyCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef EMPTY_ALGORITH #ifndef BT_EMPTY_ALGORITH
#define EMPTY_ALGORITH #define BT_EMPTY_ALGORITH
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
#include "btCollisionCreateFunc.h" #include "btCollisionCreateFunc.h"
#include "btCollisionDispatcher.h" #include "btCollisionDispatcher.h"
#define ATTRIBUTE_ALIGNED(a) #define ATTRIBUTE_ALIGNED(a)
///EmptyAlgorithm is a stub for unsupported collision pairs. ///EmptyAlgorithm is a stub for unsupported collision pairs.
///The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a sea rch every frame. ///The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a sea rch every frame.
class btEmptyAlgorithm : public btCollisionAlgorithm class btEmptyAlgorithm : public btCollisionAlgorithm
{ {
skipping to change at line 54 skipping to change at line 54
{ {
(void)body0; (void)body0;
(void)body1; (void)body1;
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btEmptyAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btEmptyAlgorithm));
return new(mem) btEmptyAlgorithm(ci); return new(mem) btEmptyAlgorithm(ci);
} }
}; };
} ATTRIBUTE_ALIGNED(16); } ATTRIBUTE_ALIGNED(16);
#endif //EMPTY_ALGORITH #endif //BT_EMPTY_ALGORITH
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btEmptyShape.h   btEmptyShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef EMPTY_SHAPE_H #ifndef BT_EMPTY_SHAPE_H
#define EMPTY_SHAPE_H #define BT_EMPTY_SHAPE_H
#include "btConcaveShape.h" #include "btConcaveShape.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btMatrix3x3.h" #include "LinearMath/btMatrix3x3.h"
#include "btCollisionMargin.h" #include "btCollisionMargin.h"
/// The btEmptyShape is a collision shape without actual collision detectio n shape, so most users should ignore this class. /// The btEmptyShape is a collision shape without actual collision detectio n shape, so most users should ignore this class.
/// It can be replaced by another shape during runtime, but the inertia ten sor should be recomputed. /// It can be replaced by another shape during runtime, but the inertia ten sor should be recomputed.
skipping to change at line 63 skipping to change at line 63
virtual void processAllTriangles(btTriangleCallback* ,const btVector 3& ,const btVector3& ) const virtual void processAllTriangles(btTriangleCallback* ,const btVector 3& ,const btVector3& ) const
{ {
} }
protected: protected:
btVector3 m_localScaling; btVector3 m_localScaling;
}; };
#endif //EMPTY_SHAPE_H #endif //BT_EMPTY_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btGImpactBvh.h   btGImpactBvh.h 
skipping to change at line 369 skipping to change at line 369
SIMD_FORCE_INLINE void getNodeTriangle(int nodeindex,btPrimitiveTria ngle & triangle) const SIMD_FORCE_INLINE void getNodeTriangle(int nodeindex,btPrimitiveTria ngle & triangle) const
{ {
m_primitive_manager->get_primitive_triangle(getNodeData(node index),triangle); m_primitive_manager->get_primitive_triangle(getNodeData(node index),triangle);
} }
SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int ind ex = 0) const SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int ind ex = 0) const
{ {
return m_box_tree.get_node_pointer(index); return m_box_tree.get_node_pointer(index);
} }
#ifdef TRI_COLLISION_PROFILING
static float getAverageTreeCollisionTime(); static float getAverageTreeCollisionTime();
#endif //TRI_COLLISION_PROFILING
static void find_collision(btGImpactBvh * boxset1, const btTransform & trans1, static void find_collision(btGImpactBvh * boxset1, const btTransform & trans1,
btGImpactBvh * boxset2, const btTransform & trans2, btGImpactBvh * boxset2, const btTransform & trans2,
btPairSet & collision_pairs); btPairSet & collision_pairs);
}; };
#endif // GIM_BOXPRUNING_H_INCLUDED #endif // GIM_BOXPRUNING_H_INCLUDED
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 btGImpactCollisionAlgorithm.h   btGImpactCollisionAlgorithm.h 
skipping to change at line 23 skipping to change at line 23
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BVH_CONCAVE_COLLISION_ALGORITHM_H #ifndef BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
#define BVH_CONCAVE_COLLISION_ALGORITHM_H #define BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. h" #include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
class btDispatcher; class btDispatcher;
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
skipping to change at line 209 skipping to change at line 209
{ {
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btGImpactCollisionAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btGImpactCollisionAlgorithm));
return new(mem) btGImpactCollisionAlgorithm(ci,body0 ,body1); return new(mem) btGImpactCollisionAlgorithm(ci,body0 ,body1);
} }
}; };
//! Use this function for register the algorithm externally //! Use this function for register the algorithm externally
static void registerAlgorithm(btCollisionDispatcher * dispatcher); static void registerAlgorithm(btCollisionDispatcher * dispatcher);
#ifdef TRI_COLLISION_PROFILING
//! Gets the average time in miliseconds of tree collisions //! Gets the average time in miliseconds of tree collisions
static float getAverageTreeCollisionTime(); static float getAverageTreeCollisionTime();
//! Gets the average time in miliseconds of triangle collisions //! Gets the average time in miliseconds of triangle collisions
static float getAverageTriangleCollisionTime(); static float getAverageTriangleCollisionTime();
#endif //TRI_COLLISION_PROFILING
//! Collides two gimpact shapes //! Collides two gimpact shapes
/*! /*!
\pre shape0 and shape1 couldn't be btGImpactMeshShape objects \pre shape0 and shape1 couldn't be btGImpactMeshShape objects
*/ */
void gimpact_vs_gimpact(btCollisionObject * body0, void gimpact_vs_gimpact(btCollisionObject * body0,
btCollisionObject * body1, btCollisionObject * body1,
btGImpactShapeInterface * shape0, btGImpactShapeInterface * shape0,
btGImpactShapeInterface * shape1); btGImpactShapeInterface * shape1);
skipping to change at line 282 skipping to change at line 283
{ {
return m_part1; return m_part1;
} }
}; };
//algorithm details //algorithm details
//#define BULLET_TRIANGLE_COLLISION 1 //#define BULLET_TRIANGLE_COLLISION 1
#define GIMPACT_VS_PLANE_COLLISION 1 #define GIMPACT_VS_PLANE_COLLISION 1
#endif //BVH_CONCAVE_COLLISION_ALGORITHM_H #endif //BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 btGImpactQuantizedBvh.h   btGImpactQuantizedBvh.h 
skipping to change at line 346 skipping to change at line 346
SIMD_FORCE_INLINE void getNodeTriangle(int nodeindex,btPrimitiveTria ngle & triangle) const SIMD_FORCE_INLINE void getNodeTriangle(int nodeindex,btPrimitiveTria ngle & triangle) const
{ {
m_primitive_manager->get_primitive_triangle(getNodeData(node index),triangle); m_primitive_manager->get_primitive_triangle(getNodeData(node index),triangle);
} }
SIMD_FORCE_INLINE const BT_QUANTIZED_BVH_NODE * get_node_pointer(int index = 0) const SIMD_FORCE_INLINE const BT_QUANTIZED_BVH_NODE * get_node_pointer(int index = 0) const
{ {
return m_box_tree.get_node_pointer(index); return m_box_tree.get_node_pointer(index);
} }
#ifdef TRI_COLLISION_PROFILING
static float getAverageTreeCollisionTime(); static float getAverageTreeCollisionTime();
#endif //TRI_COLLISION_PROFILING
static void find_collision(btGImpactQuantizedBvh * boxset1, const bt Transform & trans1, static void find_collision(btGImpactQuantizedBvh * boxset1, const bt Transform & trans1,
btGImpactQuantizedBvh * boxset2, const btTransform & trans2, btGImpactQuantizedBvh * boxset2, const btTransform & trans2,
btPairSet & collision_pairs); btPairSet & collision_pairs);
}; };
#endif // GIM_BOXPRUNING_H_INCLUDED #endif // GIM_BOXPRUNING_H_INCLUDED
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 btGeneric6DofConstraint.h   btGeneric6DofConstraint.h 
skipping to change at line 26 skipping to change at line 26
/// 2009 March: btGeneric6DofConstraint refactored by Roman Ponomarev /// 2009 March: btGeneric6DofConstraint refactored by Roman Ponomarev
/// Added support for generic constraint solver through getInfo1/getInfo2 m ethods /// Added support for generic constraint solver through getInfo1/getInfo2 m ethods
/* /*
2007-09-09 2007-09-09
btGeneric6DofConstraint Refactored by Francisco Le?n btGeneric6DofConstraint Refactored by Francisco Le?n
email: projectileman@yahoo.com email: projectileman@yahoo.com
http://gimpact.sf.net http://gimpact.sf.net
*/ */
#ifndef GENERIC_6DOF_CONSTRAINT_H #ifndef BT_GENERIC_6DOF_CONSTRAINT_H
#define GENERIC_6DOF_CONSTRAINT_H #define BT_GENERIC_6DOF_CONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btJacobianEntry.h" #include "btJacobianEntry.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
class btRigidBody; class btRigidBody;
//! Rotation Limit structure for generic joints //! Rotation Limit structure for generic joints
class btRotationalLimitMotor class btRotationalLimitMotor
{ {
skipping to change at line 417 skipping to change at line 417
\pre btGeneric6DofConstraint::calculateTransforms() must be called p reviously. \pre btGeneric6DofConstraint::calculateTransforms() must be called p reviously.
*/ */
btScalar getAngle(int axis_index) const; btScalar getAngle(int axis_index) const;
//! Get the relative position of the constraint pivot //! Get the relative position of the constraint pivot
/*! /*!
\pre btGeneric6DofConstraint::calculateTransforms() must be called p reviously. \pre btGeneric6DofConstraint::calculateTransforms() must be called p reviously.
*/ */
btScalar getRelativePivotPosition(int axis_index) const; btScalar getRelativePivotPosition(int axis_index) const;
void setFrames(const btTransform & frameA, const btTransform & frame
B);
//! Test angular limit. //! Test angular limit.
/*! /*!
Calculates angular correction and returns true if limit needs to be corrected. Calculates angular correction and returns true if limit needs to be corrected.
\pre btGeneric6DofConstraint::calculateTransforms() must be called p reviously. \pre btGeneric6DofConstraint::calculateTransforms() must be called p reviously.
*/ */
bool testAngularLimitMotor(int axis_index); bool testAngularLimitMotor(int axis_index);
void setLinearLowerLimit(const btVector3& linearLower) void setLinearLowerLimit(const btVector3& linearLower)
{ {
m_linearLimits.m_lowerLimit = linearLower; m_linearLimits.m_lowerLimit = linearLower;
} }
void setLinearUpperLimit(const btVector3& linearUpper) void getLinearLowerLimit(btVector3& linearLower)
{ {
m_linearLimits.m_upperLimit = linearUpper; linearLower = m_linearLimits.m_lowerLimit;
} }
void setLinearUpperLimit(const btVector3& linearUpper)
{
m_linearLimits.m_upperLimit = linearUpper;
}
void getLinearUpperLimit(btVector3& linearUpper)
{
linearUpper = m_linearLimits.m_upperLimit;
}
void setAngularLowerLimit(const btVector3& angularLower) void setAngularLowerLimit(const btVector3& angularLower)
{ {
for(int i = 0; i < 3; i++) for(int i = 0; i < 3; i++)
m_angularLimits[i].m_loLimit = btNormalizeAngle(angu larLower[i]); m_angularLimits[i].m_loLimit = btNormalizeAngle(angu larLower[i]);
} }
void getAngularLowerLimit(btVector3& angularLower)
{
for(int i = 0; i < 3; i++)
angularLower[i] = m_angularLimits[i].m_loLimit;
}
void setAngularUpperLimit(const btVector3& angularUpper) void setAngularUpperLimit(const btVector3& angularUpper)
{ {
for(int i = 0; i < 3; i++) for(int i = 0; i < 3; i++)
m_angularLimits[i].m_hiLimit = btNormalizeAngle(angu larUpper[i]); m_angularLimits[i].m_hiLimit = btNormalizeAngle(angu larUpper[i]);
} }
void getAngularUpperLimit(btVector3& angularUpper)
{
for(int i = 0; i < 3; i++)
angularUpper[i] = m_angularLimits[i].m_hiLimit;
}
//! Retrieves the angular limit informacion //! Retrieves the angular limit informacion
btRotationalLimitMotor * getRotationalLimitMotor(int index) btRotationalLimitMotor * getRotationalLimitMotor(int index)
{ {
return &m_angularLimits[index]; return &m_angularLimits[index];
} }
//! Retrieves the limit informacion //! Retrieves the limit informacion
btTranslationalLimitMotor * getTranslationalLimitMotor() btTranslationalLimitMotor * getTranslationalLimitMotor()
{ {
return &m_linearLimits; return &m_linearLimits;
skipping to change at line 508 skipping to change at line 532
// access for UseFrameOffset // access for UseFrameOffset
bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; } bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstr aintFrame = frameOffsetOnOff; } void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstr aintFrame = frameOffsetOnOff; }
///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
///If no axis is provided, it uses the default axis for this constra int. ///If no axis is provided, it uses the default axis for this constra int.
virtual void setParam(int num, btScalar value, int axis = -1); virtual void setParam(int num, btScalar value, int axis = -1);
///return the local value of parameter ///return the local value of parameter
virtual btScalar getParam(int num, int axis = -1) const; virtual btScalar getParam(int num, int axis = -1) const;
void setAxis( const btVector3& axis1, const btVector3& axis2);
virtual int calculateSerializeBufferSize() const; virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur e) ///fills the dataBuffer and returns the struct name (and 0 on failur e)
virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const; virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const;
}; };
///do not change those serialization structures, it requires an updated sBu lletDNAstr/sBulletDNAstr64 ///do not change those serialization structures, it requires an updated sBu lletDNAstr/sBulletDNAstr64
struct btGeneric6DofConstraintData struct btGeneric6DofConstraintData
{ {
skipping to change at line 562 skipping to change at line 588
dof->m_linearLowerLimit.m_floats[i] = float(m_linearLimits.m _lowerLimit[i]); dof->m_linearLowerLimit.m_floats[i] = float(m_linearLimits.m _lowerLimit[i]);
dof->m_linearUpperLimit.m_floats[i] = float(m_linearLimits.m _upperLimit[i]); dof->m_linearUpperLimit.m_floats[i] = float(m_linearLimits.m _upperLimit[i]);
} }
dof->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA? 1 : 0; dof->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA? 1 : 0;
dof->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame ? 1 : 0; dof->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame ? 1 : 0;
return "btGeneric6DofConstraintData"; return "btGeneric6DofConstraintData";
} }
#endif //GENERIC_6DOF_CONSTRAINT_H #endif //BT_GENERIC_6DOF_CONSTRAINT_H
 End of changes. 7 change blocks. 
6 lines changed or deleted 33 lines changed or added


 btGeneric6DofSpringConstraint.h   btGeneric6DofSpringConstraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef GENERIC_6DOF_SPRING_CONSTRAINT_H #ifndef BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
#define GENERIC_6DOF_SPRING_CONSTRAINT_H #define BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
#include "btGeneric6DofConstraint.h" #include "btGeneric6DofConstraint.h"
/// Generic 6 DOF constraint that allows to set spring motors to any transl ational and rotational DOF /// Generic 6 DOF constraint that allows to set spring motors to any transl ational and rotational DOF
/// DOF index used in enableSpring() and setStiffness() means: /// DOF index used in enableSpring() and setStiffness() means:
/// 0 : translation X /// 0 : translation X
/// 1 : translation Y /// 1 : translation Y
skipping to change at line 49 skipping to change at line 49
btScalar m_springDamping[6]; // between 0 and 1 (1 == no damp ing) btScalar m_springDamping[6]; // between 0 and 1 (1 == no damp ing)
void internalUpdateSprings(btConstraintInfo2* info); void internalUpdateSprings(btConstraintInfo2* info);
public: public:
btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenc eFrameA); btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenc eFrameA);
void enableSpring(int index, bool onOff); void enableSpring(int index, bool onOff);
void setStiffness(int index, btScalar stiffness); void setStiffness(int index, btScalar stiffness);
void setDamping(int index, btScalar damping); void setDamping(int index, btScalar damping);
void setEquilibriumPoint(); // set the current constraint position/o rientation as an equilibrium point for all DOF void setEquilibriumPoint(); // set the current constraint position/o rientation as an equilibrium point for all DOF
void setEquilibriumPoint(int index); // set the current constraint position/orientation as an equilibrium point for given DOF void setEquilibriumPoint(int index); // set the current constraint position/orientation as an equilibrium point for given DOF
void setEquilibriumPoint(int index, btScalar val); void setEquilibriumPoint(int index, btScalar val);
virtual void setAxis( const btVector3& axis1, const btVector3& axis2
);
virtual void getInfo2 (btConstraintInfo2* info); virtual void getInfo2 (btConstraintInfo2* info);
virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur
e)
virtual const char* serialize(void* dataBuffer, btSerializer* se
rializer) const;
}; };
#endif // GENERIC_6DOF_SPRING_CONSTRAINT_H ///do not change those serialization structures, it requires an updated sBu
lletDNAstr/sBulletDNAstr64
struct btGeneric6DofSpringConstraintData
{
btGeneric6DofConstraintData m_6dofData;
int m_springEnabled[6];
float m_equilibriumPoint[6];
float m_springStiffness[6];
float m_springDamping[6];
};
SIMD_FORCE_INLINE int btGeneric6DofSpringConstraint::calculateSeri
alizeBufferSize() const
{
return sizeof(btGeneric6DofSpringConstraintData);
}
///fills the dataBuffer and returns the struct name (and 0 on failur
e)
SIMD_FORCE_INLINE const char* btGeneric6DofSpringConstraint::seria
lize(void* dataBuffer, btSerializer* serializer) const
{
btGeneric6DofSpringConstraintData* dof = (btGeneric6DofSpringConstra
intData*)dataBuffer;
btGeneric6DofConstraint::serialize(&dof->m_6dofData,serializer);
int i;
for (i=0;i<6;i++)
{
dof->m_equilibriumPoint[i] = m_equilibriumPoint[i];
dof->m_springDamping[i] = m_springDamping[i];
dof->m_springEnabled[i] = m_springEnabled[i]? 1 : 0;
dof->m_springStiffness[i] = m_springStiffness[i];
}
return "btGeneric6DofConstraintData";
}
#endif // BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
 End of changes. 4 change blocks. 
2 lines changed or deleted 13 lines changed or added


 btGjkConvexCast.h   btGjkConvexCast.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef GJK_CONVEX_CAST_H #ifndef BT_GJK_CONVEX_CAST_H
#define GJK_CONVEX_CAST_H #define BT_GJK_CONVEX_CAST_H
#include "BulletCollision/CollisionShapes/btCollisionMargin.h" #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btConvexCast.h" #include "btConvexCast.h"
class btConvexShape; class btConvexShape;
class btMinkowskiSumShape; class btMinkowskiSumShape;
#include "btSimplexSolverInterface.h" #include "btSimplexSolverInterface.h"
///GjkConvexCast performs a raycast on a convex object using support mappin g. ///GjkConvexCast performs a raycast on a convex object using support mappin g.
skipping to change at line 48 skipping to change at line 48
/// cast a convex against another convex object /// cast a convex against another convex object
virtual bool calcTimeOfImpact( virtual bool calcTimeOfImpact(
const btTransform& fromA, const btTransform& fromA,
const btTransform& toA, const btTransform& toA,
const btTransform& fromB, const btTransform& fromB,
const btTransform& toB, const btTransform& toB,
CastResult& result); CastResult& result);
}; };
#endif //GJK_CONVEX_CAST_H #endif //BT_GJK_CONVEX_CAST_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btGjkEpa2.h   btGjkEpa2.h 
skipping to change at line 25 skipping to change at line 25
product, an acknowledgment in the product documentation would be appreciate d product, an acknowledgment in the product documentation would be appreciate d
but is not required. but is not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
/* /*
GJK-EPA collision solver by Nathanael Presson, 2008 GJK-EPA collision solver by Nathanael Presson, 2008
*/ */
#ifndef _68DA1F85_90B7_4bb0_A705_83B4040A75C6_ #ifndef BT_GJK_EPA2_H
#define _68DA1F85_90B7_4bb0_A705_83B4040A75C6_ #define BT_GJK_EPA2_H
#include "BulletCollision/CollisionShapes/btConvexShape.h" #include "BulletCollision/CollisionShapes/btConvexShape.h"
///btGjkEpaSolver contributed under zlib by Nathanael Presson ///btGjkEpaSolver contributed under zlib by Nathanael Presson
struct btGjkEpaSolver2 struct btGjkEpaSolver2
{ {
struct sResults struct sResults
{ {
enum eStatus enum eStatus
{ {
Separated, /* Shapes doesnt penetrate */ Separated, /* Shapes doesnt penetrate */
skipping to change at line 73 skipping to change at line 74
sResults& re sults); sResults& re sults);
static bool SignedDistance( const btConvexShape* shape0,const bt Transform& wtrs0, static bool SignedDistance( const btConvexShape* shape0,const bt Transform& wtrs0,
const btConv exShape* shape1,const btTransform& wtrs1, const btConv exShape* shape1,const btTransform& wtrs1,
const btVect or3& guess, const btVect or3& guess,
sResults& re sults); sResults& re sults);
#endif //__SPU__ #endif //__SPU__
}; };
#endif #endif //BT_GJK_EPA2_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 btGjkPairDetector.h   btGjkPairDetector.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef GJK_PAIR_DETECTOR_H #ifndef BT_GJK_PAIR_DETECTOR_H
#define GJK_PAIR_DETECTOR_H #define BT_GJK_PAIR_DETECTOR_H
#include "btDiscreteCollisionDetectorInterface.h" #include "btDiscreteCollisionDetectorInterface.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h" #include "BulletCollision/CollisionShapes/btCollisionMargin.h"
class btConvexShape; class btConvexShape;
#include "btSimplexSolverInterface.h" #include "btSimplexSolverInterface.h"
class btConvexPenetrationDepthSolver; class btConvexPenetrationDepthSolver;
/// btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetector Interface /// btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetector Interface
class btGjkPairDetector : public btDiscreteCollisionDetectorInterface class btGjkPairDetector : public btDiscreteCollisionDetectorInterface
skipping to change at line 95 skipping to change at line 95
} }
///don't use setIgnoreMargin, it's for Bullet's internal use ///don't use setIgnoreMargin, it's for Bullet's internal use
void setIgnoreMargin(bool ignoreMargin) void setIgnoreMargin(bool ignoreMargin)
{ {
m_ignoreMargin = ignoreMargin; m_ignoreMargin = ignoreMargin;
} }
}; };
#endif //GJK_PAIR_DETECTOR_H #endif //BT_GJK_PAIR_DETECTOR_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btHashMap.h   btHashMap.h 
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2009 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 th
e 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 free
ly,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla
im that you wrote the original software. If you use this software in a prod
uct, an acknowledgment in the product documentation would be appreciated bu
t 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.
*/
#ifndef BT_HASH_MAP_H #ifndef BT_HASH_MAP_H
#define BT_HASH_MAP_H #define BT_HASH_MAP_H
#include "btAlignedObjectArray.h" #include "btAlignedObjectArray.h"
///very basic hashable string implementation, compatible with btHashMap ///very basic hashable string implementation, compatible with btHashMap
struct btHashString struct btHashString
{ {
const char* m_string; const char* m_string;
unsigned int m_hash; unsigned int m_hash;
 End of changes. 1 change blocks. 
0 lines changed or deleted 21 lines changed or added


 btHeightfieldTerrainShape.h   btHeightfieldTerrainShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef HEIGHTFIELD_TERRAIN_SHAPE_H #ifndef BT_HEIGHTFIELD_TERRAIN_SHAPE_H
#define HEIGHTFIELD_TERRAIN_SHAPE_H #define BT_HEIGHTFIELD_TERRAIN_SHAPE_H
#include "btConcaveShape.h" #include "btConcaveShape.h"
///btHeightfieldTerrainShape simulates a 2D heightfield terrain ///btHeightfieldTerrainShape simulates a 2D heightfield terrain
/** /**
The caller is responsible for maintaining the heightfield array; this The caller is responsible for maintaining the heightfield array; this
class does not make a copy. class does not make a copy.
The heightfield can be dynamic so long as the min/max height values The heightfield can be dynamic so long as the min/max height values
capture the extremes (heights must always be in that range). capture the extremes (heights must always be in that range).
skipping to change at line 157 skipping to change at line 157
virtual void setLocalScaling(const btVector3& scaling); virtual void setLocalScaling(const btVector3& scaling);
virtual const btVector3& getLocalScaling() const; virtual const btVector3& getLocalScaling() const;
//debugging //debugging
virtual const char* getName()const {return "HEIGHTFIELD";} virtual const char* getName()const {return "HEIGHTFIELD";}
}; };
#endif //HEIGHTFIELD_TERRAIN_SHAPE_H #endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btHinge2Constraint.h   btHinge2Constraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef HINGE2_CONSTRAINT_H #ifndef BT_HINGE2_CONSTRAINT_H
#define HINGE2_CONSTRAINT_H #define BT_HINGE2_CONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
#include "btGeneric6DofSpringConstraint.h" #include "btGeneric6DofSpringConstraint.h"
// Constraint similar to ODE Hinge2 Joint // Constraint similar to ODE Hinge2 Joint
// has 3 degrees of frredom: // has 3 degrees of frredom:
// 2 rotational degrees of freedom, similar to Euler rotations around Z (ax is 1) and X (axis 2) // 2 rotational degrees of freedom, similar to Euler rotations around Z (ax is 1) and X (axis 2)
// 1 translational (along axis Z) with suspension spring // 1 translational (along axis Z) with suspension spring
skipping to change at line 51 skipping to change at line 51
const btVector3& getAnchor2() { return m_calculatedTransformB.getOri gin(); } const btVector3& getAnchor2() { return m_calculatedTransformB.getOri gin(); }
const btVector3& getAxis1() { return m_axis1; } const btVector3& getAxis1() { return m_axis1; }
const btVector3& getAxis2() { return m_axis2; } const btVector3& getAxis2() { return m_axis2; }
btScalar getAngle1() { return getAngle(2); } btScalar getAngle1() { return getAngle(2); }
btScalar getAngle2() { return getAngle(0); } btScalar getAngle2() { return getAngle(0); }
// limits // limits
void setUpperLimit(btScalar ang1max) { setAngularUpperLimit(btVector 3(-1.f, 0.f, ang1max)); } void setUpperLimit(btScalar ang1max) { setAngularUpperLimit(btVector 3(-1.f, 0.f, ang1max)); }
void setLowerLimit(btScalar ang1min) { setAngularLowerLimit(btVector 3( 1.f, 0.f, ang1min)); } void setLowerLimit(btScalar ang1min) { setAngularLowerLimit(btVector 3( 1.f, 0.f, ang1min)); }
}; };
#endif // HINGE2_CONSTRAINT_H #endif // BT_HINGE2_CONSTRAINT_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btHingeConstraint.h   btHingeConstraint.h 
skipping to change at line 18 skipping to change at line 18
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
/* Hinge Constraint by Dirk Gregorius. Limits added by Marcus Hennix at Sta rbreeze Studios */ /* Hinge Constraint by Dirk Gregorius. Limits added by Marcus Hennix at Sta rbreeze Studios */
#ifndef HINGECONSTRAINT_H #ifndef BT_HINGECONSTRAINT_H
#define HINGECONSTRAINT_H #define BT_HINGECONSTRAINT_H
#define _BT_USE_CENTER_LIMIT_ 1
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btJacobianEntry.h" #include "btJacobianEntry.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
class btRigidBody; class btRigidBody;
#ifdef BT_USE_DOUBLE_PRECISION #ifdef BT_USE_DOUBLE_PRECISION
#define btHingeConstraintData btHingeConstraintDoubleData #define btHingeConstraintData btHingeConstraintDoubleData
#define btHingeConstraintDataName "btHingeConstraintDoubleData" #define btHingeConstraintDataName "btHingeConstraintDoubleData"
skipping to change at line 58 skipping to change at line 60
#endif #endif
btJacobianEntry m_jac[3]; //3 orthogonal linear constraints btJacobianEntry m_jac[3]; //3 orthogonal linear constraints
btJacobianEntry m_jacAng[3]; //2 orthogonal angular constraints+ 1 f or limit/motor btJacobianEntry m_jacAng[3]; //2 orthogonal angular constraints+ 1 f or limit/motor
btTransform m_rbAFrame; // constraint axii. Assumes z is hinge axis. btTransform m_rbAFrame; // constraint axii. Assumes z is hinge axis.
btTransform m_rbBFrame; btTransform m_rbBFrame;
btScalar m_motorTargetVelocity; btScalar m_motorTargetVelocity;
btScalar m_maxMotorImpulse; btScalar m_maxMotorImpulse;
#ifdef _BT_USE_CENTER_LIMIT_
btAngularLimit m_limit;
#else
btScalar m_lowerLimit;
btScalar m_upperLimit;
btScalar m_limitSign;
btScalar m_correction;
btScalar m_limitSoftness; btScalar m_limitSoftness;
btScalar m_biasFactor; btScalar m_biasFactor;
btScalar m_relaxationFactor; btScalar m_relaxationFactor;
btScalar m_lowerLimit; bool m_solveLimit;
btScalar m_upperLimit; #endif
btScalar m_kHinge; btScalar m_kHinge;
btScalar m_limitSign;
btScalar m_correction;
btScalar m_accLimitImpulse; btScalar m_accLimitImpulse;
btScalar m_hingeAngle; btScalar m_hingeAngle;
btScalar m_referenceSign; btScalar m_referenceSign;
bool m_angularOnly; bool m_angularOnly;
bool m_enableAngularMotor; bool m_enableAngularMotor;
bool m_solveLimit;
bool m_useSolveConstraintObsolete; bool m_useSolveConstraintObsolete;
bool m_useOffsetForConstraintFrame; bool m_useOffsetForConstraintFrame;
bool m_useReferenceFrameA; bool m_useReferenceFrameA;
btScalar m_accMotorImpulse; btScalar m_accMotorImpulse;
int m_flags; int m_flags;
btScalar m_normalCFM; btScalar m_normalCFM;
btScalar m_stopCFM; btScalar m_stopCFM;
btScalar m_stopERP; btScalar m_stopERP;
skipping to change at line 132 skipping to change at line 138
btRigidBody& getRigidBodyA() btRigidBody& getRigidBodyA()
{ {
return m_rbA; return m_rbA;
} }
btRigidBody& getRigidBodyB() btRigidBody& getRigidBodyB()
{ {
return m_rbB; return m_rbB;
} }
btTransform& getFrameOffsetA()
{
return m_rbAFrame;
}
btTransform& getFrameOffsetB()
{
return m_rbBFrame;
}
void setFrames(const btTransform& frameA, const btTransform& frameB)
;
void setAngularOnly(bool angularOnly) void setAngularOnly(bool angularOnly)
{ {
m_angularOnly = angularOnly; m_angularOnly = angularOnly;
} }
void enableAngularMotor(bool enableMotor,btScalar targetVelocity, btScalar maxMotorImpulse) void enableAngularMotor(bool enableMotor,btScalar targetVelocity, btScalar maxMotorImpulse)
{ {
m_enableAngularMotor = enableMotor; m_enableAngularMotor = enableMotor;
m_motorTargetVelocity = targetVelocity; m_motorTargetVelocity = targetVelocity;
m_maxMotorImpulse = maxMotorImpulse; m_maxMotorImpulse = maxMotorImpulse;
skipping to change at line 154 skipping to change at line 172
// extra motor API, including ability to set a target rotation (as o pposed to angular velocity) // extra motor API, including ability to set a target rotation (as o pposed to angular velocity)
// note: setMotorTarget sets angular velocity under the hood, so you must call it every tick to // note: setMotorTarget sets angular velocity under the hood, so you must call it every tick to
// maintain a given angular target. // maintain a given angular target.
void enableMotor(bool enableMotor) { m_enableAngularMotor = ena bleMotor; } void enableMotor(bool enableMotor) { m_enableAngularMotor = ena bleMotor; }
void setMaxMotorImpulse(btScalar maxMotorImpulse) { m_maxMotorImpuls e = maxMotorImpulse; } void setMaxMotorImpulse(btScalar maxMotorImpulse) { m_maxMotorImpuls e = maxMotorImpulse; }
void setMotorTarget(const btQuaternion& qAinB, btScalar dt); // qAin B is rotation of body A wrt body B. void setMotorTarget(const btQuaternion& qAinB, btScalar dt); // qAin B is rotation of body A wrt body B.
void setMotorTarget(btScalar targetAngle, btScalar dt); void setMotorTarget(btScalar targetAngle, btScalar dt);
void setLimit(btScalar low,btScalar high,btScalar _softness = 0.9 f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) void setLimit(btScalar low,btScalar high,btScalar _softness = 0.9 f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f)
{ {
#ifdef _BT_USE_CENTER_LIMIT_
m_limit.set(low, high, _softness, _biasFactor, _relaxationFa
ctor);
#else
m_lowerLimit = btNormalizeAngle(low); m_lowerLimit = btNormalizeAngle(low);
m_upperLimit = btNormalizeAngle(high); m_upperLimit = btNormalizeAngle(high);
m_limitSoftness = _softness; m_limitSoftness = _softness;
m_biasFactor = _biasFactor; m_biasFactor = _biasFactor;
m_relaxationFactor = _relaxationFactor; m_relaxationFactor = _relaxationFactor;
#endif
} }
void setAxis(btVector3& axisInA) void setAxis(btVector3& axisInA)
{ {
btVector3 rbAxisA1, rbAxisA2; btVector3 rbAxisA1, rbAxisA2;
btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2); btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2);
btVector3 pivotInA = m_rbAFrame.getOrigin(); btVector3 pivotInA = m_rbAFrame.getOrigin();
// m_rbAFrame.getOrigin() = pivotInA; // m_rbAFrame.getOrigin() = pivotInA;
m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.get X(),axisInA.getX(), m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.get X(),axisInA.getX(),
rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(), rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() ); rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
btVector3 axisInB = m_rbA.getCenterOfMassTransform().getBasi s() * axisInA; btVector3 axisInB = m_rbA.getCenterOfMassTransform().getBasi s() * axisInA;
btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB); btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1); btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1);
btVector3 rbAxisB2 = axisInB.cross(rbAxisB1); btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(pi m_rbBFrame.getOrigin() = m_rbB.getCenterOfMassTransform().in
votInA); verse()(m_rbA.getCenterOfMassTransform()(pivotInA));
m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.get X(),axisInB.getX(), m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.get X(),axisInB.getX(),
rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(), rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() ); rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
m_rbBFrame.getBasis() = m_rbB.getCenterOfMassTransform().get
Basis().inverse() * m_rbBFrame.getBasis();
} }
btScalar getLowerLimit() const btScalar getLowerLimit() const
{ {
return m_lowerLimit; #ifdef _BT_USE_CENTER_LIMIT_
return m_limit.getLow();
#else
return m_lowerLimit;
#endif
} }
btScalar getUpperLimit() const btScalar getUpperLimit() const
{ {
return m_upperLimit; #ifdef _BT_USE_CENTER_LIMIT_
return m_limit.getHigh();
#else
return m_upperLimit;
#endif
} }
btScalar getHingeAngle(); btScalar getHingeAngle();
btScalar getHingeAngle(const btTransform& transA,const btTransform& transB); btScalar getHingeAngle(const btTransform& transA,const btTransform& transB);
void testLimit(const btTransform& transA,const btTransform& transB); void testLimit(const btTransform& transA,const btTransform& transB);
const btTransform& getAFrame() const { return m_rbAFrame; }; const btTransform& getAFrame() const { return m_rbAFrame; };
const btTransform& getBFrame() const { return m_rbBFrame; }; const btTransform& getBFrame() const { return m_rbBFrame; };
btTransform& getAFrame() { return m_rbAFrame; }; btTransform& getAFrame() { return m_rbAFrame; };
btTransform& getBFrame() { return m_rbBFrame; }; btTransform& getBFrame() { return m_rbBFrame; };
inline int getSolveLimit() inline int getSolveLimit()
{ {
return m_solveLimit; #ifdef _BT_USE_CENTER_LIMIT_
return m_limit.isLimit();
#else
return m_solveLimit;
#endif
} }
inline btScalar getLimitSign() inline btScalar getLimitSign()
{ {
#ifdef _BT_USE_CENTER_LIMIT_
return m_limit.getSign();
#else
return m_limitSign; return m_limitSign;
#endif
} }
inline bool getAngularOnly() inline bool getAngularOnly()
{ {
return m_angularOnly; return m_angularOnly;
} }
inline bool getEnableAngularMotor() inline bool getEnableAngularMotor()
{ {
return m_enableAngularMotor; return m_enableAngularMotor;
} }
skipping to change at line 309 skipping to change at line 348
btTypedConstraint::serialize(&hingeData->m_typeConstraintData,serial izer); btTypedConstraint::serialize(&hingeData->m_typeConstraintData,serial izer);
m_rbAFrame.serialize(hingeData->m_rbAFrame); m_rbAFrame.serialize(hingeData->m_rbAFrame);
m_rbBFrame.serialize(hingeData->m_rbBFrame); m_rbBFrame.serialize(hingeData->m_rbBFrame);
hingeData->m_angularOnly = m_angularOnly; hingeData->m_angularOnly = m_angularOnly;
hingeData->m_enableAngularMotor = m_enableAngularMotor; hingeData->m_enableAngularMotor = m_enableAngularMotor;
hingeData->m_maxMotorImpulse = float(m_maxMotorImpulse); hingeData->m_maxMotorImpulse = float(m_maxMotorImpulse);
hingeData->m_motorTargetVelocity = float(m_motorTargetVelocity); hingeData->m_motorTargetVelocity = float(m_motorTargetVelocity);
hingeData->m_useReferenceFrameA = m_useReferenceFrameA; hingeData->m_useReferenceFrameA = m_useReferenceFrameA;
#ifdef _BT_USE_CENTER_LIMIT_
hingeData->m_lowerLimit = float(m_limit.getLow());
hingeData->m_upperLimit = float(m_limit.getHigh());
hingeData->m_limitSoftness = float(m_limit.getSoftness());
hingeData->m_biasFactor = float(m_limit.getBiasFactor());
hingeData->m_relaxationFactor = float(m_limit.getRelaxationFactor())
;
#else
hingeData->m_lowerLimit = float(m_lowerLimit); hingeData->m_lowerLimit = float(m_lowerLimit);
hingeData->m_upperLimit = float(m_upperLimit); hingeData->m_upperLimit = float(m_upperLimit);
hingeData->m_limitSoftness = float(m_limitSoftness); hingeData->m_limitSoftness = float(m_limitSoftness);
hingeData->m_biasFactor = float(m_biasFactor); hingeData->m_biasFactor = float(m_biasFactor);
hingeData->m_relaxationFactor = float(m_relaxationFactor); hingeData->m_relaxationFactor = float(m_relaxationFactor);
#endif
return btHingeConstraintDataName; return btHingeConstraintDataName;
} }
#endif //HINGECONSTRAINT_H #endif //BT_HINGECONSTRAINT_H
 End of changes. 21 change blocks. 
18 lines changed or deleted 68 lines changed or added


 btIDebugDraw.h   btIDebugDraw.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef IDEBUG_DRAW__H #ifndef BT_IDEBUG_DRAW__H
#define IDEBUG_DRAW__H #define BT_IDEBUG_DRAW__H
#include "btVector3.h" #include "btVector3.h"
#include "btTransform.h" #include "btTransform.h"
///The btIDebugDraw interface class allows hooking up a debug renderer to v isually debug simulations. ///The btIDebugDraw interface class allows hooking up a debug renderer to v isually debug simulations.
///Typical use case: create a debug drawer object, and assign it to a btCol lisionWorld or btDynamicsWorld using setDebugDrawer and call debugDrawWorld . ///Typical use case: create a debug drawer object, and assign it to a btCol lisionWorld or btDynamicsWorld using setDebugDrawer and call debugDrawWorld .
///A class that implements the btIDebugDraw interface has to implement the drawLine method at a minimum. ///A class that implements the btIDebugDraw interface has to implement the drawLine method at a minimum.
///For color arguments the X,Y,Z components refer to Red, Green and Blue ea ch in the range [0..1] ///For color arguments the X,Y,Z components refer to Red, Green and Blue ea ch in the range [0..1]
class btIDebugDraw class btIDebugDraw
{ {
skipping to change at line 310 skipping to change at line 310
drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), tr ans * btVector3(bbMin[0], bbMin[1], bbMin[2]), color); drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), tr ans * btVector3(bbMin[0], bbMin[1], bbMin[2]), color);
drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), tr ans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color); drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), tr ans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), tr ans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color); drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), tr ans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), tr ans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color); drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), tr ans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), tr ans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color); drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), tr ans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), tr ans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color); drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), tr ans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), tr ans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color); drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), tr ans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), tr ans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color); drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), tr ans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), tr ans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color); drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), tr ans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
} }
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int u
pAxis, const btTransform& transform, const btVector3& color)
{
btVector3 capStart(0.f,0.f,0.f);
capStart[upAxis] = -halfHeight;
btVector3 capEnd(0.f,0.f,0.f);
capEnd[upAxis] = halfHeight;
// Draw the ends
{
btTransform childTransform = transform;
childTransform.getOrigin() = transform * capStart;
drawSphere(radius, childTransform, color);
}
{
btTransform childTransform = transform;
childTransform.getOrigin() = transform * capEnd;
drawSphere(radius, childTransform, color);
}
// Draw some additional lines
btVector3 start = transform.getOrigin();
capStart[(upAxis+1)%3] = radius;
capEnd[(upAxis+1)%3] = radius;
drawLine(start+transform.getBasis() * capStart,start+transfo
rm.getBasis() * capEnd, color);
capStart[(upAxis+1)%3] = -radius;
capEnd[(upAxis+1)%3] = -radius;
drawLine(start+transform.getBasis() * capStart,start+transfo
rm.getBasis() * capEnd, color);
capStart[(upAxis+1)%3] = 0.f;
capEnd[(upAxis+1)%3] = 0.f;
capStart[(upAxis+2)%3] = radius;
capEnd[(upAxis+2)%3] = radius;
drawLine(start+transform.getBasis() * capStart,start+transfo
rm.getBasis() * capEnd, color);
capStart[(upAxis+2)%3] = -radius;
capEnd[(upAxis+2)%3] = -radius;
drawLine(start+transform.getBasis() * capStart,start+transfo
rm.getBasis() * capEnd, color);
}
virtual void drawCylinder(btScalar radius, btScalar halfHeight, int
upAxis, const btTransform& transform, const btVector3& color)
{
btVector3 start = transform.getOrigin();
btVector3 offsetHeight(0,0,0);
offsetHeight[upAxis] = halfHeight;
btVector3 offsetRadius(0,0,0);
offsetRadius[(upAxis+1)%3] = radius;
drawLine(start+transform.getBasis() * (offsetHeight+offsetRa
dius),start+transform.getBasis() * (-offsetHeight+offsetRadius),color);
drawLine(start+transform.getBasis() * (offsetHeight-offsetRa
dius),start+transform.getBasis() * (-offsetHeight-offsetRadius),color);
// Drawing top and bottom caps of the cylinder
btVector3 yaxis(0,0,0);
yaxis[upAxis] = btScalar(1.0);
btVector3 xaxis(0,0,0);
xaxis[(upAxis+1)%3] = btScalar(1.0);
drawArc(start-transform.getBasis()*(offsetHeight),transform.
getBasis()*yaxis,transform.getBasis()*xaxis,radius,radius,0,SIMD_2_PI,color
,false,btScalar(10.0));
drawArc(start+transform.getBasis()*(offsetHeight),transform.
getBasis()*yaxis,transform.getBasis()*xaxis,radius,radius,0,SIMD_2_PI,color
,false,btScalar(10.0));
}
virtual void drawCone(btScalar radius, btScalar height, int upAxis,
const btTransform& transform, const btVector3& color)
{
btVector3 start = transform.getOrigin();
btVector3 offsetHeight(0,0,0);
offsetHeight[upAxis] = height * btScalar(0.5);
btVector3 offsetRadius(0,0,0);
offsetRadius[(upAxis+1)%3] = radius;
btVector3 offset2Radius(0,0,0);
offset2Radius[(upAxis+2)%3] = radius;
drawLine(start+transform.getBasis() * (offsetHeight),start+t
ransform.getBasis() * (-offsetHeight+offsetRadius),color);
drawLine(start+transform.getBasis() * (offsetHeight),start+t
ransform.getBasis() * (-offsetHeight-offsetRadius),color);
drawLine(start+transform.getBasis() * (offsetHeight),start+t
ransform.getBasis() * (-offsetHeight+offset2Radius),color);
drawLine(start+transform.getBasis() * (offsetHeight),start+t
ransform.getBasis() * (-offsetHeight-offset2Radius),color);
// Drawing the base of the cone
btVector3 yaxis(0,0,0);
yaxis[upAxis] = btScalar(1.0);
btVector3 xaxis(0,0,0);
xaxis[(upAxis+1)%3] = btScalar(1.0);
drawArc(start-transform.getBasis()*(offsetHeight),transform.
getBasis()*yaxis,transform.getBasis()*xaxis,radius,radius,0,SIMD_2_PI,color
,false,10.0);
}
virtual void drawPlane(const btVector3& planeNormal, btScalar planeC
onst, const btTransform& transform, const btVector3& color)
{
btVector3 planeOrigin = planeNormal * planeConst;
btVector3 vec0,vec1;
btPlaneSpace1(planeNormal,vec0,vec1);
btScalar vecLen = 100.f;
btVector3 pt0 = planeOrigin + vec0*vecLen;
btVector3 pt1 = planeOrigin - vec0*vecLen;
btVector3 pt2 = planeOrigin + vec1*vecLen;
btVector3 pt3 = planeOrigin - vec1*vecLen;
drawLine(transform*pt0,transform*pt1,color);
drawLine(transform*pt2,transform*pt3,color);
}
}; };
#endif //IDEBUG_DRAW__H #endif //BT_IDEBUG_DRAW__H
 End of changes. 3 change blocks. 
2 lines changed or deleted 123 lines changed or added


 btJacobianEntry.h   btJacobianEntry.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef JACOBIAN_ENTRY_H #ifndef BT_JACOBIAN_ENTRY_H
#define JACOBIAN_ENTRY_H #define BT_JACOBIAN_ENTRY_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "BulletDynamics/Dynamics/btRigidBody.h" #include "BulletDynamics/Dynamics/btRigidBody.h"
//notes: //notes:
// Another memory optimization would be to store m_1MinvJt in the remaining 3 w components // Another memory optimization would be to store m_1MinvJt in the remaining 3 w components
// which makes the btJacobianEntry memory layout 16 bytes // which makes the btJacobianEntry memory layout 16 bytes
// if you only are interested in angular part, just feed massInvA and massI nvB zero // if you only are interested in angular part, just feed massInvA and massI nvB zero
/// Jacobian entry is an abstraction that allows to describe constraints /// Jacobian entry is an abstraction that allows to describe constraints
skipping to change at line 153 skipping to change at line 153
btVector3 m_linearJointAxis; btVector3 m_linearJointAxis;
btVector3 m_aJ; btVector3 m_aJ;
btVector3 m_bJ; btVector3 m_bJ;
btVector3 m_0MinvJt; btVector3 m_0MinvJt;
btVector3 m_1MinvJt; btVector3 m_1MinvJt;
//Optimization: can be stored in the w/last component of one of the vectors //Optimization: can be stored in the w/last component of one of the vectors
btScalar m_Adiag; btScalar m_Adiag;
}; };
#endif //JACOBIAN_ENTRY_H #endif //BT_JACOBIAN_ENTRY_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btKinematicCharacterController.h   btKinematicCharacterController.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef KINEMATIC_CHARACTER_CONTROLLER_H #ifndef BT_KINEMATIC_CHARACTER_CONTROLLER_H
#define KINEMATIC_CHARACTER_CONTROLLER_H #define BT_KINEMATIC_CHARACTER_CONTROLLER_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btCharacterControllerInterface.h" #include "btCharacterControllerInterface.h"
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
class btCollisionShape; class btCollisionShape;
class btRigidBody; class btRigidBody;
class btCollisionWorld; class btCollisionWorld;
skipping to change at line 159 skipping to change at line 159
btPairCachingGhostObject* getGhostObject(); btPairCachingGhostObject* getGhostObject();
void setUseGhostSweepTest(bool useGhostObjectSweepTest) void setUseGhostSweepTest(bool useGhostObjectSweepTest)
{ {
m_useGhostObjectSweepTest = useGhostObjectSweepTest; m_useGhostObjectSweepTest = useGhostObjectSweepTest;
} }
bool onGround () const; bool onGround () const;
}; };
#endif // KINEMATIC_CHARACTER_CONTROLLER_H #endif // BT_KINEMATIC_CHARACTER_CONTROLLER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btList.h   btList.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef GEN_LIST_H #ifndef BT_GEN_LIST_H
#define GEN_LIST_H #define BT_GEN_LIST_H
class btGEN_Link { class btGEN_Link {
public: public:
btGEN_Link() : m_next(0), m_prev(0) {} btGEN_Link() : m_next(0), m_prev(0) {}
btGEN_Link(btGEN_Link *next, btGEN_Link *prev) : m_next(next), m_prev(p rev) {} btGEN_Link(btGEN_Link *next, btGEN_Link *prev) : m_next(next), m_prev(p rev) {}
btGEN_Link *getNext() const { return m_next; } btGEN_Link *getNext() const { return m_next; }
btGEN_Link *getPrev() const { return m_prev; } btGEN_Link *getPrev() const { return m_prev; }
bool isHead() const { return m_prev == 0; } bool isHead() const { return m_prev == 0; }
skipping to change at line 68 skipping to change at line 68
btGEN_Link *getTail() const { return m_tail.getPrev(); } btGEN_Link *getTail() const { return m_tail.getPrev(); }
void addHead(btGEN_Link *link) { link->insertAfter(&m_head); } void addHead(btGEN_Link *link) { link->insertAfter(&m_head); }
void addTail(btGEN_Link *link) { link->insertBefore(&m_tail); } void addTail(btGEN_Link *link) { link->insertBefore(&m_tail); }
private: private:
btGEN_Link m_head; btGEN_Link m_head;
btGEN_Link m_tail; btGEN_Link m_tail;
}; };
#endif #endif //BT_GEN_LIST_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btManifoldPoint.h   btManifoldPoint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef MANIFOLD_CONTACT_POINT_H #ifndef BT_MANIFOLD_CONTACT_POINT_H
#define MANIFOLD_CONTACT_POINT_H #define BT_MANIFOLD_CONTACT_POINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransformUtil.h" #include "LinearMath/btTransformUtil.h"
// Don't change following order of parameters #ifdef PFX_USE_FREE_VECTORMATH
ATTRIBUTE_ALIGNED16(struct) PfxConstraintRow { #include "physics_effects/base_level/solver/pfx_constraint_row.h"
btScalar mNormal[3]; typedef sce::PhysicsEffects::PfxConstraintRow btConstraintRow;
btScalar mRhs; #else
btScalar mJacDiagInv; // Don't change following order of parameters
btScalar mLowerLimit; ATTRIBUTE_ALIGNED16(struct) btConstraintRow {
btScalar mUpperLimit; btScalar m_normal[3];
btScalar mAccumImpulse; btScalar m_rhs;
}; btScalar m_jacDiagInv;
btScalar m_lowerLimit;
btScalar m_upperLimit;
btScalar m_accumImpulse;
};
typedef btConstraintRow PfxConstraintRow;
#endif //PFX_USE_FREE_VECTORMATH
/// ManifoldContactPoint collects and maintains persistent contactpoints. /// ManifoldContactPoint collects and maintains persistent contactpoints.
/// used to improve stability and performance of rigidbody dynamics respons e. /// used to improve stability and performance of rigidbody dynamics respons e.
class btManifoldPoint class btManifoldPoint
{ {
public: public:
btManifoldPoint() btManifoldPoint()
:m_userPersistentData(0), :m_userPersistentData(0),
m_appliedImpulse(0.f), m_appliedImpulse(0.f),
m_lateralFrictionInitialized(false), m_lateralFrictionInitialized(false),
skipping to change at line 71 skipping to change at line 77
m_appliedImpulse(0.f), m_appliedImpulse(0.f),
m_lateralFrictionInitialized(false), m_lateralFrictionInitialized(false),
m_appliedImpulseLateral1(0.f), m_appliedImpulseLateral1(0.f),
m_appliedImpulseLateral2(0.f), m_appliedImpulseLateral2(0.f),
m_contactMotion1(0.f), m_contactMotion1(0.f),
m_contactMotion2(0.f), m_contactMotion2(0.f),
m_contactCFM1(0.f), m_contactCFM1(0.f),
m_contactCFM2(0.f), m_contactCFM2(0.f),
m_lifeTime(0) m_lifeTime(0)
{ {
mConstraintRow[0].mAccumImpulse = 0.f; mConstraintRow[0].m_accumImpulse = 0.f;
mConstraintRow[1].mAccumImpulse = 0.f; mConstraintRow[1].m_accumImpulse = 0.f;
mConstraintRow[2].mAccumImpulse = 0.f; mConstraintRow[2].m_accumImpulse = 0.f;
} }
btVector3 m_localPointA; btVector3 m_localPointA;
btVector3 m_localPointB; btVector3 m_localPointB;
btVector3 m_positionWorldOnB; btVector3 m_positionWorldOnB;
///m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity ///m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity
btVector3 m_positionWorldOnA; btVector3 m_positionWorldOnA;
btVector3 m_normalWorldOnB; btVector3 m_normalWorldOnB;
btScalar m_distance1; btScalar m_distance1;
skipping to change at line 109 skipping to change at line 115
btScalar m_contactMotion1; btScalar m_contactMotion1;
btScalar m_contactMotion2; btScalar m_contactMotion2;
btScalar m_contactCFM1; btScalar m_contactCFM1;
btScalar m_contactCFM2; btScalar m_contactCFM2;
int m_lifeTime;//lifetim e of the contactpoint in frames int m_lifeTime;//lifetim e of the contactpoint in frames
btVector3 m_lateralFrictionDir1; btVector3 m_lateralFrictionDir1;
btVector3 m_lateralFrictionDir2; btVector3 m_lateralFrictionDir2;
PfxConstraintRow mConstraintRow[3]; btConstraintRow mConstraintRow[3];
btScalar getDistance() const btScalar getDistance() const
{ {
return m_distance1; return m_distance1;
} }
int getLifeTime() const int getLifeTime() const
{ {
return m_lifeTime; return m_lifeTime;
} }
skipping to change at line 143 skipping to change at line 149
} }
///this returns the most recent applied impulse, to satisfy contact constraints by the constraint solver ///this returns the most recent applied impulse, to satisfy contact constraints by the constraint solver
btScalar getAppliedImpulse() const btScalar getAppliedImpulse() const
{ {
return m_appliedImpulse; return m_appliedImpulse;
} }
}; };
#endif //MANIFOLD_CONTACT_POINT_H #endif //BT_MANIFOLD_CONTACT_POINT_H
 End of changes. 5 change blocks. 
15 lines changed or deleted 21 lines changed or added


 btManifoldResult.h   btManifoldResult.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef MANIFOLD_RESULT_H #ifndef BT_MANIFOLD_RESULT_H
#define MANIFOLD_RESULT_H #define BT_MANIFOLD_RESULT_H
class btCollisionObject; class btCollisionObject;
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
class btManifoldPoint; class btManifoldPoint;
#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorI nterface.h" #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorI nterface.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btColl isionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj 1,int partId1,int index1); typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btColl isionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj 1,int partId1,int index1);
skipping to change at line 124 skipping to change at line 124
return m_body0; return m_body0;
} }
const btCollisionObject* getBody1Internal() const const btCollisionObject* getBody1Internal() const
{ {
return m_body1; return m_body1;
} }
}; };
#endif //MANIFOLD_RESULT_H #endif //BT_MANIFOLD_RESULT_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btMaterial.h   btMaterial.h 
skipping to change at line 18 skipping to change at line 18
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
/// This file was created by Alex Silverman /// This file was created by Alex Silverman
#ifndef MATERIAL_H #ifndef BT_MATERIAL_H
#define MATERIAL_H #define BT_MATERIAL_H
// Material class to be used by btMultimaterialTriangleMeshShape to store t riangle properties // Material class to be used by btMultimaterialTriangleMeshShape to store t riangle properties
class btMaterial class btMaterial
{ {
// public members so that materials can change due to world events // public members so that materials can change due to world events
public: public:
btScalar m_friction; btScalar m_friction;
btScalar m_restitution; btScalar m_restitution;
int pad[2]; int pad[2];
btMaterial(){} btMaterial(){}
btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitu tion = rest; } btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitu tion = rest; }
}; };
#endif // MATERIAL_H #endif // BT_MATERIAL_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btMatrix3x3.h   btMatrix3x3.h 
skipping to change at line 110 skipping to change at line 110
{ {
btFullAssert(0 <= i && i < 3); btFullAssert(0 <= i && i < 3);
return m_el[i]; return m_el[i];
} }
/** @brief Multiply by the target matrix on the right /** @brief Multiply by the target matrix on the right
* @param m Rotation matrix to be applied * @param m Rotation matrix to be applied
* Equivilant to this = this * m */ * Equivilant to this = this * m */
btMatrix3x3& operator*=(const btMatrix3x3& m); btMatrix3x3& operator*=(const btMatrix3x3& m);
/** @brief Set from a carray of btScalars /** @brief Adds by the target matrix on the right
* @param m A pointer to the beginning of an array of 9 btScalars */ * @param m matrix to be applied
* Equivilant to this = this + m */
btMatrix3x3& operator+=(const btMatrix3x3& m);
/** @brief Substractss by the target matrix on the right
* @param m matrix to be applied
* Equivilant to this = this - m */
btMatrix3x3& operator-=(const btMatrix3x3& m);
/** @brief Set from the rotational part of a 4x4 OpenGL matrix
* @param m A pointer to the beginning of the array of scalars*/
void setFromOpenGLSubMatrix(const btScalar *m) void setFromOpenGLSubMatrix(const btScalar *m)
{ {
m_el[0].setValue(m[0],m[4],m[8]); m_el[0].setValue(m[0],m[4],m[8]);
m_el[1].setValue(m[1],m[5],m[9]); m_el[1].setValue(m[1],m[5],m[9]);
m_el[2].setValue(m[2],m[6],m[10]); m_el[2].setValue(m[2],m[6],m[10]);
} }
/** @brief Set the values of the matrix explicitly (row major) /** @brief Set the values of the matrix explicitly (row major)
* @param xx Top left * @param xx Top left
* @param xy Top Middle * @param xy Top Middle
skipping to change at line 207 skipping to change at line 217
} }
static const btMatrix3x3& getIdentity() static const btMatrix3x3& getIdentity()
{ {
static const btMatrix3x3 identityMatrix(btScalar(1.0), btSca lar(0.0), btScalar(0.0), static const btMatrix3x3 identityMatrix(btScalar(1.0), btSca lar(0.0), btScalar(0.0),
btScalar(0.0), btScalar(1.0), btScalar(0.0), btScalar(0.0), btScalar(1.0), btScalar(0.0),
btScalar(0.0), btScalar(0.0), btScalar(1.0)); btScalar(0.0), btScalar(0.0), btScalar(1.0));
return identityMatrix; return identityMatrix;
} }
/**@brief Fill the values of the matrix into a 9 element array /**@brief Fill the rotational part of an OpenGL matrix and clear the shear/perspective
* @param m The array to be filled */ * @param m The array to be filled */
void getOpenGLSubMatrix(btScalar *m) const void getOpenGLSubMatrix(btScalar *m) const
{ {
m[0] = btScalar(m_el[0].x()); m[0] = btScalar(m_el[0].x());
m[1] = btScalar(m_el[1].x()); m[1] = btScalar(m_el[1].x());
m[2] = btScalar(m_el[2].x()); m[2] = btScalar(m_el[2].x());
m[3] = btScalar(0.0); m[3] = btScalar(0.0);
m[4] = btScalar(m_el[0].y()); m[4] = btScalar(m_el[0].y());
m[5] = btScalar(m_el[1].y()); m[5] = btScalar(m_el[1].y());
m[6] = btScalar(m_el[2].y()); m[6] = btScalar(m_el[2].y());
skipping to change at line 516 skipping to change at line 526
SIMD_FORCE_INLINE btMatrix3x3& SIMD_FORCE_INLINE btMatrix3x3&
btMatrix3x3::operator*=(const btMatrix3x3& m) btMatrix3x3::operator*=(const btMatrix3x3& m)
{ {
setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]), setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]),
m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]), m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]),
m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2])); m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2]));
return *this; return *this;
} }
SIMD_FORCE_INLINE btMatrix3x3&
btMatrix3x3::operator+=(const btMatrix3x3& m)
{
setValue(
m_el[0][0]+m.m_el[0][0],
m_el[0][1]+m.m_el[0][1],
m_el[0][2]+m.m_el[0][2],
m_el[1][0]+m.m_el[1][0],
m_el[1][1]+m.m_el[1][1],
m_el[1][2]+m.m_el[1][2],
m_el[2][0]+m.m_el[2][0],
m_el[2][1]+m.m_el[2][1],
m_el[2][2]+m.m_el[2][2]);
return *this;
}
SIMD_FORCE_INLINE btMatrix3x3
operator*(const btMatrix3x3& m, const btScalar & k)
{
return btMatrix3x3(
m[0].x()*k,m[0].y()*k,m[0].z()*k,
m[1].x()*k,m[1].y()*k,m[1].z()*k,
m[2].x()*k,m[2].y()*k,m[2].z()*k);
}
SIMD_FORCE_INLINE btMatrix3x3
operator+(const btMatrix3x3& m1, const btMatrix3x3& m2)
{
return btMatrix3x3(
m1[0][0]+m2[0][0],
m1[0][1]+m2[0][1],
m1[0][2]+m2[0][2],
m1[1][0]+m2[1][0],
m1[1][1]+m2[1][1],
m1[1][2]+m2[1][2],
m1[2][0]+m2[2][0],
m1[2][1]+m2[2][1],
m1[2][2]+m2[2][2]);
}
SIMD_FORCE_INLINE btMatrix3x3
operator-(const btMatrix3x3& m1, const btMatrix3x3& m2)
{
return btMatrix3x3(
m1[0][0]-m2[0][0],
m1[0][1]-m2[0][1],
m1[0][2]-m2[0][2],
m1[1][0]-m2[1][0],
m1[1][1]-m2[1][1],
m1[1][2]-m2[1][2],
m1[2][0]-m2[2][0],
m1[2][1]-m2[2][1],
m1[2][2]-m2[2][2]);
}
SIMD_FORCE_INLINE btMatrix3x3&
btMatrix3x3::operator-=(const btMatrix3x3& m)
{
setValue(
m_el[0][0]-m.m_el[0][0],
m_el[0][1]-m.m_el[0][1],
m_el[0][2]-m.m_el[0][2],
m_el[1][0]-m.m_el[1][0],
m_el[1][1]-m.m_el[1][1],
m_el[1][2]-m.m_el[1][2],
m_el[2][0]-m.m_el[2][0],
m_el[2][1]-m.m_el[2][1],
m_el[2][2]-m.m_el[2][2]);
return *this;
}
SIMD_FORCE_INLINE btScalar SIMD_FORCE_INLINE btScalar
btMatrix3x3::determinant() const btMatrix3x3::determinant() const
{ {
return btTriple((*this)[0], (*this)[1], (*this)[2]); return btTriple((*this)[0], (*this)[1], (*this)[2]);
} }
SIMD_FORCE_INLINE btMatrix3x3 SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::absolute() const btMatrix3x3::absolute() const
{ {
return btMatrix3x3( return btMatrix3x3(
 End of changes. 3 change blocks. 
3 lines changed or deleted 84 lines changed or added


 btMinMax.h   btMinMax.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef GEN_MINMAX_H #ifndef BT_GEN_MINMAX_H
#define GEN_MINMAX_H #define BT_GEN_MINMAX_H
#include "LinearMath/btScalar.h" #include "LinearMath/btScalar.h"
template <class T> template <class T>
SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b)
{ {
return a < b ? a : b ; return a < b ? a : b ;
} }
template <class T> template <class T>
skipping to change at line 69 skipping to change at line 69
if (a < lb) if (a < lb)
{ {
a = lb; a = lb;
} }
else if (ub < a) else if (ub < a)
{ {
a = ub; a = ub;
} }
} }
#endif #endif //BT_GEN_MINMAX_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btMinkowskiPenetrationDepthSolver.h   btMinkowskiPenetrationDepthSolver.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef MINKOWSKI_PENETRATION_DEPTH_SOLVER_H #ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
#define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H #define BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
#include "btConvexPenetrationDepthSolver.h" #include "btConvexPenetrationDepthSolver.h"
///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. ///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation.
///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. ///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points.
class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSo lver class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSo lver
{ {
protected: protected:
static btVector3* getPenetrationDirections(); static btVector3* getPenetrationDirections();
skipping to change at line 39 skipping to change at line 39
public: public:
virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
const btConvexShape* convexA,const btConvexShape* convexB, const btConvexShape* convexA,const btConvexShape* convexB,
const btTransform& transA,const btTransform& transB, const btTransform& transA,const btTransform& transB,
btVector3& v, btVector3& pa, btVector3& pb, btVector3& v, btVector3& pa, btVector3& pb,
class btIDebugDraw* debugDraw,btStackAlloc* stackAll oc class btIDebugDraw* debugDraw,btStackAlloc* stackAll oc
); );
}; };
#endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H #endif //BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btMinkowskiSumShape.h   btMinkowskiSumShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef MINKOWSKI_SUM_SHAPE_H #ifndef BT_MINKOWSKI_SUM_SHAPE_H
#define MINKOWSKI_SUM_SHAPE_H #define BT_MINKOWSKI_SUM_SHAPE_H
#include "btConvexInternalShape.h" #include "btConvexInternalShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
/// The btMinkowskiSumShape is only for advanced users. This shape represen ts implicit based minkowski sum of two convex implicit shapes. /// The btMinkowskiSumShape is only for advanced users. This shape represen ts implicit based minkowski sum of two convex implicit shapes.
class btMinkowskiSumShape : public btConvexInternalShape class btMinkowskiSumShape : public btConvexInternalShape
{ {
btTransform m_transA; btTransform m_transA;
btTransform m_transB; btTransform m_transB;
skipping to change at line 58 skipping to change at line 58
const btConvexShape* getShapeA() const { return m_shapeA;} const btConvexShape* getShapeA() const { return m_shapeA;}
const btConvexShape* getShapeB() const { return m_shapeB;} const btConvexShape* getShapeB() const { return m_shapeB;}
virtual const char* getName()const virtual const char* getName()const
{ {
return "MinkowskiSum"; return "MinkowskiSum";
} }
}; };
#endif //MINKOWSKI_SUM_SHAPE_H #endif //BT_MINKOWSKI_SUM_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btMultiSphereShape.h   btMultiSphereShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef MULTI_SPHERE_MINKOWSKI_H #ifndef BT_MULTI_SPHERE_MINKOWSKI_H
#define MULTI_SPHERE_MINKOWSKI_H #define BT_MULTI_SPHERE_MINKOWSKI_H
#include "btConvexInternalShape.h" #include "btConvexInternalShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "LinearMath/btAabbUtil2.h" #include "LinearMath/btAabbUtil2.h"
///The btMultiSphereShape represents the convex hull of a collection of sph eres. You can create special capsules or other smooth volumes. ///The btMultiSphereShape represents the convex hull of a collection of sph eres. You can create special capsules or other smooth volumes.
///It is possible to animate the spheres for deformation, but call 'recalcL ocalAabb' after changing any sphere position/radius ///It is possible to animate the spheres for deformation, but call 'recalcL ocalAabb' after changing any sphere position/radius
class btMultiSphereShape : public btConvexInternalAabbCachingShape class btMultiSphereShape : public btConvexInternalAabbCachingShape
{ {
skipping to change at line 90 skipping to change at line 90
btPositionAndRadius *m_localPositionArrayPtr; btPositionAndRadius *m_localPositionArrayPtr;
int m_localPositionArraySize; int m_localPositionArraySize;
char m_padding[4]; char m_padding[4];
}; };
SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBuffer Size() const SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBuffer Size() const
{ {
return sizeof(btMultiSphereShapeData); return sizeof(btMultiSphereShapeData);
} }
#endif //MULTI_SPHERE_MINKOWSKI_H #endif //BT_MULTI_SPHERE_MINKOWSKI_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btMultimaterialTriangleMeshShape.h   btMultimaterialTriangleMeshShape.h 
skipping to change at line 18 skipping to change at line 18
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
/// This file was created by Alex Silverman /// This file was created by Alex Silverman
#ifndef BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H #ifndef BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
#define BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H #define BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
#include "btBvhTriangleMeshShape.h" #include "btBvhTriangleMeshShape.h"
#include "btMaterial.h" #include "btMaterial.h"
///The BvhTriangleMaterialMeshShape extends the btBvhTriangleMeshShape. Its main contribution is the interface into a material array, which allows per -triangle friction and restitution. ///The BvhTriangleMaterialMeshShape extends the btBvhTriangleMeshShape. Its main contribution is the interface into a material array, which allows per -triangle friction and restitution.
ATTRIBUTE_ALIGNED16(class) btMultimaterialTriangleMeshShape : public btBvhT riangleMeshShape ATTRIBUTE_ALIGNED16(class) btMultimaterialTriangleMeshShape : public btBvhT riangleMeshShape
{ {
btAlignedObjectArray <btMaterial*> m_materialList; btAlignedObjectArray <btMaterial*> m_materialList;
int ** m_triangleMaterials; int ** m_triangleMaterials;
public: public:
BT_DECLARE_ALIGNED_ALLOCATOR(); BT_DECLARE_ALIGNED_ALLOCATOR();
btMultimaterialTriangleMeshShape(): btBvhTriangleMeshShape() {m_shapeTy pe = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;}
btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface , bool useQuantizedAabbCompression, bool buildBvh = true): btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface , bool useQuantizedAabbCompression, bool buildBvh = true):
btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh) btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh)
{ {
m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE; m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;
const unsigned char *vertexbase; const unsigned char *vertexbase;
int numverts; int numverts;
PHY_ScalarType type; PHY_ScalarType type;
int stride; int stride;
const unsigned char *indexbase; const unsigned char *indexbase;
skipping to change at line 121 skipping to change at line 120
} }
//debugging //debugging
virtual const char* getName()const {return "MULTIMATERIALTRIANGL EMESH";} virtual const char* getName()const {return "MULTIMATERIALTRIANGL EMESH";}
///Obtains the material for a specific triangle ///Obtains the material for a specific triangle
const btMaterial * getMaterialProperties(int partID, int triIndex); const btMaterial * getMaterialProperties(int partID, int triIndex);
} }
; ;
#endif //BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H #endif //BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 btOptimizedBvh.h   btOptimizedBvh.h 
skipping to change at line 18 skipping to change at line 18
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
///Contains contributions from Disney Studio's ///Contains contributions from Disney Studio's
#ifndef OPTIMIZED_BVH_H #ifndef BT_OPTIMIZED_BVH_H
#define OPTIMIZED_BVH_H #define BT_OPTIMIZED_BVH_H
#include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h" #include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
class btStridingMeshInterface; class btStridingMeshInterface;
///The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for tr iangle meshes, through the btStridingMeshInterface. ///The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for tr iangle meshes, through the btStridingMeshInterface.
ATTRIBUTE_ALIGNED16(class) btOptimizedBvh : public btQuantizedBvh ATTRIBUTE_ALIGNED16(class) btOptimizedBvh : public btQuantizedBvh
{ {
public: public:
skipping to change at line 60 skipping to change at line 60
{ {
return btQuantizedBvh::serialize(o_alignedDataBuffer,i_dataB ufferSize,i_swapEndian); return btQuantizedBvh::serialize(o_alignedDataBuffer,i_dataB ufferSize,i_swapEndian);
} }
///deSerializeInPlace loads and initializes a BVH from a buffer in m emory 'in place' ///deSerializeInPlace loads and initializes a BVH from a buffer in m emory 'in place'
static btOptimizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian); static btOptimizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian);
}; };
#endif //OPTIMIZED_BVH_H #endif //BT_OPTIMIZED_BVH_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btOverlappingPairCache.h   btOverlappingPairCache.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OVERLAPPING_PAIR_CACHE_H #ifndef BT_OVERLAPPING_PAIR_CACHE_H
#define OVERLAPPING_PAIR_CACHE_H #define BT_OVERLAPPING_PAIR_CACHE_H
#include "btBroadphaseInterface.h" #include "btBroadphaseInterface.h"
#include "btBroadphaseProxy.h" #include "btBroadphaseProxy.h"
#include "btOverlappingPairCallback.h" #include "btOverlappingPairCallback.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
class btDispatcher; class btDispatcher;
typedef btAlignedObjectArray<btBroadphasePair> btBroadphasePairArray; typedef btAlignedObjectArray<btBroadphasePair> btBroadphasePairArray;
skipping to change at line 432 skipping to change at line 432
{ {
} }
virtual void sortOverlappingPairs(btDispatcher* dispatcher) virtual void sortOverlappingPairs(btDispatcher* dispatcher)
{ {
(void) dispatcher; (void) dispatcher;
} }
}; };
#endif //OVERLAPPING_PAIR_CACHE_H #endif //BT_OVERLAPPING_PAIR_CACHE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btPersistentManifold.h   btPersistentManifold.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef PERSISTENT_MANIFOLD_H #ifndef BT_PERSISTENT_MANIFOLD_H
#define PERSISTENT_MANIFOLD_H #define BT_PERSISTENT_MANIFOLD_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "btManifoldPoint.h" #include "btManifoldPoint.h"
#include "LinearMath/btAlignedAllocator.h" #include "LinearMath/btAlignedAllocator.h"
struct btCollisionResult; struct btCollisionResult;
///maximum contact breaking and merging threshold ///maximum contact breaking and merging threshold
extern btScalar gContactBreakingThreshold; extern btScalar gContactBreakingThreshold;
typedef bool (*ContactDestroyedCallback)(void* userPersistentData); typedef bool (*ContactDestroyedCallback)(void* userPersistentData);
typedef bool (*ContactProcessedCallback)(btManifoldPoint& cp,void* body0,vo id* body1); typedef bool (*ContactProcessedCallback)(btManifoldPoint& cp,void* body0,vo id* body1);
extern ContactDestroyedCallback gContactDestroyedCallback; extern ContactDestroyedCallback gContactDestroyedCallback;
extern ContactProcessedCallback gContactProcessedCallback; extern ContactProcessedCallback gContactProcessedCallback;
//the enum starts at 1024 to avoid type conflicts with btTypedConstraint
enum btContactManifoldTypes enum btContactManifoldTypes
{ {
BT_PERSISTENT_MANIFOLD_TYPE = 1, MIN_CONTACT_MANIFOLD_TYPE = 1024,
MAX_CONTACT_MANIFOLD_TYPE BT_PERSISTENT_MANIFOLD_TYPE
}; };
#define MANIFOLD_CACHE_SIZE 4 #define MANIFOLD_CACHE_SIZE 4
///btPersistentManifold is a contact point cache, it stays persistent as lo ng as objects are overlapping in the broadphase. ///btPersistentManifold is a contact point cache, it stays persistent as lo ng as objects are overlapping in the broadphase.
///Those contact points are created by the collision narrow phase. ///Those contact points are created by the collision narrow phase.
///The cache can be empty, or hold 1,2,3 or 4 points. Some collision algori thms (GJK) might only add one point at a time. ///The cache can be empty, or hold 1,2,3 or 4 points. Some collision algori thms (GJK) might only add one point at a time.
///updates/refreshes old contact points, and throw them away if necessary ( distance becomes too large) ///updates/refreshes old contact points, and throw them away if necessary ( distance becomes too large)
///reduces the cache to 4 points, when more then 4 points are added, using following rules: ///reduces the cache to 4 points, when more then 4 points are added, using following rules:
///the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points ///the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points
skipping to change at line 145 skipping to change at line 146
{ {
clearUserCache(m_pointCache[index]); clearUserCache(m_pointCache[index]);
int lastUsedIndex = getNumContacts() - 1; int lastUsedIndex = getNumContacts() - 1;
// m_pointCache[index] = m_pointCache[lastUsedIndex]; // m_pointCache[index] = m_pointCache[lastUsedIndex];
if(index != lastUsedIndex) if(index != lastUsedIndex)
{ {
m_pointCache[index] = m_pointCache[lastUsedIndex]; m_pointCache[index] = m_pointCache[lastUsedIndex];
//get rid of duplicated userPersistentData pointer //get rid of duplicated userPersistentData pointer
m_pointCache[lastUsedIndex].m_userPersistentData = 0 ; m_pointCache[lastUsedIndex].m_userPersistentData = 0 ;
m_pointCache[lastUsedIndex].mConstraintRow[0].mAccum m_pointCache[lastUsedIndex].mConstraintRow[0].m_accu
Impulse = 0.f; mImpulse = 0.f;
m_pointCache[lastUsedIndex].mConstraintRow[1].mAccum m_pointCache[lastUsedIndex].mConstraintRow[1].m_accu
Impulse = 0.f; mImpulse = 0.f;
m_pointCache[lastUsedIndex].mConstraintRow[2].mAccum m_pointCache[lastUsedIndex].mConstraintRow[2].m_accu
Impulse = 0.f; mImpulse = 0.f;
m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f; m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f;
m_pointCache[lastUsedIndex].m_lateralFrictionInitial ized = false; m_pointCache[lastUsedIndex].m_lateralFrictionInitial ized = false;
m_pointCache[lastUsedIndex].m_appliedImpulseLateral1 = 0.f; m_pointCache[lastUsedIndex].m_appliedImpulseLateral1 = 0.f;
m_pointCache[lastUsedIndex].m_appliedImpulseLateral2 = 0.f; m_pointCache[lastUsedIndex].m_appliedImpulseLateral2 = 0.f;
m_pointCache[lastUsedIndex].m_lifeTime = 0; m_pointCache[lastUsedIndex].m_lifeTime = 0;
} }
btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0 ); btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0 );
m_cachedPoints--; m_cachedPoints--;
} }
void replaceContactPoint(const btManifoldPoint& newPoint,int insertI ndex) void replaceContactPoint(const btManifoldPoint& newPoint,int insertI ndex)
{ {
btAssert(validContactDistance(newPoint)); btAssert(validContactDistance(newPoint));
#define MAINTAIN_PERSISTENCY 1 #define MAINTAIN_PERSISTENCY 1
#ifdef MAINTAIN_PERSISTENCY #ifdef MAINTAIN_PERSISTENCY
int lifeTime = m_pointCache[insertIndex].getLifeTime(); int lifeTime = m_pointCache[insertIndex].getLifeTime();
btScalar appliedImpulse = m_pointCache[insertIndex].m btScalar appliedImpulse = m_pointCache[insertIndex].m
ConstraintRow[0].mAccumImpulse; ConstraintRow[0].m_accumImpulse;
btScalar appliedLateralImpulse1 = m_pointCache[insert btScalar appliedLateralImpulse1 = m_pointCache[insert
Index].mConstraintRow[1].mAccumImpulse; Index].mConstraintRow[1].m_accumImpulse;
btScalar appliedLateralImpulse2 = m_pointCache[insert btScalar appliedLateralImpulse2 = m_pointCache[insert
Index].mConstraintRow[2].mAccumImpulse; Index].mConstraintRow[2].m_accumImpulse;
// bool isLateralFrictionInitialized = m_pointCache[insertIndex ].m_lateralFrictionInitialized; // bool isLateralFrictionInitialized = m_pointCache[insertIndex ].m_lateralFrictionInitialized;
btAssert(lifeTime>=0); btAssert(lifeTime>=0);
void* cache = m_pointCache[insertIndex].m_userPersistentData ; void* cache = m_pointCache[insertIndex].m_userPersistentData ;
m_pointCache[insertIndex] = newPoint; m_pointCache[insertIndex] = newPoint;
m_pointCache[insertIndex].m_userPersistentData = cache; m_pointCache[insertIndex].m_userPersistentData = cache;
m_pointCache[insertIndex].m_appliedImpulse = appliedImpulse; m_pointCache[insertIndex].m_appliedImpulse = appliedImpulse;
m_pointCache[insertIndex].m_appliedImpulseLateral1 = applied LateralImpulse1; m_pointCache[insertIndex].m_appliedImpulseLateral1 = applied LateralImpulse1;
m_pointCache[insertIndex].m_appliedImpulseLateral2 = applied LateralImpulse2; m_pointCache[insertIndex].m_appliedImpulseLateral2 = applied LateralImpulse2;
m_pointCache[insertIndex].mConstraintRow[0].mAccumImpulse = m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse =
appliedImpulse; appliedImpulse;
m_pointCache[insertIndex].mConstraintRow[1].mAccumImpulse = m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse =
appliedLateralImpulse1; appliedLateralImpulse1;
m_pointCache[insertIndex].mConstraintRow[2].mAccumImpulse = m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse =
appliedLateralImpulse2; appliedLateralImpulse2;
m_pointCache[insertIndex].m_lifeTime = lifeTime; m_pointCache[insertIndex].m_lifeTime = lifeTime;
#else #else
clearUserCache(m_pointCache[insertIndex]); clearUserCache(m_pointCache[insertIndex]);
m_pointCache[insertIndex] = newPoint; m_pointCache[insertIndex] = newPoint;
#endif #endif
} }
bool validContactDistance(const btManifoldPoint& pt) const bool validContactDistance(const btManifoldPoint& pt) const
{ {
return pt.m_distance1 <= getContactBreakingThreshold(); if (pt.m_lifeTime >1)
{
return pt.m_distance1 <= getContactBreakingThreshold
();
}
return pt.m_distance1 <= getContactProcessingThreshold();
} }
/// calculated new worldspace coordinates and depth, and reject poin ts that exceed the collision margin /// calculated new worldspace coordinates and depth, and reject poin ts that exceed the collision margin
void refreshContactPoints( const btTransform& trA,const btTransf orm& trB); void refreshContactPoints( const btTransform& trA,const btTransf orm& trB);
SIMD_FORCE_INLINE void clearManifold() SIMD_FORCE_INLINE void clearManifold()
{ {
int i; int i;
for (i=0;i<m_cachedPoints;i++) for (i=0;i<m_cachedPoints;i++)
{ {
clearUserCache(m_pointCache[i]); clearUserCache(m_pointCache[i]);
} }
m_cachedPoints = 0; m_cachedPoints = 0;
} }
} }
; ;
#endif //PERSISTENT_MANIFOLD_H #endif //BT_PERSISTENT_MANIFOLD_H
 End of changes. 8 change blocks. 
23 lines changed or deleted 30 lines changed or added


 btPoint2PointConstraint.h   btPoint2PointConstraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef POINT2POINTCONSTRAINT_H #ifndef BT_POINT2POINTCONSTRAINT_H
#define POINT2POINTCONSTRAINT_H #define BT_POINT2POINTCONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btJacobianEntry.h" #include "btJacobianEntry.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
class btRigidBody; class btRigidBody;
#ifdef BT_USE_DOUBLE_PRECISION #ifdef BT_USE_DOUBLE_PRECISION
#define btPoint2PointConstraintData btPoint2PointConstraintDoubleData #define btPoint2PointConstraintData btPoint2PointConstraintDoubleData
#define btPoint2PointConstraintDataName "btPoint2PointConstraintDoub leData" #define btPoint2PointConstraintDataName "btPoint2PointConstraintDoub leData"
skipping to change at line 157 skipping to change at line 157
{ {
btPoint2PointConstraintData* p2pData = (btPoint2PointConstraintData* )dataBuffer; btPoint2PointConstraintData* p2pData = (btPoint2PointConstraintData* )dataBuffer;
btTypedConstraint::serialize(&p2pData->m_typeConstraintData,serializ er); btTypedConstraint::serialize(&p2pData->m_typeConstraintData,serializ er);
m_pivotInA.serialize(p2pData->m_pivotInA); m_pivotInA.serialize(p2pData->m_pivotInA);
m_pivotInB.serialize(p2pData->m_pivotInB); m_pivotInB.serialize(p2pData->m_pivotInB);
return btPoint2PointConstraintDataName; return btPoint2PointConstraintDataName;
} }
#endif //POINT2POINTCONSTRAINT_H #endif //BT_POINT2POINTCONSTRAINT_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btPointCollector.h   btPointCollector.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef POINT_COLLECTOR_H #ifndef BT_POINT_COLLECTOR_H
#define POINT_COLLECTOR_H #define BT_POINT_COLLECTOR_H
#include "btDiscreteCollisionDetectorInterface.h" #include "btDiscreteCollisionDetectorInterface.h"
struct btPointCollector : public btDiscreteCollisionDetectorInterface::Resu lt struct btPointCollector : public btDiscreteCollisionDetectorInterface::Resu lt
{ {
btVector3 m_normalOnBInWorld; btVector3 m_normalOnBInWorld;
btVector3 m_pointInWorld; btVector3 m_pointInWorld;
btScalar m_distance;//negative means penetration btScalar m_distance;//negative means penetration
skipping to change at line 60 skipping to change at line 60
{ {
m_hasResult = true; m_hasResult = true;
m_normalOnBInWorld = normalOnBInWorld; m_normalOnBInWorld = normalOnBInWorld;
m_pointInWorld = pointInWorld; m_pointInWorld = pointInWorld;
//negative means penetration //negative means penetration
m_distance = depth; m_distance = depth;
} }
} }
}; };
#endif //POINT_COLLECTOR_H #endif //BT_POINT_COLLECTOR_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btPolyhedralConvexShape.h   btPolyhedralConvexShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BU_SHAPE #ifndef BT_POLYHEDRAL_CONVEX_SHAPE_H
#define BU_SHAPE #define BT_POLYHEDRAL_CONVEX_SHAPE_H
#include "LinearMath/btMatrix3x3.h" #include "LinearMath/btMatrix3x3.h"
#include "btConvexInternalShape.h" #include "btConvexInternalShape.h"
class btConvexPolyhedron;
///The btPolyhedralConvexShape is an internal interface class for polyhedra l convex shapes. ///The btPolyhedralConvexShape is an internal interface class for polyhedra l convex shapes.
class btPolyhedralConvexShape : public btConvexInternalShape class btPolyhedralConvexShape : public btConvexInternalShape
{ {
protected: protected:
btConvexPolyhedron* m_polyhedron;
public: public:
btPolyhedralConvexShape(); btPolyhedralConvexShape();
virtual ~btPolyhedralConvexShape();
///optional method mainly used to generate multiple contact points b
y clipping polyhedral features (faces/edges)
virtual bool initializePolyhedralFeatures();
const btConvexPolyhedron* getConvexPolyhedron() const
{
return m_polyhedron;
}
//brute force implementations //brute force implementations
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(co nst btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(co nst btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
virtual void calculateLocalInertia(btScalar mass,btVector3& inert ia) const; virtual void calculateLocalInertia(btScalar mass,btVector3& inert ia) const;
virtual int getNumVertices() const = 0 ; virtual int getNumVertices() const = 0 ;
virtual int getNumEdges() const = 0; virtual int getNumEdges() const = 0;
virtual void getEdge(int i,btVector3& pa,btVector3& pb) const = 0; virtual void getEdge(int i,btVector3& pa,btVector3& pb) const = 0;
skipping to change at line 95 skipping to change at line 108
} }
virtual void setLocalScaling(const btVector3& scaling); virtual void setLocalScaling(const btVector3& scaling);
virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVecto r3& aabbMax) const; virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVecto r3& aabbMax) const;
void recalcLocalAabb(); void recalcLocalAabb();
}; };
#endif //BU_SHAPE #endif //BT_POLYHEDRAL_CONVEX_SHAPE_H
 End of changes. 5 change blocks. 
2 lines changed or deleted 16 lines changed or added


 btPoolAllocator.h   btPoolAllocator.h 
skipping to change at line 64 skipping to change at line 64
int getFreeCount() const int getFreeCount() const
{ {
return m_freeCount; return m_freeCount;
} }
int getUsedCount() const int getUsedCount() const
{ {
return m_maxElements - m_freeCount; return m_maxElements - m_freeCount;
} }
int getMaxCount() const
{
return m_maxElements;
}
void* allocate(int size) void* allocate(int size)
{ {
// release mode fix // release mode fix
(void)size; (void)size;
btAssert(!size || size<=m_elemSize); btAssert(!size || size<=m_elemSize);
btAssert(m_freeCount>0); btAssert(m_freeCount>0);
void* result = m_firstFree; void* result = m_firstFree;
m_firstFree = *(void**)m_firstFree; m_firstFree = *(void**)m_firstFree;
--m_freeCount; --m_freeCount;
return result; return result;
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 btQuadWord.h   btQuadWord.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMD_QUADWORD_H #ifndef BT_SIMD_QUADWORD_H
#define SIMD_QUADWORD_H #define BT_SIMD_QUADWORD_H
#include "btScalar.h" #include "btScalar.h"
#include "btMinMax.h" #include "btMinMax.h"
#if defined (__CELLOS_LV2) && defined (__SPU__) #if defined (__CELLOS_LV2) && defined (__SPU__)
#include <altivec.h> #include <altivec.h>
#endif #endif
/**@brief The btQuadWord class is base class for btVector3 and btQuaternion . /**@brief The btQuadWord class is base class for btVector3 and btQuaternion .
* Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. * Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword.
skipping to change at line 175 skipping to change at line 175
SIMD_FORCE_INLINE void setMin(const btQuadWord& other) SIMD_FORCE_INLINE void setMin(const btQuadWord& other)
{ {
btSetMin(m_floats[0], other.m_floats[0]); btSetMin(m_floats[0], other.m_floats[0]);
btSetMin(m_floats[1], other.m_floats[1]); btSetMin(m_floats[1], other.m_floats[1]);
btSetMin(m_floats[2], other.m_floats[2]); btSetMin(m_floats[2], other.m_floats[2]);
btSetMin(m_floats[3], other.m_floats[3]); btSetMin(m_floats[3], other.m_floats[3]);
} }
}; };
#endif //SIMD_QUADWORD_H #endif //BT_SIMD_QUADWORD_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btQuantization.h   btQuantization.h 
#ifndef BT_QUANTIZATION_H_INCLUDED #ifndef BT_GIMPACT_QUANTIZATION_H_INCLUDED
#define BT_QUANTIZATION_H_INCLUDED #define BT_GIMPACT_QUANTIZATION_H_INCLUDED
/*! \file btQuantization.h /*! \file btQuantization.h
*\author Francisco Leon Najera *\author Francisco Leon Najera
*/ */
/* /*
This source file is part of GIMPACT Library. This source file is part of GIMPACT Library.
For the latest info, see http://gimpact.sourceforge.net/ For the latest info, see http://gimpact.sourceforge.net/
skipping to change at line 78 skipping to change at line 78
{ {
btVector3 vecOut; btVector3 vecOut;
vecOut.setValue( vecOut.setValue(
(btScalar)(vecIn[0]) / (bvhQuantization.getX()), (btScalar)(vecIn[0]) / (bvhQuantization.getX()),
(btScalar)(vecIn[1]) / (bvhQuantization.getY()), (btScalar)(vecIn[1]) / (bvhQuantization.getY()),
(btScalar)(vecIn[2]) / (bvhQuantization.getZ())); (btScalar)(vecIn[2]) / (bvhQuantization.getZ()));
vecOut += offset; vecOut += offset;
return vecOut; return vecOut;
} }
#endif // GIM_VECTOR_H_INCLUDED #endif // BT_GIMPACT_QUANTIZATION_H_INCLUDED
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btQuantizedBvh.h   btQuantizedBvh.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef QUANTIZED_BVH_H #ifndef BT_QUANTIZED_BVH_H
#define QUANTIZED_BVH_H #define BT_QUANTIZED_BVH_H
class btSerializer; class btSerializer;
//#define DEBUG_CHECK_DEQUANTIZATION 1 //#define DEBUG_CHECK_DEQUANTIZATION 1
#ifdef DEBUG_CHECK_DEQUANTIZATION #ifdef DEBUG_CHECK_DEQUANTIZATION
#ifdef __SPU__ #ifdef __SPU__
#define printf spu_printf #define printf spu_printf
#endif //__SPU__ #endif //__SPU__
#include <stdio.h> #include <stdio.h>
skipping to change at line 544 skipping to change at line 544
int m_traversalM ode; int m_traversalM ode;
int m_numSubtree Headers; int m_numSubtree Headers;
btBvhSubtreeInfoData *m_subTreeInfoPtr; btBvhSubtreeInfoData *m_subTreeInfoPtr;
}; };
SIMD_FORCE_INLINE int btQuantizedBvh::calculateSerializeBufferSize New() const SIMD_FORCE_INLINE int btQuantizedBvh::calculateSerializeBufferSize New() const
{ {
return sizeof(btQuantizedBvhData); return sizeof(btQuantizedBvhData);
} }
#endif //QUANTIZED_BVH_H #endif //BT_QUANTIZED_BVH_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btQuaternion.h   btQuaternion.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMD__QUATERNION_H_ #ifndef BT_SIMD__QUATERNION_H_
#define SIMD__QUATERNION_H_ #define BT_SIMD__QUATERNION_H_
#include "btVector3.h" #include "btVector3.h"
#include "btQuadWord.h" #include "btQuadWord.h"
/**@brief The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. */ /**@brief The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. */
class btQuaternion : public btQuadWord { class btQuaternion : public btQuadWord {
public: public:
/**@brief No initialization constructor */ /**@brief No initialization constructor */
btQuaternion() {} btQuaternion() {}
skipping to change at line 419 skipping to change at line 419
} }
SIMD_FORCE_INLINE btQuaternion SIMD_FORCE_INLINE btQuaternion
shortestArcQuatNormalize2(btVector3& v0,btVector3& v1) shortestArcQuatNormalize2(btVector3& v0,btVector3& v1)
{ {
v0.normalize(); v0.normalize();
v1.normalize(); v1.normalize();
return shortestArcQuat(v0,v1); return shortestArcQuat(v0,v1);
} }
#endif #endif //BT_SIMD__QUATERNION_H_
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btQuickprof.h   btQuickprof.h 
skipping to change at line 13 skipping to change at line 13
** **
** Real-Time Hierarchical Profiling for Game Programming Gems 3 ** Real-Time Hierarchical Profiling for Game Programming Gems 3
** **
** by Greg Hjelstrom & Byon Garrabrant ** by Greg Hjelstrom & Byon Garrabrant
** **
*************************************************************************** ************************/ *************************************************************************** ************************/
// Credits: The Clock class was inspired by the Timer classes in // Credits: The Clock class was inspired by the Timer classes in
// Ogre (www.ogre3d.org). // Ogre (www.ogre3d.org).
#ifndef QUICK_PROF_H #ifndef BT_QUICK_PROF_H
#define QUICK_PROF_H #define BT_QUICK_PROF_H
//To disable built-in profiling, please comment out next line //To disable built-in profiling, please comment out next line
//#define BT_NO_PROFILE 1 //#define BT_NO_PROFILE 1
#ifndef BT_NO_PROFILE #ifndef BT_NO_PROFILE
#include <stdio.h>//@todo remove this, backwards compatibility #include <stdio.h>//@todo remove this, backwards compatibility
#include "btScalar.h" #include "btScalar.h"
#include "btAlignedAllocator.h" #include "btAlignedAllocator.h"
#include <new> #include <new>
#define USE_BT_CLOCK 1 #define USE_BT_CLOCK 1
skipping to change at line 180 skipping to change at line 180
}; };
#define BT_PROFILE( name ) CProfileSample __pro file( name ) #define BT_PROFILE( name ) CProfileSample __pro file( name )
#else #else
#define BT_PROFILE( name ) #define BT_PROFILE( name )
#endif //#ifndef BT_NO_PROFILE #endif //#ifndef BT_NO_PROFILE
#endif //QUICK_PROF_H #endif //BT_QUICK_PROF_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btRandom.h   btRandom.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef GEN_RANDOM_H #ifndef BT_GEN_RANDOM_H
#define GEN_RANDOM_H #define BT_GEN_RANDOM_H
#ifdef MT19937 #ifdef MT19937
#include <limits.h> #include <limits.h>
#include <mt19937.h> #include <mt19937.h>
#define GEN_RAND_MAX UINT_MAX #define GEN_RAND_MAX UINT_MAX
SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand( seed); } SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand( seed); }
SIMD_FORCE_INLINE unsigned int GEN_rand() { return genran d_int32(); } SIMD_FORCE_INLINE unsigned int GEN_rand() { return genran d_int32(); }
skipping to change at line 39 skipping to change at line 39
#include <stdlib.h> #include <stdlib.h>
#define GEN_RAND_MAX RAND_MAX #define GEN_RAND_MAX RAND_MAX
SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); } SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); }
SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand() ; } SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand() ; }
#endif #endif
#endif #endif //BT_GEN_RANDOM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btRaycastCallback.h   btRaycastCallback.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef RAYCAST_TRI_CALLBACK_H #ifndef BT_RAYCAST_TRI_CALLBACK_H
#define RAYCAST_TRI_CALLBACK_H #define BT_RAYCAST_TRI_CALLBACK_H
#include "BulletCollision/CollisionShapes/btTriangleCallback.h" #include "BulletCollision/CollisionShapes/btTriangleCallback.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
struct btBroadphaseProxy; struct btBroadphaseProxy;
class btConvexShape; class btConvexShape;
class btTriangleRaycastCallback: public btTriangleCallback class btTriangleRaycastCallback: public btTriangleCallback
{ {
public: public:
skipping to change at line 61 skipping to change at line 61
}; };
class btTriangleConvexcastCallback : public btTriangleCallback class btTriangleConvexcastCallback : public btTriangleCallback
{ {
public: public:
const btConvexShape* m_convexShape; const btConvexShape* m_convexShape;
btTransform m_convexShapeFrom; btTransform m_convexShapeFrom;
btTransform m_convexShapeTo; btTransform m_convexShapeTo;
btTransform m_triangleToWorld; btTransform m_triangleToWorld;
btScalar m_hitFraction; btScalar m_hitFraction;
btScalar m_triangleCollisionMargin; btScalar m_triangleCollisionMargin;
btScalar m_allowedPenetration;
btTriangleConvexcastCallback (const btConvexShape* convexShape, cons t btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btT ransform& triangleToWorld, const btScalar triangleCollisionMargin); btTriangleConvexcastCallback (const btConvexShape* convexShape, cons t btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btT ransform& triangleToWorld, const btScalar triangleCollisionMargin);
virtual void processTriangle (btVector3* triangle, int partId, int t riangleIndex); virtual void processTriangle (btVector3* triangle, int partId, int t riangleIndex);
virtual btScalar reportHit (const btVector3& hitNormalLocal, const b tVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleInde x) = 0; virtual btScalar reportHit (const btVector3& hitNormalLocal, const b tVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleInde x) = 0;
}; };
#endif //RAYCAST_TRI_CALLBACK_H #endif //BT_RAYCAST_TRI_CALLBACK_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 4 lines changed or added


 btRaycastVehicle.h   btRaycastVehicle.h 
/* /*
* Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
* *
* Permission to use, copy, modify, distribute and sell this software * Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee, * and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies. * provided that the above copyright notice appear in all copies.
* Erwin Coumans makes no representations about the suitability * Erwin Coumans makes no representations about the suitability
* of this software for any purpose. * of this software for any purpose.
* It is provided "as is" without express or implied warranty. * It is provided "as is" without express or implied warranty.
*/ */
#ifndef RAYCASTVEHICLE_H #ifndef BT_RAYCASTVEHICLE_H
#define RAYCASTVEHICLE_H #define BT_RAYCASTVEHICLE_H
#include "BulletDynamics/Dynamics/btRigidBody.h" #include "BulletDynamics/Dynamics/btRigidBody.h"
#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" #include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
#include "btVehicleRaycaster.h" #include "btVehicleRaycaster.h"
class btDynamicsWorld; class btDynamicsWorld;
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "btWheelInfo.h" #include "btWheelInfo.h"
#include "BulletDynamics/Dynamics/btActionInterface.h" #include "BulletDynamics/Dynamics/btActionInterface.h"
class btVehicleTuning; class btVehicleTuning;
skipping to change at line 111 skipping to change at line 111
btScalar getSteeringValue(int wheel) const; btScalar getSteeringValue(int wheel) const;
void setSteeringValue(btScalar steering,int wheel); void setSteeringValue(btScalar steering,int wheel);
void applyEngineForce(btScalar force, int wheel); void applyEngineForce(btScalar force, int wheel);
const btTransform& getWheelTransformWS( int wheelIndex ) const; const btTransform& getWheelTransformWS( int wheelIndex ) const;
void updateWheelTransform( int wheelIndex, bool interpolatedTrans form = true ); void updateWheelTransform( int wheelIndex, bool interpolatedTrans form = true );
void setRaycastWheelInfo( int wheelIndex , bool isInContact, cons t btVector3& hitPoint, const btVector3& hitNormal,btScalar depth); // void setRaycastWheelInfo( int wheelIndex , bool isInContact, cons t btVector3& hitPoint, const btVector3& hitNormal,btScalar depth);
btWheelInfo& addWheel( const btVector3& connectionPointCS0, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS,btScalar suspens ionRestLength,btScalar wheelRadius,const btVehicleTuning& tuning, bool isFr ontWheel); btWheelInfo& addWheel( const btVector3& connectionPointCS0, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS,btScalar suspens ionRestLength,btScalar wheelRadius,const btVehicleTuning& tuning, bool isFr ontWheel);
inline int getNumWheels() const { inline int getNumWheels() const {
return int (m_wheelInfo.size()); return int (m_wheelInfo.size());
} }
btAlignedObjectArray<btWheelInfo> m_wheelInfo; btAlignedObjectArray<btWheelInfo> m_wheelInfo;
const btWheelInfo& getWheelInfo(int index) const; const btWheelInfo& getWheelInfo(int index) const;
skipping to change at line 224 skipping to change at line 224
public: public:
btDefaultVehicleRaycaster(btDynamicsWorld* world) btDefaultVehicleRaycaster(btDynamicsWorld* world)
:m_dynamicsWorld(world) :m_dynamicsWorld(world)
{ {
} }
virtual void* castRay(const btVector3& from,const btVector3& to, btV ehicleRaycasterResult& result); virtual void* castRay(const btVector3& from,const btVector3& to, btV ehicleRaycasterResult& result);
}; };
#endif //RAYCASTVEHICLE_H #endif //BT_RAYCASTVEHICLE_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 btRigidBody.h   btRigidBody.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef RIGIDBODY_H #ifndef BT_RIGIDBODY_H
#define RIGIDBODY_H #define BT_RIGIDBODY_H
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h"
class btCollisionShape; class btCollisionShape;
class btMotionState; class btMotionState;
class btTypedConstraint; class btTypedConstraint;
skipping to change at line 265 skipping to change at line 265
void integrateVelocities(btScalar step); void integrateVelocities(btScalar step);
void setCenterOfMassTransform(const btTransform& xform); void setCenterOfMassTransform(const btTransform& xform);
void applyCentralForce(const btVector3& force) void applyCentralForce(const btVector3& force)
{ {
m_totalForce += force*m_linearFactor; m_totalForce += force*m_linearFactor;
} }
const btVector3& getTotalForce() const btVector3& getTotalForce() const
{ {
return m_totalForce; return m_totalForce;
}; };
const btVector3& getTotalTorque() const btVector3& getTotalTorque() const
{ {
return m_totalTorque; return m_totalTorque;
}; };
const btVector3& getInvInertiaDiagLocal() const const btVector3& getInvInertiaDiagLocal() const
{ {
return m_invInertiaLocal; return m_invInertiaLocal;
}; };
void setInvInertiaDiagLocal(const btVector3& diagInvInertia) void setInvInertiaDiagLocal(const btVector3& diagInvInertia)
skipping to change at line 491 skipping to change at line 491
virtual bool checkCollideWithOverride(btCollisionObject* co); virtual bool checkCollideWithOverride(btCollisionObject* co);
void addConstraintRef(btTypedConstraint* c); void addConstraintRef(btTypedConstraint* c);
void removeConstraintRef(btTypedConstraint* c); void removeConstraintRef(btTypedConstraint* c);
btTypedConstraint* getConstraintRef(int index) btTypedConstraint* getConstraintRef(int index)
{ {
return m_constraintRefs[index]; return m_constraintRefs[index];
} }
int getNumConstraintRefs() int getNumConstraintRefs() const
{ {
return m_constraintRefs.size(); return m_constraintRefs.size();
} }
void setFlags(int flags) void setFlags(int flags)
{ {
m_rigidbodyFlags = flags; m_rigidbodyFlags = flags;
} }
int getFlags() const int getFlags() const
skipping to change at line 667 skipping to change at line 667
double m_additionalDampingFactor; double m_additionalDampingFactor;
double m_additionalLinearDampingThr esholdSqr; double m_additionalLinearDampingThr esholdSqr;
double m_additionalAngularDampingTh resholdSqr; double m_additionalAngularDampingTh resholdSqr;
double m_additionalAngularDampingFa ctor; double m_additionalAngularDampingFa ctor;
double m_linearSleepingThreshold; double m_linearSleepingThreshold;
double m_angularSleepingThreshold; double m_angularSleepingThreshold;
int m_additionalDamping; int m_additionalDamping;
char m_padding[4]; char m_padding[4];
}; };
#endif #endif //BT_RIGIDBODY_H
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 btScalar.h   btScalar.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMD___SCALAR_H #ifndef BT_SCALAR_H
#define SIMD___SCALAR_H #define BT_SCALAR_H
#ifdef BT_MANAGED_CODE #ifdef BT_MANAGED_CODE
//Aligned data types not supported in managed code //Aligned data types not supported in managed code
#pragma unmanaged #pragma unmanaged
#endif #endif
#include <math.h> #include <math.h>
#include <stdlib.h>//size_t for MSVC 6.0 #include <stdlib.h>//size_t for MSVC 6.0
#include <cstdlib>
#include <cfloat>
#include <float.h> #include <float.h>
/* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/ /* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/
#define BT_BULLET_VERSION 277 #define BT_BULLET_VERSION 278
inline int btGetVersion() inline int btGetVersion()
{ {
return BT_BULLET_VERSION; return BT_BULLET_VERSION;
} }
#if defined(DEBUG) || defined (_DEBUG) #if defined(DEBUG) || defined (_DEBUG)
#define BT_DEBUG #define BT_DEBUG
#endif #endif
skipping to change at line 506 skipping to change at line 504
btTypedObject(int objectType) btTypedObject(int objectType)
:m_objectType(objectType) :m_objectType(objectType)
{ {
} }
int m_objectType; int m_objectType;
inline int getObjectType() const inline int getObjectType() const
{ {
return m_objectType; return m_objectType;
} }
}; };
#endif //SIMD___SCALAR_H #endif //BT_SCALAR_H
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added


 btScaledBvhTriangleMeshShape.h   btScaledBvhTriangleMeshShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SCALED_BVH_TRIANGLE_MESH_SHAPE_H #ifndef BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
#define SCALED_BVH_TRIANGLE_MESH_SHAPE_H #define BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
///The btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMeshShape. ///The btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMeshShape.
///Note that each btBvhTriangleMeshShape still can have its own local scali ng, independent from this btScaledBvhTriangleMeshShape 'localScaling' ///Note that each btBvhTriangleMeshShape still can have its own local scali ng, independent from this btScaledBvhTriangleMeshShape 'localScaling'
ATTRIBUTE_ALIGNED16(class) btScaledBvhTriangleMeshShape : public btConcaveS hape ATTRIBUTE_ALIGNED16(class) btScaledBvhTriangleMeshShape : public btConcaveS hape
{ {
btVector3 m_localScaling; btVector3 m_localScaling;
skipping to change at line 56 skipping to change at line 56
} }
const btBvhTriangleMeshShape* getChildShape() const const btBvhTriangleMeshShape* getChildShape() const
{ {
return m_bvhTriMeshShape; return m_bvhTriMeshShape;
} }
//debugging //debugging
virtual const char* getName()const {return "SCALEDBVHTRIANGLEMES H";} virtual const char* getName()const {return "SCALEDBVHTRIANGLEMES H";}
virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur
e)
virtual const char* serialize(void* dataBuffer, btSerializer* se
rializer) const;
}; };
#endif //BVH_TRIANGLE_MESH_SHAPE_H ///do not change those serialization structures, it requires an updated sBu
lletDNAstr/sBulletDNAstr64
struct btScaledTriangleMeshShapeData
{
btTriangleMeshShapeData m_trimeshShapeData;
btVector3FloatData m_localScaling;
};
SIMD_FORCE_INLINE int btScaledBvhTriangleMeshShape::calculateSeria
lizeBufferSize() const
{
return sizeof(btScaledTriangleMeshShapeData);
}
///fills the dataBuffer and returns the struct name (and 0 on failure)
SIMD_FORCE_INLINE const char* btScaledBvhTriangleMeshShape::serial
ize(void* dataBuffer, btSerializer* serializer) const
{
btScaledTriangleMeshShapeData* scaledMeshData = (btScaledTriangleMes
hShapeData*) dataBuffer;
m_bvhTriMeshShape->serialize(&scaledMeshData->m_trimeshShapeData,ser
ializer);
scaledMeshData->m_trimeshShapeData.m_collisionShapeData.m_shapeType
= SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE;
m_localScaling.serializeFloat(scaledMeshData->m_localScaling);
return "btScaledTriangleMeshShapeData";
}
#endif //BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
 End of changes. 3 change blocks. 
2 lines changed or deleted 9 lines changed or added


 btSequentialImpulseConstraintSolver.h   btSequentialImpulseConstraintSolver.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H #ifndef BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H
#define SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H #define BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H
#include "btConstraintSolver.h" #include "btConstraintSolver.h"
class btIDebugDraw; class btIDebugDraw;
#include "btContactConstraint.h" #include "btContactConstraint.h"
#include "btSolverBody.h" #include "btSolverBody.h"
#include "btSolverConstraint.h" #include "btSolverConstraint.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h" #include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
///The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method. ///The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method.
skipping to change at line 121 skipping to change at line 121
{ {
return m_btSeed2; return m_btSeed2;
} }
}; };
#ifndef BT_PREFER_SIMD #ifndef BT_PREFER_SIMD
typedef btSequentialImpulseConstraintSolver btSequentialImpulseConstraintSo lverPrefered; typedef btSequentialImpulseConstraintSolver btSequentialImpulseConstraintSo lverPrefered;
#endif #endif
#endif //SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H #endif //BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSerializer.h   btSerializer.h 
skipping to change at line 108 skipping to change at line 108
}; };
#define BT_HEADER_LENGTH 12 #define BT_HEADER_LENGTH 12
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined ( __PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__) #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined ( __PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) ) # define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
#else #else
# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) ) # define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
#endif #endif
#define BT_SOFTBODY_CODE MAKE_ID('S','B','D','Y')
#define BT_COLLISIONOBJECT_CODE MAKE_ID('C','O','B','J') #define BT_COLLISIONOBJECT_CODE MAKE_ID('C','O','B','J')
#define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y') #define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y')
#define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S') #define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S')
#define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S') #define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S')
#define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H') #define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H')
#define BT_TRIANLGE_INFO_MAP MAKE_ID('T','M','A','P') #define BT_TRIANLGE_INFO_MAP MAKE_ID('T','M','A','P')
#define BT_SHAPE_CODE MAKE_ID('S','H','A','P') #define BT_SHAPE_CODE MAKE_ID('S','H','A','P')
#define BT_ARRAY_CODE MAKE_ID('A','R','A','Y') #define BT_ARRAY_CODE MAKE_ID('A','R','A','Y')
#define BT_SBMATERIAL_CODE MAKE_ID('S','B','M','T')
#define BT_SBNODE_CODE MAKE_ID('S','B','N','D')
#define BT_DNA_CODE MAKE_ID('D','N','A','1') #define BT_DNA_CODE MAKE_ID('D','N','A','1')
struct btPointerUid struct btPointerUid
{ {
union union
{ {
void* m_ptr; void* m_ptr;
int m_uniqueIds[2]; int m_uniqueIds[2];
}; };
}; };
///The btDefaultSerializer is the main Bullet serialization class.
///The constructor takes an optional argument for backwards compatibility,
it is recommended to leave this empty/zero.
class btDefaultSerializer : public btSerializer class btDefaultSerializer : public btSerializer
{ {
btAlignedObjectArray<char*> mTypes; btAlignedObjectArray<char*> mTypes;
btAlignedObjectArray<short*> mStructs; btAlignedObjectArray<short*> mStructs;
btAlignedObjectArray<short> mTlens; btAlignedObjectArray<short> mTlens;
btHashMap<btHashInt, int> mStructReverse; btHashMap<btHashInt, int> mStructReverse;
btHashMap<btHashString,int> mTypeLookup; btHashMap<btHashString,int> mTypeLookup;
btHashMap<btHashPtr,void*> m_chunkP; btHashMap<btHashPtr,void*> m_chunkP;
skipping to change at line 351 skipping to change at line 356
for (i=0; i<(int)mStructs.size(); i++) for (i=0; i<(int)mStructs.size(); i++)
{ {
short *strc = mStructs.at(i); short *strc = mStructs.at(i);
mStructReverse.insert(strc[0], i); mStructReverse.insert(strc[0], i);
mTypeLookup.insert(btHashString(mTypes[strc[ 0]]),i); mTypeLookup.insert(btHashString(mTypes[strc[ 0]]),i);
} }
} }
public: public:
btDefaultSerializer(int totalSize) btDefaultSerializer(int totalSize=0)
:m_totalSize(totalSize), :m_totalSize(totalSize),
m_currentSize(0), m_currentSize(0),
m_dna(0), m_dna(0),
m_dnaLength(0), m_dnaLength(0),
m_serializationFlags(0) m_serializationFlags(0)
{ {
m_buffer = (unsigned char*)btAlignedAlloc(totalSize, 16); m_buffer = m_totalSize?(unsigned char*)btAlignedAllo c(totalSize,16):0;
const bool VOID_IS_8 = ((sizeof(void*)==8)); const bool VOID_IS_8 = ((sizeof(void*)==8));
#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES #ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
if (VOID_IS_8) if (VOID_IS_8)
{ {
#if _WIN64 #if _WIN64
initDNA((const char*)sBulletDNAstr64,sBullet DNAlen64); initDNA((const char*)sBulletDNAstr64,sBullet DNAlen64);
#else #else
btAssert(0); btAssert(0);
skipping to change at line 399 skipping to change at line 404
} }
virtual ~btDefaultSerializer() virtual ~btDefaultSerializer()
{ {
if (m_buffer) if (m_buffer)
btAlignedFree(m_buffer); btAlignedFree(m_buffer);
if (m_dna) if (m_dna)
btAlignedFree(m_dna); btAlignedFree(m_dna);
} }
virtual void startSerialization() void writeHeader(unsigned char* buffer) const
{ {
m_uniqueIdGenerator= 1;
m_currentSize = BT_HEADER_LENGTH;
#ifdef BT_USE_DOUBLE_PRECISION #ifdef BT_USE_DOUBLE_PRECISION
memcpy(m_buffer, "BULLETd", 7); memcpy(buffer, "BULLETd", 7);
#else #else
memcpy(m_buffer, "BULLETf", 7); memcpy(buffer, "BULLETf", 7);
#endif //BT_USE_DOUBLE_PRECISION #endif //BT_USE_DOUBLE_PRECISION
int littleEndian= 1; int littleEndian= 1;
littleEndian= ((char*)&littleEndian)[0]; littleEndian= ((char*)&littleEndian)[0];
if (sizeof(void*)==8) if (sizeof(void*)==8)
{ {
m_buffer[7] = '-'; buffer[7] = '-';
} else } else
{ {
m_buffer[7] = '_'; buffer[7] = '_';
} }
if (littleEndian) if (littleEndian)
{ {
m_buffer[8]='v'; buffer[8]='v';
} else } else
{ {
m_buffer[8]='V'; buffer[8]='V';
} }
m_buffer[9] = '2'; buffer[9] = '2';
m_buffer[10] = '7'; buffer[10] = '7';
m_buffer[11] = '7'; buffer[11] = '8';
}
virtual void startSerialization()
{
m_uniqueIdGenerator= 1;
if (m_totalSize)
{
unsigned char* buffer = internalAlloc(BT_HEA
DER_LENGTH);
writeHeader(buffer);
}
} }
virtual void finishSerialization() virtual void finishSerialization()
{ {
writeDNA(); writeDNA();
//if we didn't pre-allocate a buffer, we need to cre
ate a contiguous buffer now
int mysize = 0;
if (!m_totalSize)
{
if (m_buffer)
btAlignedFree(m_buffer);
m_currentSize += BT_HEADER_LENGTH;
m_buffer = (unsigned char*)btAlignedAlloc(m_
currentSize,16);
unsigned char* currentPtr = m_buffer;
writeHeader(m_buffer);
currentPtr += BT_HEADER_LENGTH;
mysize+=BT_HEADER_LENGTH;
for (int i=0;i< m_chunkPtrs.size();i++)
{
int curLength = sizeof(btChunk)+m_ch
unkPtrs[i]->m_length;
memcpy(currentPtr,m_chunkPtrs[i], cu
rLength);
btAlignedFree(m_chunkPtrs[i]);
currentPtr+=curLength;
mysize+=curLength;
}
}
mTypes.clear(); mTypes.clear();
mStructs.clear(); mStructs.clear();
mTlens.clear(); mTlens.clear();
mStructReverse.clear(); mStructReverse.clear();
mTypeLookup.clear(); mTypeLookup.clear();
m_chunkP.clear(); m_chunkP.clear();
m_nameMap.clear(); m_nameMap.clear();
m_uniquePointers.clear(); m_uniquePointers.clear();
m_chunkPtrs.clear();
} }
virtual void* getUniquePointer(void*oldPtr) virtual void* getUniquePointer(void*oldPtr)
{ {
if (!oldPtr) if (!oldPtr)
return 0; return 0;
btPointerUid* uptr = (btPointerUid*)m_uniquePointers .find(oldPtr); btPointerUid* uptr = (btPointerUid*)m_uniquePointers .find(oldPtr);
if (uptr) if (uptr)
{ {
skipping to change at line 498 skipping to change at line 536
chunk->m_chunkCode = chunkCode; chunk->m_chunkCode = chunkCode;
void* uniquePtr = getUniquePointer(oldPtr); void* uniquePtr = getUniquePointer(oldPtr);
m_chunkP.insert(oldPtr,uniquePtr);//chunk->m_oldPtr) ; m_chunkP.insert(oldPtr,uniquePtr);//chunk->m_oldPtr) ;
chunk->m_oldPtr = uniquePtr;//oldPtr; chunk->m_oldPtr = uniquePtr;//oldPtr;
} }
virtual unsigned char* internalAlloc(size_t size)
{
unsigned char* ptr = 0;
if (m_totalSize)
{
ptr = m_buffer+m_currentSize;
m_currentSize += int(size);
btAssert(m_currentSize<m_totalSize);
} else
{
ptr = (unsigned char*)btAlignedAlloc(size,16
);
m_currentSize += int(size);
}
return ptr;
}
virtual btChunk* allocate(size_t size, int numElement s) virtual btChunk* allocate(size_t size, int numElement s)
{ {
unsigned char* ptr = m_buffer+m_currentSize; unsigned char* ptr = internalAlloc(int(size)*numElem
m_currentSize += int(size)*numElements+sizeof(btChun ents+sizeof(btChunk));
k);
btAssert(m_currentSize<m_totalSize);
unsigned char* data = ptr + sizeof(btChunk); unsigned char* data = ptr + sizeof(btChunk);
btChunk* chunk = (btChunk*)ptr; btChunk* chunk = (btChunk*)ptr;
chunk->m_chunkCode = 0; chunk->m_chunkCode = 0;
chunk->m_oldPtr = data; chunk->m_oldPtr = data;
chunk->m_length = int(size)*numElements; chunk->m_length = int(size)*numElements;
chunk->m_number = numElements; chunk->m_number = numElements;
m_chunkPtrs.push_back(chunk); m_chunkPtrs.push_back(chunk);
 End of changes. 18 change blocks. 
19 lines changed or deleted 79 lines changed or added


 btShapeHull.h   btShapeHull.h 
skipping to change at line 18 skipping to change at line 18
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
///btShapeHull implemented by John McCutchan. ///btShapeHull implemented by John McCutchan.
#ifndef _SHAPE_HULL_H #ifndef BT_SHAPE_HULL_H
#define _SHAPE_HULL_H #define BT_SHAPE_HULL_H
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "BulletCollision/CollisionShapes/btConvexShape.h" #include "BulletCollision/CollisionShapes/btConvexShape.h"
///The btShapeHull class takes a btConvexShape, builds a simplified convex hull using btConvexHull and provides triangle indices and vertices. ///The btShapeHull class takes a btConvexShape, builds a simplified convex hull using btConvexHull and provides triangle indices and vertices.
///It can be useful for to simplify a complex convex object and for visuali zation of a non-polyhedral convex object. ///It can be useful for to simplify a complex convex object and for visuali zation of a non-polyhedral convex object.
///It approximates the convex hull using the supporting vertex of 42 direct ions. ///It approximates the convex hull using the supporting vertex of 42 direct ions.
class btShapeHull class btShapeHull
{ {
protected: protected:
skipping to change at line 58 skipping to change at line 58
const btVector3* getVertexPointer() const const btVector3* getVertexPointer() const
{ {
return &m_vertices[0]; return &m_vertices[0];
} }
const unsigned int* getIndexPointer() const const unsigned int* getIndexPointer() const
{ {
return &m_indices[0]; return &m_indices[0];
} }
}; };
#endif //_SHAPE_HULL_H #endif //BT_SHAPE_HULL_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSimpleBroadphase.h   btSimpleBroadphase.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMPLE_BROADPHASE_H #ifndef BT_SIMPLE_BROADPHASE_H
#define SIMPLE_BROADPHASE_H #define BT_SIMPLE_BROADPHASE_H
#include "btOverlappingPairCache.h" #include "btOverlappingPairCache.h"
struct btSimpleBroadphaseProxy : public btBroadphaseProxy struct btSimpleBroadphaseProxy : public btBroadphaseProxy
{ {
int m_nextFree; int m_nextFree;
// int m_handleId; // int m_handleId;
btSimpleBroadphaseProxy() {}; btSimpleBroadphaseProxy() {};
skipping to change at line 152 skipping to change at line 152
aabbMax.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOA T); aabbMax.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOA T);
} }
virtual void printStats() virtual void printStats()
{ {
// printf("btSimpleBroadphase.h\n"); // printf("btSimpleBroadphase.h\n");
// printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_m axHandles); // printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_m axHandles);
} }
}; };
#endif //SIMPLE_BROADPHASE_H #endif //BT_SIMPLE_BROADPHASE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSimpleDynamicsWorld.h   btSimpleDynamicsWorld.h 
skipping to change at line 57 skipping to change at line 57
///maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead ///maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead
virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)); virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));
virtual void setGravity(const btVector3& gravity); virtual void setGravity(const btVector3& gravity);
virtual btVector3 getGravity () const; virtual btVector3 getGravity () const;
virtual void addRigidBody(btRigidBody* body); virtual void addRigidBody(btRigidBody* body);
virtual void addRigidBody(btRigidBody* body, short group, short m
ask);
virtual void removeRigidBody(btRigidBody* body); virtual void removeRigidBody(btRigidBody* body);
virtual void debugDrawWorld();
virtual void addAction(btActionInterface* action);
virtual void removeAction(btActionInterface* action);
///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObj ect ///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObj ect
virtual void removeCollisionObject(btCollisionObject* collisionOb ject); virtual void removeCollisionObject(btCollisionObject* collisionOb ject);
virtual void updateAabbs(); virtual void updateAabbs();
virtual void synchronizeMotionStates(); virtual void synchronizeMotionStates();
virtual void setConstraintSolver(btConstraintSolver* solver); virtual void setConstraintSolver(btConstraintSolver* solver);
virtual btConstraintSolver* getConstraintSolver(); virtual btConstraintSolver* getConstraintSolver();
 End of changes. 2 change blocks. 
0 lines changed or deleted 9 lines changed or added


 btSimplexSolverInterface.h   btSimplexSolverInterface.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMPLEX_SOLVER_INTERFACE_H #ifndef BT_SIMPLEX_SOLVER_INTERFACE_H
#define SIMPLEX_SOLVER_INTERFACE_H #define BT_SIMPLEX_SOLVER_INTERFACE_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#define NO_VIRTUAL_INTERFACE 1 #define NO_VIRTUAL_INTERFACE 1
#ifdef NO_VIRTUAL_INTERFACE #ifdef NO_VIRTUAL_INTERFACE
#include "btVoronoiSimplexSolver.h" #include "btVoronoiSimplexSolver.h"
#define btSimplexSolverInterface btVoronoiSimplexSolver #define btSimplexSolverInterface btVoronoiSimplexSolver
#else #else
/// btSimplexSolverInterface can incrementally calculate distance between o rigin and up to 4 vertices /// btSimplexSolverInterface can incrementally calculate distance between o rigin and up to 4 vertices
skipping to change at line 59 skipping to change at line 59
virtual void backup_closest(btVector3& v) = 0; virtual void backup_closest(btVector3& v) = 0;
virtual bool emptySimplex() const = 0; virtual bool emptySimplex() const = 0;
virtual void compute_points(btVector3& p1, btVector3& p2) = 0; virtual void compute_points(btVector3& p1, btVector3& p2) = 0;
virtual int numVertices() const =0; virtual int numVertices() const =0;
}; };
#endif #endif
#endif //SIMPLEX_SOLVER_INTERFACE_H #endif //BT_SIMPLEX_SOLVER_INTERFACE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSimulationIslandManager.h   btSimulationIslandManager.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMULATION_ISLAND_MANAGER_H #ifndef BT_SIMULATION_ISLAND_MANAGER_H
#define SIMULATION_ISLAND_MANAGER_H #define BT_SIMULATION_ISLAND_MANAGER_H
#include "BulletCollision/CollisionDispatch/btUnionFind.h" #include "BulletCollision/CollisionDispatch/btUnionFind.h"
#include "btCollisionCreateFunc.h" #include "btCollisionCreateFunc.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "btCollisionObject.h" #include "btCollisionObject.h"
class btCollisionObject; class btCollisionObject;
class btCollisionWorld; class btCollisionWorld;
class btDispatcher; class btDispatcher;
class btPersistentManifold; class btPersistentManifold;
skipping to change at line 74 skipping to change at line 74
{ {
return m_splitIslands; return m_splitIslands;
} }
void setSplitIslands(bool doSplitIslands) void setSplitIslands(bool doSplitIslands)
{ {
m_splitIslands = doSplitIslands; m_splitIslands = doSplitIslands;
} }
}; };
#endif //SIMULATION_ISLAND_MANAGER_H #endif //BT_SIMULATION_ISLAND_MANAGER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSliderConstraint.h   btSliderConstraint.h 
skipping to change at line 25 skipping to change at line 25
/* /*
Added by Roman Ponomarev (rponom@gmail.com) Added by Roman Ponomarev (rponom@gmail.com)
April 04, 2008 April 04, 2008
TODO: TODO:
- add clamping od accumulated impulse to improve stability - add clamping od accumulated impulse to improve stability
- add conversion for ODE constraint solver - add conversion for ODE constraint solver
*/ */
#ifndef SLIDER_CONSTRAINT_H #ifndef BT_SLIDER_CONSTRAINT_H
#define SLIDER_CONSTRAINT_H #define BT_SLIDER_CONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btJacobianEntry.h" #include "btJacobianEntry.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
class btRigidBody; class btRigidBody;
#define SLIDER_CONSTRAINT_DEF_SOFTNESS (btScalar(1.0)) #define SLIDER_CONSTRAINT_DEF_SOFTNESS (btScalar(1.0))
#define SLIDER_CONSTRAINT_DEF_DAMPING (btScalar(1.0)) #define SLIDER_CONSTRAINT_DEF_DAMPING (btScalar(1.0))
#define SLIDER_CONSTRAINT_DEF_RESTITUTION (btScalar(0.7)) #define SLIDER_CONSTRAINT_DEF_RESTITUTION (btScalar(0.7))
skipping to change at line 230 skipping to change at line 230
void setTargetLinMotorVelocity(btScalar targetLinMotorVelocity) { m_ targetLinMotorVelocity = targetLinMotorVelocity; } void setTargetLinMotorVelocity(btScalar targetLinMotorVelocity) { m_ targetLinMotorVelocity = targetLinMotorVelocity; }
btScalar getTargetLinMotorVelocity() { return m_targetLinMotorVeloci ty; } btScalar getTargetLinMotorVelocity() { return m_targetLinMotorVeloci ty; }
void setMaxLinMotorForce(btScalar maxLinMotorForce) { m_maxLinMotorF orce = maxLinMotorForce; } void setMaxLinMotorForce(btScalar maxLinMotorForce) { m_maxLinMotorF orce = maxLinMotorForce; }
btScalar getMaxLinMotorForce() { return m_maxLinMotorForce; } btScalar getMaxLinMotorForce() { return m_maxLinMotorForce; }
void setPoweredAngMotor(bool onOff) { m_poweredAngMotor = onOff; } void setPoweredAngMotor(bool onOff) { m_poweredAngMotor = onOff; }
bool getPoweredAngMotor() { return m_poweredAngMotor; } bool getPoweredAngMotor() { return m_poweredAngMotor; }
void setTargetAngMotorVelocity(btScalar targetAngMotorVelocity) { m_ targetAngMotorVelocity = targetAngMotorVelocity; } void setTargetAngMotorVelocity(btScalar targetAngMotorVelocity) { m_ targetAngMotorVelocity = targetAngMotorVelocity; }
btScalar getTargetAngMotorVelocity() { return m_targetAngMotorVeloci ty; } btScalar getTargetAngMotorVelocity() { return m_targetAngMotorVeloci ty; }
void setMaxAngMotorForce(btScalar maxAngMotorForce) { m_maxAngMotorF orce = maxAngMotorForce; } void setMaxAngMotorForce(btScalar maxAngMotorForce) { m_maxAngMotorF orce = maxAngMotorForce; }
btScalar getMaxAngMotorForce() { return m_maxAngMotorForce; } btScalar getMaxAngMotorForce() { return m_maxAngMotorForce; }
btScalar getLinearPos() { return m_linPos; }
btScalar getLinearPos() const { return m_linPos; }
btScalar getAngularPos() const { return m_angPos; }
// access for ODE solver // access for ODE solver
bool getSolveLinLimit() { return m_solveLinLim; } bool getSolveLinLimit() { return m_solveLinLim; }
btScalar getLinDepth() { return m_depth[0]; } btScalar getLinDepth() { return m_depth[0]; }
bool getSolveAngLimit() { return m_solveAngLim; } bool getSolveAngLimit() { return m_solveAngLim; }
btScalar getAngDepth() { return m_angDepth; } btScalar getAngDepth() { return m_angDepth; }
// shared code used by ODE solver // shared code used by ODE solver
void calculateTransforms(const btTransform& transA,const btTransf orm& transB); void calculateTransforms(const btTransform& transA,const btTransf orm& transB);
void testLinLimits(); void testLinLimits();
void testAngLimits(); void testAngLimits();
// access for PE Solver // access for PE Solver
btVector3 getAncorInA(); btVector3 getAncorInA();
btVector3 getAncorInB(); btVector3 getAncorInB();
// access for UseFrameOffset // access for UseFrameOffset
bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; } bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstr aintFrame = frameOffsetOnOff; } void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstr aintFrame = frameOffsetOnOff; }
void setFrames(const btTransform& frameA, const btTransform& frameB)
{
m_frameInA=frameA;
m_frameInB=frameB;
calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.g
etCenterOfMassTransform());
buildJacobian();
}
///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
///If no axis is provided, it uses the default axis for this constra int. ///If no axis is provided, it uses the default axis for this constra int.
virtual void setParam(int num, btScalar value, int axis = -1); virtual void setParam(int num, btScalar value, int axis = -1);
///return the local value of parameter ///return the local value of parameter
virtual btScalar getParam(int num, int axis = -1) const; virtual btScalar getParam(int num, int axis = -1) const;
virtual int calculateSerializeBufferSize() const; virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur e) ///fills the dataBuffer and returns the struct name (and 0 on failur e)
virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const; virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const;
skipping to change at line 306 skipping to change at line 316
sliderData->m_angularUpperLimit = float(m_upperAngLimit); sliderData->m_angularUpperLimit = float(m_upperAngLimit);
sliderData->m_angularLowerLimit = float(m_lowerAngLimit); sliderData->m_angularLowerLimit = float(m_lowerAngLimit);
sliderData->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA; sliderData->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA;
sliderData->m_useOffsetForConstraintFrame = m_useOffsetForConstraint Frame; sliderData->m_useOffsetForConstraintFrame = m_useOffsetForConstraint Frame;
return "btSliderConstraintData"; return "btSliderConstraintData";
} }
#endif //SLIDER_CONSTRAINT_H #endif //BT_SLIDER_CONSTRAINT_H
 End of changes. 4 change blocks. 
3 lines changed or deleted 14 lines changed or added


 btSoftBody.h   btSoftBody.h 
skipping to change at line 30 skipping to change at line 30
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "LinearMath/btIDebugDraw.h" #include "LinearMath/btIDebugDraw.h"
#include "BulletDynamics/Dynamics/btRigidBody.h" #include "BulletDynamics/Dynamics/btRigidBody.h"
#include "BulletCollision/CollisionShapes/btConcaveShape.h" #include "BulletCollision/CollisionShapes/btConcaveShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
#include "btSparseSDF.h" #include "btSparseSDF.h"
#include "BulletCollision/BroadphaseCollision/btDbvt.h" #include "BulletCollision/BroadphaseCollision/btDbvt.h"
//#ifdef BT_USE_DOUBLE_PRECISION
//#define btRigidBodyData btRigidBodyDoubleData
//#define btRigidBodyDataName "btRigidBodyDoubleData"
//#else
#define btSoftBodyData btSoftBodyFloatData
#define btSoftBodyDataName "btSoftBodyFloatData"
//#endif //BT_USE_DOUBLE_PRECISION
class btBroadphaseInterface; class btBroadphaseInterface;
class btDispatcher; class btDispatcher;
class btSoftBodySolver;
/* btSoftBodyWorldInfo */ /* btSoftBodyWorldInfo */
struct btSoftBodyWorldInfo struct btSoftBodyWorldInfo
{ {
btScalar air_density; btScalar air_density;
btScalar water_density; btScalar water_density;
btScalar water_offset; btScalar water_offset;
btVector3 water_normal; btVector3 water_normal;
btBroadphaseInterface* m_broadphase; btBroadphaseInterface* m_broadphase;
btDispatcher* m_dispatcher; btDispatcher* m_dispatcher;
btVector3 m_gravity; btVector3 m_gravity;
btSparseSdf<3> m_sparsesdf; btSparseSdf<3> m_sparsesdf;
btSoftBodyWorldInfo()
:air_density((btScalar)1.2),
water_density(0),
water_offset(0),
water_normal(0,0,0),
m_broadphase(0),
m_dispatcher(0),
m_gravity(0,-10,0)
{
}
}; };
///The btSoftBody is an class to simulate cloth and volumetric soft bodies. ///The btSoftBody is an class to simulate cloth and volumetric soft bodies.
///There is two-way interaction between btSoftBody and btRigidBody/btCollis ionObject. ///There is two-way interaction between btSoftBody and btRigidBody/btCollis ionObject.
class btSoftBody : public btCollisionObject class btSoftBody : public btCollisionObject
{ {
public: public:
btAlignedObjectArray<class btCollisionObject*> m_collisionDisabledOb jects; btAlignedObjectArray<class btCollisionObject*> m_collisionDisabledOb jects;
// The solver object that handles this soft body
btSoftBodySolver *m_softBodySolver;
// //
// Enumerations // Enumerations
// //
///eAeroModel ///eAeroModel
struct eAeroModel { enum _ { struct eAeroModel { enum _ {
V_Point, ///Vertex normals are oriented toward veloci ty V_Point, ///Vertex normals are oriented toward veloci ty
V_TwoSided, ///Vertex normals are fliped to match veloci ty V_TwoSided, ///Vertex normals are fliped to match veloci ty
V_OneSided, ///Vertex normals are taken as it is V_OneSided, ///Vertex normals are taken as it is
F_TwoSided, ///Face normals are fliped to match velocity F_TwoSided, ///Face normals are fliped to match velocity
skipping to change at line 261 skipping to change at line 284
btScalar m_margin; // Margin btScalar m_margin; // Margin
btScalar m_friction; // Friction btScalar m_friction; // Friction
btScalar m_cfm[2]; // Constraint force mixing btScalar m_cfm[2]; // Constraint force mixing
}; };
/* Anchor */ /* Anchor */
struct Anchor struct Anchor
{ {
Node* m_node; // Node pointer Node* m_node; // Node pointer
btVector3 m_local; // Anchor position in body space btVector3 m_local; // Anchor position in body space
btRigidBody* m_body; // B ody btRigidBody* m_body; // B ody
btScalar m_influence;
btMatrix3x3 m_c0; // Impulse matrix btMatrix3x3 m_c0; // Impulse matrix
btVector3 m_c1; // Relative anchor btVector3 m_c1; // Relative anchor
btScalar m_c2; // ima*dt btScalar m_c2; // ima*dt
}; };
/* Note */ /* Note */
struct Note : Element struct Note : Element
{ {
const char* m_text; // Text const char* m_text; // Text
btVector3 m_offset; // Offset btVector3 m_offset; // Offset
int m_rank; // Rank int m_rank; // Rank
skipping to change at line 290 skipping to change at line 314
tVector3Array m_pos; // R eference positions tVector3Array m_pos; // R eference positions
tScalarArray m_wgh; // W eights tScalarArray m_wgh; // W eights
btVector3 m_com; // COM btVector3 m_com; // COM
btMatrix3x3 m_rot; // Rotation btMatrix3x3 m_rot; // Rotation
btMatrix3x3 m_scl; // Scale btMatrix3x3 m_scl; // Scale
btMatrix3x3 m_aqq; // Base scaling btMatrix3x3 m_aqq; // Base scaling
}; };
/* Cluster */ /* Cluster */
struct Cluster struct Cluster
{ {
btAlignedObjectArray<Node*> m_nodes;
tScalarArray m_masses; tScalarArray m_masses;
btAlignedObjectArray<Node*> m_nodes;
tVector3Array m_framerefs; tVector3Array m_framerefs;
btTransform m_framexform ; btTransform m_framexform ;
btScalar m_idmass; btScalar m_idmass;
btScalar m_imass; btScalar m_imass;
btMatrix3x3 m_locii; btMatrix3x3 m_locii;
btMatrix3x3 m_invwi; btMatrix3x3 m_invwi;
btVector3 m_com; btVector3 m_com;
btVector3 m_vimpulses[ 2]; btVector3 m_vimpulses[ 2];
btVector3 m_dimpulses[ 2]; btVector3 m_dimpulses[ 2];
int m_nv impulses; int m_nv impulses;
skipping to change at line 360 skipping to change at line 384
Body() : m_soft(0),m_rigid(0),m_collisionObject(0) {} Body() : m_soft(0),m_rigid(0),m_collisionObject(0) {}
Body(Cluster* p) : m_soft(p),m_rigid(0),m_collisionObject(0) {} Body(Cluster* p) : m_soft(p),m_rigid(0),m_collisionObject(0) {}
Body(btCollisionObject* colObj) : m_soft(0),m_collisionObjec t(colObj) Body(btCollisionObject* colObj) : m_soft(0),m_collisionObjec t(colObj)
{ {
m_rigid = btRigidBody::upcast(m_collisionObject); m_rigid = btRigidBody::upcast(m_collisionObject);
} }
void activate() c onst void activate() c onst
{ {
if(m_rigid) m_rigid->activate(); if(m_rigid)
m_rigid->activate();
if (m_collisionObject)
m_collisionObject->activate();
} }
const btMatrix3x3& invWorldInertia() co nst const btMatrix3x3& invWorldInertia() co nst
{ {
static const btMatrix3x3 iwi(0,0,0,0,0,0,0,0, 0); static const btMatrix3x3 iwi(0,0,0,0,0,0,0,0, 0);
if(m_rigid) return(m_rigid->getInvInertiaTensorWorld ()); if(m_rigid) return(m_rigid->getInvInertiaTensorWorld ());
if(m_soft) return(m_soft->m_invwi); if(m_soft) return(m_soft->m_invwi);
return(iwi); return(iwi);
} }
btScalar invMass() co nst btScalar invMass() co nst
{ {
if(m_rigid) return(m_rigid->getInvMass()); if(m_rigid) return(m_rigid->getInvMass());
if(m_soft) return(m_soft->m_imass); if(m_soft) return(m_soft->m_imass);
return(0); return(0);
} }
const btTransform& xform() const const btTransform& xform() const
{ {
static const btTransform identity=btTransform ::getIdentity(); static const btTransform identity=btTransform ::getIdentity();
if(m_collisionObject) return(m_collisionObject->getI nterpolationWorldTransform()); if(m_collisionObject) return(m_collisionObject->getW orldTransform());
if(m_soft) return(m_soft->m_framexform); if(m_soft) return(m_soft->m_framexform);
return(identity); return(identity);
} }
btVector3 linearVeloci ty() const btVector3 linearVeloci ty() const
{ {
if(m_rigid) return(m_rigid->getLinearVelocity()); if(m_rigid) return(m_rigid->getLinearVelocity());
if(m_soft) return(m_soft->m_lv); if(m_soft) return(m_soft->m_lv);
return(btVector3(0,0,0)); return(btVector3(0,0,0));
} }
btVector3 angularVeloc ity(const btVector3& rpos) const btVector3 angularVeloc ity(const btVector3& rpos) const
skipping to change at line 452 skipping to change at line 480
void applyDCImpul se(const btVector3& impulse) const void applyDCImpul se(const btVector3& impulse) const
{ {
if(m_rigid) m_rigid->applyCentralImpulse(impulse ); if(m_rigid) m_rigid->applyCentralImpulse(impulse );
if(m_soft) btSoftBody::clusterDCImpulse(m_soft, impulse); if(m_soft) btSoftBody::clusterDCImpulse(m_soft, impulse);
} }
}; };
/* Joint */ /* Joint */
struct Joint struct Joint
{ {
struct eType { enum _ { struct eType { enum _ {
Linear, Linear=0,
Angular, Angular,
Contact Contact
};}; };};
struct Specs struct Specs
{ {
Specs() : erp(1),cfm(1),split(1) {} Specs() : erp(1),cfm(1),split(1) {}
btScalar erp; btScalar erp;
btScalar cfm; btScalar cfm;
btScalar split; btScalar split;
}; };
skipping to change at line 647 skipping to change at line 675
btAlignedObjectArray<bool>m_clusterConnectivity;//cluster connectivi ty, for self-collision btAlignedObjectArray<bool>m_clusterConnectivity;//cluster connectivi ty, for self-collision
btTransform m_initialWorldTransform; btTransform m_initialWorldTransform;
btVector3 m_windVelocity; btVector3 m_windVelocity;
// //
// Api // Api
// //
/* ctor */ /* ctor */
btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count, btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count,
const btVector3* x, const btVector3* x, const btScalar* m);
const btScalar* m);
/* ctor
*/
btSoftBody( btSoftBodyWorldInfo* worldInfo);
void initDefaults();
/* dtor */ /* dtor */
virtual ~btSoftBody(); virtual ~btSoftBody();
/* Check for existing link */ /* Check for existing link */
btAlignedObjectArray<int> m_userIndexMapping; btAlignedObjectArray<int> m_userIndexMapping;
btSoftBodyWorldInfo* getWorldInfo() btSoftBodyWorldInfo* getWorldInfo()
{ {
return m_worldInfo; return m_worldInfo;
} }
skipping to change at line 722 skipping to change at line 754
void appendTetra(int model,Material* mat); void appendTetra(int model,Material* mat);
// //
void appendTetra(int node0, void appendTetra(int node0,
int node1, int node1,
int node2, int node2,
int node3, int node3,
Material* mat=0); Material* mat=0);
/* Append anchor */ /* Append anchor */
void appendAnchor( int node, void appendAnchor( int node,
btRigidBody* body, bool disableCollisionBetweenLinkedBodies= btRigidBody* body, bool disableCollisionBetweenLinkedBodies=
false); false,btScalar influence = 1);
void appendAnchor(int node,btRigidBody* body, con
st btVector3& localPivot,bool disableCollisionBetweenLinkedBodies=false,btS
calar influence = 1);
/* Append linear joint */ /* Append linear joint */
void appendLinearJoint(const LJoint::Spec s& specs,Cluster* body0,Body body1); void appendLinearJoint(const LJoint::Spec s& specs,Cluster* body0,Body body1);
void appendLinearJoint(const LJoint::Spec s& specs,Body body=Body()); void appendLinearJoint(const LJoint::Spec s& specs,Body body=Body());
void appendLinearJoint(const LJoint::Spec s& specs,btSoftBody* body); void appendLinearJoint(const LJoint::Spec s& specs,btSoftBody* body);
/* Append linear joint */ /* Append linear joint */
void appendAngularJoint(const AJoint::Spe cs& specs,Cluster* body0,Body body1); void appendAngularJoint(const AJoint::Spe cs& specs,Cluster* body0,Body body1);
void appendAngularJoint(const AJoint::Spe cs& specs,Body body=Body()); void appendAngularJoint(const AJoint::Spe cs& specs,Body body=Body());
void appendAngularJoint(const AJoint::Spe cs& specs,btSoftBody* body); void appendAngularJoint(const AJoint::Spe cs& specs,btSoftBody* body);
/* Add force (or gravity) to the entire body */ /* Add force (or gravity) to the entire body */
void addForce( const btVect or3& force); void addForce( const btVect or3& force);
skipping to change at line 844 skipping to change at line 877
* Set a wind velocity for interaction with the air. * Set a wind velocity for interaction with the air.
*/ */
void setWindVelocity( const btVector3 &velocity ); void setWindVelocity( const btVector3 &velocity );
/** /**
* Return the wind velocity for interaction with the air. * Return the wind velocity for interaction with the air.
*/ */
const btVector3& getWindVelocity(); const btVector3& getWindVelocity();
// //
// Set the solver that handles this soft body
// Should not be allowed to get out of sync with reality
// Currently called internally on addition to the world
void setSoftBodySolver( btSoftBodySolver *softBodySolver )
{
m_softBodySolver = softBodySolver;
}
//
// Return the solver that handles this soft body
//
btSoftBodySolver *getSoftBodySolver()
{
return m_softBodySolver;
}
//
// Return the solver that handles this soft body
//
btSoftBodySolver *getSoftBodySolver() const
{
return m_softBodySolver;
}
//
// Cast // Cast
// //
static const btSoftBody* upcast(const btCollisionObject* colO bj) static const btSoftBody* upcast(const btCollisionObject* colO bj)
{ {
if (colObj->getInternalType()==CO_SOFT_BODY) if (colObj->getInternalType()==CO_SOFT_BODY)
return (const btSoftBody*)colObj; return (const btSoftBody*)colObj;
return 0; return 0;
} }
static btSoftBody* upcast(btCollisionObject* co lObj) static btSoftBody* upcast(btCollisionObject* co lObj)
skipping to change at line 900 skipping to change at line 958
void dampClusters(); void dampClusters();
void applyForces(); void applyForces();
static void PSolve_Anchors(btSoftBody* psb,btSca lar kst,btScalar ti); static void PSolve_Anchors(btSoftBody* psb,btSca lar kst,btScalar ti);
static void PSolve_RContacts(btSoftBody* psb,btS calar kst,btScalar ti); static void PSolve_RContacts(btSoftBody* psb,btS calar kst,btScalar ti);
static void PSolve_SContacts(btSoftBody* psb,btS calar,btScalar ti); static void PSolve_SContacts(btSoftBody* psb,btS calar,btScalar ti);
static void PSolve_Links(btSoftBody* psb,btScala r kst,btScalar ti); static void PSolve_Links(btSoftBody* psb,btScala r kst,btScalar ti);
static void VSolve_Links(btSoftBody* psb,btScala r kst); static void VSolve_Links(btSoftBody* psb,btScala r kst);
static psolver_t getSolver(ePSolver::_ solver); static psolver_t getSolver(ePSolver::_ solver);
static vsolver_t getSolver(eVSolver::_ solver); static vsolver_t getSolver(eVSolver::_ solver);
virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur
e)
virtual const char* serialize(void* dataBuffer, class btSeriali
zer* serializer) const;
//virtual void serializeSingleObject(class btSerializer* serializer)
const;
}; };
#endif //_BT_SOFT_BODY_H #endif //_BT_SOFT_BODY_H
 End of changes. 14 change blocks. 
9 lines changed or deleted 81 lines changed or added


 btSoftBodyConcaveCollisionAlgorithm.h   btSoftBodyConcaveCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H #ifndef BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H
#define SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H #define BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/CollisionShapes/btTriangleCallback.h" #include "BulletCollision/CollisionShapes/btTriangleCallback.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
class btDispatcher; class btDispatcher;
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btSoftBody; class btSoftBody;
skipping to change at line 149 skipping to change at line 149
{ {
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btSoftBodyConcaveCollisionAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btSoftBodyConcaveCollisionAlgorithm));
return new(mem) btSoftBodyConcaveCollisionAlgorithm( ci,body0,body1,true); return new(mem) btSoftBodyConcaveCollisionAlgorithm( ci,body0,body1,true);
} }
}; };
}; };
#endif //SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H #endif //BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSoftBodyHelpers.h   btSoftBodyHelpers.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SOFT_BODY_HELPERS_H #ifndef BT_SOFT_BODY_HELPERS_H
#define SOFT_BODY_HELPERS_H #define BT_SOFT_BODY_HELPERS_H
#include "btSoftBody.h" #include "btSoftBody.h"
// //
// Helpers // Helpers
// //
/* fDrawFlags */ /* fDrawFlags */
struct fDrawFlags { enum _ { struct fDrawFlags { enum _ {
Nodes = 0x0001, Nodes = 0x0001,
skipping to change at line 121 skipping to change at line 121
const int* triangles, const int* triangles,
int ntriangles, int ntriangles,
bool randomizeConstraints = true); bool randomizeConstraints = true);
/* Create from convex-hull */ /* Create from convex-hull */
static btSoftBody* CreateFromConvexHull( btSoftBodyWo rldInfo& worldInfo, static btSoftBody* CreateFromConvexHull( btSoftBodyWo rldInfo& worldInfo,
const btVector3* vertices, const btVector3* vertices,
int nvertices, int nvertices,
bool randomizeConstraints = true); bool randomizeConstraints = true);
/* Export TetGen compatible .smesh file */ /* Export TetGen compatible .smesh file */
static void ExportAsSMeshFile( btSo // static void ExportAsSMeshFile( btSo
ftBody* psb, ftBody* psb,
//
const char* filename); const char* filename);
/* Create from TetGen .ele, .face, .node files */ /* Create from TetGen .ele, .face, .node files */
static btSoftBody* CreateFromTetGenFile( btSoftBodyWo // static btSoftBody* CreateFromTetGenFile( btSoftBodyWo
rldInfo& worldInfo, rldInfo& worldInfo,
//
const char* ele, const char* ele,
//
const char* face, const char* face,
//
const char* node, const char* node,
//
bool bfacelinks, bool bfacelinks,
//
bool btetralinks, bool btetralinks,
//
bool bfacesfromtetras); bool bfacesfromtetras);
/* Create from TetGen .ele, .face, .node data */ /* Create from TetGen .ele, .face, .node data */
static btSoftBody* CreateFromTetGenData( btSoftBodyWo rldInfo& worldInfo, static btSoftBody* CreateFromTetGenData( btSoftBodyWo rldInfo& worldInfo,
const char* ele, const char* ele,
const char* face, const char* face,
const char* node, const char* node,
bool bfacelinks, bool bfacelinks,
bool btetralinks, bool btetralinks,
bool bfacesfromtetras); bool bfacesfromtetras);
}; };
#endif //SOFT_BODY_HELPERS_H #endif //BT_SOFT_BODY_HELPERS_H
 End of changes. 4 change blocks. 
20 lines changed or deleted 20 lines changed or added


 btSoftBodyInternals.h   btSoftBodyInternals.h 
skipping to change at line 27 skipping to change at line 27
#ifndef _BT_SOFT_BODY_INTERNALS_H #ifndef _BT_SOFT_BODY_INTERNALS_H
#define _BT_SOFT_BODY_INTERNALS_H #define _BT_SOFT_BODY_INTERNALS_H
#include "btSoftBody.h" #include "btSoftBody.h"
#include "LinearMath/btQuickprof.h" #include "LinearMath/btQuickprof.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "BulletCollision/CollisionShapes/btConvexInternalShape.h" #include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
#include <string.h> //for memset
// //
// btSymMatrix // btSymMatrix
// //
template <typename T> template <typename T>
struct btSymMatrix struct btSymMatrix
{ {
btSymMatrix() : dim(0) {} btSymMatrix() : dim(0) {}
btSymMatrix(int n,const T& init=T()) { resize(n,init); } btSymMatrix(int n,const T& init=T()) { resize(n,init); }
void resize(int n,const T& init=T ()) { dim=n;store.resize((n*(n+1))/2,init); } void resize(int n,const T& init=T ()) { dim=n;store.resize((n*(n+1))/2,init); }
int index(int c,int r) c onst { if(c>r) btSwap(c,r);btAssert(r<dim);r eturn((r*(r+1))/2+c); } int index(int c,int r) c onst { if(c>r) btSwap(c,r);btAssert(r<dim);r eturn((r*(r+1))/2+c); }
skipping to change at line 72 skipping to change at line 72
void processAllTriangles(btTriangleCallback* /*callback*/,const b tVector3& /*aabbMin*/,const btVector3& /*aabbMax*/) const void processAllTriangles(btTriangleCallback* /*callback*/,const b tVector3& /*aabbMin*/,const btVector3& /*aabbMax*/) const
{ {
//not yet //not yet
btAssert(0); btAssert(0);
} }
///getAabb returns the axis aligned bounding box in the coordinate f rame of the given transform t. ///getAabb returns the axis aligned bounding box in the coordinate f rame of the given transform t.
virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVecto r3& aabbMax) const virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVecto r3& aabbMax) const
{ {
/* t should be identity, but better be safe than...fast? */ /* t should be identity */
const btVector3 mins=m_body->m_bounds[0]; aabbMin=m_body->m_bounds[0];
const btVector3 maxs=m_body->m_bounds[1]; aabbMax=m_body->m_bounds[1];
const btVector3 crns[]={t*btVector3(mins.x(),mins.y(),mins.z
()),
t*btVector3(maxs.x(),mins.y(),mins.z()),
t*btVector3(maxs.x(),maxs.y(),mins.z()),
t*btVector3(mins.x(),maxs.y(),mins.z()),
t*btVector3(mins.x(),mins.y(),maxs.z()),
t*btVector3(maxs.x(),mins.y(),maxs.z()),
t*btVector3(maxs.x(),maxs.y(),maxs.z()),
t*btVector3(mins.x(),maxs.y(),maxs.z())};
aabbMin=aabbMax=crns[0];
for(int i=1;i<8;++i)
{
aabbMin.setMin(crns[i]);
aabbMax.setMax(crns[i]);
}
} }
virtual void setLocalScaling(const btVector3& /*scaling*/) virtual void setLocalScaling(const btVector3& /*scaling*/)
{ {
///na ///na
} }
virtual const btVector3& getLocalScaling() const virtual const btVector3& getLocalScaling() const
{ {
static const btVector3 dummy(1,1,1); static const btVector3 dummy(1,1,1);
return dummy; return dummy;
skipping to change at line 171 skipping to change at line 157
}; };
// //
// Inline's // Inline's
// //
// //
template <typename T> template <typename T>
static inline void ZeroInitialize(T& value) static inline void ZeroInitialize(T& value)
{ {
static const T zerodummy; memset(&value,0,sizeof(T));
value=zerodummy;
} }
// //
template <typename T> template <typename T>
static inline bool CompLess(const T& a,const T& b) static inline bool CompLess(const T& a,const T& b)
{ return(a<b); } { return(a<b); }
// //
template <typename T> template <typename T>
static inline bool CompGreater(const T& a,const T& b) static inline bool CompGreater(const T& a,const T& b)
{ return(a>b); } { return(a>b); }
// //
skipping to change at line 732 skipping to change at line 717
btSoftClusterCollisionShape cshape(cluster); btSoftClusterCollisionShape cshape(cluster);
const btConvexShape* rshape=(const btConv exShape*)m_colObj->getCollisionShape(); const btConvexShape* rshape=(const btConv exShape*)m_colObj->getCollisionShape();
///don't collide an anchored cluster with a static/k inematic object ///don't collide an anchored cluster with a static/k inematic object
if(m_colObj->isStaticOrKinematicObject() && cluster- >m_containsAnchor) if(m_colObj->isStaticOrKinematicObject() && cluster- >m_containsAnchor)
return; return;
btGjkEpaSolver2::sResults res; btGjkEpaSolver2::sResults res;
if(btGjkEpaSolver2::SignedDistance( &cshape,btTr ansform::getIdentity(), if(btGjkEpaSolver2::SignedDistance( &cshape,btTr ansform::getIdentity(),
rshape,m_colObj->getInterpolationWorldTransf orm(), rshape,m_colObj->getWorldTransform(),
btVector3(1,0,0),res)) btVector3(1,0,0),res))
{ {
btSoftBody::CJoint joint; btSoftBody::CJoint joint;
if(SolveContact(res,cluster,m_colObj,joint)) //prb,joint)) if(SolveContact(res,cluster,m_colObj,joint)) //prb,joint))
{ {
btSoftBody::CJoint* pj=new(btAli gnedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint(); btSoftBody::CJoint* pj=new(btAli gnedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint();
*pj=joint;psb->m_joints.push_back(pj ); *pj=joint;psb->m_joints.push_back(pj );
if(m_colObj->isStaticOrKinematicObje ct()) if(m_colObj->isStaticOrKinematicObje ct())
{ {
pj->m_erp *= psb- >m_cfg.kSKHR_CL; pj->m_erp *= psb- >m_cfg.kSKHR_CL;
skipping to change at line 765 skipping to change at line 750
psb = ps; psb = ps;
m_colObj = colOb; m_colObj = colOb;
idt = ps->m_sst.isdt; idt = ps->m_sst.isdt;
m_margin = m_colObj->getCollisi onShape()->getMargin()+psb->getCollisionShape()->getMargin(); m_margin = m_colObj->getCollisi onShape()->getMargin()+psb->getCollisionShape()->getMargin();
///Bullet rigid body uses multiply instead of minimu m to determine combined friction. Some customization would be useful. ///Bullet rigid body uses multiply instead of minimu m to determine combined friction. Some customization would be useful.
friction = btMin(psb->m_cfg.kDF,m_colOb j->getFriction()); friction = btMin(psb->m_cfg.kDF,m_colOb j->getFriction());
btVector3 mins; btVector3 mins;
btVector3 maxs; btVector3 maxs;
ATTRIBUTE_ALIGNED16(btDbvtVolume) volu me; ATTRIBUTE_ALIGNED16(btDbvtVolume) volu me;
colOb->getCollisionShape()->getAabb(colOb->getInterp olationWorldTransform(),mins,maxs); colOb->getCollisionShape()->getAabb(colOb->getWorldT ransform(),mins,maxs);
volume=btDbvtVolume::FromMM(mins,maxs); volume=btDbvtVolume::FromMM(mins,maxs);
volume.Expand(btVector3(1,1,1)*m_margin); volume.Expand(btVector3(1,1,1)*m_margin);
ps->m_cdbvt.collideTV(ps->m_cdbvt.m_root,volume,*thi s); ps->m_cdbvt.collideTV(ps->m_cdbvt.m_root,volume,*thi s);
} }
}; };
// //
// CollideCL_SS // CollideCL_SS
// //
struct CollideCL_SS : ClusterBase struct CollideCL_SS : ClusterBase
{ {
skipping to change at line 847 skipping to change at line 832
const btScalar m=n.m_im>0?dynmargin :stamargin; const btScalar m=n.m_im>0?dynmargin :stamargin;
btSoftBody::RContact c; btSoftBody::RContact c;
if( (!n.m_battach)&& if( (!n.m_battach)&&
psb->checkContact(m_colObj1,n.m_x,m,c.m_cti) ) psb->checkContact(m_colObj1,n.m_x,m,c.m_cti) )
{ {
const btScalar ima=n.m_im; const btScalar ima=n.m_im;
const btScalar imb= m_rigidBody? m_rigidBod y->getInvMass() : 0.f; const btScalar imb= m_rigidBody? m_rigidBod y->getInvMass() : 0.f;
const btScalar ms=ima+imb; const btScalar ms=ima+imb;
if(ms>0) if(ms>0)
{ {
const btTransform& wtr=m_rigidB ody?m_rigidBody->getInterpolationWorldTransform() : m_colObj1->getWorldTran sform(); const btTransform& wtr=m_rigidB ody?m_rigidBody->getWorldTransform() : m_colObj1->getWorldTransform();
static const btMatrix3x3 iwiS tatic(0,0,0,0,0,0,0,0,0); static const btMatrix3x3 iwiS tatic(0,0,0,0,0,0,0,0,0);
const btMatrix3x3& iwi=m_rigidB ody?m_rigidBody->getInvInertiaTensorWorld() : iwiStatic; const btMatrix3x3& iwi=m_rigidB ody?m_rigidBody->getInvInertiaTensorWorld() : iwiStatic;
const btVector3 ra=n.m_x-wtr .getOrigin(); const btVector3 ra=n.m_x-wtr .getOrigin();
const btVector3 va=m_rigidBo dy ? m_rigidBody->getVelocityInLocalPoint(ra)*psb->m_sst.sdt : btVector3(0, 0,0); const btVector3 va=m_rigidBo dy ? m_rigidBody->getVelocityInLocalPoint(ra)*psb->m_sst.sdt : btVector3(0, 0,0);
const btVector3 vb=n.m_x-n.m _q; const btVector3 vb=n.m_x-n.m _q;
const btVector3 vr=vb-va; const btVector3 vr=vb-va;
const btScalar dn=btDot(vr, c.m_cti.m_normal); const btScalar dn=btDot(vr, c.m_cti.m_normal);
const btVector3 fv=vr-c.m_ct i.m_normal*dn; const btVector3 fv=vr-c.m_ct i.m_normal*dn;
const btScalar fc=psb->m_cf g.kDF*m_colObj1->getFriction(); const btScalar fc=psb->m_cf g.kDF*m_colObj1->getFriction();
c.m_node = &n; c.m_node = &n;
 End of changes. 6 change blocks. 
24 lines changed or deleted 8 lines changed or added


 btSoftRigidCollisionAlgorithm.h   btSoftRigidCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SOFT_RIGID_COLLISION_ALGORITHM_H #ifndef BT_SOFT_RIGID_COLLISION_ALGORITHM_H
#define SOFT_RIGID_COLLISION_ALGORITHM_H #define BT_SOFT_RIGID_COLLISION_ALGORITHM_H
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
class btSoftBody; class btSoftBody;
skipping to change at line 72 skipping to change at line 72
return new(mem) btSoftRigidCollisionAlgorith m(0,ci,body0,body1,false); return new(mem) btSoftRigidCollisionAlgorith m(0,ci,body0,body1,false);
} else } else
{ {
return new(mem) btSoftRigidCollisionAlgorith m(0,ci,body0,body1,true); return new(mem) btSoftRigidCollisionAlgorith m(0,ci,body0,body1,true);
} }
} }
}; };
}; };
#endif //SOFT_RIGID_COLLISION_ALGORITHM_H #endif //BT_SOFT_RIGID_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSoftRigidDynamicsWorld.h   btSoftRigidDynamicsWorld.h 
skipping to change at line 47 skipping to change at line 47
bool m_ownsSolver; bool m_ownsSolver;
protected: protected:
virtual void predictUnconstraintMotion(btScalar timeStep); virtual void predictUnconstraintMotion(btScalar timeStep);
virtual void internalSingleStepSimulation( btScalar timeStep); virtual void internalSingleStepSimulation( btScalar timeStep);
void solveSoftBodiesConstraints( btScalar timeStep ); void solveSoftBodiesConstraints( btScalar timeStep );
void serializeSoftBodies(btSerializer* serializer);
public: public:
btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterf ace* pairCache,btConstraintSolver* constraintSolver, btCollisionConfigurati on* collisionConfiguration, btSoftBodySolver *softBodySolver = 0 ); btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterf ace* pairCache,btConstraintSolver* constraintSolver, btCollisionConfigurati on* collisionConfiguration, btSoftBodySolver *softBodySolver = 0 );
virtual ~btSoftRigidDynamicsWorld(); virtual ~btSoftRigidDynamicsWorld();
virtual void debugDrawWorld(); virtual void debugDrawWorld();
void addSoftBody(btSoftBody* body,short int collisionFilterGroup= btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphase Proxy::AllFilter); void addSoftBody(btSoftBody* body,short int collisionFilterGroup= btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphase Proxy::AllFilter);
skipping to change at line 74 skipping to change at line 76
btSoftBodyWorldInfo& getWorldInfo() btSoftBodyWorldInfo& getWorldInfo()
{ {
return m_sbi; return m_sbi;
} }
const btSoftBodyWorldInfo& getWorldInfo() const const btSoftBodyWorldInfo& getWorldInfo() const
{ {
return m_sbi; return m_sbi;
} }
virtual btDynamicsWorldType getWorldType() const
{
return BT_SOFT_RIGID_DYNAMICS_WORLD;
}
btSoftBodyArray& getSoftBodyArray() btSoftBodyArray& getSoftBodyArray()
{ {
return m_softBodies; return m_softBodies;
} }
const btSoftBodyArray& getSoftBodyArray() const const btSoftBodyArray& getSoftBodyArray() const
{ {
return m_softBodies; return m_softBodies;
} }
skipping to change at line 95 skipping to change at line 102
/// rayTestSingle performs a raycast call and calls the resultCallba ck. It is used internally by rayTest. /// rayTestSingle performs a raycast call and calls the resultCallba ck. It is used internally by rayTest.
/// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape. /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
/// This allows more customization. /// This allows more customization.
static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
btCollisionObject* collisionObject , btCollisionObject* collisionObject ,
const btCollisionShape* collisionS hape, const btCollisionShape* collisionS hape,
const btTransform& colObjWorldTran sform, const btTransform& colObjWorldTran sform,
RayResultCallback& resultCallback) ; RayResultCallback& resultCallback) ;
virtual void serialize(btSerializer* serializer);
}; };
#endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H #endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H
 End of changes. 3 change blocks. 
0 lines changed or deleted 9 lines changed or added


 btSoftSoftCollisionAlgorithm.h   btSoftSoftCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SOFT_SOFT_COLLISION_ALGORITHM_H #ifndef BT_SOFT_SOFT_COLLISION_ALGORITHM_H
#define SOFT_SOFT_COLLISION_ALGORITHM_H #define BT_SOFT_SOFT_COLLISION_ALGORITHM_H
#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
class btSoftBody; class btSoftBody;
///collision detection between two btSoftBody shapes ///collision detection between two btSoftBody shapes
skipping to change at line 66 skipping to change at line 66
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
int bbsize = sizeof(btSoftSoftCollisionAlgorithm); int bbsize = sizeof(btSoftSoftCollisionAlgorithm);
void* ptr = ci.m_dispatcher1->allocateCollisionAlgor ithm(bbsize); void* ptr = ci.m_dispatcher1->allocateCollisionAlgor ithm(bbsize);
return new(ptr) btSoftSoftCollisionAlgorithm(0,ci,bo dy0,body1); return new(ptr) btSoftSoftCollisionAlgorithm(0,ci,bo dy0,body1);
} }
}; };
}; };
#endif //SOFT_SOFT_COLLISION_ALGORITHM_H #endif //BT_SOFT_SOFT_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSolve2LinearConstraint.h   btSolve2LinearConstraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SOLVE_2LINEAR_CONSTRAINT_H #ifndef BT_SOLVE_2LINEAR_CONSTRAINT_H
#define SOLVE_2LINEAR_CONSTRAINT_H #define BT_SOLVE_2LINEAR_CONSTRAINT_H
#include "LinearMath/btMatrix3x3.h" #include "LinearMath/btMatrix3x3.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
class btRigidBody; class btRigidBody;
/// constraint class used for lateral tyre friction. /// constraint class used for lateral tyre friction.
class btSolve2LinearConstraint class btSolve2LinearConstraint
{ {
btScalar m_tau; btScalar m_tau;
skipping to change at line 103 skipping to change at line 103
btScalar depthA, const btVector3& normalA, btScalar depthA, const btVector3& normalA,
const btVector3& rel_posB1,const b tVector3& rel_posB2, const btVector3& rel_posB1,const b tVector3& rel_posB2,
btScalar depthB, const btVector3& normalB, btScalar depthB, const btVector3& normalB,
btScalar& imp0,btScalar& imp1); btScalar& imp0,btScalar& imp1);
*/ */
}; };
#endif //SOLVE_2LINEAR_CONSTRAINT_H #endif //BT_SOLVE_2LINEAR_CONSTRAINT_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSparseSDF.h   btSparseSDF.h 
skipping to change at line 17 skipping to change at line 17
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
///btSparseSdf implementation by Nathanael Presson ///btSparseSdf implementation by Nathanael Presson
#ifndef _14F9D17F_EAE8_4aba_B41C_292DB2AA70F3_ #ifndef BT_SPARSE_SDF_H
#define _14F9D17F_EAE8_4aba_B41C_292DB2AA70F3_ #define BT_SPARSE_SDF_H
#include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
// Modified Paul Hsieh hash // Modified Paul Hsieh hash
template <const int DWORDLEN> template <const int DWORDLEN>
unsigned int HsiehHash(const void* pdata) unsigned int HsiehHash(const void* pdata)
{ {
const unsigned short* data=(const unsigned short*)pdata; const unsigned short* data=(const unsigned short*)pdata;
unsigned hash=DWORDLEN<<2,tmp; unsigned hash=DWORDLEN<<2,tmp;
skipping to change at line 302 skipping to change at line 302
myset.x=x;myset.y=y;myset.z=z;myset.p=shape; myset.x=x;myset.y=y;myset.z=z;myset.p=shape;
const void* ptr = &myset; const void* ptr = &myset;
unsigned int result = HsiehHash<sizeof(btS)/4> (ptr); unsigned int result = HsiehHash<sizeof(btS)/4> (ptr);
return result; return result;
} }
}; };
#endif #endif //BT_SPARSE_SDF_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSphereBoxCollisionAlgorithm.h   btSphereBoxCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SPHERE_BOX_COLLISION_ALGORITHM_H #ifndef BT_SPHERE_BOX_COLLISION_ALGORITHM_H
#define SPHERE_BOX_COLLISION_ALGORITHM_H #define BT_SPHERE_BOX_COLLISION_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
#include "btCollisionDispatcher.h" #include "btCollisionDispatcher.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
/// btSphereBoxCollisionAlgorithm provides sphere-box collision detection. /// btSphereBoxCollisionAlgorithm provides sphere-box collision detection.
skipping to change at line 74 skipping to change at line 74
return new(mem) btSphereBoxCollisionAlgorith m(0,ci,body0,body1,false); return new(mem) btSphereBoxCollisionAlgorith m(0,ci,body0,body1,false);
} else } else
{ {
return new(mem) btSphereBoxCollisionAlgorith m(0,ci,body0,body1,true); return new(mem) btSphereBoxCollisionAlgorith m(0,ci,body0,body1,true);
} }
} }
}; };
}; };
#endif //SPHERE_BOX_COLLISION_ALGORITHM_H #endif //BT_SPHERE_BOX_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSphereShape.h   btSphereShape.h 
skipping to change at line 15 skipping to change at line 15
This software is provided 'as-is', without any express or implied warranty. 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 th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SPHERE_MINKOWSKI_H #ifndef BT_SPHERE_MINKOWSKI_H
#define SPHERE_MINKOWSKI_H #define BT_SPHERE_MINKOWSKI_H
#include "btConvexInternalShape.h" #include "btConvexInternalShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for t he types
///The btSphereShape implements an implicit sphere, centered around a local origin with radius. ///The btSphereShape implements an implicit sphere, centered around a local origin with radius.
ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape
{ {
public: public:
skipping to change at line 69 skipping to change at line 69
} }
virtual btScalar getMargin() const virtual btScalar getMargin() const
{ {
//to improve gjk behaviour, use radius+margin as the full ma rgin, so never get into the penetration case //to improve gjk behaviour, use radius+margin as the full ma rgin, so never get into the penetration case
//this means, non-uniform scaling is not supported anymore //this means, non-uniform scaling is not supported anymore
return getRadius(); return getRadius();
} }
}; };
#endif //SPHERE_MINKOWSKI_H #endif //BT_SPHERE_MINKOWSKI_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSphereSphereCollisionAlgorithm.h   btSphereSphereCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SPHERE_SPHERE_COLLISION_ALGORITHM_H #ifndef BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
#define SPHERE_SPHERE_COLLISION_ALGORITHM_H #define BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
#include "btCollisionDispatcher.h" #include "btCollisionDispatcher.h"
class btPersistentManifold; class btPersistentManifold;
/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision dete ction. /// btSphereSphereCollisionAlgorithm provides sphere-sphere collision dete ction.
/// Other features are frame-coherency (persistent data) and collision resp onse. /// Other features are frame-coherency (persistent data) and collision resp onse.
skipping to change at line 65 skipping to change at line 65
{ {
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1) virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCol lisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionOb ject* body1)
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btSphereSphereCollisionAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btSphereSphereCollisionAlgorithm));
return new(mem) btSphereSphereCollisionAlgorithm(0,c i,body0,body1); return new(mem) btSphereSphereCollisionAlgorithm(0,c i,body0,body1);
} }
}; };
}; };
#endif //SPHERE_SPHERE_COLLISION_ALGORITHM_H #endif //BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btSphereTriangleCollisionAlgorithm.h   btSphereTriangleCollisionAlgorithm.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SPHERE_TRIANGLE_COLLISION_ALGORITHM_H #ifndef BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
#define SPHERE_TRIANGLE_COLLISION_ALGORITHM_H #define BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
#include "btActivatingCollisionAlgorithm.h" #include "btActivatingCollisionAlgorithm.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
class btPersistentManifold; class btPersistentManifold;
#include "btCollisionDispatcher.h" #include "btCollisionDispatcher.h"
/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision dete ction. /// btSphereSphereCollisionAlgorithm provides sphere-sphere collision dete ction.
/// Other features are frame-coherency (persistent data) and collision resp onse. /// Other features are frame-coherency (persistent data) and collision resp onse.
/// Also provides the most basic sample for custom/user btCollisionAlgorith m /// Also provides the most basic sample for custom/user btCollisionAlgorith m
skipping to change at line 68 skipping to change at line 68
{ {
void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btSphereTriangleCollisionAlgorithm)); void* mem = ci.m_dispatcher1->allocateCollisionAlgor ithm(sizeof(btSphereTriangleCollisionAlgorithm));
return new(mem) btSphereTriangleCollisionAlgorithm(c i.m_manifold,ci,body0,body1,m_swapped); return new(mem) btSphereTriangleCollisionAlgorithm(c i.m_manifold,ci,body0,body1,m_swapped);
} }
}; };
}; };
#endif //SPHERE_TRIANGLE_COLLISION_ALGORITHM_H #endif //BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btStaticPlaneShape.h   btStaticPlaneShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef STATIC_PLANE_SHAPE_H #ifndef BT_STATIC_PLANE_SHAPE_H
#define STATIC_PLANE_SHAPE_H #define BT_STATIC_PLANE_SHAPE_H
#include "btConcaveShape.h" #include "btConcaveShape.h"
///The btStaticPlaneShape simulates an infinite non-moving (static) collisi on plane. ///The btStaticPlaneShape simulates an infinite non-moving (static) collisi on plane.
ATTRIBUTE_ALIGNED16(class) btStaticPlaneShape : public btConcaveShape ATTRIBUTE_ALIGNED16(class) btStaticPlaneShape : public btConcaveShape
{ {
protected: protected:
btVector3 m_localAabbMin; btVector3 m_localAabbMin;
btVector3 m_localAabbMax; btVector3 m_localAabbMax;
skipping to change at line 95 skipping to change at line 95
btStaticPlaneShapeData* planeData = (btStaticPlaneShapeData*) dataBu ffer; btStaticPlaneShapeData* planeData = (btStaticPlaneShapeData*) dataBu ffer;
btCollisionShape::serialize(&planeData->m_collisionShapeData,seriali zer); btCollisionShape::serialize(&planeData->m_collisionShapeData,seriali zer);
m_localScaling.serializeFloat(planeData->m_localScaling); m_localScaling.serializeFloat(planeData->m_localScaling);
m_planeNormal.serializeFloat(planeData->m_planeNormal); m_planeNormal.serializeFloat(planeData->m_planeNormal);
planeData->m_planeConstant = float(m_planeConstant); planeData->m_planeConstant = float(m_planeConstant);
return "btStaticPlaneShapeData"; return "btStaticPlaneShapeData";
} }
#endif //STATIC_PLANE_SHAPE_H #endif //BT_STATIC_PLANE_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btStridingMeshInterface.h   btStridingMeshInterface.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef STRIDING_MESHINTERFACE_H #ifndef BT_STRIDING_MESHINTERFACE_H
#define STRIDING_MESHINTERFACE_H #define BT_STRIDING_MESHINTERFACE_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btTriangleCallback.h" #include "btTriangleCallback.h"
#include "btConcaveShape.h" #include "btConcaveShape.h"
/// The btStridingMeshInterface is the interface class for high performa nce generic access to triangle meshes, used in combination with btBvhTriang leMeshShape and some other collision shapes. /// The btStridingMeshInterface is the interface class for high performa nce generic access to triangle meshes, used in combination with btBvhTriang leMeshShape and some other collision shapes.
/// Using index striding of 3*sizeof(integer) it can use triangle arrays, u sing index striding of 1*sizeof(integer) it can handle triangle strips. /// Using index striding of 3*sizeof(integer) it can use triangle arrays, u sing index striding of 1*sizeof(integer) it can handle triangle strips.
/// It allows for sharing graphics and collision meshes. Also it provides l ocking/unlocking of graphics meshes that are in gpu memory. /// It allows for sharing graphics and collision meshes. Also it provides l ocking/unlocking of graphics meshes that are in gpu memory.
class btStridingMeshInterface class btStridingMeshInterface
{ {
skipping to change at line 111 skipping to change at line 111
short m_value; short m_value;
char m_pad[2]; char m_pad[2];
}; };
struct btShortIntIndexTripletData struct btShortIntIndexTripletData
{ {
short m_values[3]; short m_values[3];
char m_pad[2]; char m_pad[2];
}; };
struct btCharIndexTripletData
{
unsigned char m_values[3];
char m_pad;
};
///do not change those serialization structures, it requires an updated sBu lletDNAstr/sBulletDNAstr64 ///do not change those serialization structures, it requires an updated sBu lletDNAstr/sBulletDNAstr64
struct btMeshPartData struct btMeshPartData
{ {
btVector3FloatData *m_vertices3f; btVector3FloatData *m_vertices3f;
btVector3DoubleData *m_vertices3d; btVector3DoubleData *m_vertices3d;
btIntIndexData *m_indices32; btIntIndexData *m_indices32;
btShortIntIndexTripletData *m_3indices16; btShortIntIndexTripletData *m_3indices16;
btCharIndexTripletData *m_3indices8;
btShortIntIndexData *m_indices16;//backwards com patibility btShortIntIndexData *m_indices16;//backwards com patibility
int m_numTriangles;//length of m_indices = m_num Triangles int m_numTriangles;//length of m_indices = m_num Triangles
int m_numVertices; int m_numVertices;
}; };
///do not change those serialization structures, it requires an updated sBu lletDNAstr/sBulletDNAstr64 ///do not change those serialization structures, it requires an updated sBu lletDNAstr/sBulletDNAstr64
struct btStridingMeshInterfaceData struct btStridingMeshInterfaceData
{ {
skipping to change at line 140 skipping to change at line 147
btVector3FloatData m_scaling; btVector3FloatData m_scaling;
int m_numMeshParts; int m_numMeshParts;
char m_padding[4]; char m_padding[4];
}; };
SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeB ufferSize() const SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeB ufferSize() const
{ {
return sizeof(btStridingMeshInterfaceData); return sizeof(btStridingMeshInterfaceData);
} }
#endif //STRIDING_MESHINTERFACE_H #endif //BT_STRIDING_MESHINTERFACE_H
 End of changes. 4 change blocks. 
2 lines changed or deleted 9 lines changed or added


 btSubSimplexConvexCast.h   btSubSimplexConvexCast.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SUBSIMPLEX_CONVEX_CAST_H #ifndef BT_SUBSIMPLEX_CONVEX_CAST_H
#define SUBSIMPLEX_CONVEX_CAST_H #define BT_SUBSIMPLEX_CONVEX_CAST_H
#include "btConvexCast.h" #include "btConvexCast.h"
#include "btSimplexSolverInterface.h" #include "btSimplexSolverInterface.h"
class btConvexShape; class btConvexShape;
/// btSubsimplexConvexCast implements Gino van den Bergens' paper /// btSubsimplexConvexCast implements Gino van den Bergens' paper
///"Ray Casting against bteral Convex Objects with Application to Continuou s Collision Detection" ///"Ray Casting against bteral Convex Objects with Application to Continuou s Collision Detection"
/// GJK based Ray Cast, optimized version /// GJK based Ray Cast, optimized version
/// Objects should not start in overlap, otherwise results are not defined. /// Objects should not start in overlap, otherwise results are not defined.
class btSubsimplexConvexCast : public btConvexCast class btSubsimplexConvexCast : public btConvexCast
skipping to change at line 49 skipping to change at line 49
///Precondition is that objects should not penetration/overlap at th e start from the interval. Overlap can be tested using btGjkPairDetector. ///Precondition is that objects should not penetration/overlap at th e start from the interval. Overlap can be tested using btGjkPairDetector.
virtual bool calcTimeOfImpact( virtual bool calcTimeOfImpact(
const btTransform& fromA, const btTransform& fromA,
const btTransform& toA, const btTransform& toA,
const btTransform& fromB, const btTransform& fromB,
const btTransform& toB, const btTransform& toB,
CastResult& result); CastResult& result);
}; };
#endif //SUBSIMPLEX_CONVEX_CAST_H #endif //BT_SUBSIMPLEX_CONVEX_CAST_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTetrahedronShape.h   btTetrahedronShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef BU_SIMPLEX_1TO4_SHAPE #ifndef BT_SIMPLEX_1TO4_SHAPE
#define BU_SIMPLEX_1TO4_SHAPE #define BT_SIMPLEX_1TO4_SHAPE
#include "btPolyhedralConvexShape.h" #include "btPolyhedralConvexShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
///The btBU_Simplex1to4 implements tetrahedron, triangle, line, vertex coll ision shapes. In most cases it is better to use btConvexHullShape instead. ///The btBU_Simplex1to4 implements tetrahedron, triangle, line, vertex coll ision shapes. In most cases it is better to use btConvexHullShape instead.
class btBU_Simplex1to4 : public btPolyhedralConvexAabbCachingShape class btBU_Simplex1to4 : public btPolyhedralConvexAabbCachingShape
{ {
protected: protected:
int m_numVertices; int m_numVertices;
skipping to change at line 70 skipping to change at line 70
virtual int getIndex(int i) const; virtual int getIndex(int i) const;
virtual bool isInside(const btVector3& pt,btScalar tolerance) const; virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
///getName is for debugging ///getName is for debugging
virtual const char* getName()const { return "btBU_Simplex1to4";} virtual const char* getName()const { return "btBU_Simplex1to4";}
}; };
#endif //BU_SIMPLEX_1TO4_SHAPE #endif //BT_SIMPLEX_1TO4_SHAPE
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTransform.h   btTransform.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef btTransform_H #ifndef BT_TRANSFORM_H
#define btTransform_H #define BT_TRANSFORM_H
#include "btMatrix3x3.h" #include "btMatrix3x3.h"
#ifdef BT_USE_DOUBLE_PRECISION #ifdef BT_USE_DOUBLE_PRECISION
#define btTransformData btTransformDoubleData #define btTransformData btTransformDoubleData
#else #else
#define btTransformData btTransformFloatData #define btTransformData btTransformFloatData
#endif #endif
/**@brief The btTransform class supports rigid transforms with only transla tion and rotation and no scaling/shear. /**@brief The btTransform class supports rigid transforms with only transla tion and rotation and no scaling/shear.
skipping to change at line 285 skipping to change at line 285
m_basis.deSerializeFloat(dataIn.m_basis); m_basis.deSerializeFloat(dataIn.m_basis);
m_origin.deSerializeFloat(dataIn.m_origin); m_origin.deSerializeFloat(dataIn.m_origin);
} }
SIMD_FORCE_INLINE void btTransform::deSerializeDouble(const btTrans formDoubleData& dataIn) SIMD_FORCE_INLINE void btTransform::deSerializeDouble(const btTrans formDoubleData& dataIn)
{ {
m_basis.deSerializeDouble(dataIn.m_basis); m_basis.deSerializeDouble(dataIn.m_basis);
m_origin.deSerializeDouble(dataIn.m_origin); m_origin.deSerializeDouble(dataIn.m_origin);
} }
#endif #endif //BT_TRANSFORM_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTransformUtil.h   btTransformUtil.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMD_TRANSFORM_UTIL_H #ifndef BT_TRANSFORM_UTIL_H
#define SIMD_TRANSFORM_UTIL_H #define BT_TRANSFORM_UTIL_H
#include "btTransform.h" #include "btTransform.h"
#define ANGULAR_MOTION_THRESHOLD btScalar(0.5)*SIMD_HALF_PI #define ANGULAR_MOTION_THRESHOLD btScalar(0.5)*SIMD_HALF_PI
SIMD_FORCE_INLINE btVector3 btAabbSupport(const btVector3& halfExtents,cons t btVector3& supportDir) SIMD_FORCE_INLINE btVector3 btAabbSupport(const btVector3& halfExtents,cons t btVector3& supportDir)
{ {
return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(),
supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(),
supportDir.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); supportDir.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z());
} }
skipping to change at line 215 skipping to change at line 215
btQuaternion toOrnB = transB.getRotation(); btQuaternion toOrnB = transB.getRotation();
m_posA = toPosA; m_posA = toPosA;
m_posB = toPosB; m_posB = toPosB;
m_ornA = toOrnA; m_ornA = toOrnA;
m_ornB = toOrnB; m_ornB = toOrnB;
} }
} }
}; };
#endif //SIMD_TRANSFORM_UTIL_H #endif //BT_TRANSFORM_UTIL_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTriangleCallback.h   btTriangleCallback.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef TRIANGLE_CALLBACK_H #ifndef BT_TRIANGLE_CALLBACK_H
#define TRIANGLE_CALLBACK_H #define BT_TRIANGLE_CALLBACK_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
///The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTriangles. ///The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTriangles.
///This callback is called by processAllTriangles for all btConcaveShape de rived class, such as btBvhTriangleMeshShape, btStaticPlaneShape and btHeig htfieldTerrainShape. ///This callback is called by processAllTriangles for all btConcaveShape de rived class, such as btBvhTriangleMeshShape, btStaticPlaneShape and btHeig htfieldTerrainShape.
class btTriangleCallback class btTriangleCallback
{ {
public: public:
virtual ~btTriangleCallback(); virtual ~btTriangleCallback();
skipping to change at line 39 skipping to change at line 39
}; };
class btInternalTriangleIndexCallback class btInternalTriangleIndexCallback
{ {
public: public:
virtual ~btInternalTriangleIndexCallback(); virtual ~btInternalTriangleIndexCallback();
virtual void internalProcessTriangleIndex(btVector3* triangle,int pa rtId,int triangleIndex) = 0; virtual void internalProcessTriangleIndex(btVector3* triangle,int pa rtId,int triangleIndex) = 0;
}; };
#endif //TRIANGLE_CALLBACK_H #endif //BT_TRIANGLE_CALLBACK_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTriangleInfoMap.h   btTriangleInfoMap.h 
skipping to change at line 60 skipping to change at line 60
typedef btHashMap<btHashInt,btTriangleInfo> btInternalTriangleInfoMap; typedef btHashMap<btHashInt,btTriangleInfo> btInternalTriangleInfoMap;
///The btTriangleInfoMap stores edge angle information for some triangles. You can compute this information yourself or using btGenerateInternalEdgeIn fo. ///The btTriangleInfoMap stores edge angle information for some triangles. You can compute this information yourself or using btGenerateInternalEdgeIn fo.
struct btTriangleInfoMap : public btInternalTriangleInfoMap struct btTriangleInfoMap : public btInternalTriangleInfoMap
{ {
btScalar m_convexEpsilon;///used to determine if an edge or c ontact normal is convex, using the dot product btScalar m_convexEpsilon;///used to determine if an edge or c ontact normal is convex, using the dot product
btScalar m_planarEpsilon; ///used to determine if a triangle edge is planar with zero angle btScalar m_planarEpsilon; ///used to determine if a triangle edge is planar with zero angle
btScalar m_equalVertexThreshold; ///used to compute connectiv ity: if the distance between two vertices is smaller than m_equalVertexThre shold, they are considered to be 'shared' btScalar m_equalVertexThreshold; ///used to compute connectiv ity: if the distance between two vertices is smaller than m_equalVertexThre shold, they are considered to be 'shared'
btScalar m_edgeDistanceThreshold; ///used to determine edge c ontacts: if the closest distance between a contact point and an edge is sma ller than this distance threshold it is considered to "hit the edge" btScalar m_edgeDistanceThreshold; ///used to determine edge c ontacts: if the closest distance between a contact point and an edge is sma ller than this distance threshold it is considered to "hit the edge"
btScalar m_maxEdgeAngleThreshold; //ignore edges that connect triangles at an angle larger than this m_maxEdgeAngleThreshold
btScalar m_zeroAreaThreshold; ///used to determine if a trian gle is degenerate (length squared of cross product of 2 triangle edges < th reshold) btScalar m_zeroAreaThreshold; ///used to determine if a trian gle is degenerate (length squared of cross product of 2 triangle edges < th reshold)
btTriangleInfoMap() btTriangleInfoMap()
{ {
m_convexEpsilon = 0.00f; m_convexEpsilon = 0.00f;
m_planarEpsilon = 0.0001f; m_planarEpsilon = 0.0001f;
m_equalVertexThreshold = btScalar(0.0001)*btScalar(0.0001); m_equalVertexThreshold = btScalar(0.0001)*btScalar(0.0001);
m_edgeDistanceThreshold = btScalar(0.1); m_edgeDistanceThreshold = btScalar(0.1);
m_zeroAreaThreshold = btScalar(0.0001)*btScalar(0.0001); m_zeroAreaThreshold = btScalar(0.0001)*btScalar(0.0001);
m_maxEdgeAngleThreshold = SIMD_2_PI;
} }
virtual ~btTriangleInfoMap() {} virtual ~btTriangleInfoMap() {}
virtual int calculateSerializeBufferSize() const; virtual int calculateSerializeBufferSize() const;
///fills the dataBuffer and returns the struct name (and 0 on failur e) ///fills the dataBuffer and returns the struct name (and 0 on failur e)
virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const; virtual const char* serialize(void* dataBuffer, btSerializer* se rializer) const;
void deSerialize(struct btTriangleInfoMapData& data); void deSerialize(struct btTriangleInfoMapData& data);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 btTriangleMesh.h   btTriangleMesh.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef TRIANGLE_MESH_H #ifndef BT_TRIANGLE_MESH_H
#define TRIANGLE_MESH_H #define BT_TRIANGLE_MESH_H
#include "btTriangleIndexVertexArray.h" #include "btTriangleIndexVertexArray.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
///The btTriangleMesh class is a convenience class derived from btTriangleI ndexVertexArray, that provides storage for a concave triangle mesh. It can be used as data for the btBvhTriangleMeshShape. ///The btTriangleMesh class is a convenience class derived from btTriangleI ndexVertexArray, that provides storage for a concave triangle mesh. It can be used as data for the btBvhTriangleMeshShape.
///It allows either 32bit or 16bit indices, and 4 (x-y-z-w) or 3 (x-y-z) co mponent vertices. ///It allows either 32bit or 16bit indices, and 4 (x-y-z-w) or 3 (x-y-z) co mponent vertices.
///If you want to share triangle/index data between graphics mesh and colli sion mesh (btBvhTriangleMeshShape), you can directly use btTriangleIndexVer texArray or derive your own class from btStridingMeshInterface. ///If you want to share triangle/index data between graphics mesh and colli sion mesh (btBvhTriangleMeshShape), you can directly use btTriangleIndexVer texArray or derive your own class from btStridingMeshInterface.
///Performance of btTriangleMesh and btTriangleIndexVertexArray used in a b tBvhTriangleMeshShape is the same. ///Performance of btTriangleMesh and btTriangleIndexVertexArray used in a b tBvhTriangleMeshShape is the same.
class btTriangleMesh : public btTriangleIndexVertexArray class btTriangleMesh : public btTriangleIndexVertexArray
skipping to change at line 67 skipping to change at line 67
virtual void preallocateVertices(int numverts){(void) num verts;} virtual void preallocateVertices(int numverts){(void) num verts;}
virtual void preallocateIndices(int numindices){(void) nu mindices;} virtual void preallocateIndices(int numindices){(void) nu mindices;}
///findOrAddVertex is an internal method, use addTriangle in stead ///findOrAddVertex is an internal method, use addTriangle in stead
int findOrAddVertex(const btVector3& vertex, boo l removeDuplicateVertices); int findOrAddVertex(const btVector3& vertex, boo l removeDuplicateVertices);
///addIndex is an internal method, use addTriangle instead ///addIndex is an internal method, use addTriangle instead
void addIndex(int index); void addIndex(int index);
}; };
#endif //TRIANGLE_MESH_H #endif //BT_TRIANGLE_MESH_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTriangleMeshShape.h   btTriangleMeshShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef TRIANGLE_MESH_SHAPE_H #ifndef BT_TRIANGLE_MESH_SHAPE_H
#define TRIANGLE_MESH_SHAPE_H #define BT_TRIANGLE_MESH_SHAPE_H
#include "btConcaveShape.h" #include "btConcaveShape.h"
#include "btStridingMeshInterface.h" #include "btStridingMeshInterface.h"
///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. ///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead.
class btTriangleMeshShape : public btConcaveShape class btTriangleMeshShape : public btConcaveShape
{ {
protected: protected:
btVector3 m_localAabbMin; btVector3 m_localAabbMin;
btVector3 m_localAabbMax; btVector3 m_localAabbMax;
skipping to change at line 81 skipping to change at line 81
const btVector3& getLocalAabbMax() const const btVector3& getLocalAabbMax() const
{ {
return m_localAabbMax; return m_localAabbMax;
} }
//debugging //debugging
virtual const char* getName()const {return "TRIANGLEMESH";} virtual const char* getName()const {return "TRIANGLEMESH";}
}; };
#endif //TRIANGLE_MESH_SHAPE_H #endif //BT_TRIANGLE_MESH_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTriangleShape.h   btTriangleShape.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OBB_TRIANGLE_MINKOWSKI_H #ifndef BT_OBB_TRIANGLE_MINKOWSKI_H
#define OBB_TRIANGLE_MINKOWSKI_H #define BT_OBB_TRIANGLE_MINKOWSKI_H
#include "btConvexShape.h" #include "btConvexShape.h"
#include "btBoxShape.h" #include "btBoxShape.h"
ATTRIBUTE_ALIGNED16(class) btTriangleShape : public btPolyhedralConvexShape ATTRIBUTE_ALIGNED16(class) btTriangleShape : public btPolyhedralConvexShape
{ {
public: public:
btVector3 m_vertices1[3]; btVector3 m_vertices1[3];
skipping to change at line 177 skipping to change at line 177
virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
{ {
calcNormal(penetrationVector); calcNormal(penetrationVector);
if (index) if (index)
penetrationVector *= btScalar(-1.); penetrationVector *= btScalar(-1.);
} }
}; };
#endif //OBB_TRIANGLE_MINKOWSKI_H #endif //BT_OBB_TRIANGLE_MINKOWSKI_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTriangleShapeEx.h   btTriangleShapeEx.h 
skipping to change at line 23 skipping to change at line 23
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef TRIANGLE_SHAPE_EX_H #ifndef GIMPACT_TRIANGLE_SHAPE_EX_H
#define TRIANGLE_SHAPE_EX_H #define GIMPACT_TRIANGLE_SHAPE_EX_H
#include "BulletCollision/CollisionShapes/btCollisionShape.h" #include "BulletCollision/CollisionShapes/btCollisionShape.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h" #include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include "btBoxCollision.h" #include "btBoxCollision.h"
#include "btClipPolygon.h" #include "btClipPolygon.h"
#include "btGeometryOperations.h" #include "btGeometryOperations.h"
#define MAX_TRI_CLIPPING 16 #define MAX_TRI_CLIPPING 16
//! Structure for collision //! Structure for collision
skipping to change at line 171 skipping to change at line 171
SIMD_FORCE_INLINE void buildTriPlane(btVector4 & plane) const SIMD_FORCE_INLINE void buildTriPlane(btVector4 & plane) const
{ {
btVector3 normal = (m_vertices1[1]-m_vertices1[0]).cross(m_v ertices1[2]-m_vertices1[0]); btVector3 normal = (m_vertices1[1]-m_vertices1[0]).cross(m_v ertices1[2]-m_vertices1[0]);
normal.normalize(); normal.normalize();
plane.setValue(normal[0],normal[1],normal[2],m_vertices1[0]. dot(normal)); plane.setValue(normal[0],normal[1],normal[2],m_vertices1[0]. dot(normal));
} }
bool overlap_test_conservative(const btTriangleShapeEx& other); bool overlap_test_conservative(const btTriangleShapeEx& other);
}; };
#endif //TRIANGLE_MESH_SHAPE_H #endif //GIMPACT_TRIANGLE_MESH_SHAPE_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btTypedConstraint.h   btTypedConstraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef TYPED_CONSTRAINT_H #ifndef BT_TYPED_CONSTRAINT_H
#define TYPED_CONSTRAINT_H #define BT_TYPED_CONSTRAINT_H
class btRigidBody; class btRigidBody;
#include "LinearMath/btScalar.h" #include "LinearMath/btScalar.h"
#include "btSolverConstraint.h" #include "btSolverConstraint.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
class btSerializer; class btSerializer;
//Don't change any of the existing enum values, so add enum types at the en d for serialization compatibility
enum btTypedConstraintType enum btTypedConstraintType
{ {
POINT2POINT_CONSTRAINT_TYPE=MAX_CONTACT_MANIFOLD_TYPE+1, POINT2POINT_CONSTRAINT_TYPE=3,
HINGE_CONSTRAINT_TYPE, HINGE_CONSTRAINT_TYPE,
CONETWIST_CONSTRAINT_TYPE, CONETWIST_CONSTRAINT_TYPE,
D6_CONSTRAINT_TYPE, D6_CONSTRAINT_TYPE,
SLIDER_CONSTRAINT_TYPE, SLIDER_CONSTRAINT_TYPE,
CONTACT_CONSTRAINT_TYPE CONTACT_CONSTRAINT_TYPE,
D6_SPRING_CONSTRAINT_TYPE,
MAX_CONSTRAINT_TYPE
}; };
enum btConstraintParams enum btConstraintParams
{ {
BT_CONSTRAINT_ERP=1, BT_CONSTRAINT_ERP=1,
BT_CONSTRAINT_STOP_ERP, BT_CONSTRAINT_STOP_ERP,
BT_CONSTRAINT_CFM, BT_CONSTRAINT_CFM,
BT_CONSTRAINT_STOP_CFM BT_CONSTRAINT_STOP_CFM
}; };
skipping to change at line 61 skipping to change at line 63
class btTypedConstraint : public btTypedObject class btTypedConstraint : public btTypedObject
{ {
int m_userConstraintType; int m_userConstraintType;
union union
{ {
int m_userConstraintId; int m_userConstraintId;
void* m_userConstraintPtr; void* m_userConstraintPtr;
}; };
btScalar m_breakingImpulseThreshold;
bool m_isEnabled;
bool m_needsFeedback; bool m_needsFeedback;
btTypedConstraint& operator=(btTypedConstraint& other) btTypedConstraint& operator=(btTypedConstraint& other)
{ {
btAssert(0); btAssert(0);
(void) other; (void) other;
return *this; return *this;
} }
protected: protected:
skipping to change at line 154 skipping to change at line 159
void internalSetAppliedImpulse(btScalar appliedImpulse) void internalSetAppliedImpulse(btScalar appliedImpulse)
{ {
m_appliedImpulse = appliedImpulse; m_appliedImpulse = appliedImpulse;
} }
///internal method used by the constraint solver, don't use them dir ectly ///internal method used by the constraint solver, don't use them dir ectly
btScalar internalGetAppliedImpulse() btScalar internalGetAppliedImpulse()
{ {
return m_appliedImpulse; return m_appliedImpulse;
} }
btScalar getBreakingImpulseThreshold() const
{
return m_breakingImpulseThreshold;
}
void setBreakingImpulseThreshold(btScalar threshold)
{
m_breakingImpulseThreshold = threshold;
}
bool isEnabled() const
{
return m_isEnabled;
}
void setEnabled(bool enabled)
{
m_isEnabled=enabled;
}
///internal method used by the constraint solver, don't use them dir ectly ///internal method used by the constraint solver, don't use them dir ectly
virtual void solveConstraintObsolete(btRigidBody& /*bodyA*/,btRig idBody& /*bodyB*/,btScalar /*timeStep*/) {}; virtual void solveConstraintObsolete(btRigidBody& /*bodyA*/,btRig idBody& /*bodyB*/,btScalar /*timeStep*/) {};
const btRigidBody& getRigidBodyA() const const btRigidBody& getRigidBodyA() const
{ {
return m_rbA; return m_rbA;
} }
const btRigidBody& getRigidBodyB() const const btRigidBody& getRigidBodyB() const
{ {
return m_rbB; return m_rbB;
skipping to change at line 309 skipping to change at line 334
int m_disableCollisionsBetweenLinkedBodies; int m_disableCollisionsBetweenLinkedBodies;
char m_pad4[4]; char m_pad4[4];
}; };
SIMD_FORCE_INLINE int btTypedConstraint::calculateSerializeBufferS ize() const SIMD_FORCE_INLINE int btTypedConstraint::calculateSerializeBufferS ize() const
{ {
return sizeof(btTypedConstraintData); return sizeof(btTypedConstraintData);
} }
#endif //TYPED_CONSTRAINT_H class btAngularLimit
{
private:
btScalar
m_center,
m_halfRange,
m_softness,
m_biasFactor,
m_relaxationFactor,
m_correction,
m_sign;
bool
m_solveLimit;
public:
/// Default constructor initializes limit as inactive, allowing free
constraint movement
btAngularLimit()
:m_center(0.0f),
m_halfRange(-1.0f),
m_softness(0.9f),
m_biasFactor(0.3f),
m_relaxationFactor(1.0f),
m_correction(0.0f),
m_sign(0.0f),
m_solveLimit(false)
{}
/// Sets all limit's parameters.
/// When low > high limit becomes inactive.
/// When high - low > 2PI limit is ineffective too becouse no angle
can exceed the limit
void set(btScalar low, btScalar high, btScalar _softness = 0.9f, btS
calar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f);
/// Checks conastaint angle against limit. If limit is active and th
e angle violates the limit
/// correction is calculated.
void test(const btScalar angle);
/// Returns limit's softness
inline btScalar getSoftness() const
{
return m_softness;
}
/// Returns limit's bias factor
inline btScalar getBiasFactor() const
{
return m_biasFactor;
}
/// Returns limit's relaxation factor
inline btScalar getRelaxationFactor() const
{
return m_relaxationFactor;
}
/// Returns correction value evaluated when test() was invoked
inline btScalar getCorrection() const
{
return m_correction;
}
/// Returns sign value evaluated when test() was invoked
inline btScalar getSign() const
{
return m_sign;
}
/// Gives half of the distance between min and max limit angle
inline btScalar getHalfRange() const
{
return m_halfRange;
}
/// Returns true when the last test() invocation recognized limit vi
olation
inline bool isLimit() const
{
return m_solveLimit;
}
/// Checks given angle against limit. If limit is active and angle d
oesn't fit it, the angle
/// returned is modified so it equals to the limit closest to given
angle.
void fit(btScalar& angle) const;
/// Returns correction value multiplied by sign value
btScalar getError() const;
btScalar getLow() const;
btScalar getHigh() const;
};
#endif //BT_TYPED_CONSTRAINT_H
 End of changes. 8 change blocks. 
5 lines changed or deleted 30 lines changed or added


 btUnionFind.h   btUnionFind.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef UNION_FIND_H #ifndef BT_UNION_FIND_H
#define UNION_FIND_H #define BT_UNION_FIND_H
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#define USE_PATH_COMPRESSION 1 #define USE_PATH_COMPRESSION 1
///see for discussion of static island optimizations by Vroonsh here: http: //code.google.com/p/bullet/issues/detail?id=406 ///see for discussion of static island optimizations by Vroonsh here: http: //code.google.com/p/bullet/issues/detail?id=406
#define STATIC_SIMULATION_ISLAND_OPTIMIZATION 1 #define STATIC_SIMULATION_ISLAND_OPTIMIZATION 1
struct btElement struct btElement
{ {
skipping to change at line 123 skipping to change at line 123
#endif #endif
//btAssert(x < m_N); //btAssert(x < m_N);
//btAssert(x >= 0); //btAssert(x >= 0);
} }
return x; return x;
} }
}; };
#endif //UNION_FIND_H #endif //BT_UNION_FIND_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btUniversalConstraint.h   btUniversalConstraint.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef UNIVERSAL_CONSTRAINT_H #ifndef BT_UNIVERSAL_CONSTRAINT_H
#define UNIVERSAL_CONSTRAINT_H #define BT_UNIVERSAL_CONSTRAINT_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "btTypedConstraint.h" #include "btTypedConstraint.h"
#include "btGeneric6DofConstraint.h" #include "btGeneric6DofConstraint.h"
/// Constraint similar to ODE Universal Joint /// Constraint similar to ODE Universal Joint
/// has 2 rotatioonal degrees of freedom, similar to Euler rotations around Z (axis 1) /// has 2 rotatioonal degrees of freedom, similar to Euler rotations around Z (axis 1)
/// and Y (axis 2) /// and Y (axis 2)
/// Description from ODE manual : /// Description from ODE manual :
/// "Given axis 1 on body 1, and axis 2 on body 2 that is perpendicular to axis 1, it keeps them perpendicular. /// "Given axis 1 on body 1, and axis 2 on body 2 that is perpendicular to axis 1, it keeps them perpendicular.
skipping to change at line 51 skipping to change at line 51
// access // access
const btVector3& getAnchor() { return m_calculatedTransformA.getOrig in(); } const btVector3& getAnchor() { return m_calculatedTransformA.getOrig in(); }
const btVector3& getAnchor2() { return m_calculatedTransformB.getOri gin(); } const btVector3& getAnchor2() { return m_calculatedTransformB.getOri gin(); }
const btVector3& getAxis1() { return m_axis1; } const btVector3& getAxis1() { return m_axis1; }
const btVector3& getAxis2() { return m_axis2; } const btVector3& getAxis2() { return m_axis2; }
btScalar getAngle1() { return getAngle(2); } btScalar getAngle1() { return getAngle(2); }
btScalar getAngle2() { return getAngle(1); } btScalar getAngle2() { return getAngle(1); }
// limits // limits
void setUpperLimit(btScalar ang1max, btScalar ang2max) { setAngularU pperLimit(btVector3(0.f, ang1max, ang2max)); } void setUpperLimit(btScalar ang1max, btScalar ang2max) { setAngularU pperLimit(btVector3(0.f, ang1max, ang2max)); }
void setLowerLimit(btScalar ang1min, btScalar ang2min) { setAngularL owerLimit(btVector3(0.f, ang1min, ang2min)); } void setLowerLimit(btScalar ang1min, btScalar ang2min) { setAngularL owerLimit(btVector3(0.f, ang1min, ang2min)); }
void setAxis( const btVector3& axis1, const btVector3& axis2);
}; };
#endif // UNIVERSAL_CONSTRAINT_H #endif // BT_UNIVERSAL_CONSTRAINT_H
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 btVector3.h   btVector3.h 
skipping to change at line 15 skipping to change at line 15
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef SIMD__VECTOR3_H #ifndef BT_VECTOR3_H
#define SIMD__VECTOR3_H #define BT_VECTOR3_H
#include "btScalar.h" #include "btScalar.h"
#include "btMinMax.h" #include "btMinMax.h"
#ifdef BT_USE_DOUBLE_PRECISION #ifdef BT_USE_DOUBLE_PRECISION
#define btVector3Data btVector3DoubleData #define btVector3Data btVector3DoubleData
#define btVector3DataName "btVector3DoubleData" #define btVector3DataName "btVector3DoubleData"
#else #else
#define btVector3Data btVector3FloatData #define btVector3Data btVector3FloatData
#define btVector3DataName "btVector3FloatData" #define btVector3DataName "btVector3FloatData"
skipping to change at line 732 skipping to change at line 732
for (int i=0;i<4;i++) for (int i=0;i<4;i++)
dataOut.m_floats[i] = m_floats[i]; dataOut.m_floats[i] = m_floats[i];
} }
SIMD_FORCE_INLINE void btVector3::deSerialize(const struct btVector3Dat a& dataIn) SIMD_FORCE_INLINE void btVector3::deSerialize(const struct btVector3Dat a& dataIn)
{ {
for (int i=0;i<4;i++) for (int i=0;i<4;i++)
m_floats[i] = dataIn.m_floats[i]; m_floats[i] = dataIn.m_floats[i];
} }
#endif //SIMD__VECTOR3_H #endif //BT_VECTOR3_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btVehicleRaycaster.h   btVehicleRaycaster.h 
/* /*
* Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org
* *
* Permission to use, copy, modify, distribute and sell this software * Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee, * and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies. * provided that the above copyright notice appear in all copies.
* Erwin Coumans makes no representations about the suitability * Erwin Coumans makes no representations about the suitability
* of this software for any purpose. * of this software for any purpose.
* It is provided "as is" without express or implied warranty. * It is provided "as is" without express or implied warranty.
*/ */
#ifndef VEHICLE_RAYCASTER_H #ifndef BT_VEHICLE_RAYCASTER_H
#define VEHICLE_RAYCASTER_H #define BT_VEHICLE_RAYCASTER_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
/// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting
struct btVehicleRaycaster struct btVehicleRaycaster
{ {
virtual ~btVehicleRaycaster() virtual ~btVehicleRaycaster()
{ {
} }
struct btVehicleRaycasterResult struct btVehicleRaycasterResult
skipping to change at line 34 skipping to change at line 34
btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){}; btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){};
btVector3 m_hitPointInWorld; btVector3 m_hitPointInWorld;
btVector3 m_hitNormalInWorld; btVector3 m_hitNormalInWorld;
btScalar m_distFraction; btScalar m_distFraction;
}; };
virtual void* castRay(const btVector3& from,const btVector3& to, btV ehicleRaycasterResult& result) = 0; virtual void* castRay(const btVector3& from,const btVector3& to, btV ehicleRaycasterResult& result) = 0;
}; };
#endif //VEHICLE_RAYCASTER_H #endif //BT_VEHICLE_RAYCASTER_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 btVoronoiSimplexSolver.h   btVoronoiSimplexSolver.h 
skipping to change at line 16 skipping to change at line 16
In no event will the authors be held liable for any damages arising from th e use of this software. In no event will the authors be held liable for any damages arising from th e use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it free ly, including commercial applications, and to alter it and redistribute it free ly,
subject to the following restrictions: subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required. 1. The origin of this software must not be misrepresented; you must not cla im that you wrote the original software. If you use this software in a prod uct, an acknowledgment in the product documentation would be appreciated bu t is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 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. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef btVoronoiSimplexSolver_H #ifndef BT_VORONOI_SIMPLEX_SOLVER_H
#define btVoronoiSimplexSolver_H #define BT_VORONOI_SIMPLEX_SOLVER_H
#include "btSimplexSolverInterface.h" #include "btSimplexSolverInterface.h"
#define VORONOI_SIMPLEX_MAX_VERTS 5 #define VORONOI_SIMPLEX_MAX_VERTS 5
///disable next define, or use defaultCollisionConfiguration->getSimplexSol ver()->setEqualVertexThreshold(0.f) to disable/configure ///disable next define, or use defaultCollisionConfiguration->getSimplexSol ver()->setEqualVertexThreshold(0.f) to disable/configure
#define BT_USE_EQUAL_VERTEX_THRESHOLD #define BT_USE_EQUAL_VERTEX_THRESHOLD
#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f #define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f
struct btUsageBitfield{ struct btUsageBitfield{
skipping to change at line 167 skipping to change at line 167
void compute_points(btVector3& p1, btVector3& p2) ; void compute_points(btVector3& p1, btVector3& p2) ;
int numVertices() const int numVertices() const
{ {
return m_numVertices; return m_numVertices;
} }
}; };
#endif //VoronoiSimplexSolver #endif //BT_VORONOI_SIMPLEX_SOLVER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 btWheelInfo.h   btWheelInfo.h 
/* /*
* Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
* *
* Permission to use, copy, modify, distribute and sell this software * Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee, * and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies. * provided that the above copyright notice appear in all copies.
* Erwin Coumans makes no representations about the suitability * Erwin Coumans makes no representations about the suitability
* of this software for any purpose. * of this software for any purpose.
* It is provided "as is" without express or implied warranty. * It is provided "as is" without express or implied warranty.
*/ */
#ifndef WHEEL_INFO_H #ifndef BT_WHEEL_INFO_H
#define WHEEL_INFO_H #define BT_WHEEL_INFO_H
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
class btRigidBody; class btRigidBody;
struct btWheelInfoConstructionInfo struct btWheelInfoConstructionInfo
{ {
btVector3 m_chassisConnectionCS; btVector3 m_chassisConnectionCS;
btVector3 m_wheelDirectionCS; btVector3 m_wheelDirectionCS;
skipping to change at line 118 skipping to change at line 118
void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastI nfo); void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastI nfo);
btScalar m_clippedInvContactDotSuspension; btScalar m_clippedInvContactDotSuspension;
btScalar m_suspensionRelativeVelocity; btScalar m_suspensionRelativeVelocity;
//calculated by suspension //calculated by suspension
btScalar m_wheelsSuspensionForce; btScalar m_wheelsSuspensionForce;
btScalar m_skidInfo; btScalar m_skidInfo;
}; };
#endif //WHEEL_INFO_H #endif //BT_WHEEL_INFO_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/