Some performance improvements and fixes related to btVector3 being aligned on SPU.
btQuantizedBvh has a version number, memory layout might be different now (due to aligned btVector3) reorganized some data members of some classes, to reduce memory footprint
This commit is contained in:
@@ -91,20 +91,16 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
|
|||||||
AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
|
AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
|
||||||
};
|
};
|
||||||
|
|
||||||
btVector3 m_aabbMin;
|
|
||||||
btVector3 m_aabbMax;
|
|
||||||
|
|
||||||
//Usually the client btCollisionObject or Rigidbody class
|
//Usually the client btCollisionObject or Rigidbody class
|
||||||
void* m_clientObject;
|
void* m_clientObject;
|
||||||
|
|
||||||
short int m_collisionFilterGroup;
|
short int m_collisionFilterGroup;
|
||||||
short int m_collisionFilterMask;
|
short int m_collisionFilterMask;
|
||||||
|
|
||||||
void* m_multiSapParentProxy;
|
void* m_multiSapParentProxy;
|
||||||
|
|
||||||
|
|
||||||
int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
|
int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
|
||||||
|
|
||||||
|
btVector3 m_aabbMin;
|
||||||
|
btVector3 m_aabbMax;
|
||||||
|
|
||||||
SIMD_FORCE_INLINE int getUid() const
|
SIMD_FORCE_INLINE int getUid() const
|
||||||
{
|
{
|
||||||
return m_uniqueId;
|
return m_uniqueId;
|
||||||
@@ -116,11 +112,11 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
|
|||||||
}
|
}
|
||||||
|
|
||||||
btBroadphaseProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
|
btBroadphaseProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
|
||||||
:m_aabbMin(aabbMin),
|
:m_clientObject(userPtr),
|
||||||
m_aabbMax(aabbMax),
|
|
||||||
m_clientObject(userPtr),
|
|
||||||
m_collisionFilterGroup(collisionFilterGroup),
|
m_collisionFilterGroup(collisionFilterGroup),
|
||||||
m_collisionFilterMask(collisionFilterMask)
|
m_collisionFilterMask(collisionFilterMask),
|
||||||
|
m_aabbMin(aabbMin),
|
||||||
|
m_aabbMax(aabbMax)
|
||||||
{
|
{
|
||||||
m_multiSapParentProxy = multiSapParentProxy;
|
m_multiSapParentProxy = multiSapParentProxy;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ void btDbvt::update(btDbvtNode* leaf,int lookahead)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
void btDbvt::update(btDbvtNode* leaf,const btDbvtVolume& volume)
|
void btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume)
|
||||||
{
|
{
|
||||||
btDbvtNode* root=removeleaf(this,leaf);
|
btDbvtNode* root=removeleaf(this,leaf);
|
||||||
if(root)
|
if(root)
|
||||||
@@ -518,7 +518,7 @@ void btDbvt::update(btDbvtNode* leaf,const btDbvtVolume& volume)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity,btScalar margin)
|
bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity,btScalar margin)
|
||||||
{
|
{
|
||||||
if(leaf->volume.Contain(volume)) return(false);
|
if(leaf->volume.Contain(volume)) return(false);
|
||||||
volume.Expand(btVector3(margin,margin,margin));
|
volume.Expand(btVector3(margin,margin,margin));
|
||||||
@@ -528,7 +528,7 @@ bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velo
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity)
|
bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity)
|
||||||
{
|
{
|
||||||
if(leaf->volume.Contain(volume)) return(false);
|
if(leaf->volume.Contain(volume)) return(false);
|
||||||
volume.SignedExpand(velocity);
|
volume.SignedExpand(velocity);
|
||||||
@@ -537,7 +537,7 @@ bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velo
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,btScalar margin)
|
bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,btScalar margin)
|
||||||
{
|
{
|
||||||
if(leaf->volume.Contain(volume)) return(false);
|
if(leaf->volume.Contain(volume)) return(false);
|
||||||
volume.Expand(btVector3(margin,margin,margin));
|
volume.Expand(btVector3(margin,margin,margin));
|
||||||
|
|||||||
@@ -276,10 +276,10 @@ struct btDbvt
|
|||||||
void optimizeIncremental(int passes);
|
void optimizeIncremental(int passes);
|
||||||
btDbvtNode* insert(const btDbvtVolume& box,void* data);
|
btDbvtNode* insert(const btDbvtVolume& box,void* data);
|
||||||
void update(btDbvtNode* leaf,int lookahead=-1);
|
void update(btDbvtNode* leaf,int lookahead=-1);
|
||||||
void update(btDbvtNode* leaf,const btDbvtVolume& volume);
|
void update(btDbvtNode* leaf,btDbvtVolume& volume);
|
||||||
bool update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity,btScalar margin);
|
bool update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity,btScalar margin);
|
||||||
bool update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity);
|
bool update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity);
|
||||||
bool update(btDbvtNode* leaf,btDbvtVolume volume,btScalar margin);
|
bool update(btDbvtNode* leaf,btDbvtVolume& volume,btScalar margin);
|
||||||
void remove(btDbvtNode* leaf);
|
void remove(btDbvtNode* leaf);
|
||||||
void write(IWriter* iwriter) const;
|
void write(IWriter* iwriter) const;
|
||||||
void clone(btDbvt& dest,IClone* iclone=0) const;
|
void clone(btDbvt& dest,IClone* iclone=0) const;
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ subject to the following restrictions:
|
|||||||
|
|
||||||
#define RAYAABB2
|
#define RAYAABB2
|
||||||
|
|
||||||
btQuantizedBvh::btQuantizedBvh() : m_useQuantization(false),
|
btQuantizedBvh::btQuantizedBvh() :
|
||||||
|
m_bulletVersion(BT_BULLET_VERSION),
|
||||||
|
m_useQuantization(false),
|
||||||
//m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIENDLY)
|
//m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIENDLY)
|
||||||
m_traversalMode(TRAVERSAL_STACKLESS)
|
m_traversalMode(TRAVERSAL_STACKLESS)
|
||||||
//m_traversalMode(TRAVERSAL_RECURSIVE)
|
//m_traversalMode(TRAVERSAL_RECURSIVE)
|
||||||
@@ -1136,10 +1138,10 @@ btQuantizedBvh *btQuantizedBvh::deSerializeInPlace(void *i_alignedDataBuffer, un
|
|||||||
btQuantizedBvh::btQuantizedBvh(btQuantizedBvh &self, bool /* ownsMemory */) :
|
btQuantizedBvh::btQuantizedBvh(btQuantizedBvh &self, bool /* ownsMemory */) :
|
||||||
m_bvhAabbMin(self.m_bvhAabbMin),
|
m_bvhAabbMin(self.m_bvhAabbMin),
|
||||||
m_bvhAabbMax(self.m_bvhAabbMax),
|
m_bvhAabbMax(self.m_bvhAabbMax),
|
||||||
m_bvhQuantization(self.m_bvhQuantization)
|
m_bvhQuantization(self.m_bvhQuantization),
|
||||||
|
m_bulletVersion(BT_BULLET_VERSION)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -158,41 +158,43 @@ typedef btAlignedObjectArray<btBvhSubtreeInfo> BvhSubtreeInfoArray;
|
|||||||
///It is recommended to use quantization for better performance and lower memory requirements.
|
///It is recommended to use quantization for better performance and lower memory requirements.
|
||||||
ATTRIBUTE_ALIGNED16(class) btQuantizedBvh
|
ATTRIBUTE_ALIGNED16(class) btQuantizedBvh
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
|
|
||||||
NodeArray m_leafNodes;
|
|
||||||
NodeArray m_contiguousNodes;
|
|
||||||
|
|
||||||
QuantizedNodeArray m_quantizedLeafNodes;
|
|
||||||
|
|
||||||
QuantizedNodeArray m_quantizedContiguousNodes;
|
|
||||||
|
|
||||||
int m_curNodeIndex;
|
|
||||||
|
|
||||||
|
|
||||||
//quantization data
|
|
||||||
bool m_useQuantization;
|
|
||||||
btVector3 m_bvhAabbMin;
|
|
||||||
btVector3 m_bvhAabbMax;
|
|
||||||
btVector3 m_bvhQuantization;
|
|
||||||
public:
|
public:
|
||||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
|
||||||
|
|
||||||
enum btTraversalMode
|
enum btTraversalMode
|
||||||
{
|
{
|
||||||
TRAVERSAL_STACKLESS = 0,
|
TRAVERSAL_STACKLESS = 0,
|
||||||
TRAVERSAL_STACKLESS_CACHE_FRIENDLY,
|
TRAVERSAL_STACKLESS_CACHE_FRIENDLY,
|
||||||
TRAVERSAL_RECURSIVE
|
TRAVERSAL_RECURSIVE
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
btTraversalMode m_traversalMode;
|
|
||||||
|
btVector3 m_bvhAabbMin;
|
||||||
|
btVector3 m_bvhAabbMax;
|
||||||
|
btVector3 m_bvhQuantization;
|
||||||
|
|
||||||
|
int m_bulletVersion; //for serialization versioning. It could also be used to detect endianess.
|
||||||
|
|
||||||
|
int m_curNodeIndex;
|
||||||
|
//quantization data
|
||||||
|
bool m_useQuantization;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NodeArray m_leafNodes;
|
||||||
|
NodeArray m_contiguousNodes;
|
||||||
|
QuantizedNodeArray m_quantizedLeafNodes;
|
||||||
|
QuantizedNodeArray m_quantizedContiguousNodes;
|
||||||
|
|
||||||
|
btTraversalMode m_traversalMode;
|
||||||
BvhSubtreeInfoArray m_SubtreeHeaders;
|
BvhSubtreeInfoArray m_SubtreeHeaders;
|
||||||
|
|
||||||
//This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray
|
//This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray
|
||||||
int m_subtreeHeaderCount;
|
int m_subtreeHeaderCount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!)
|
///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!)
|
||||||
///this might be refactored into a virtual, it is usually not calculated at run-time
|
///this might be refactored into a virtual, it is usually not calculated at run-time
|
||||||
@@ -332,6 +334,9 @@ protected:
|
|||||||
void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex);
|
void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||||
|
|
||||||
btQuantizedBvh();
|
btQuantizedBvh();
|
||||||
|
|
||||||
virtual ~btQuantizedBvh();
|
virtual ~btQuantizedBvh();
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ class btConvexTriangleCallback : public btTriangleCallback
|
|||||||
btVector3 m_aabbMin;
|
btVector3 m_aabbMin;
|
||||||
btVector3 m_aabbMax ;
|
btVector3 m_aabbMax ;
|
||||||
|
|
||||||
btManifoldResult* m_resultOut;
|
|
||||||
|
|
||||||
|
btManifoldResult* m_resultOut;
|
||||||
btDispatcher* m_dispatcher;
|
btDispatcher* m_dispatcher;
|
||||||
const btDispatcherInfo* m_dispatchInfoPtr;
|
const btDispatcherInfo* m_dispatchInfoPtr;
|
||||||
btScalar m_collisionMarginTriangle;
|
btScalar m_collisionMarginTriangle;
|
||||||
@@ -78,6 +78,7 @@ class btConvexConcaveCollisionAlgorithm : public btCollisionAlgorithm
|
|||||||
btConvexTriangleCallback m_btConvexTriangleCallback;
|
btConvexTriangleCallback m_btConvexTriangleCallback;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
|
btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
|
||||||
|
|||||||
@@ -61,12 +61,15 @@ btConvexConvexAlgorithm::CreateFunc::~CreateFunc()
|
|||||||
|
|
||||||
btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver)
|
btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver)
|
||||||
: btCollisionAlgorithm(ci),
|
: btCollisionAlgorithm(ci),
|
||||||
m_gjkPairDetector(0,0,simplexSolver,pdSolver),
|
m_simplexSolver(simplexSolver),
|
||||||
|
m_pdSolver(pdSolver),
|
||||||
m_ownManifold (false),
|
m_ownManifold (false),
|
||||||
m_manifoldPtr(mf),
|
m_manifoldPtr(mf),
|
||||||
m_lowLevelOfDetail(false),
|
m_lowLevelOfDetail(false)
|
||||||
m_sepDistance((static_cast<btConvexShape*>(body0->getCollisionShape()))->getAngularMotionDisc(),
|
#ifdef USE_SEPDISTANCE_UTIL2
|
||||||
|
,m_sepDistance((static_cast<btConvexShape*>(body0->getCollisionShape()))->getAngularMotionDisc(),
|
||||||
(static_cast<btConvexShape*>(body1->getCollisionShape()))->getAngularMotionDisc())
|
(static_cast<btConvexShape*>(body1->getCollisionShape()))->getAngularMotionDisc())
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
(void)body0;
|
(void)body0;
|
||||||
(void)body1;
|
(void)body1;
|
||||||
@@ -112,9 +115,11 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl
|
|||||||
btConvexShape* min0 = static_cast<btConvexShape*>(body0->getCollisionShape());
|
btConvexShape* min0 = static_cast<btConvexShape*>(body0->getCollisionShape());
|
||||||
btConvexShape* min1 = static_cast<btConvexShape*>(body1->getCollisionShape());
|
btConvexShape* min1 = static_cast<btConvexShape*>(body1->getCollisionShape());
|
||||||
|
|
||||||
|
#ifdef USE_SEPDISTANCE_UTIL2
|
||||||
m_sepDistance.updateSeparatingDistance(body0->getWorldTransform(),body1->getWorldTransform());
|
m_sepDistance.updateSeparatingDistance(body0->getWorldTransform(),body1->getWorldTransform());
|
||||||
|
|
||||||
if (!dispatchInfo.m_useConvexConservativeDistanceUtil || m_sepDistance.getConservativeSeparatingDistance()<=0.f)
|
if (!dispatchInfo.m_useConvexConservativeDistanceUtil || m_sepDistance.getConservativeSeparatingDistance()<=0.f)
|
||||||
|
#endif //USE_SEPDISTANCE_UTIL2
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef USE_BT_GJKEPA
|
#ifdef USE_BT_GJKEPA
|
||||||
@@ -135,9 +140,10 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl
|
|||||||
|
|
||||||
btGjkPairDetector::ClosestPointInput input;
|
btGjkPairDetector::ClosestPointInput input;
|
||||||
|
|
||||||
|
btGjkPairDetector gjkPairDetector(min0,min1,m_simplexSolver,m_pdSolver);
|
||||||
//TODO: if (dispatchInfo.m_useContinuous)
|
//TODO: if (dispatchInfo.m_useContinuous)
|
||||||
m_gjkPairDetector.setMinkowskiA(min0);
|
gjkPairDetector.setMinkowskiA(min0);
|
||||||
m_gjkPairDetector.setMinkowskiB(min1);
|
gjkPairDetector.setMinkowskiB(min1);
|
||||||
input.m_maximumDistanceSquared = 1e30f;//min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
|
input.m_maximumDistanceSquared = 1e30f;//min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
|
||||||
//input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
|
//input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
|
||||||
input.m_stackAlloc = dispatchInfo.m_stackAllocator;
|
input.m_stackAlloc = dispatchInfo.m_stackAllocator;
|
||||||
@@ -147,12 +153,14 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl
|
|||||||
input.m_transformA = body0->getWorldTransform();
|
input.m_transformA = body0->getWorldTransform();
|
||||||
input.m_transformB = body1->getWorldTransform();
|
input.m_transformB = body1->getWorldTransform();
|
||||||
|
|
||||||
m_gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
|
gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
btScalar sepDist = m_gjkPairDetector.getCachedSeparatingDistance()+dispatchInfo.m_convexConservativeDistanceThreshold;
|
btScalar sepDist = gjkPairDetector.getCachedSeparatingDistance()+dispatchInfo.m_convexConservativeDistanceThreshold;
|
||||||
|
|
||||||
|
#ifdef USE_SEPDISTANCE_UTIL2
|
||||||
m_sepDistance.initSeparatingDistance(m_gjkPairDetector.getCachedSeparatingAxis(),sepDist,body0->getWorldTransform(),body1->getWorldTransform());
|
m_sepDistance.initSeparatingDistance(m_gjkPairDetector.getCachedSeparatingAxis(),sepDist,body0->getWorldTransform(),body1->getWorldTransform());
|
||||||
|
#endif //USE_SEPDISTANCE_UTIL2
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,19 +27,24 @@ subject to the following restrictions:
|
|||||||
|
|
||||||
class btConvexPenetrationDepthSolver;
|
class btConvexPenetrationDepthSolver;
|
||||||
|
|
||||||
|
//#define USE_SEPDISTANCE_UTIL2 1
|
||||||
|
|
||||||
///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations.
|
///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations.
|
||||||
class btConvexConvexAlgorithm : public btCollisionAlgorithm
|
class btConvexConvexAlgorithm : public btCollisionAlgorithm
|
||||||
{
|
{
|
||||||
btGjkPairDetector m_gjkPairDetector;
|
#ifdef USE_SEPDISTANCE_UTIL2
|
||||||
public:
|
btConvexSeparatingDistanceUtil m_sepDistance;
|
||||||
|
#endif
|
||||||
|
btSimplexSolverInterface* m_simplexSolver;
|
||||||
|
btConvexPenetrationDepthSolver* m_pdSolver;
|
||||||
|
|
||||||
|
|
||||||
bool m_ownManifold;
|
bool m_ownManifold;
|
||||||
btPersistentManifold* m_manifoldPtr;
|
btPersistentManifold* m_manifoldPtr;
|
||||||
bool m_lowLevelOfDetail;
|
bool m_lowLevelOfDetail;
|
||||||
|
|
||||||
///cache separating vector to speedup collision detection
|
///cache separating vector to speedup collision detection
|
||||||
btConvexSeparatingDistanceUtil m_sepDistance;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ subject to the following restrictions:
|
|||||||
|
|
||||||
#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h"
|
#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h"
|
||||||
#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
|
#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
|
||||||
|
#include "BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h"
|
||||||
#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h"
|
#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h"
|
||||||
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
|
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
|
||||||
#include "BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h"
|
#include "BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h"
|
||||||
@@ -100,8 +101,9 @@ btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefault
|
|||||||
int maxSize = sizeof(btConvexConvexAlgorithm);
|
int maxSize = sizeof(btConvexConvexAlgorithm);
|
||||||
int maxSize2 = sizeof(btConvexConcaveCollisionAlgorithm);
|
int maxSize2 = sizeof(btConvexConcaveCollisionAlgorithm);
|
||||||
int maxSize3 = sizeof(btCompoundCollisionAlgorithm);
|
int maxSize3 = sizeof(btCompoundCollisionAlgorithm);
|
||||||
int maxSize4 = sizeof(btEmptyAlgorithm);
|
int maxSize4 = sizeof(SpuContactManifoldCollisionAlgorithm);
|
||||||
|
int sl = sizeof(btConvexSeparatingDistanceUtil);
|
||||||
|
sl = sizeof(btGjkPairDetector);
|
||||||
int collisionAlgorithmMaxElementSize = btMax(maxSize,maxSize2);
|
int collisionAlgorithmMaxElementSize = btMax(maxSize,maxSize2);
|
||||||
collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3);
|
collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3);
|
||||||
collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize4);
|
collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize4);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ subject to the following restrictions:
|
|||||||
|
|
||||||
#include "btScaledBvhTriangleMeshShape.h"
|
#include "btScaledBvhTriangleMeshShape.h"
|
||||||
|
|
||||||
btScaledBvhTriangleMeshShape::btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape* childShape,btVector3 localScaling)
|
btScaledBvhTriangleMeshShape::btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape* childShape,const btVector3& localScaling)
|
||||||
:m_localScaling(localScaling),m_bvhTriMeshShape(childShape)
|
:m_localScaling(localScaling),m_bvhTriMeshShape(childShape)
|
||||||
{
|
{
|
||||||
m_shapeType = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE;
|
m_shapeType = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE;
|
||||||
@@ -34,7 +34,7 @@ class btScaledTriangleCallback : public btTriangleCallback
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
btScaledTriangleCallback(btTriangleCallback* originalCallback,btVector3 localScaling)
|
btScaledTriangleCallback(btTriangleCallback* originalCallback,const btVector3& localScaling)
|
||||||
:m_originalCallback(originalCallback),
|
:m_originalCallback(originalCallback),
|
||||||
m_localScaling(localScaling)
|
m_localScaling(localScaling)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ ATTRIBUTE_ALIGNED16(class) btScaledBvhTriangleMeshShape : public btConcaveShape
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape* childShape,btVector3 localScaling);
|
btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape* childShape,const btVector3& localScaling);
|
||||||
|
|
||||||
virtual ~btScaledBvhTriangleMeshShape();
|
virtual ~btScaledBvhTriangleMeshShape();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user