[osg-users] Non-convex polytope picking

tianzjyh tianzjyh at 126.com
Thu Sep 14 20:14:49 PDT 2017


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" <antoinerennuit at 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 at lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170915/f6480b7b/attachment.htm>


More information about the osg-users mailing list