📄 io_sectorplacer.cpp
字号:
#include <osgParticle/SectorPlacer>#include <iostream>#include <osgDB/Registry>#include <osgDB/Input>#include <osgDB/Output>bool SectorPlacer_readLocalData(osg::Object &obj, osgDB::Input &fr);bool SectorPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &fw);osgDB::RegisterDotOsgWrapperProxy SectorPlacer_Proxy( new osgParticle::SectorPlacer, "SectorPlacer", "Object Placer CenteredPlacer SectorPlacer", SectorPlacer_readLocalData, SectorPlacer_writeLocalData);bool SectorPlacer_readLocalData(osg::Object &obj, osgDB::Input &fr){ osgParticle::SectorPlacer &myobj = static_cast<osgParticle::SectorPlacer &>(obj); bool itAdvanced = false; osgParticle::rangef r; if (fr[0].matchWord("radiusRange")) { if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setRadiusRange(r); fr += 3; itAdvanced = true; } } if (fr[0].matchWord("phiRange")) { if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setPhiRange(r); fr += 3; itAdvanced = true; } } return itAdvanced;}bool SectorPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &fw){ const osgParticle::SectorPlacer &myobj = static_cast<const osgParticle::SectorPlacer &>(obj); osgParticle::rangef r; r = myobj.getRadiusRange(); fw.indent() << "radiusRange " << r.minimum << " " << r.maximum << std::endl; r = myobj.getPhiRange(); fw.indent() << "phiRange " << r.minimum << " " << r.maximum << std::endl; return true;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -