ObjImporter: Added better progress reporting during file import.

There are two stages to this:
1) Processing '\'s - this accounts for 1/3rd of the file import progress.
2) Parsing the file data - this accounts for the other 2/3rds.
This commit is contained in:
Andrew Parlane
2016-01-11 11:25:36 -04:00
parent bd268bd864
commit 1632f1fbb9
3 changed files with 44 additions and 4 deletions

View File

@@ -59,6 +59,7 @@ namespace ObjFile {
class ObjFileImporter;
class IOSystem;
class ProgressHandler;
/// \class ObjFileParser
/// \brief Parser for a obj waveform file
@@ -71,7 +72,7 @@ public:
public:
/// \brief Constructor with data array.
ObjFileParser(std::vector<char> &Data,const std::string &strModelName, IOSystem* io);
ObjFileParser(std::vector<char> &Data,const std::string &strModelName, IOSystem* io, ProgressHandler* progress);
/// \brief Destructor
~ObjFileParser();
/// \brief Model getter.
@@ -139,6 +140,8 @@ private:
char m_buffer[Buffersize];
/// Pointer to IO system instance.
IOSystem *m_pIO;
//! Pointer to progress handler
ProgressHandler* m_progress;
/// Path to the current model
};