Merge branch 'master' into jc3-cctype-fixes

This commit is contained in:
Jason C
2021-05-07 14:48:01 -04:00
committed by GitHub
12 changed files with 58 additions and 98 deletions

View File

@@ -51,10 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Exceptional.h"
#include <assimp/ai_assert.h>
#include <assimp/types.h>
#include <assimp/ProgressHandler.hpp>
#include <map>
#include <set>
#include <vector>
#include <memory>
@@ -179,42 +177,10 @@ public:
/**
* Will be called only by scale process when scaling is requested.
*/
virtual void SetFileScale(double scale) {
void SetFileScale(double scale) {
fileScale = scale;
}
virtual double GetFileScale() const {
return fileScale;
}
enum ImporterUnits {
M,
MM,
CM,
INCHES,
FEET
};
/**
* Assimp Importer
* unit conversions available
* NOTE: Valid options are initialised in the
* constructor in the implementation file to
* work around a VS2013 compiler bug if support
* for that compiler is dropped in the future
* initialisation can be moved back here
* */
std::map<ImporterUnits, double> importerUnits;
virtual void SetApplicationUnits(const ImporterUnits &unit) {
importerScale = importerUnits[unit];
applicationUnits = unit;
}
virtual const ImporterUnits &GetApplicationUnits() {
return applicationUnits;
}
// -------------------------------------------------------------------
/** Called by #Importer::GetExtensionList for each loaded importer.
* Take the extension list contained in the structure returned by
@@ -223,7 +189,6 @@ public:
void GetExtensionList(std::set<std::string> &extensions);
protected:
ImporterUnits applicationUnits = ImporterUnits::M;
double importerScale = 1.0;
double fileScale = 1.0;
@@ -420,7 +385,7 @@ public: // static utilities
private:
/* Pushes state into importer for the importer scale */
virtual void UpdateImporterScale(Importer *pImp);
void UpdateImporterScale(Importer *pImp);
protected:
/// Error description in case there was one.

View File

@@ -43,8 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_IRRXML_WRAPPER
#include <assimp/DefaultLogger.hpp>
#include <assimp/ai_assert.h>
#include "BaseImporter.h"
#include "IOStream.hpp"
#include <pugixml.hpp>
#include <vector>