Ogre dotScene saving

I'm making a video game using Ogre3d. I load the .scene file with the most recent tinyxml dotscene loader. Now I want to save the modified scene back to the .scene file. Can someone give me an example or an hint on how to do that?


You need to code the exact reverse process:

  • Loop over all relevant scene objects and for each one add the needed TiXmlElements to a TiXmlDocument.
  • At the end, save out the TiXmlDocument.
  • This TinyXml Tutorial shows the needed code parts in terms of XML generation.

    A real-world example is Ogitor (an WYSIWYG Ogre editor), where each editor object has a method TiXmlElement* CXXXEditor::exportDotScene(TiXmlElement *pParent) that moves all relevant attributes/states into the TinyXml structures before it then gets saved into a file.

    链接地址: http://www.djcxy.com/p/95562.html

    上一篇: 使用Easy Ogre Exporter创建的Ogre 3D加载模型

    下一篇: 食人魔dotScene保存