#include <Windows.h>
#include <osgViewer/Viewer>
#include <osg/Node>
#include <osg/Geode>
#include <osg/Group>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgUtil/Optimizer>
#include <osgParticle/PrecipitationEffect>
#include <osgParticle/ExplosionDebrisEffect>
#include <osgParticle/ExplosionEffect>
#include <osgParticle/SmokeEffect>
#include <osgParticle/FireEffect>
using namespace std;
osg::ref_ptr<osg::Node> createExplode()
{
osg::ref_ptr<osg::Group> explode = new osg::Group();
//风向
osg::Vec3 wind(1.0f, 0.0f, 0.0f);
osg::Vec3 position(0.0f, 0.0f, -1.0f);
//爆炸模拟,10.0f为缩放比,默认为1.0f,不缩放
osg::ref_ptr<osgParticle::ExplosionEffect> explosion = new osgParticle::ExplosionEffect(position, 10.0f);
osg::ref_ptr<osgParticle::ExplosionDebrisEffect> explosionDebri = new osgParticle::ExplosionDebrisEffect(position