Hi, Antoine, 
   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.





--





Cheers, 
---
TianZJ



At 2017-09-15 01:34:44, "Antoine Rennuit" <antoinerenn...@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
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to