- #86
- #88 
- #87 
- #89
This commit is contained in:
Erin Catto 2026-07-24 21:48:23 -07:00 • committed by GitHub
commit 781673be80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 705 additions and 152 deletions

View file

@ -1295,6 +1295,8 @@ void b3Shape_SetMeshMaterial( b3ShapeId shapeId, b3SurfaceMaterial surfaceMateri
B3_ASSERT( 0 <= index && index < shape->materialCount );
B3_ASSERT( shape->type != b3_compoundShape );
B3_REC( world, ShapeSetMeshMaterial, shapeId, surfaceMaterial, index );
b3GetShapeMaterials( shape )[index] = surfaceMaterial;
}
@ -1613,6 +1615,14 @@ void b3Shape_SetHull( b3ShapeId shapeId, const b3HullData* hull )
return;
}
if ( world->recording != NULL )
{
// Intern the shared hull.
uint32_t geometryId = b3RecInternHull( world->recording, data );
b3RecArgs_ShapeSetHull setArgs = { shapeId, geometryId };
b3RecWrite_ShapeSetHull( world->recording, &setArgs );
}
b3DestroyShapeAllocationForShapeChange( world, shape );
shape->hull = data;
@ -1640,6 +1650,13 @@ void b3Shape_SetMesh( b3ShapeId shapeId, const b3MeshData* meshData, b3Vec3 scal
world->locked = true;
if ( world->recording != NULL )
{
uint32_t geometryId = b3RecInternMesh( world->recording, meshData );
b3RecArgs_ShapeSetMesh setArgs = { shapeId, geometryId, scale };
b3RecWrite_ShapeSetMesh( world->recording, &setArgs );
}
b3Shape* shape = b3GetShape( world, shapeId );
b3DestroyShapeAllocationForShapeChange( world, shape );