I am trying to uses pyODE together with pyglet (for 3d graphics).
pyODE conveniently keeps track of the location and rotation of objects for me.
So when it comes to drawing them I'd like to do something like:
pos = body.getPosition()
rot = body.getRotation()
matrix = [rot[0], rot[3], rot[6], 0.0,
rot[1], rot[4], rot[7], 0.0,
rot[2], rot[5], rot[8], 0.0,
pos[0], pos[1], pos[2], 1.0]
glMultMatrixd(matrix)
When I try this, I get the following error:
ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: expected LP_c_double instance instead of list
what is the right way to construct a matrix to be passed to glMultMatrixd?
Cheers,
Robert