Hi All, On Wed, Mar 19, 2008 at 9:55 AM, Robert Osfield <[EMAIL PROTECTED]> wrote: > This forth approach is currently my favoured as its least intrusive > w.r.t setAttribute() method parameters, but... I'm not overly happy > with the behind the scenes automatic setting of other parameters. > Doxygen comments can come in to solve this one though.
I've go ahead and implemented this approach. The addition to CullSettings are: enum InheritanceMaskActionOnAttributeSetting { DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT, DO_NOT_MODIFY_INHERITANCE_MASK }; void setInheritanceMaskActionOnAttributeSetting(InheritanceMaskActionOnAttributeSetting action) { _inheritanceMaskActionOnAttributeSetting = action; } InheritanceMaskActionOnAttributeSetting getInheritanceMaskActionOnAttributeSetting() const { return _inheritanceMaskActionOnAttributeSetting; } /** Apply the action, specified by the InheritanceMaskActionOnAttributeSetting, to apply to the inheritance bit mask. * This method is called by CullSettings::set*() parameter methods to ensure that CullSettings inheritance mechanisms doesn't overwrite the local parameter settings.*/ inline void applyMaskAction(unsigned int maskBit) { if (_inheritanceMaskActionOnAttributeSetting==DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT) { _inheritanceMask = _inheritanceMask & (~maskBit); } } A set*() method now has the applymaskAction() method call it it: /** Switch the creation of Impostors on or off. * Setting active to false forces the CullVisitor to use the Impostor * LOD children for rendering. Setting active to true forces the * CullVisitor to create the appropriate pre-rendering stages which * render to the ImpostorSprite's texture.*/ void setImpostorsActive(bool active) { _impostorActive = active; applyMaskAction(IMPOSTOR_ACTIVE); } The _inheritanceMaskActionOnAttributeSetting defaults to DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT. I've revert the temporary fix to osgShadow that I made yesterday, and with the above changes in place osgShadow still works as it originally did. I have checked in this changes and am looking for assistance on testing these changes out in the wild. Key things to look for are any code that uses Camera's and sets the CullSettings on them, are these now behaving as expected? Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org