Hi ??  Could you please sign with your name so we know how to address
you, thanks.

W.r.t. bug, the code certainly shouldn't be using a static in this
code block, and should be used a local _previousTime member,
unfortunately adding this will change the ABI so to make a patch to
the OSG-2.8 branch will break the ABI compatibility of the 2.8.x
series.  We can make this change easily to the svn/trunk version
though.  I can't think of a workaround for 2.8.x yet though....
suggestions welcome.

Robert.

2009/6/11 renlw <[email protected]>:
> hi,
>     found a bug in osgParticle::PrecipitationEffect::traverse,  version 2.8.
>
> code is:
>
> void PrecipitationEffect::traverse(osg::NodeVisitor& nv)
> {
>     if (nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR)
>     {
>         if (_dirty) update();
>
>         if (nv.getFrameStamp())
>         {
>             double currentTime = nv.getFrameStamp()->getSimulationTime();
>
>            static double previousTime = currentTime;        // here, if i
> have tow PrecipitationEffect object running, they share the same static
> previousTime, thus the second one would reach a delta of 0 always. maybe we
> can change it as a member variable instead.
>             double delta = currentTime - previousTime;
>             _origin += _wind * delta;
>             previousTime = currentTime;
>         }
>
>         return;
>     }
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to