Hello, I am considering the overall design of how physics engine should be integrated with OSG if I wanted to support complete serialization (load/save) of both OSG nodes and the physics state. With new dev versions there is serialization support for OSG and let us assume we can can somehow dump the physics engine state. I am wondering how should it all be implemented.
One idea I have is, the physics world could be implemented as an OSG node so it could be serialized by osg standards as a part of a scene graph. However, I am not sure this is a good design, putting something like that into a osg node, since it hasn't got anything to do with rendering. Also, this node would have rigid bodies and collision shapes which in turn need references to other nodes (not necessariliry children) which are used as a graphics representation of physics objects in the scene graph for position/attitude updates. So it is all interconnected, and such references would need to be restored upon state load. The other solution would be to keep physics out of the scene graph... that way osg serialization support cannot be used for physics state. If physics engine had any serialization that could be used, but there would still need to be a "register" that knows how to connect appropriate physics bodies to OSG nodes after both states have been restored. I would appreciate any suggestions and ideas, or if anyone has experience to share regarding this topic. Thanks. Cheers, Marko ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35517#35517 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

