removed dead code from 0d29203e24
parent
c8ad1cb078
commit
e6a47d93c2
|
@ -57,6 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
#ifdef MDL_HALFLIFE_LOG_WARN_HEADER
|
#ifdef MDL_HALFLIFE_LOG_WARN_HEADER
|
||||||
#undef MDL_HALFLIFE_LOG_WARN_HEADER
|
#undef MDL_HALFLIFE_LOG_WARN_HEADER
|
||||||
|
|
|
@ -65,20 +65,6 @@ using namespace Assimp;
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
BaseImporter::BaseImporter() AI_NO_EXCEPT
|
BaseImporter::BaseImporter() AI_NO_EXCEPT
|
||||||
: m_progress() {
|
: 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -51,10 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "Exceptional.h"
|
#include "Exceptional.h"
|
||||||
|
|
||||||
#include <assimp/ai_assert.h>
|
|
||||||
#include <assimp/types.h>
|
#include <assimp/types.h>
|
||||||
#include <assimp/ProgressHandler.hpp>
|
#include <assimp/ProgressHandler.hpp>
|
||||||
#include <map>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -179,42 +177,10 @@ public:
|
||||||
/**
|
/**
|
||||||
* Will be called only by scale process when scaling is requested.
|
* Will be called only by scale process when scaling is requested.
|
||||||
*/
|
*/
|
||||||
virtual void SetFileScale(double scale) {
|
void SetFileScale(double scale) {
|
||||||
fileScale = 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.
|
/** Called by #Importer::GetExtensionList for each loaded importer.
|
||||||
* Take the extension list contained in the structure returned by
|
* Take the extension list contained in the structure returned by
|
||||||
|
@ -223,7 +189,6 @@ public:
|
||||||
void GetExtensionList(std::set<std::string> &extensions);
|
void GetExtensionList(std::set<std::string> &extensions);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ImporterUnits applicationUnits = ImporterUnits::M;
|
|
||||||
double importerScale = 1.0;
|
double importerScale = 1.0;
|
||||||
double fileScale = 1.0;
|
double fileScale = 1.0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue