CScene* build() { sys::info << "ogl::CXmlSceneBuilder::build()" << sys::endl; if(mFile.isEmpty()) throw EXCEPTION << "File not found, while trying to build scene from XML file!"; pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file(mFile.getFilePath().c_str()); if(!result) throw EXCEPTION << result.description(); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// CScene* pScene = new CScene; { pugi::xml_node _scene = doc.child("scene"); pugi::xml_node _objects = _scene.child("objects"); buildObjects(pScene, _objects); pugi::xml_node _cameras = _scene.child("cameras"); buildCameras(pScene, _cameras); pugi::xml_node _lights = _scene.child("lights"); buildLights(pScene, _lights); } return pScene; }
void DynamicLighting::processDirty() { if (mIsDirty) { mIsDirty = false; buildObjects(); buildShaders(); } }
void CO2FluidPropertiesTest::setUp() { char str[] = "foo"; char * argv[] = { str, NULL }; _app = AppFactory::createApp("MooseUnitApp", 1, (char **) argv); _factory = &_app->getFactory(); registerObjects(*_factory); buildObjects(); }