Aloush154 / bullet

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

Can't load btConeShapes saved by btDefaultSerializer through the btBulletWorldImporter. #725

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Create the file through btDefaultSerializer

    //...
        btDefaultSerializer* serializer = new btDefaultSerializer(1024*1024*5);
    serializer->registerNameForPointer(coneBody,"myCone");
    dynamicsWorld->serialize(serializer);

    file = fopen("test.bullet","wb");
    fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1, file);

2. Try to retrieve the saved shape "myCone"

    //...
    btBulletWorldImporter *fileImporter = new btBulletWorldImporter(nil);
    fileImporter->loadFile("test.bullet");
    fileImporter->getRigidBodyByName("myCone")

What version of the product are you using? On what operating system?

    v2.81

Original issue reported on code.google.com by rhodyl...@gmail.com on 17 Jul 2013 at 4:08

Attachments:

GoogleCodeExporter commented 8 years ago
This patch should add support for btConeShape serialization allowing to 
save/load that collision shape to/from .bullet files

Original comment by rhodyl...@gmail.com on 1 Aug 2013 at 6:20

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in latest trunk:
https://code.google.com/p/bullet/source/detail?r=2665

Thanks for the help!

Original comment by erwin.coumans on 13 Sep 2013 at 4:52