[osg-users] cullcallback and visitor ?

Robert Osfield robert.osfield at gmail.com
Thu Sep 25 08:20:00 PDT 2008


Hi Vincent,

The ways to track whether a drawable or node is in the view frustum are:

  1) Attach a cull callback, if it get's called during the cull
traversal then it hasn't been culled (yet).
  2) Traverse the rendering back data structures (RenderStage etc)
after the cull traversal so see what drawables.
  3) Test the object in question directly against the view frustum.

Robert.

On Thu, Sep 25, 2008 at 4:15 PM, Vincent Bourdier
<vincent.bourdier at gmail.com> wrote:
> Hi,
>
> I'm looking at a way to determine if a node is visible (in the frustum) or
> not.
>
> I saw something about cullvisitor and isCulled()
>
> But, I do not understand how to implement that visitor.
>
> I saw a osg::Drawable::cullcallback ...
> Do I have to make my callbak ingerit from this class ?
> What operator do I have to define (operator()(node*, nodevisitor*) ) ?
>
> thanks a lot.
>
> Regards,
> Vincent.
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



More information about the osg-users mailing list