Hi Daniel,

On 3/13/07, DANIEL BASS <[EMAIL PROTECTED]> wrote:
I had not thought of subclassing CullVisitor, so I tried doing that,
and it
mostly works, except that I have lost my lightpoints!  I think the
problem
is that the LightPointNode::traverse() method is checking to see if the

nodeVisitor is specifically a osgUtil::CullVisitor type.  Since mine is
a subclass,
this fails and so the Light points never get shuffled over to be
rendered.
Is this analysis correct?  How can I get around this?

Your analysis is correct, the typeid usage in
src/osgSim/LightPointNode.cpp was preventing the use of the subclass.
The simple solution to this is to use dynamic_cast<> instead, this is
a bit slower, but as long as there are a huge number of LightPointNode
the performance hit will be pretty small so I have applied this change
and checked it in to SVN.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to