From: Chris B. <chr...@gm...> - 2005-06-05 10:53:04
|
According to the ODE manual space.getBody should return an error in the debug build of ODE . Instead I get: >>> import ode >>> s=3Dode.Space() >>> s <ode.SimpleSpace object at 0xa7c48a20> >>> s.getBody() <ode.Body object at 0xa7c506ec> >>> dir(s) ['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '_id', 'add', 'collide', 'disable', 'enable', 'getAABB', 'getBody', 'getCategoryBits', 'getCollideBits', 'getGeom', 'getNumGeoms', 'getPosition', 'getRotation', 'getSpace', 'isEnabled', 'isSpace', 'placeable', 'query', 'remove', 'setBody', 'setCategoryBits', 'setCollideBits', 'setPosition', 'setRo tation'] >>> s.placeable() False >>> s.getBody() <ode.Body object at 0xa7c506ec> >>> s.getBody().getPosition() zsh: segmentation fault python Also, it would be nice to be able to iterate over a space in a more python-like way, say: for g in space: print g looks prettier than; for i in range(space.getNumGeoms()): print space.getGeom(i) and len(space) might return the number of Geoms inside it.. just some ideas= ;-) |