Rotation matrix and object

Hi, I hope this is the right forum to post this question (no more Q&A)…
I am trying to use a very powerful physics engine called ODE.
I have the position (vector) and rotation (4x4 matrix) of the simulated object and I want to update the corresponding Blender object with python.
Blender has only RotX, RotY and RotZ, there is no way to manipulate directly the object matrix, right?
In this case the best that I can do is to calculate the angles with trigonometry from the rotation matrix and set the Rot* fields.
Does anybody has any suggestion about this?

I’m not sure what you’re trying to do. Could you explain some more?

he wants to extract the Euler rotation angle from a 4x4 rotation matrix (if you didn’t get a thing from what I said, I really don’t need to explain more).

Alas, Hos posted something about this… on the blender.nl forum… :frowning:

Martin

I will find how to get the euler angles from the matrix, my question is if this is the only method or is there anybody that solved the problem in a more efficient/rational way… thanks anyway, I really hope to make this work 'cause it would boost the interest around Blender (imagine what you can do with the accurate physical behaviour granted by ODE… if you’re curious, pay a visit to http://www.q12.org where the genius Russ Smith give us his awesome library) - this engine is much more powerful than Blender one and much faster (if only NAN asked Russ to license his engine, probably the game engine would have been 5x faster).
I plan to use it for animations, but it’s so fast that it could be used also on the real time side.

JM Soler had a solution to this as well…
Anyway, I’d be interested to hear about your progress with this. Of course I knew about ODE, it is not the only dynamics library, there are several others, but ODE is one of the more powerful ones, the author has worked on the highly estimated MathEngine as well. I could not have used this since the plan was for Dynamica to go commercial, so I have to do my own stuff, and of course it is not in any way even remotely comparable to ODE…
So, if you want, let me know about your progress…

ODE’s license is LGPL, from what I understand you can use it for commercial products without publishing the source code (I know of a commercial game developed using ODE, even if it’s still a WIP - I got in touch with one of the developers once).
You just have to state that it uses ODE linking to the site.
Read the agreement though, since I’m not sure (if I will ever manage to have something working I will release it as free).
By the way, does anyone knows why when I’m trying to create a .so for Linux (dll for windows is ok) I’m getting a “dbopen” unsatisfied link when Blender imports it?