[osg-users] bounding box of culled geometry
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Wed Oct 14 06:56:21 PDT 2020
Hi Renzo,
On Wed, 14 Oct 2020 at 12:00, OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:
> I am using osg::Drawable::getBoundingBox() to retrieve the bounding box
> around the whole geometry. Is there a similar short way to get the
> equivalent box for just the culled geometry or do I need to write my own
> procedure?
>
Culling isn't related to the nodes directly, but to a traversersal of the
scene graph that compares the bounding shere's of internal nodes of the
scene graph and the bounding boxes of the drawable leaves. Culling can
happen at any point in the hierarchy - it can cull right up at the top node
in the scene graph if the scene is outside the view frustum.
Within the cull traversal there is no tracking of culled or non culling
bounding boxes, a cull test is done and the bool result used directly.
There isn't a "bounding box" or "bounding sphere" for culled or non culled
objects. All the cull traversal cares about is building a list of
drawables leaves that pass the view frustum test, there is no tracking of
any objects that are culled - this would be a crazy waste of CPU resources.
I have to ask, why do you want a bounding box of culled objects - what is
the high level problem you are trying to solve? It may well be that you
are asking the wrong question thinking about the task you have in the wrong
way.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201014/f46a8f32/attachment.html>
More information about the osg-users
mailing list