OgreNewt treecollisions, - how to load from cache?


16-05-2007 13:05:35


am trying to load a pre-computed treecollision back into the game using ogreNewt. my code to do this is:

f = open( filename, 'rb' ).read()
self.treeCollision = OgreNewt.TreeCollision(self.world)
dataS = ogre.DataStream(f)
treeColLoader = OgreNewt.TreeCollisionSerializer()
treeColLoader.importTreeCollision( dataS, self.treeCollision)

it crashes with this error, but I can't see what is wrong. I suspect a bug :cry:

self.treeColLoader.importTreeCollision( dataS, self.treeCollision)
Boost.Python.ArgumentError: Python argument types in
TreeCollisionSerializer.importTreeCollision(TreeCollisionSerializer, DataStream, TreeCollision)
did not match C++ signature:
importTreeCollision(class OgreNewt::TreeCollisionSerializer {lvalue}, class Ogre::SharedPtr<class Ogre::DataStream> {lvalue} stream, class OgreNewt::CollisionPrimitives::TreeCollision * pDest)