Re: [osg-users] View coordinates of a 3D point

2018-03-19 Thread Wojciech Lewandowski
PS: the multiplication is in reverse order Ah, indeed, sorry multiplication order should be reversed. I wrote that from top of my mind. Even though I use OSG every day I sometimes make some silly mistakes too. Regards, WL 2018-03-19 16:42 GMT+01:00 Antoine Rennuit :

Re: [osg-users] View coordinates of a 3D point

2018-03-19 Thread Antoine Rennuit
@Julien, You are right, sorry for the noise. Regards, Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73134#73134 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] View coordinates of a 3D point

2018-03-19 Thread Antoine Rennuit
Wojtek, This does work, thanks! PS: the multiplication is in reverse order because it is OpenGL convention matrices. Regards, Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73133#73133

Re: [osg-users] View coordinates of a 3D point

2018-03-18 Thread Wojciech Lewandowski
Hi, Knowing the 3D coordinates of a point, is there an easy way in OSG to > compute its 2D projected equivalent (i.e. in pixel coordinates)? Yes. In general your pixel coord is computed as: pixel_coords = WindowMatrix * ProjectionMatrix * ViewMatrix * ModelMatrix * point; Your solution may

Re: [osg-users] View coordinates of a 3D point

2018-03-17 Thread Julien Valentin
Short answer is no The maths has been covered plenty of time search the forum Why not use TransformFeedBack and readback Arrays from gpu..? It's here for that kind of stuff arennuit wrote: > Dear OSG forum, > > Knowing the 3D coordinates of a point, is there an easy way in OSG to compute > its

[osg-users] View coordinates of a 3D point

2018-03-16 Thread Antoine Rennuit
Dear OSG forum, Knowing the 3D coordinates of a point, is there an easy way in OSG to compute its 2D projected equivalent (i.e. in pixel coordinates)? Thanks, Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73112#73112