A solution for getting OGRE3DBody from SceneNode's node?

sersia

27-02-2010 10:31:32

Hello guys~

I'm using NxOgre.1.5.5.BloodyMess.

When I use NxOgre's Ray system, I can get OGRE3DBody or OGRE3DKinematicBody object.
and then I can get NxActor and SceneNode.

like this
...
OGRE3DBody* mSelected;
...
mSelected->getNxActor();
mSelected->getSceneNode();

How about opposite way?

When I use Ogre's Ray system, I can get just SceneNode object.
And then I want to get OGRE3DBody of OGRE3DKinematicBody object for translate or rotate.

(when I change selected node's translate, I need to change actor's translate also.
I know setGlobalPosition() change node potion with actor so I need OGRE3DBody or OGRE3DKinematicBody object)

like this?
SceneNode* mSelected;
mSelected->getOGRE3DBody(); ??
getOGRE3DBody(from SceneNode); ??

Is there any way to get a OGRE3DBody or OGRE3DKinematicBody from SceneNode?

Do I have to make another (vector<OGRE3DBody*> searchBody;) for finding OGRE3DBody from SceneNode?
and then comparing using iterator...
vector<OGRE3DBody*>::iterator itr = searchBody.begin();
....

I think NxOgre already have a function for searching OGRE3DBody or OGRE3DKinematicBody from SceneNode or Actor.

I've searched but I couldn't find yet.
if you have a good idea or good solutiom Please help me.

Have a nice day. thank you for your concerns..