コード例 #1
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 )
    {
        osg::ref_ptr<osgVolume::Property> child = is.readObjectOfType<osgVolume::Property>();
        if ( child ) prop.addProperty( child );
    }
    is >> is.END_BRACKET;
    return true;
}
コード例 #2
0
ファイル: CompositeProperty.cpp プロジェクト: 3dcl/osg
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;
}
コード例 #3
0
 virtual void apply(osgVolume::CompositeProperty& cp)
 {
     OSG_NOTICE<<"Found CompositeProperty, inserting transfer function"<<std::endl;
     if (_tfp.valid()) cp.addProperty(_tfp.get());
 }