#ifndef ADVXMLLOADER_H #define ADVXMLLOADER_H #include #include #include class wb3RayTracer; class wb3Scene; class wb3TracingShader; using namespace AdvXMLParser; using namespace std; typedef map wb3MaterialLookup; class wb3AdvXMLLoader : public wb3Loader { public: wb3AdvXMLLoader() { m_bCopyInfile = false; } wb3RayTracer *Load(const char *filename); void BuildScene(const Element& elem, wb3ArtifactSet *currAggregate = 0); void BuildSceneItem(const Element& elem); void BuildViewOpts(const Element& elem); void BuildRenderOpts(const Element& elem); void BuildSurface(const Element& elem); void BuildLight(const Element& elem); void BuildObjectItem(const Element& elem, wb3ArtifactSet* parent); void BuildTransforms(const Element& elem, wb3Artifact* arty); void BuildTextures(const Element& elem, wb3Artifact* arty); wb3Texture* BuildImageTexture(const Element& elem, wb3Artifact *pObj); wb3Artifact* BuildPrimitive(const Element& elem); wb3Artifact* BuildInstance(const Element& elem, bool doTransformsAndTextures = true); // Exception classes class ParseError {}; // == Bad* (everything else) class BadLight : public ParseError {}; class BadVector : public ParseError {}; class BadColor : public ParseError {}; class UnimplementedFeature {}; class FileProblems {}; // all file system difficulties class FileNotWriteable : public FileProblems {}; protected: wb3Scene *m_pScene; wb3RayTracer *m_pTracer; wb3TracingShader *m_pShader; wb3MaterialLookup m_MaterialMap; wb3Material *m_pLastMaterial; bool m_bCopyInfile; const char *inputFile; }; #endif