virtual void apply(osgVolume::CompositeProperty& cp)
 {
     OSG_NOTICE<<"Found CompositeProperty"<<std::endl;
     for(unsigned int i=0; i<cp.getNumProperties(); ++i)
     {
         cp.getProperty(i)->accept(*this);
     }
 }
Esempio n. 2
0
static bool writeProperties( osgDB::OutputStream& os, const osgVolume::CompositeProperty& prop )
{
    unsigned int size = prop.getNumProperties();
    os << size << os.BEGIN_BRACKET << std::endl;
    for ( unsigned int i=0; i<size; ++i )
    {
        os << prop.getProperty(i);
    }
    os << os.END_BRACKET << std::endl;
    return true;
}
Esempio n. 3
0
static bool readProperties( osgDB::InputStream& is, osgVolume::CompositeProperty& prop )
{
    unsigned int size = 0; is >> size >> is.BEGIN_BRACKET;
    for ( unsigned int i=0; i<size; ++i )
    {
        osgVolume::Property* child = dynamic_cast<osgVolume::Property*>( is.readObject() );
        if ( child ) prop.addProperty( child );
    }
    is >> is.END_BRACKET;
    return true;
}
static bool readProperties( osgDB::InputStream& is, osgVolume::CompositeProperty& prop )
{
    unsigned int size = 0; is >> size >> is.BEGIN_BRACKET;
    for ( unsigned int i=0; i<size; ++i )
    {
        osg::ref_ptr<osgVolume::Property> child = is.readObjectOfType<osgVolume::Property>();
        if ( child ) prop.addProperty( child );
    }
    is >> is.END_BRACKET;
    return true;
}
Esempio n. 5
0
static bool checkProperties( const osgVolume::CompositeProperty& prop )
{
    return prop.getNumProperties()>0;
}
 virtual void apply(osgVolume::CompositeProperty& cp)
 {
     OSG_NOTICE<<"Found CompositeProperty, inserting transfer function"<<std::endl;
     if (_tfp.valid()) cp.addProperty(_tfp.get());
 }