antonio_lioy wrote:
Thanks for your answer, but my problem actually is that I have a complex model drawn with a CAD application that is split into many components by the CAD app. Each component is saved to a single vrml file. If I just load all the models under a common parent in the scenegraph I can correctly see the big model cause in each VRML file the CAD app saves a matrix that specify where each model should be with respect to the world axis. In my application (which is a stereo viewer in a CAVE environment)I need to pick a single part of entire model through a tracked pointer. When a pointer picks a model, the transformation performed by the pointer (which I compute through tracking system) should be reproduced by the model. My problem is now that when I move the objects with the pointer they move keeping their initial transformation, that is objects centered in origin are moved corretly, and objects transformed keeps an offset from the point that I actually move. For now I set to ide
ntity the local transform when I pick an object but for some models I cannot
find this transformation where I expect it to be, so they continue to mantain
their offset.
I hope that all this now looks clearer...
Ok. I think I get it. Well, it's a data problem on your part, since you
get some models the way you want and some not. To find that actual
transformation can be very tricky, so I strongly recommend that you
re-export the problematic models and attempt to get it the way you prefer.
You could, perhaps, use the bounding volume of those geometries as a
starting point, to at least get a local center, but if that (the pivot,
local origin, etc) is not centered, then you have a problem. Getting the
orintation can be done if you have or can find code to create an
object-aligned bounding box.
However, trying to reconstruct local transform data afterward will mostl
likely create more problems (or at least frustration). If you cannot
re-export properly, you are probably better off finding the transforms
via trial-and-error and coding/scripting them into your app.
Best Regards,
/Marcus
P.S. It would be nice if you could line-break your e-mails at
80-columns. I'm sure there's a setting for it in your mail-client. ;)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users