Fixes for Linux compilation,
Thanks to Ole: http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=3590 Add option to select EPA or Minkowski sampling method in btDefaultCollisionConfiguration
This commit is contained in:
@@ -45,17 +45,17 @@ btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefault
|
||||
|
||||
void* mem = btAlignedAlloc(sizeof(btVoronoiSimplexSolver),16);
|
||||
m_simplexSolver = new (mem)btVoronoiSimplexSolver();
|
||||
|
||||
#define USE_EPA 1
|
||||
#ifdef USE_EPA
|
||||
mem = btAlignedAlloc(sizeof(btGjkEpaPenetrationDepthSolver),16);
|
||||
m_pdSolver = new (mem)btGjkEpaPenetrationDepthSolver;
|
||||
#else
|
||||
mem = btAlignedAlloc(sizeof(btMinkowskiPenetrationDepthSolver),16);
|
||||
m_pdSolver = new (mem)btMinkowskiPenetrationDepthSolver;
|
||||
#endif//USE_EPA
|
||||
|
||||
|
||||
if (constructionInfo.m_useEpaPenetrationAlgorithm)
|
||||
{
|
||||
mem = btAlignedAlloc(sizeof(btGjkEpaPenetrationDepthSolver),16);
|
||||
m_pdSolver = new (mem)btGjkEpaPenetrationDepthSolver;
|
||||
}else
|
||||
{
|
||||
mem = btAlignedAlloc(sizeof(btMinkowskiPenetrationDepthSolver),16);
|
||||
m_pdSolver = new (mem)btMinkowskiPenetrationDepthSolver;
|
||||
}
|
||||
|
||||
//default CreationFunctions, filling the m_doubleDispatch table
|
||||
mem = btAlignedAlloc(sizeof(btConvexConvexAlgorithm::CreateFunc),16);
|
||||
m_convexConvexCreateFunc = new(mem) btConvexConvexAlgorithm::CreateFunc(m_simplexSolver,m_pdSolver);
|
||||
|
||||
@@ -28,6 +28,7 @@ struct btDefaultCollisionConstructionInfo
|
||||
int m_defaultMaxPersistentManifoldPoolSize;
|
||||
int m_defaultMaxCollisionAlgorithmPoolSize;
|
||||
int m_defaultStackAllocatorSize;
|
||||
int m_useEpaPenetrationAlgorithm;
|
||||
|
||||
btDefaultCollisionConstructionInfo()
|
||||
:m_stackAlloc(0),
|
||||
@@ -35,7 +36,8 @@ struct btDefaultCollisionConstructionInfo
|
||||
m_collisionAlgorithmPool(0),
|
||||
m_defaultMaxPersistentManifoldPoolSize(4096),
|
||||
m_defaultMaxCollisionAlgorithmPoolSize(4096),
|
||||
m_defaultStackAllocatorSize(0)
|
||||
m_defaultStackAllocatorSize(0),
|
||||
m_useEpaPenetrationAlgorithm(true)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void setAxis(btVector3& axisInA = btVector3(0, 1, 0))
|
||||
void setAxis(btVector3& axisInA)
|
||||
{
|
||||
btVector3 rbAxisA1, rbAxisA2;
|
||||
btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2);
|
||||
|
||||
@@ -27,8 +27,7 @@ subject to the following restrictions:
|
||||
#include "btGpu3DGridBroadphaseSharedDefs.h"
|
||||
|
||||
#include "btGpu3DGridBroadphase.h"
|
||||
#include <string> //for memset
|
||||
|
||||
#include <string.h> //for memset
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user