Merge pull request #3806 from krishty/remove-useless-scaling-prototype

removed dead code from 0d29203e24
pull/3808/head^2
Kim Kulling 2021-05-06 14:04:35 +02:00 committed by GitHub
commit 90d3ff27f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 51 deletions

View File

@ -57,6 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iomanip>
#include <sstream>
#include <map>
#ifdef MDL_HALFLIFE_LOG_WARN_HEADER
#undef MDL_HALFLIFE_LOG_WARN_HEADER

View File

@ -65,20 +65,6 @@ using namespace Assimp;
// Constructor to be privately used by Importer
BaseImporter::BaseImporter() AI_NO_EXCEPT
: m_progress() {
/**
* Assimp Importer
* unit conversions available
* if you need another measurment unit add it below.
* it's currently defined in assimp that we prefer meters.
*
* NOTE: Initialised here rather than in the header file
* to workaround a VS2013 bug with brace initialisers
* */
importerUnits[ImporterUnits::M] = 1.0;
importerUnits[ImporterUnits::CM] = 0.01;
importerUnits[ImporterUnits::MM] = 0.001;
importerUnits[ImporterUnits::INCHES] = 0.0254;
importerUnits[ImporterUnits::FEET] = 0.3048;
}
// ------------------------------------------------------------------------------------------------

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>