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

Method processTrackTarget

PlugIns/DotScene/src/DotSceneLoader.cpp:586–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void DotSceneLoader::processTrackTarget(pugi::xml_node& XMLNode, SceneNode* pParent)
587{
588 // Process attributes
589 String nodeName = getAttrib(XMLNode, "nodeName");
590
591 LogManager::getSingleton().logMessage("[DotSceneLoader] Processing Track Target, nodeName: " + nodeName, LML_TRIVIAL);
592
593 // Process localDirection (?)
594 Vector3 localDirection = Vector3::NEGATIVE_UNIT_Z;
595 if (auto pElement = XMLNode.child("localDirection"))
596 localDirection = parseVector3(pElement);
597
598 // Process offset (?)
599 Vector3 offset = Vector3::ZERO;
600 if (auto pElement = XMLNode.child("offset"))
601 offset = parseVector3(pElement);
602
603 // Setup the track target
604 try
605 {
606 SceneNode* pTrackNode = mSceneMgr->getSceneNode(nodeName);
607 pParent->setAutoTracking(true, pTrackNode, localDirection, offset);
608 }
609 catch (const Exception& e)
610 {
611 LogManager::getSingleton().logError("DotSceneLoader - " + e.getDescription());
612 }
613}
614
615void DotSceneLoader::processEntity(pugi::xml_node& XMLNode, SceneNode* pParent)
616{

Callers

nothing calls this directly

Calls 7

getAttribFunction · 0.85
getSceneNodeMethod · 0.80
logErrorMethod · 0.80
parseVector3Function · 0.70
logMessageMethod · 0.45
setAutoTrackingMethod · 0.45
getDescriptionMethod · 0.45

Tested by

no test coverage detected