Skip to content

Instantly share code, notes, and snippets.

@ghiboz
Last active August 29, 2015 14:13
Show Gist options
  • Save ghiboz/d1a86a81867457a547c7 to your computer and use it in GitHub Desktop.
Save ghiboz/d1a86a81867457a547c7 to your computer and use it in GitHub Desktop.
Ogre 1.x to Ogre 2.x
// node iterator
// 1.x
Ogre::Node::ChildNodeIterator node_it = node->getChildIterator();
// 2.x
Ogre::Node::NodeVecIterator node_it = node->getChildIterator();
// create child
// 1.x
mEarNode = scene->getRootSceneNode()->createChildSceneNode(Ogre::Vector3(0,0,0), Ogre::Quaternion::IDENTITY);
Ogre::SceneNode * nodeSign = node->createChildSceneNode(sName);
// 2.x
mEarNode = scene->getRootSceneNode()->createChildSceneNode(Ogre::SCENE_DYNAMIC, Ogre::Vector3(0,0,0), Ogre::Quaternion::IDENTITY);
Ogre::SceneNode * nodeSign = node->createChildSceneNode(Ogre::SCENE_STATIC);
nodeSign->setName(sName);
// entity AABB
// 1.x
myAxisAlignedBox->merge(myEntity->getBoundingBox());
// 2.x
myAxisAlignedBox->merge(myEntity->getWorldAabb().getMinimum());
myAxisAlignedBox->merge(myEntity->getWorldAabb().getMaximum());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment