[osg-users] PagedLOD experts?
Jean-Sébastien Guay
jean-sebastien.guay at cm-labs.com
Mon Nov 2 06:20:03 PST 2009
Hi Chris,
> 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 tend to think that any use of user-settable properties, such as node
name, callbacks, user data, etc. inside OSG is potentially dangerous.
Any app could potentially change the node's name, remove/replace a
callback or user data and that would break the library's behavior, and
the only way to know why it's broken is to go delve into OSG's source.
For callbacks, it's pretty easy to instead derive a node type and
override the traverse() method. That way it's much harder for the user
to break expected behavior of the node (they would need to derive from
this node type, override traverse() and forget to call the base class
version). For name and user data, I don't see an easy way to avoid using
them if OSG already uses them in some cases... But in any case,
identifying nodes by name always strikes me as unsafe.
Since we use visitors so often in OSG coding, OSG itself can't assume
that any node is hidden from the user, and so can't assume that
user-settable properties won't be changed by the user...
This doesn't really help you, but I wanted to be more detailed than just
saying "I agree".
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
More information about the osg-users
mailing list