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

@ -93,7 +93,7 @@ public:
b3Transform transform = { { 0.0f, 0.01f, 0.0f }, b3Quat_identity };
DrawAxes( b3MakeWorldTransform( transform ), 1.0f );
int height = b3DynamicTree_GetHeight( &m_compound->tree );
int height = m_compound->treeHeight;
DrawTextLine( "compound tree height = %d", height );
}
@ -153,7 +153,7 @@ public:
b3Transform transform = { { 0.0f, 0.01f, 0.0f }, b3Quat_identity };
DrawAxes( b3MakeWorldTransform( transform ), 1.0f );
int height = b3DynamicTree_GetHeight( &m_compound->tree );
int height = m_compound->treeHeight;
DrawTextLine( "compound tree height = %d", height );
}
@ -227,7 +227,7 @@ public:
b3Transform transform = { { 0.0f, 0.01f, 0.0f }, b3Quat_identity };
DrawAxes( b3MakeWorldTransform( transform ), 1.0f );
int height = b3DynamicTree_GetHeight( &m_compound->tree );
int height = m_compound->treeHeight;
DrawTextLine( "compound tree height = %d", height );
}
@ -345,8 +345,8 @@ public:
DrawTextLine( "compound hull count = %d, mesh count = %d", m_compound->hullCount, m_compound->meshCount );
DrawTextLine( "compound byte count = %d", m_compound->byteCount );
int treeBytes = b3DynamicTree_GetByteCount( &m_compound->tree );
int height = b3DynamicTree_GetHeight( &m_compound->tree );
int treeBytes = m_compound->nodeCount * (int)sizeof( b3TreeNode );
int height = m_compound->treeHeight;
DrawTextLine( "compound tree byte count = %d, height = %d", treeBytes, height );
}
@ -461,8 +461,8 @@ public:
DrawTextLine( "compound instance count = %d, byte count = %d", m_compound->meshCount, m_compound->byteCount );
int treeBytes = b3DynamicTree_GetByteCount( &m_compound->tree );
int height = b3DynamicTree_GetHeight( &m_compound->tree );
int treeBytes = m_compound->nodeCount * (int)sizeof( b3TreeNode );
int height = m_compound->treeHeight;
DrawTextLine( "compound tree byte count = %d, height = %d", treeBytes, height );
}
@ -700,8 +700,8 @@ public:
m_compound->hullCount, m_compound->meshCount, m_compound->sphereCount );
DrawTextLine( "compound byte count = %d", m_compound->byteCount );
int treeBytes = b3DynamicTree_GetByteCount( &m_compound->tree );
int height = b3DynamicTree_GetHeight( &m_compound->tree );
int treeBytes = m_compound->nodeCount * (int)sizeof( b3TreeNode );
int height = m_compound->treeHeight;
DrawTextLine( "compound tree byte count = %d, height = %d", treeBytes, height );
int total = 0;