Sorry for replying to my own email but I’ve
been searching the web and there seem to be a lot of people with the same
problem as me. But I found an answer.
To get the position you need to call the get(Vector3f
) method on a Transform3D. You get the Transform3D from the TransformGroup.
S
Hello,
I’m writing a program for my Comp Sci Masters and
I’m trying to get the positions of objects within the scenegraph but have
no idea how to do it. I’ve read about using getLocalToVworld() but
it said the node was not compiled. Anyone got any ideas?
Cheers
Rich
Birmingham Univers
Cheers Lorenzo. I'd looked at that in the beginning but had very little
idea what was happening. Now I've played around with it a bit more,
you're right, getLocalToVworld is much easier.
Cheers
Rich Bone
Birmingham University
==
Richard Bone wrote:
To get the absolute position, traverse the scenegraph and add all the
vectors together that precede the target object. ie. Call it on the
root, then the child of the root, etc.
No that is not correct. The transforms can be rotated and/or scaled, in
that case it will not work
Richard Bone wrote:
Hello,
I’m writing a program for my Comp Sci Masters and I’m trying to get the
positions of objects within the scenegraph but have no idea how to do
it. I’ve read about using getLocalToVworld() but it said the node was
not compiled. Anyone got any ideas?
Hi,
probably this was
Richard Bone wrote:
To get the absolute position, traverse the scenegraph and add all the
vectors together that precede the target object. ie. Call it on the
root, then the child of the root, etc.
Hi,
this will work, but it's not the simplest way.
If you call node.getLocalToVWorld you will get a m