avoid conflicts when using a unity build (single cpp file including many other cpp)
This commit is contained in:
@@ -27,7 +27,7 @@ btConvexPolyhedron::~btConvexPolyhedron()
|
||||
{
|
||||
}
|
||||
|
||||
inline bool IsAlmostZero(const btVector3& v)
|
||||
inline bool IsAlmostZero1(const btVector3& v)
|
||||
{
|
||||
if (btFabs(v.x()) > 1e-6 || btFabs(v.y()) > 1e-6 || btFabs(v.z()) > 1e-6) return false;
|
||||
return true;
|
||||
@@ -123,7 +123,7 @@ void btConvexPolyhedron::initialize()
|
||||
for (int p = 0; p < m_uniqueEdges.size(); p++)
|
||||
{
|
||||
if (IsAlmostZero(m_uniqueEdges[p] - edge) ||
|
||||
IsAlmostZero(m_uniqueEdges[p] + edge))
|
||||
IsAlmostZero1(m_uniqueEdges[p] + edge))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
||||
@@ -65,7 +65,7 @@ inline int getIslandId(const btPersistentManifold* lhs)
|
||||
return islandId;
|
||||
}
|
||||
|
||||
SIMD_FORCE_INLINE int btGetConstraintIslandId(const btTypedConstraint* lhs)
|
||||
SIMD_FORCE_INLINE int btGetConstraintIslandId1(const btTypedConstraint* lhs)
|
||||
{
|
||||
const btCollisionObject& rcolObj0 = lhs->getRigidBodyA();
|
||||
const btCollisionObject& rcolObj1 = lhs->getRigidBodyB();
|
||||
@@ -452,7 +452,7 @@ void btSimulationIslandManagerMt::addConstraintsToIslands(btAlignedObjectArray<b
|
||||
btTypedConstraint* constraint = constraints[i];
|
||||
if (constraint->isEnabled())
|
||||
{
|
||||
int islandId = btGetConstraintIslandId(constraint);
|
||||
int islandId = btGetConstraintIslandId1(constraint);
|
||||
// if island is not sleeping,
|
||||
if (Island* island = getIsland(islandId))
|
||||
{
|
||||
|
||||
@@ -22,9 +22,9 @@ subject to the following restrictions:
|
||||
|
||||
#define DIRECTLY_UPDATE_VELOCITY_DURING_SOLVER_ITERATIONS
|
||||
|
||||
static bool interleaveContactAndFriction = false;
|
||||
static bool interleaveContactAndFriction1 = false;
|
||||
|
||||
struct btJointNode
|
||||
struct btJointNode1
|
||||
{
|
||||
int jointIndex; // pointer to enclosing dxJoint object
|
||||
int otherBodyIndex; // *other* body this joint is connected to
|
||||
@@ -241,7 +241,7 @@ void btMultiBodyMLCPConstraintSolver::createMLCPFast(const btContactSolverInfo&
|
||||
|
||||
void btMultiBodyMLCPConstraintSolver::createMLCPFastRigidBody(const btContactSolverInfo& infoGlobal)
|
||||
{
|
||||
int numContactRows = interleaveContactAndFriction ? 3 : 1;
|
||||
int numContactRows = interleaveContactAndFriction1 ? 3 : 1;
|
||||
|
||||
int numConstraintRows = m_allConstraintPtrArray.size();
|
||||
|
||||
@@ -301,7 +301,7 @@ void btMultiBodyMLCPConstraintSolver::createMLCPFastRigidBody(const btContactSol
|
||||
BT_PROFILE("bodyJointNodeArray.resize");
|
||||
bodyJointNodeArray.resize(numBodies, -1);
|
||||
}
|
||||
btAlignedObjectArray<btJointNode> jointNodeArray;
|
||||
btAlignedObjectArray<btJointNode1> jointNodeArray;
|
||||
{
|
||||
BT_PROFILE("jointNodeArray.reserve");
|
||||
jointNodeArray.reserve(2 * m_allConstraintPtrArray.size());
|
||||
@@ -729,7 +729,7 @@ btScalar btMultiBodyMLCPConstraintSolver::solveGroupCacheFriendlySetup(
|
||||
int firstContactConstraintOffset = dindex;
|
||||
|
||||
// The btSequentialImpulseConstraintSolver moves all friction constraints at the very end, we can also interleave them instead
|
||||
if (interleaveContactAndFriction)
|
||||
if (interleaveContactAndFriction1)
|
||||
{
|
||||
for (int i = 0; i < m_tmpSolverContactConstraintPool.size(); i++)
|
||||
{
|
||||
@@ -785,7 +785,7 @@ btScalar btMultiBodyMLCPConstraintSolver::solveGroupCacheFriendlySetup(
|
||||
firstContactConstraintOffset = dindex;
|
||||
|
||||
// The btSequentialImpulseConstraintSolver moves all friction constraints at the very end, we can also interleave them instead
|
||||
if (interleaveContactAndFriction)
|
||||
if (interleaveContactAndFriction1)
|
||||
{
|
||||
for (int i = 0; i < m_multiBodyNormalContactConstraints.size(); ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user