mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-07-21 21:49:19 +00:00
Problem description: When you add a body, remove it and then add a new body, the body id may be reused by Bullet. Because the visual shape data was not being removed when a body was removed, requesting the visual shape data for a 'recycled' body id results in both the visual shape data of the new body as well as the old one. Removing the visual shape data when the body gets removed fixes this. Changes the btAlignedObjectArray for visual shapes to a hashmap, so that removing is faster. Additionally, functions like getNumVisualShape don't perform a linear search anymore.