OgreOde wrapper change?

BernieRoehl

24-11-2008 21:39:21

I'm using OgreOde. I used to be able to do this:

testSpace.collide(ray)

where testSpace is an odeSpace object and ray is a RayGeomtry object.

However, I now get a complaint about the signature not matching:

Python argument types in
HashTableSpace.collide(HashTableSpace, RayGeometry)
did not match C++ signature:
collide(struct HashTableSpace_wrapper {lvalue}, class OgreOde::CollisionCallback * colCallback, class OgreOde::Geometry * geometry,
bool useInternalCollisionFlag=True)
collide(class OgreOde::HashTableSpace {lvalue}, class OgreOde::CollisionCallback * colCallback, class OgreOde::Geometry * geometry,
bool useInternalCollisionFlag=True)
collide(struct HashTableSpace_wrapper {lvalue}, class OgreOde::CollisionCallback * colCallback, class OgreOde::Space * space)
collide(class OgreOde::HashTableSpace {lvalue}, class OgreOde::CollisionCallback * colCallback, class OgreOde::Space * space)
collide(struct HashTableSpace_wrapper {lvalue}, class OgreOde::CollisionCallback * colCallback, bool useInternalCollisionFlag=True)
collide(class OgreOde::HashTableSpace {lvalue}, class OgreOde::CollisionCallback * colCallback, bool useInternalCollisionFlag=True)


Is the simpler version of the method (which does not require a CollisionCallback object) no longer being wrapped?

andy

25-11-2008 00:41:50

I'll take a look at it -- it is a newer version of ODE and OgreODE so I wonder if the simple version was removed...

Could you add this as a bug in Sourceforge so I have a place to track the issue...

thanks

Andy

andy

26-11-2008 01:05:15

The wrapper did change as the automated functions to transform void pointers improved AND it has some logic to ensure that you can access 'overlapping' functions -- ie in some cases we would transform functions to the point that their signatures became identical (from Boost's perspective) and were unreachable from Python..

To fix this I check for duplicate names and if needed change the function call -- unfortunately I missed updating the doc strings so it's not obvious -- sorry about that..

In your case you need collideVoid_1self._world = OgreOde.World(self.sceneManager)
space = self._world.getDefaultSpace()
myOdeRay = OgreOde.RayGeometry(1000.0, self._world, space)
space.collideVoid_1(myOdeRay)

As an aside collideVoid also exists and it expects a 'Space' as it's argument...

I'm planning some changes on how documentation is generated which should help future cases like this..

Andy

BernieRoehl

26-11-2008 15:29:31

That worked! Thanks very much for the help, it would have taken me a while to figure that one out.

In case other people run into a similar problem, you may want to mention it in the release notes (http://wiki.python-ogre.org/index.php/P ... ease_Notes).

Thanks again for all your amazing hard work on Python-Ogre!