lucas95123 / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

btWorldImporter::convertCollisionShape creates duplicates #716

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Always happens with composite shapes:
1. create a composite collision shape (composite -> e.g. box)
2. save as bullet file
3. reload the bullet file using btBulletWorldImporter

Expected vs. observed:
There should be two collision shapes, but there are three.

Observed in version 2.81 on Windows (but that shouldn't matter at all).

Comments and possible solution:
If this is not behaviour by design (what should be the reason for that?), it is 
caused by filling m_shapeMap in the derived classes. Instead,
convertCollisionShape should first look up in m_shapeMap. Only if the shape 
cannot be found, it should be constructed and immediately entered into the map. 
In addition, there is no reason why the name should not be recorded at that 
time, too.

Original issue reported on code.google.com by falk.roh...@gmail.com on 31 May 2013 at 1:54

GoogleCodeExporter commented 8 years ago
Can you provide a patch?

I am actively working on Bullet 3.x and rely on contributors to improve Bullet 
2.x,

Thanks,
Erwin

Original comment by erwin.coumans on 31 May 2013 at 2:11

GoogleCodeExporter commented 8 years ago
Here you are (patch against trunk).

Original comment by falk.roh...@gmail.com on 3 Jun 2013 at 9:04

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, I will check it before next release
(still busy with Bullet 3.x OpenCL rigid body at 
htpp://github.com/erwincoumans/bullet3

Original comment by erwin.coumans on 4 Jun 2013 at 9:53

GoogleCodeExporter commented 8 years ago
See https://github.com/bulletphysics/bullet3/issues/89

Original comment by erwin.coumans on 30 Mar 2014 at 6:05