Horde3D

Next-Generation Graphics Engine
It is currently 16.06.2024, 22:37

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 06.12.2011, 01:00 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
I'm probably missing something obvious here, but why there is no API to set global transformation?
Does it mean, if i want to drive my physics transformations by physics engine, i have manually reverse transformations like:
world (from physics engine) -> parent(*) -> local and then set local in horde?

Doesn't it make sense to just insert every mesh as children of root, and don't care about this scene graph thingy anymore?
I don't know the answer, because i still didn't dive too much into horde3d source code, and it's not obvious for me since i still feel incompetent in graphics programming (i wish i had more time :( ).

So, how do you drive your physics transformations with horde3d (assuming you're simulating your world with help of it) ?


Top
 Profile  
Reply with quote  
PostPosted: 08.12.2011, 19:30 
Offline

Joined: 09.09.2009, 18:58
Posts: 107
You can set the absolute transformation matrix through h3dSetNodeTransMat. I use it in my engine without problems. Just be sure that whatever matrix you get from your physics engine will work with OpenGL (column major versus row major, etc...)


Top
 Profile  
Reply with quote  
PostPosted: 08.12.2011, 20:50 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
Orm wrote:
You can set the absolute transformation matrix through h3dSetNodeTransMat.

Thanks for answer!
So, http://www.horde3d.org/docs/html/_api.html#h3dSetNodeTransMat which describes h3dSetNodeTransMat as
Quote:
This function sets the relative transformation matrix of the specified scene node. It is basically the same as setNodeTransform but takes directly a matrix instead of individual transformation parameters.

is wrong?

If it is, someone with svn access should update description because it might be confusing for noobs like me.


Top
 Profile  
Reply with quote  
PostPosted: 08.12.2011, 21:22 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
No it's not wrong. It sets the relative transformation matrix based on the scene graph hierarchy. If you don't have a hierarchy it's basically the same as an absolute matrix. But in general it's always relative to it's parent node.


Top
 Profile  
Reply with quote  
PostPosted: 09.12.2011, 19:35 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
Volker wrote:
No it's not wrong. It sets the relative transformation matrix based on the scene graph hierarchy. If you don't have a hierarchy it's basically the same as an absolute matrix. But in general it's always relative to it's parent node.

Oh, i thought scene graph is generally used for deep hierarchies rather than root -> model -> joints.
Thanks for answer.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 51 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group