Python port of OpenSteer

Onigiri

02-10-2008 21:19:18

Hi all,

Just to let you all know that I've begun the port of OpenSteer to python.

There it is : http://pyopensteer.svn.sourceforge.net/ ... opensteer/

Only basic behaviours are implemented as of yet, but more will come steadily (I haven't much more effort to put in it right now, but contributors are welcome).

You can use the basic class Vector3D as a tuple to initialise an ogre.Vector3.
As for orientation, the best I've found would be in the wrapping class extending SimpleVehicule to have :


def getOrientation(self):

f=ogre.Vector3(self.forward[0],self.forward[1],self.forward[2])
s=ogre.Vector3(self.side[0],self.side[1],self.side[2])
s=ogre.Vector3(self.up[0],self.up[1],self.up[2])
return ogre.Quaternion(f,u,s)

def setOrientation(self,value):

self.setForward(value.xAxis())
self.setUp(value.yAxis())
self.setSide(value.zAxis())



Suggestions welcomed,

Cheers

fpois

06-10-2008 06:50:24

very cool...
I don't exactly have a question for openSteer but I'm wondering what approach are you using to do the port? Py++? SWIG?

EDIT: had a quick look at your code... you're doing this line by line?

Onigiri

06-10-2008 20:31:52

Fpois,

yes, I am converting the source to Python.
There aren't so many lines, and it is a good exercise.