report when compound pair capacity is exceeded (and avoid crash)
add tetrahedron, reorganized demos
This commit is contained in:
@@ -7,6 +7,7 @@ struct b3Config
|
||||
int m_maxConvexShapes;
|
||||
int m_maxBroadphasePairs;
|
||||
int m_maxContactCapacity;
|
||||
int m_compoundPairCapacity;
|
||||
|
||||
int m_maxVerticesPerFace;
|
||||
int m_maxFacesPerShape;
|
||||
@@ -31,6 +32,7 @@ struct b3Config
|
||||
m_maxConvexShapes = m_maxConvexBodies;
|
||||
m_maxBroadphasePairs = 16*m_maxConvexBodies;
|
||||
m_maxContactCapacity = m_maxBroadphasePairs;
|
||||
m_compoundPairCapacity = 1524*1024;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -738,6 +738,7 @@ void b3GpuNarrowPhase::computeContacts(cl_mem broadphasePairs, int numBroadphase
|
||||
m_data->m_pBufContactOutGPU,
|
||||
nContactOut,
|
||||
m_data->m_config.m_maxContactCapacity,
|
||||
m_data->m_config.m_compoundPairCapacity,
|
||||
*m_data->m_convexPolyhedraGPU,
|
||||
*m_data->m_convexVerticesGPU,
|
||||
*m_data->m_uniqueEdgesGPU,
|
||||
|
||||
Reference in New Issue
Block a user