| 584 | } |
| 585 | |
| 586 | void 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 | |
| 615 | void DotSceneLoader::processEntity(pugi::xml_node& XMLNode, SceneNode* pParent) |
| 616 | { |
nothing calls this directly
no test coverage detected