Valerian, I recommend you look into the osgUtil::PlaneIntersector. For each segment of your line, construct a plane that is orthogonal to the grid. The PlaneIntersector will generate a Polyline containing all the points in that plane that intersect the grid.
Glenn Waldron On Wed, Jul 13, 2016 at 5:24 AM, Valerian Merkling <niarkolep...@gmail.com> wrote: > Hi, > > To make it short, I want to tessellate a line to make it follow a grid. > > On the attached example, the red line on the top is my starting line, and > I want to add every intersection of this line and a grid as vertex of this > line. > > The expected result is the line in the bottom. > > I know I can do it with math, but I would like to know if the > osgUtil::Tessellator can do it for me. > > I looked at the osgtessellate example but it's all about polygons... > > Thank you! > > Cheers, > Valerian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=68109#68109 > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org