Improve compound serialization (#183)

- no more pointer fixups
- reduced storage 20% by removing leaf proxies
This commit is contained in:
Erin Catto 2026-10-07 14:48:58 -07:00 • committed by GitHub
commit 5d83df83ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 845 additions and 376 deletions

View file

@ -1567,6 +1567,14 @@ const b3HeightFieldData* b3Shape_GetHeightField( b3ShapeId shapeId )
return shape->heightField;
}
const b3CompoundData* b3Shape_GetCompound( b3ShapeId shapeId )
{
b3World* world = b3GetWorld( shapeId.world0 );
b3Shape* shape = b3GetShape( world, shapeId );
B3_ASSERT( shape->type == b3_compoundShape );
return shape->compound;
}
void b3Shape_SetSphere( b3ShapeId shapeId, const b3Sphere* sphere )
{
b3World* world = b3GetUnlockedWorld( shapeId.world0 );