|
|
|
@ -6,8 +6,9 @@
|
|
|
|
|
#include <osgParticle/ParticleSystemUpdater>
|
|
|
|
|
#include <osgParticle/Emitter>
|
|
|
|
|
|
|
|
|
|
#include <components/sceneutil/morphgeometry.hpp>
|
|
|
|
|
#include <components/nifosg/userdata.hpp>
|
|
|
|
|
|
|
|
|
|
#include <components/sceneutil/morphgeometry.hpp>
|
|
|
|
|
#include <components/sceneutil/riggeometry.hpp>
|
|
|
|
|
|
|
|
|
|
namespace SceneUtil
|
|
|
|
@ -30,6 +31,15 @@ namespace SceneUtil
|
|
|
|
|
return const_cast<osg::StateSet*>(stateset);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
osg::Object* CopyOp::operator ()(const osg::Object* node) const
|
|
|
|
|
{
|
|
|
|
|
// We should copy node transformations when we copy node
|
|
|
|
|
if (const NifOsg::NodeUserData* data = dynamic_cast<const NifOsg::NodeUserData*>(node))
|
|
|
|
|
return osg::clone(data, *this);
|
|
|
|
|
|
|
|
|
|
return osg::CopyOp::operator()(node);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
osg::Node* CopyOp::operator ()(const osg::Node* node) const
|
|
|
|
|
{
|
|
|
|
|
if (const osgParticle::ParticleProcessor* processor = dynamic_cast<const osgParticle::ParticleProcessor*>(node))
|
|
|
|
|