Updated assimp to latest

This commit is contained in:
Areloch 2019-03-05 14:39:38 -06:00
parent 25ce4477ce
commit 161bf7f83b
461 changed files with 34662 additions and 30165 deletions

View file

@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2017, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Implementation of the MD2 importer class */
#include "MD2Loader.h"
#include "ByteSwapper.h"
#include <assimp/ByteSwapper.h>
#include "MD2NormalTable.h" // shouldn't be included by other units
#include <assimp/DefaultLogger.hpp>
#include <assimp/Importer.hpp>
@ -82,7 +83,7 @@ void MD2::LookupNormalIndex(uint8_t iNormalIndex,aiVector3D& vOut)
{
// make sure the normal index has a valid value
if (iNormalIndex >= ARRAYSIZE(g_avNormals)) {
DefaultLogger::get()->warn("Index overflow in Quake II normal vector list");
ASSIMP_LOG_WARN("Index overflow in Quake II normal vector list");
iNormalIndex = ARRAYSIZE(g_avNormals) - 1;
}
vOut = *((const aiVector3D*)(&g_avNormals[iNormalIndex]));
@ -160,7 +161,7 @@ void MD2Importer::ValidateHeader( )
// check file format version
if (m_pcHeader->version != 8)
DefaultLogger::get()->warn( "Unsupported md2 file version. Continuing happily ...");
ASSIMP_LOG_WARN( "Unsupported md2 file version. Continuing happily ...");
// check some values whether they are valid
if (0 == m_pcHeader->numFrames)
@ -202,11 +203,11 @@ void MD2Importer::ValidateHeader( )
}
if (m_pcHeader->numSkins > AI_MD2_MAX_SKINS)
DefaultLogger::get()->warn("The model contains more skins than Quake 2 supports");
ASSIMP_LOG_WARN("The model contains more skins than Quake 2 supports");
if ( m_pcHeader->numFrames > AI_MD2_MAX_FRAMES)
DefaultLogger::get()->warn("The model contains more frames than Quake 2 supports");
ASSIMP_LOG_WARN("The model contains more frames than Quake 2 supports");
if (m_pcHeader->numVertices > AI_MD2_MAX_VERTS)
DefaultLogger::get()->warn("The model contains more vertices than Quake 2 supports");
ASSIMP_LOG_WARN("The model contains more vertices than Quake 2 supports");
if (m_pcHeader->numFrames <= configFrameID )
throw DeadlyImportError("The requested frame is not existing the file");
@ -351,7 +352,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
pcHelper->AddProperty(&szString,AI_MATKEY_TEXTURE_DIFFUSE(0));
}
else{
DefaultLogger::get()->warn("Texture file name has zero length. It will be skipped.");
ASSIMP_LOG_WARN("Texture file name has zero length. It will be skipped.");
}
}
else {
@ -389,11 +390,11 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// check whether the skin width or height are zero (this would
// cause a division through zero)
if (!m_pcHeader->skinWidth) {
DefaultLogger::get()->error("MD2: No valid skin width given");
ASSIMP_LOG_ERROR("MD2: No valid skin width given");
}
else fDivisorU = (float)m_pcHeader->skinWidth;
if (!m_pcHeader->skinHeight){
DefaultLogger::get()->error("MD2: No valid skin height given");
ASSIMP_LOG_ERROR("MD2: No valid skin height given");
}
else fDivisorV = (float)m_pcHeader->skinHeight;
}
@ -411,7 +412,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// validate vertex indices
unsigned int iIndex = (unsigned int)pcTriangles[i].vertexIndices[c];
if (iIndex >= m_pcHeader->numVertices) {
DefaultLogger::get()->error("MD2: Vertex index is outside the allowed range");
ASSIMP_LOG_ERROR("MD2: Vertex index is outside the allowed range");
iIndex = m_pcHeader->numVertices-1;
}
@ -439,7 +440,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// validate texture coordinates
iIndex = pcTriangles[i].textureIndices[c];
if (iIndex >= m_pcHeader->numTexCoords) {
DefaultLogger::get()->error("MD2: UV index is outside the allowed range");
ASSIMP_LOG_ERROR("MD2: UV index is outside the allowed range");
iIndex = m_pcHeader->numTexCoords-1;
}