osgEarth 2.1.1
Public Member Functions | Protected Attributes

SimpleModelSource Class Reference

Inheritance diagram for SimpleModelSource:
Collaboration diagram for SimpleModelSource:

List of all members.

Public Member Functions

 SimpleModelSource (const ModelSourceOptions &options)
void initialize (const std::string &referenceURI, const osgEarth::Map *map)
osg::Node * createNode (ProgressCallback *progress)

Protected Attributes

URI _url
const SimpleModelOptions _options

Detailed Description

Definition at line 33 of file SimpleModelSource.cpp.


Constructor & Destructor Documentation

SimpleModelSource::SimpleModelSource ( const ModelSourceOptions options) [inline]

Definition at line 36 of file SimpleModelSource.cpp.

        : ModelSource( options ), _options(options) { }

Member Function Documentation

osg::Node* SimpleModelSource::createNode ( ProgressCallback progress) [inline, virtual]

Subclass implements this method to create the mode node.

Implements osgEarth::ModelSource.

Definition at line 51 of file SimpleModelSource.cpp.

    {
        osg::ref_ptr<osg::Node> result;

        // required if the model includes local refs, like PagedLOD or ProxyNode:
        osg::ref_ptr<osgDB::Options> options = new osgDB::Options();
        options->getDatabasePathList().push_back( osgDB::getFilePath(*_url) );

        HTTPClient::readNodeFile( *_url, result, options.get(), progress ); //_settings.get(), progress );
        return result.release();
    }

Here is the call graph for this function:

void SimpleModelSource::initialize ( const std::string &  referenceURI,
const osgEarth::Map map 
) [inline, virtual]

Initialize the NodeSource.

Reimplemented from osgEarth::ModelSource.

Definition at line 40 of file SimpleModelSource.cpp.

    {
        ModelSource::initialize( referenceURI, map );
                       
        _url = *_options.url();        
       
        //_url = URI(_options.url()->base(), referenceURI);
        //_url = osgEarth::getFullPath( referenceURI, _options.url().value() );
    }

Here is the call graph for this function:


Member Data Documentation

Reimplemented from osgEarth::ModelSource.

Definition at line 65 of file SimpleModelSource.cpp.

Definition at line 64 of file SimpleModelSource.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines