sync repo

This commit is contained in:
Erwin Coumans
2015-11-11 12:44:26 -08:00
parent 91204e8ed2
commit f6a8079353
16 changed files with 239 additions and 62 deletions

View File

@@ -1196,23 +1196,32 @@ inline void btDbvt::collideOCL( const btDbvtNode* root,
//void * memmove ( void * destination, const void * source, size_t num );
//#if DBVT_USE_MEMMOVE
// memmove(&stack[j],&stack[j-1],sizeof(int)*(stack.size()-j-1));
//#else
for(int k=stack.size()-1;k>j;--k)
{
#if DBVT_USE_MEMMOVE
{
int num_items_to_move = stack.size()-1-j;
if(num_items_to_move > 0)
memmove(&stack[j+1],&stack[j],sizeof(int)*num_items_to_move);
}
#else
for(int k=stack.size()-1;k>j;--k) {
stack[k]=stack[k-1];
}
//#endif
}
#endif
stack[j]=allocate(ifree,stock,nes[q]);
/* Insert 1 */
j=nearest(&stack[0],&stock[0],nes[1-q].value,j,stack.size());
stack.push_back(0);
//#if DBVT_USE_MEMMOVE
// memmove(&stack[j],&stack[j-1],sizeof(int)*(stack.size()-j-1));
//#else
for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1];
//#endif
#if DBVT_USE_MEMMOVE
{
int num_items_to_move = stack.size()-1-j;
if(num_items_to_move > 0)
memmove(&stack[j+1],&stack[j],sizeof(int)*num_items_to_move);
}
#else
for(int k=stack.size()-1;k>j;--k) {
stack[k]=stack[k-1];
}
#endif
stack[j]=allocate(ifree,stock,nes[1-q]);
}
else

View File

@@ -196,10 +196,6 @@ public:
m_pointCache[insertIndex].m_appliedImpulseLateral1 = appliedLateralImpulse1;
m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
m_pointCache[insertIndex].m_appliedImpulse = appliedImpulse;
m_pointCache[insertIndex].m_appliedImpulseLateral1 = appliedLateralImpulse1;
m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
m_pointCache[insertIndex].m_lifeTime = lifeTime;
#else

View File

@@ -294,7 +294,10 @@ bool btVoronoiSimplexSolver::inSimplex(const btVector3& w)
#else
if (m_simplexVectorW[i] == w)
#endif
{
found = true;
break;
}
}
//check in case lastW is already removed