Exemple #1
0
static bool readPlacers( osgDB::InputStream& is, osgParticle::CompositePlacer& cp )
{
    unsigned int size = 0; is >> size >> osgDB::BEGIN_BRACKET;
    for ( unsigned int i=0; i<size; ++i )
    {
        osgParticle::Placer* p = dynamic_cast<osgParticle::Placer*>( is.readObject() );
        if ( p ) cp.addPlacer( p );
    }
    is >> osgDB::END_BRACKET;
    return true;
}
Exemple #2
0
static bool readPlacers( osgDB::InputStream& is, osgParticle::CompositePlacer& cp )
{
    unsigned int size = 0; is >> size >> is.BEGIN_BRACKET;
    for ( unsigned int i=0; i<size; ++i )
    {
        osg::ref_ptr<osgParticle::Placer> p = is.readObjectOfType<osgParticle::Placer>();
        if ( p ) cp.addPlacer( p.get() );
    }
    is >> is.END_BRACKET;
    return true;
}