<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi, Antoine, </div><div> Yes, I think so, you have to split the non-convex polygon. Convex polygon is convenient to do point-containing test since it is just an AND-combination of half-space. But non-convex polygon is not that simple.</div><br><br><br><br><div style="position:relative;zoom:1">--<br><div><br></div><div><br></div><div>Cheers, </div><div>---</div><div>TianZJ</div><div style="clear:both"></div></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2017-09-15 01:34:44, "Antoine Rennuit" <antoinerennuit@hotmail.com> wrote:
>Dear OSG forum,
>
>I am currently using PolytopeIntersector with rectangular polygons for picking. I am thinking of extending this selection mode with polygons than could potentially be complex, non-convex for instance (e.g. polygons resulting from hand drawn areas).
>
>Now I understand that the osg::Polytope class can only handle convex polygons.
>
>Does that mean that if I want to pick using non-convex polygons I need to split my non-convex polygon into multiple convex osg::Polytopes and call the IntersectionVisitor multiple times? Is this handled in OSG? Are there helpers or should I do all this on the app side?
>
>Kind regards,
>
>Antoine.
>
>------------------
>Read this topic online here:
>http://forum.openscenegraph.org/viewtopic.php?p=71725#71725
>
>
>
>
>
>_______________________________________________
>osg-users mailing list
>osg-users@lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
</pre></div><br><br><span title="neteasefooter"><p> </p></span>