clockwise option, joint is awake (#130)

- b3MeshDef gets stride and clockwise option
- Added b3Joint_IsAwake
- Added b3Body_TimeOfImpactMover
- #116
- Smoother mover collision: #141
- Shape casts now ignore backside collision on mesh and height-field
triangles, same as ray casts.
This commit is contained in:
Erin Catto 2026-08-29 21:47:53 -07:00 • committed by GitHub
commit 47d7f7cc7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 2466 additions and 303 deletions

View file

@ -399,7 +399,9 @@ b3CompoundData* b3CreateCompound( const b3CompoundDef* def )
// No effort to share mesh materials. It would be easier to do if the number of materials was limited.
B3_ASSERT( meshData->materialCount == meshDef->materialCount );
for ( int j = 0; j < meshDef->materialCount; ++j )
int meshMaterialCount = b3MinInt( meshDef->materialCount, B3_MAX_COMPOUND_MESH_MATERIALS );
for ( int j = 0; j < meshMaterialCount; ++j )
{
// Look for an existing material.
b3MaterialMap_itr materialItr =
@ -1168,6 +1170,10 @@ static bool b3CompoundMoverCallback( int proxyId, uint64_t userData, void* conte
{
planes[i].plane.normal = b3RotateVector( child.transform.q, planes[i].plane.normal );
planes[i].point = b3TransformPoint( child.transform, planes[i].point );
planes[i].childIndex = childIndex;
int childMaterialIndex = b3MinInt( planes[i].materialIndex, B3_MAX_COMPOUND_MESH_MATERIALS - 1 );
planes[i].materialIndex = child.materialIndices[childMaterialIndex];
}
moverContext->planeCount += planeCount;