MCPcopy Create free account
hub / github.com/RenderKit/embree / CoronaLoader

Method CoronaLoader

tutorials/common/scenegraph/corona_loader.cpp:274–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272 }
273
274 CoronaLoader::CoronaLoader(const FileName& fileName, const AffineSpace3fa& space)
275 {
276 path = fileName.path();
277 Ref<XML> xml = parseXML(fileName,"/.-",false);
278 if (xml->name == "scene")
279 {
280 Ref<SceneGraph::GroupNode> group = new SceneGraph::GroupNode;
281 for (size_t i=0; i<xml->children.size(); i++) {
282 group->add(loadNode(xml->children[i]));
283 }
284 root = group.cast<SceneGraph::Node>();
285 }
286 else
287 THROW_RUNTIME_ERROR(xml->loc.str()+": invalid scene tag");
288
289 if (space == AffineSpace3fa(one))
290 return;
291
292 root = new SceneGraph::TransformNode(space,root);
293 }
294
295 /*! read from disk */
296 Ref<SceneGraph::Node> SceneGraph::loadCorona(const FileName& fileName, const AffineSpace3fa& space) {

Callers

nothing calls this directly

Calls 5

parseXMLFunction · 0.85
pathMethod · 0.80
sizeMethod · 0.45
addMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected