MCPcopy Create free account
hub / github.com/OGRECave/ogre / processNode

Method processNode

PlugIns/DotScene/src/DotSceneLoader.cpp:436–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436void DotSceneLoader::processNode(pugi::xml_node& XMLNode, SceneNode* pParent)
437{
438 // Construct the node's name
439 String name = getAttrib(XMLNode, "name");
440
441 LogManager::getSingleton().logMessage("[DotSceneLoader] Processing Node: " + name, LML_TRIVIAL);
442
443 // Create the scene node
444 SceneNode* pNode;
445 if (name.empty())
446 {
447 // Let Ogre choose the name
448 if (pParent)
449 pNode = pParent->createChildSceneNode();
450 else
451 pNode = mAttachNode->createChildSceneNode();
452 }
453 else
454 {
455 // Provide the name
456 if (pParent)
457 pNode = pParent->createChildSceneNode(mItemPrefix + name);
458 else
459 pNode = mAttachNode->createChildSceneNode(mItemPrefix + name);
460 }
461
462 // Process other attributes
463
464 // Process position (?)
465 if (auto pElement = XMLNode.child("position"))
466 {
467 pNode->setPosition(parseVector3(pElement));
468 }
469
470 // Process rotation (?)
471 if (auto pElement = XMLNode.child("rotation"))
472 {
473 pNode->setOrientation(parseQuaternion(pElement));
474 }
475
476 // Process scale (?)
477 if (auto pElement = XMLNode.child("scale"))
478 {
479 pNode->setScale(parseVector3(pElement));
480 }
481
482 // Process lookTarget (?)
483 if (auto pElement = XMLNode.child("lookTarget"))
484 processLookTarget(pElement, pNode);
485
486 // Process trackTarget (?)
487 if (auto pElement = XMLNode.child("trackTarget"))
488 processTrackTarget(pElement, pNode);
489
490 // Process node (*)
491 for (auto pElement : XMLNode.children("node"))
492 {
493 processNode(pElement, pNode);

Callers

nothing calls this directly

Calls 9

getAttribFunction · 0.85
parseVector3Function · 0.70
parseQuaternionFunction · 0.70
logMessageMethod · 0.45
emptyMethod · 0.45
createChildSceneNodeMethod · 0.45
setPositionMethod · 0.45
setOrientationMethod · 0.45
setScaleMethod · 0.45

Tested by

no test coverage detected