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

@ -1538,6 +1538,20 @@ public:
b3AABB aabb = b3Shape_GetAABB( shape );
ImGui::Text( "aabb (%.2f, %.2f, %.2f)", aabb.lowerBound.x, aabb.lowerBound.y, aabb.lowerBound.z );
ImGui::Text( " (%.2f, %.2f, %.2f)", aabb.upperBound.x, aabb.upperBound.y, aabb.upperBound.z );
if ( b3Shape_GetType( shape ) == b3_compoundShape )
{
const b3CompoundData* compound = b3Shape_GetCompound( shape );
int childCount = compound->capsuleCount + compound->hullCount + compound->meshCount + compound->sphereCount;
ImGui::Text( "children %d", childCount );
ImGui::Text( " capsules %d", compound->capsuleCount );
ImGui::Text( " hulls %d (%d unique)", compound->hullCount, compound->sharedHullCount );
ImGui::Text( " meshes %d (%d unique)", compound->meshCount, compound->sharedMeshCount );
ImGui::Text( " spheres %d", compound->sphereCount );
ImGui::Text( "materials %d", compound->materialCount );
ImGui::Text( "tree height %d nodes %d", compound->treeHeight, compound->nodeCount );
ImGui::Text( "bytes %d", compound->byteCount );
}
}
void DrawContactDetail( b3BodyId body )