XML parser for Mitsuba scene files. To be used with the SAX interface of Xerces-C++. More...
#include <mitsuba/render/scenehandler.h>
Inheritance diagram for mitsuba::SceneHandler:Public Types | |
| typedef std::map< std::string, ConfigurableObject * > | NamedObjectMap |
| typedef std::map< std::string, std::string, SimpleStringOrdering > | ParameterMap |
Public Member Functions | |
| SceneHandler (const ParameterMap ¶ms, NamedObjectMap *objects=NULL, bool isIncludedFile=false) | |
| virtual | ~SceneHandler () |
| virtual void | startDocument () |
| virtual void | endDocument () |
| virtual void | startElement (const XMLCh *const name, xercesc::AttributeList &attributes) |
| virtual void | endElement (const XMLCh *const name) |
| virtual void | characters (const XMLCh *const chars, const XMLSize_t length) |
| virtual void | setDocumentLocator (const xercesc::Locator *const locator) |
| const Scene * | getScene () const |
| Scene * | getScene () |
| void | warning (const xercesc::SAXParseException &exc) |
| void | error (const xercesc::SAXParseException &exc) |
| void | fatalError (const xercesc::SAXParseException &exc) |
Static Public Member Functions | |
| static ref< Scene > | loadScene (const fs::path &filename, const ParameterMap ¶ms=ParameterMap()) |
| Convenience method – load a scene from a given filename. More... | |
| static ref< Scene > | loadSceneFromString (const std::string &string, const ParameterMap ¶ms=ParameterMap()) |
| Convenience method – load a scene from a given string. More... | |
| static void | staticInitialization () |
| Initialize Xerces-C++ (needs to be called once at program startup) More... | |
| static void | staticShutdown () |
| Free the memory taken up by staticInitialization() More... | |
Protected Member Functions | |
| std::string | transcode (const XMLCh *input) const |
| Float | parseFloat (const std::string &name, const std::string &str, Float defVal=-1) const |
| void | clear () |
XML parser for Mitsuba scene files. To be used with the SAX interface of Xerces-C++.
| typedef std::map<std::string, ConfigurableObject *> mitsuba::SceneHandler::NamedObjectMap |
| typedef std::map<std::string, std::string, SimpleStringOrdering> mitsuba::SceneHandler::ParameterMap |
| mitsuba::SceneHandler::SceneHandler | ( | const ParameterMap & | params, |
| NamedObjectMap * | objects = NULL, |
||
| bool | isIncludedFile = false |
||
| ) |
|
virtual |
|
virtual |
|
protected |
|
virtual |
|
virtual |
| void mitsuba::SceneHandler::error | ( | const xercesc::SAXParseException & | exc | ) |
| void mitsuba::SceneHandler::fatalError | ( | const xercesc::SAXParseException & | exc | ) |
|
inline |
|
inline |
|
static |
Convenience method – load a scene from a given filename.
|
static |
Convenience method – load a scene from a given string.
|
protected |
|
virtual |
|
virtual |
|
virtual |
|
static |
Initialize Xerces-C++ (needs to be called once at program startup)
|
static |
Free the memory taken up by staticInitialization()
|
protected |
| void mitsuba::SceneHandler::warning | ( | const xercesc::SAXParseException & | exc | ) |