Brad, You take the plane that defines the left side of the view frustum; then you intersect your line with that plane.
I find this is easiest to do in normalized clip space (which goes from [-1..1] in each dimension). The left plane will be defined as point=(-1,0,0), normal=(1,0,0). You can convert your line's points into clip space by multiplying each point by the (modelview matrix * projection matrix). I successfully used this approach for graticule labeling in osgEarth. Good luck! Glenn Waldron / osgEarth On Fri, Nov 8, 2019 at 3:44 PM Brad Colbert <bcolb...@rscusa.com> wrote: > Hi, > > I'm using an ortho frustum to draw a map. On the map I'm drawing a kind > of range ring / sector pattern, starting from an origin using lines. I > want to draw text at the edge of the viewport where the lines intersect > with the edge (well, just inside so the text is viewable). > > The problem I'm having is I can't quite figure out how to tell where the > lines end within the frustum. Any ideas would be welcomed. > > Picture for context is attached. > > Thank you! > > Cheers, > Brad > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=76886#76886 > > > > > Attachments: > http://forum.openscenegraph.org//files/mapview_458.png > > > _______________________________________________ > osg-users mailing list > email@example.com > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list firstname.lastname@example.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org