Hi Antonio,

On Mon, 2006-02-27 at 10:54 +0100, antonio_lioy wrote:
> Hi guys, I need to know where the SceneFileHandler puts the global
> transform data (i.e. the data that place the whole model on the scene)
> when we load a VRML model using its read  method. In other words, does
> the loader build a graph that has a default initial structure (so I
> can easily find the data), because it seems to me that the data are in
> different position for different models (I mean global poitioning
> data, if it in different positions, how may I find it?) 

There is no global transformation data. It all depends on how the model
is structured, which depends on the exporter used. I would assume most
systems to have a transformation node close to the root to move the
whole object around, but it is just as valid to have no transformations
at all and change all the object coordinate to move objects around.

But if I understand your problem right (grabbing objects and moving them
around) you don't need absolute transformation anyway, all you need is
the relative transformation from the hand/pointer to the object at the
time the object is grabbed. You can get that by multiplying the
transformation of the hand to world with the inverse transformation from
the object to world. Then when the hand transformation changes, you
multiply it with that stored matrix and you get a new transformation to
apply to the object.

Hope it helps

        Dirk




-------------------------------------------------------
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

Reply via email to