6 #include <OGRE/OgreSceneManager.h>
23 void ShowSceneNodeControls(Ogre::Node* node,
int iterator_index)
30 std::string entry_name = node->getName() +
"##" + node->getName() + std::to_string(iterator_index);
34 Ogre::Vector3 position = node->getPosition();
35 Ogre::Quaternion orientation = node->getOrientation();
36 Ogre::Vector3 scale = node->getScale();
38 std::string position_name =
"position##" + node->getName() + std::to_string(iterator_index);
39 std::string orientation_name =
"orientation##" + node->getName() + std::to_string(iterator_index);
40 std::string rotation_name =
"rotation##" + node->getName() + std::to_string(iterator_index);
41 std::string scale_name =
"scale##" + node->getName() + std::to_string(iterator_index);
45 node->setPosition(position);
48 BlamVector3 rotation = BlamVector3(orientation.getPitch().valueDegrees(), orientation.getYaw().valueDegrees(),
49 orientation.getRoll().valueDegrees());
53 BlamVector4 quaternion = BlamStrings::Utils::Math::GetQuaternionFromRotation(rotation);
54 node->setOrientation(quaternion.w, quaternion.x, quaternion.y, quaternion.z);
59 node->setOrientation(orientation);
64 node->setScale(scale);
67 Ogre::SceneNode* sn = (Ogre::SceneNode*)node;
68 for (
int i = 0; i < sn->numAttachedObjects(); i++)
70 Ogre::MovableObject*
object = sn->getAttachedObject(i);
71 std::string header_name =
"attach" + std::to_string(i) +
": " +
object->getName() +
"##" + std::to_string(iterator_index) +
"_" + std::to_string(i);
75 std::string flags_name =
"query flags##" + node->getName() + std::to_string(iterator_index) +
"_" + std::to_string(i);
77 std::string flags = std::to_string(sn->getAttachedObject(0)->getQueryFlags());
82 if (node->numChildren() > 0)
84 std::string child_count_message =
"children: " + std::to_string(node->numChildren());
87 Ogre::Node::NodeVecIterator it = node->getChildIterator();
90 while (it.current() != it.end())
92 Ogre::Node* node = it.getNext();
93 ShowSceneNodeControls(node, index);
120 ShowSceneNodeControls(root, 0);
125 ShowSceneNodeControls(root_2d, 0);