Hi Mathias,

Thanks for the explanation.

Reviewing the code now I do wonder if the inheritance isn't a bit the
wrong way round.  The code has the CullVisitor inheriting from the
local Camera that is being traversed.  I am now thinking that the
camera's settings should be inheriting from CullVisitor according to
its own cull inheritance mask, but rather than these cull settings
being overwritten into the Camera's own local settings, the combined
settings should be assigned to the CullVisitor for the duration of the
traversal.  This is a little different from you own suggest.

I'd guess something like changing the existing code in
CullVisitor::apply(Camera&) from:

    // Save current cull settings
    CullSettings saved_cull_settings(*this);

    // activate all active cull settings from this Camera
    inheritCullSettings(camera);

To:

    // Save current cull settings
    CullSettings saved_cull_settings(*this);

    // activate all active cull settings from this Camera
    setCullSettings(camera);

    // inherit the original cull visitors settings.
    inheritCullSettings(saved_cull_settings, camera.getInheritanceMask());

Does this make sense?

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to