Checked in osgParticle, writtten by Marco Jez.

This commit is contained in:
Robert Osfield
2002-06-05 12:44:55 +00:00
parent f8ffc692be
commit 9ba7505d1e
110 changed files with 10467 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
#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
(
osgNew 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.min) && fr[2].getFloat(r.max)) {
myobj.setRadiusRange(r);
fr += 3;
itAdvanced = true;
}
}
if (fr[0].matchWord("phiRange")) {
if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) {
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.min << " " << r.max << std::endl;
r = myobj.getPhiRange();
fw.indent() << "phiRange " << r.min << " " << r.max << std::endl;
return true;
}