dumbo2007
Crazy about real time sims
Hi,
I am trying to integrate a physics engine into orbiter. I have got the position of various objects in the physics world as opengl 4 by 4 matrices.
http://www.songho.ca/opengl/gl_transform.html#matrix
If I was directly rendering this in opengl I could simply pass these matrices one by one to glMultMatrix() and then render the object. However I want to render these objects in Orbiter.
So I want to change the orientation of meshes which are a part of a vessel to match the position of the physics world objects. This is basically to help make a base which has objects inside it.
So given a standard opengl 4 by 4 matrix which has the rotation and translation data is there any way to directly send this matrix to an Orbiter API function and have my mesh moved there immediately ?
Here is some information on the OpenGL transformation matrix :
http://pages.cs.wisc.edu/~psilord/docs/local_axis.html
http://www.cprogramming.com/tutorial/3d/rotationMatrices.html
Opengl
http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml
http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml
Basically the output of glRotate() and glTranslate() are combined into a single matrix as far as I understand. But getting the exact information out of the standard opengl transformation matrix appears to be non trivial. Also the rotation axes themselves can apparently be oriented differently from the standard axes.
Thanks.
I am trying to integrate a physics engine into orbiter. I have got the position of various objects in the physics world as opengl 4 by 4 matrices.
http://www.songho.ca/opengl/gl_transform.html#matrix
If I was directly rendering this in opengl I could simply pass these matrices one by one to glMultMatrix() and then render the object. However I want to render these objects in Orbiter.
So I want to change the orientation of meshes which are a part of a vessel to match the position of the physics world objects. This is basically to help make a base which has objects inside it.
So given a standard opengl 4 by 4 matrix which has the rotation and translation data is there any way to directly send this matrix to an Orbiter API function and have my mesh moved there immediately ?
Here is some information on the OpenGL transformation matrix :
http://pages.cs.wisc.edu/~psilord/docs/local_axis.html
http://www.cprogramming.com/tutorial/3d/rotationMatrices.html
Opengl
http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml
http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml
Basically the output of glRotate() and glTranslate() are combined into a single matrix as far as I understand. But getting the exact information out of the standard opengl transformation matrix appears to be non trivial. Also the rotation axes themselves can apparently be oriented differently from the standard axes.
Thanks.
Last edited: