GettingStartedWithOde
A way to transfer position and orientation info from ode to ogre
Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
I try to learn Ogre and Ode by combining the examples (and not by using the OgreOde Wrapper) and I was looking for a way to transfer position and orientation info from ode to ogre:
This is the corresponding code snippet from the Ogre ReferenceApplication
// Get position & rotation from ODE
const dReal* pos = mOdeBody->getPosition(); const dReal* quat = mOdeBody->getQuaternion();
Warning!
for me (on new versions of ODE, and 'mOdeBody' is a dBodyID) the above two lines should be:
const dReal* pos = dBodyGetPosition(mOdeBody); const dReal* quat = dBodyGetQuaternion(mOdeBody); mSceneNode->setPosition((Real)pos[0], (Real)pos[1], (Real)pos[2]); mSceneNode->setOrientation((Real)quat[0], (Real)quat[1], (Real)quat[2], (Real)quat[3]);
Contributors to this page: jacmoe
and
Spacegaier
.
Page last modified on Saturday 02 of January, 2010 22:28:13 GMT by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
54
online users

