World space to local space

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
charles88
Posts: 29
Joined: Tue Nov 04, 2008 10:02 am

World space to local space

Post by charles88 »

Hi, could anyone help me with .x model(dwarf.x)? basically, I want to get back the local matrix of the .x model after I load it into the engine. But I failed after many attempts. Can someone help me please?

Thank you.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The model itself doesn't have a transformation matrix. The scene node has a transformation matrix, that you can access with getTransformation() and getAbsoluteTransformation() (they are different). Each of the joints have their own transformations that you can access by asking the IAnimatedMeshSceneNode for its joints.

Travis
charles88
Posts: 29
Joined: Tue Nov 04, 2008 10:02 am

Post by charles88 »

Thanks for your reply. So first I should get the joints' transformation, then get the vertices around the joints and transform it back to local space?

I will try to do as you said, and post my solution if I found one. :)
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I don't know what you're trying to do. You said you wanted to get the local matrix of the .x model and I gave you the information you needed. Now you are assuming that I know what you want to do with the transform. How about you just stop for a few seconds and tell us what you want to achieve, and then maybe we can help you.

Travis
charles88
Posts: 29
Joined: Tue Nov 04, 2008 10:02 am

Post by charles88 »

oh... sorry, basically I want to get back the vertices of the .x file and write it back to a new .x file after changing the vertices.

Thx. :)
Post Reply