Yep, I've seen that stuff.  My confusion was all about where to make
the call to inheritCullSettings.  After a bit more poking around, it
seems I can add

inheritCullSettings(camera);

as the very first line in CullVisitor::apply(osg::CameraNode& camera)
and I get a working CameraNode LOD scale.  However, I think to do this
properly I need to somehow push and pop the CullSettings at the
beginning and end of this apply function.  Does that sound right?  I
can't find a mechanism for doing this; does one exist?
- Terry

Hi Terry,

osg::CameraNode inherits from osg::CullSettings which is where its
inhertCullSettings comes from.  The setInheritanceMask in CullSettings
has a bit for LOD_SCALE.

Robert.

On 10/27/06, Terry Welsh <[EMAIL PROTECTED]> wrote:
> So, I'm not sure how to wire up CameraNode to do this.  It appears
> that CameraNode always inherits SceneView's lod scale and that's what
> I need to prevent.
>
> SceneView has its cull() functions, which calls cullStage(), which
> calls cullVisitor->inheritCullSettings(*this).  My best guess is that
> CameraNode needs to do something similar in order to mask pieces of
> CullSettings that it does not want to inherit, but I can't find any
> cull functionality in CameraNode like I find in SceneView, so I don't
> know where I should be calling inheritCullSettings().
>
> Does this sound right so far or am I barking up the wrong tree?  Any
> suggestions where to go from here?
> - Terry
>
> > Message: 30
> > Date: Fri, 27 Oct 2006 19:11:58 +0100
> > From: "Robert Osfield" <[EMAIL PROTECTED]>
> > Subject: Re: [osg-users] setLODScale and CameraNode
> > To: "osg users" <[email protected]>
> > Message-ID:
> >         <[EMAIL PROTECTED]>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > Hi Terry,
> >
> > It might simply be that it hasn't been wired up yet...  feel free to
> > browse through the code.
> >
> > Robert.
> >
> > On 10/27/06, Terry Welsh <[EMAIL PROTECTED]> wrote:
> > > setLODScale works fine with SceneView, but I can't get it to work on
> > > CameraNode.  It appears to have no affect at all.  I tried adding
> > >
> > > mycameranode->setInheritanceMask(CullSettings::ALL_VARIABLES -
> > > CullSettings::LOD_SCALE);
> > >
> > > so that it wouldn't inherit the LOD scale from its parent SceneView,
> > > but that doesn't help.  Anyone know what I'm missing?
> > > --
> > > Terry Welsh - mogumbo 'at' gmail.com
> > > www.reallyslick.com  |  www.mogumbo.com
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to