#include <sceneparser.h>
Collaboration diagram for SceneParser:

Public Member Functions | |
| void | parse (xmlNode *root) |
| SceneParser (std::string scene_file_name) | |
Protected Attributes | |
| std::map< std::string, nodehandler_t > | m_node_handlers |
| This is our map of node names to node handlers. | |
| std::string | m_scene_filename |
Private Member Functions | |
| Renderable * | noop (Scene *scene, xmlNode *node) |
| Renderable * | parse_bumpmaps (Scene *scene, xmlNode *node) |
| Renderable * | parse_camera (Scene *scene, xmlNode *node) |
| Renderable * | parse_colors (Scene *scene, xmlNode *node) |
| Renderable * | parse_light_sources (Scene *scene, xmlNode *node) |
| Renderable * | parse_materials (Scene *scene, xmlNode *node) |
| Renderable * | parse_meta (Scene *scene, xmlNode *node) |
| Renderable * | parse_objects (Scene *scene, xmlNode *node) |
| void | register_default_handlers () |
| Register the default node handlers. | |
Definition at line 20 of file sceneparser.h.
| SceneParser::SceneParser | ( | std::string | scene_file_name | ) |
Loads a scene from the XML file named by scene_file_name.
| scene_file_name | This is the name of the file that contains the XML specification of the scene to be ray traced. |
| Renderable * SceneParser::noop | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 90 of file sceneparser.cpp.
| void SceneParser::parse | ( | xmlNode * | root | ) |
Parse the XML document whose root is passed in.
| root | The root of the document to parse. |
Definition at line 227 of file sceneparser.cpp.
References Scene::get_instance(), log_debug, log_err, log_info, log_warn, and m_node_handlers.
Here is the call graph for this function:

| Renderable * SceneParser::parse_bumpmaps | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 198 of file sceneparser.cpp.
References Scene::add_bumpmap(), PluginFactory< _ParentType, _SigType, _SlotType >::get_instance(), get_properties(), log_debug, and log_warn.
Referenced by register_default_handlers().
Here is the call graph for this function:

Here is the caller graph for this function:

| Renderable * SceneParser::parse_camera | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 148 of file sceneparser.cpp.
References get_properties(), log_debug, and Scene::set_camera().
Referenced by register_default_handlers().
Here is the call graph for this function:

Here is the caller graph for this function:

| Renderable* SceneParser::parse_colors | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
Parse a set of color nodes and return them in a map<char *, Color>.
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
| Renderable * SceneParser::parse_light_sources | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
Parse the <light_sources> XML node.
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 171 of file sceneparser.cpp.
References Scene::add_primitive(), PluginFactory< _ParentType, _SigType, _SlotType >::get_instance(), Renderable::initialize(), log_debug, log_warn, and Renderable::set_is_light().
Referenced by register_default_handlers().
Here is the call graph for this function:

Here is the caller graph for this function:

| Renderable * SceneParser::parse_materials | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 63 of file sceneparser.cpp.
References Scene::add_material(), exit_mbrt(), PluginFactory< _ParentType, _SigType, _SlotType >::get_instance(), get_properties(), and log_crit.
Referenced by register_default_handlers().
Here is the call graph for this function:

Here is the caller graph for this function:

| Renderable * SceneParser::parse_meta | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 117 of file sceneparser.cpp.
References get_properties(), log_debug, Scene::set_max_recurse_depth(), Scene::set_output_filename(), Scene::set_pixel_height(), Scene::set_pixel_width(), and Scene::set_subpixel_sqrt().
Referenced by register_default_handlers().
Here is the call graph for this function:

Here is the caller graph for this function:

| Renderable * SceneParser::parse_objects | ( | Scene * | scene, | |
| xmlNode * | node | |||
| ) | [private] |
| scene | The scene that the object will affect. | |
| node | The xml node that contains configuration for this element |
Definition at line 95 of file sceneparser.cpp.
References Scene::add_primitive(), PluginFactory< _ParentType, _SigType, _SlotType >::get_instance(), Renderable::initialize(), log_debug, and log_warn.
Referenced by register_default_handlers().
Here is the call graph for this function:

Here is the caller graph for this function:

| void SceneParser::register_default_handlers | ( | ) | [private] |
Register the default node handlers.
Definition at line 53 of file sceneparser.cpp.
References m_node_handlers, parse_bumpmaps(), parse_camera(), parse_light_sources(), parse_materials(), parse_meta(), and parse_objects().
Here is the call graph for this function:

std::map<std::string, nodehandler_t> SceneParser::m_node_handlers [protected] |
This is our map of node names to node handlers.
Definition at line 64 of file sceneparser.h.
Referenced by parse(), and register_default_handlers().
std::string SceneParser::m_scene_filename [protected] |
This is the name of the XML file which contains the definition of the scene.
Definition at line 68 of file sceneparser.h.
1.5.2