[osg-users] Polytopes limited to 32 planes

Robert Osfield robert.osfield at gmail.com
Fri Sep 22 00:47:58 PDT 2017


Hi Antoine,

On 21 September 2017 at 18:55, Antoine Rennuit <antoinerennuit at hotmail.com>
wrote:

> Now for the suggestion to use a custom technique, are you thinking about
> using GL_SELCT with glRenderMode() and the glInitNames() / glPushName()
> functions? If so, do you know any example code implementing this?
>

Using GL to do picking is possible but I generally wouldn't recommend it as
it requires a round trip to the graphics hardware so you have a large
overhead associated with the operation.

When I'm thinking of a custom approach I'm thinking of a user implementing
something like a intersection scheme that uses a hierarchy of osg::Plane to
break the volume into half spaces.  So you end up with a graph of
osg::Plane rather than a single osg::Plane list like you have in a
osg::Polytope.    Another approach would be to create a graph of Polytope
to break up your volume.

FYI, osg::Polytope was originally written for view frustum culling and has
been expanded to be used elsewhere, in your case you it sounds like you are
pushing a bit beyond the tradeoff in design it's adopted - it's built
around performing view frustum culling as quick as possible.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170922/3a8b738f/attachment.htm>


More information about the osg-users mailing list