Hi Roland,

You'll need to recompute the position of the ray in world coordinates
by taking the ray in local coords to the node and multiplying by the
accumulated world matrix of the node in question.  You can get the
world matrices from any node by doing node->getWorldMatices().  Please
note this might be back 0, 1 or many Matrices, depending upon the
particular set up of your scene graph i.e. how many parents with
transforms your node has.

Robert.

On Tue, Jun 9, 2009 at 4:24 PM, Roland Leitner<[email protected]> wrote:
> Hi all,
>
> I am working with a "line of sight" ray with start and end point in the world 
> coordinate system. I meassure the distance between the start point of this 
> ray and the first intersection with the scene, e.g. terrain. If the ray is 
> fixed, everything is working well.
>
> Now I want to add the ray to a moving node, furthermore the direction of the 
> ray should also move with respect to the nodes coordinate frame. How can I 
> implement such a ray?
>
> Thx, Roland
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=13787#13787
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to