Spitting out Meshes & Animation Data to file.

This commit is contained in:
antc13
2016-01-12 15:39:29 +01:00
parent 0e90382fd1
commit 7b62dc19bf
7 changed files with 242 additions and 73 deletions
+14 -2
View File
@@ -20,20 +20,32 @@ public:
MGlobal::displayInfo("WriteToFile::writeToFiles()");
if (ASCIIFile.is_open())
{
MGlobal::displayInfo("Writing to ASCIIfile");
for (unsigned int i = startIndex; i < numOfElementToWrite + startIndex; i++)
ASCIIFile << toWrite[i] << endl;
}
if (binFile.is_open())
{
MGlobal::displayInfo("Writing to binaryfile");
for (unsigned int i = startIndex; i < numOfElementToWrite + startIndex; i++)
toWrite[i].WriteBinary(binFile);
}
}
void writeToFiles(unsigned int* toWrite, unsigned int numOfElementToWrite = 1, unsigned int startIndex = 0)
{
MGlobal::displayInfo("WriteToFile::writeToFiles()");
if (ASCIIFile.is_open()) {
for (unsigned int i = startIndex; i < numOfElementToWrite + startIndex; i++)
ASCIIFile << toWrite[i] << endl;
}
if (binFile.is_open()) {
binFile.write((char*)toWrite, numOfElementToWrite * sizeof(int));
}
}
void OpenFiles();
void CloseFiles();