OSG粒子系统学习

发布时间:2023年12月23日
#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
文章来源:https://blog.csdn.net/bcbobo21cn/article/details/135162118
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。