[osg-users] bounding box of culled geometry

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Thu Oct 15 09:21:32 PDT 2020

Hi Renzo,

On Thu, 15 Oct 2020 at 09:05, OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:

> thanks for pointing out how cull traversal operates.
> Yes, it might be I am searching in the wrong direction. I need to get the
> minimum and the maximum Z coordinate of the geometry vertices in order to
> apply a color range. This is quite easy to do for the whole geometry but I
> would know if there is a way just for the vertices inside the view frustum.

The CullVisitor maintains the near and far values used in the view frustum
so after the cull traversal you should be able query the settings.  See
CullVisitor::getCalculatedNearPlane() and getCalculatedFarPlane()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201015/351b1eb9/attachment.html>

More information about the osg-users mailing list