Hi Wojtek,
You got me. Say magic word "shadow" and I will crawl up from my den ;-)
:-)
Actually, I like the approach with node names and I don't think this is a hack. Node naming is possible in many modelling tools and this is what make them quite useful. We often use names to mark special nodes. When such models are loaded we run traversals, find special nodes and do some extra work there. So names work well as simple link between modelers and programmers. I don't see a reason programmers should avoid to use them in the same way.
I find it hacky for another reason, it's not really safe. A simple typo, or a case difference, and you'll have problems. But I agree, it can be really useful for load-time things.
But in this case I think we could find something better because we're doing a string comparison each frame (actually, two per traversal - for ShadowCamera and AnalysisCamera - and there are three traversals at that point per frame, so 6 string comparisons per frame). That's not so bad, but if you start doing this everywhere, string comparisons will slow down your frame rate... They're more costly than simple boolean tests / pointer equality tests. It's kind of like doing allocations or dynamic_casts in your frame loop, it's not something you want to do too often...
But nah, it's fine. Thanks, J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

