[osg-users] PagedLOD experts?

Wang Rui wangray84 at gmail.com
Sun Nov 1 21:24:27 PST 2009


Hi Chris,

2009/11/2 Chris 'Xenon' Hanson xenon at alphapixel.com

>
> This visitor, when applied, goes through the _inactivePagedLODList, and
> renames a
> certain number of the contents to "NeedToRemove". Later, if you are NOT
> using the
> _deleteRemovedSubgraphsInDatabaseThread option, it removes PagedLOD nodes
> that have this name.
>
>
Yes, it does. In my opinion, PagedLODs are seldom named "NeedToRemove"
because they are created by VPB automatically, or created by some
user-defined LOD generating tools, which may easily avoid this problem. So I
just ignore it while coding. But as you say, it is potentially dangerous.


> It does raise another question -- is this a common practice and is there
> anywhere else
> in OSG where node name has a special meaning during specific phases of
> operation?
>

I think so. There are some other special uses of setName(),
setUpdateCallback() and etc. in core osg libraries. For example,
osgAnimation::MorphGeometry applies setUpdateCallback() to itself
automatically, which may be invalid if a innocent developer set a customized
udpate callback to it again. Usage of ImageSequence::UpdateCallback in
osg::Texture classes may also have the same trouble.


>  And finally, is there a better extensible way to go about marking
> arbitrary nodes for
> later processing (while potentially still in the scenegraph, even though
> this case has
> them removed from the scenegraph by this point)? Any fast boolean flag will
> be immediately
> overwhelmed because everyone will want to use it and they'll collide. But
> any extensible
> method would seem to involve allocating and attaching some sort of dynamic
> marker, which
> is not especially efficient.
>
>  Any thoughts?
>
>


I don't think OSG can solve all those problems by itself. IMHO, the best way
is to write and improve documents and reference manuals, and try to tell
these exceptions and notes to developers all over the world: Don't rename
"unrenamable" nodes, and don't disturb self-propelled objects. :D


Wang Rui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091102/81384781/attachment.htm>


More information about the osg-users mailing list