extend Wavefront obj loader to recognize objects (for compound shape creation)

add reproduction of a bug in compound versus concave trimesh
This commit is contained in:
erwin coumans
2013-04-12 10:25:11 -07:00
parent 467a68293b
commit ec0d2ed523
13 changed files with 386 additions and 21 deletions

View File

@@ -1062,7 +1062,7 @@ __kernel void clipCompoundsHullHullKernel( __global const int4* gpuCompoundPai
__global const int* gpuHasCompoundSepNormalsOut,
__global Contact4* restrict globalContactsOut,
counter32_t nGlobalContactsOut,
int numCompoundPairs)
int numCompoundPairs, int maxContactCapacity)
{
int i = get_global_id(0);
@@ -1155,7 +1155,7 @@ __kernel void clipCompoundsHullHullKernel( __global const int4* gpuCompoundPai
int dstIdx;
AppendInc( nGlobalContactsOut, dstIdx );
//if ((dstIdx+nReducedContacts) < capacity)
if ((dstIdx+nReducedContacts) < maxContactCapacity)
{
__global Contact4* c = globalContactsOut+ dstIdx;
c->m_worldNormal = normal;