⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io_particlesystemupdater.cpp

📁 最新osg包
💻 CPP
字号:
#include <osgParticle/ParticleSystemUpdater>#include <osg/ref_ptr>#include <osgDB/Registry>#include <osgDB/Input>#include <osgDB/Output>bool  PSU_readLocalData(osg::Object &obj, osgDB::Input &fr);bool  PSU_writeLocalData(const osg::Object &obj, osgDB::Output &fr);osgDB::RegisterDotOsgWrapperProxy PSU_Proxy(    new osgParticle::ParticleSystemUpdater,    "ParticleSystemUpdater",    "Object Node ParticleSystemUpdater",    PSU_readLocalData,    PSU_writeLocalData);bool PSU_readLocalData(osg::Object &obj, osgDB::Input &fr){    osgParticle::ParticleSystemUpdater &myobj = static_cast<osgParticle::ParticleSystemUpdater &>(obj);        bool itAdvanced = false;    osg::ref_ptr<osgParticle::ParticleSystem> proto = new osgParticle::ParticleSystem;    osgParticle::ParticleSystem *ps = static_cast<osgParticle::ParticleSystem *>(fr.readObjectOfType(*proto));    if (ps) {        myobj.addParticleSystem(ps);        itAdvanced = true;    }    return itAdvanced;}bool PSU_writeLocalData(const osg::Object &obj, osgDB::Output &fw){    const osgParticle::ParticleSystemUpdater &myobj = static_cast<const osgParticle::ParticleSystemUpdater &>(obj);        for (unsigned int i=0; i<myobj.getNumParticleSystems(); ++i) {        fw.writeObject(*myobj.getParticleSystem(i));    }    return true;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -