![]() |
VR-Forces Developer's Guide
|
This class replaces the osgearth earth file loader and then calls into it It's purpose is to do xml processing on the earth file for the sim This is where the "vrfsim:" xml prefix is processed The XML DOM data structures turn the xml document into a node tree with each element being a node. The general idea is that if is something like this: <section> value
<vrfsim:param>othervalue</vrfsim:param> </section> Then this will be parsed as a section node with two children. The processing will then find the one with the vrfsim prefix, remove the prefix and replace the non-prefix version. If there is no non-prefix version it will just create it. Either way, the actual parameter ("param" in this example) will only exist as "param" in the sim after this parsing, and since the gui will not ever try to read anything that has the vrfsim prefix it will be ignored there. There is some extra processing for model elements b/c we want those disabled by default in the sim and you need to explicitly supply vrfsim:enabled="true".

Public Member Functions | |
| DtVrfOsgEarthFilePseudoLoader (osgDB::ReaderWriter *impl) | |
| virtual const char * | className () |
| virtual bool | acceptsExtension (const std::string &ext) const override |
| virtual ReadResult | readObject (const std::string &file_name, const osgDB::Options *options) const override |
| virtual ReadResult | readNode (const std::string &fileName, const Options *opts) const override |
| virtual ReadResult | readNode (std::istream &stream, const Options *options) const override |
| void | processAttributes (osgEarth::XmlElement &element) const |
| void | processModelElement (osgEarth::XmlElement &element) const |
| void | processXmlElement (osgEarth::XmlElement &element) const |
Static Public Member Functions | |
| static void | SetupLoader () |
| static void | RemoveLoader () |
| static void | SetOrCreateSetting (osgEarth::XmlElement &element, const std::string &name, bool def) |
| static std::string | ProcessName (std::string &name) |
Protected Attributes | |
| osg::ref_ptr< osgDB::ReaderWriter > | myImpl |
| DtVrfOsgEarthFilePseudoLoader::DtVrfOsgEarthFilePseudoLoader | ( | osgDB::ReaderWriter * | impl | ) |
|
static |
Install global singleton into osgDB.
|
static |
|
virtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
| void DtVrfOsgEarthFilePseudoLoader::processAttributes | ( | osgEarth::XmlElement & | element | ) | const |
|
static |
| void DtVrfOsgEarthFilePseudoLoader::processModelElement | ( | osgEarth::XmlElement & | element | ) | const |
| void DtVrfOsgEarthFilePseudoLoader::processXmlElement | ( | osgEarth::XmlElement & | element | ) | const |
|
static |
|
protected |