Rev | Line | |
---|
[104] | 1 | #include "IoManager.h"
|
---|
| 2 |
|
---|
| 3 | IoManager::IoManager(Ogre::String fileName)
|
---|
| 4 | {
|
---|
| 5 | mFile.open(fileName.c_str());
|
---|
| 6 | }
|
---|
| 7 |
|
---|
| 8 | IoManager::~IoManager()
|
---|
| 9 | {
|
---|
| 10 | mFile.close();
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | void IoManager::Write()
|
---|
| 14 | {
|
---|
| 15 | std::vector<Ogre::Vector3>::const_iterator posit, posit_end;
|
---|
| 16 | posit_end = mPositions.end();
|
---|
| 17 |
|
---|
| 18 | std::vector<Ogre::Quaternion>::const_iterator orit;
|
---|
| 19 | orit = mOrientations.begin();
|
---|
| 20 |
|
---|
| 21 | for (posit = mPositions.begin(); posit != posit_end; ++posit)
|
---|
| 22 | {
|
---|
| 23 | mFile << (*posit) << (*(orit++));
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 |
|
---|
[105] | 27 | void IoManager::AddNode(Ogre::SceneNode *node)
|
---|
[104] | 28 | {
|
---|
| 29 | mPositions.push_back(node->getPosition());
|
---|
| 30 | mOrientations.push_back(node->getOrientation());
|
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.