|
From: -oli- <ol...@fr...> - 2002-04-12 07:42:13
|
At 08:06 12.04.2002 +0200, you wrote:
>>> > (2) How can I get the coordinates of a Sound node in the VRML-world
>>> > coordinate system?
>
>You can get the MV and multiply it with (0,0,0) then you have the vector
>from the camera to Object,
That doesn't work. The result always is (0,0,0).
:o(
I inserted in NodeSound::render() this code:
***snip***
VrmlMatrix.MV = rc.getMatrix();
SFVec3f o(0,0,0);
SFVec3f pos;
MV.multMatrixVec(o, pos);
pos.print(cerr);
+++snap+++
>to get the Position, you may add the current position
>from Viewpoint in the VRML-world coordinate system, and now add the
>location(field location) of Sound node.
I suppose, this proceeding will not include other transformations of
parental Transform nodes that translation.
E.g. rotation has to be applied to the direction field of the Sound node.
Anyone any other ideas/hints?
Thanks!
-oli-
(Oliver Baum)
|