Creating multiple rigibody instances from serialized data?
Posted: Wed Sep 15, 2010 7:45 pm
I'm working on some gamecode and I need a way to load serialized bullet-data and then spawn multiple instances of it. The assumption I'm going with is that you only need to have the rigidbodies and constraints as single user and the rest (like shapes etc) can be used by many.
I started coding a class that will extend the btBulletWorldImporter (inherited as private) and use it to store the multiuser data whilst the single user rigidbodies and constraints are copied as data into my class and "instanced" from there. The actual BulletFile will be deleted after it's been used to initialize the shapes etc. and had it's rigidbody etc. data copied for later use.
Is this even doable or is there some caveat I'm not seeing? Input would be appreciated.
I started coding a class that will extend the btBulletWorldImporter (inherited as private) and use it to store the multiuser data whilst the single user rigidbodies and constraints are copied as data into my class and "instanced" from there. The actual BulletFile will be deleted after it's been used to initialize the shapes etc. and had it's rigidbody etc. data copied for later use.
Is this even doable or is there some caveat I'm not seeing? Input would be appreciated.