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

@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2017, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h>
#include "TextureTransform.h"
#include "StringUtils.h"
#include <assimp/StringUtils.h>
using namespace Assimp;
@ -87,7 +88,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
{
/* This function tries to simplify the input UV transformation.
* That's very important as it allows us to reduce the number
* of output UV channels. The oder in which the transformations
* of output UV channels. The order in which the transformations
* are applied is - as always - scaling, rotation, translation.
*/
@ -104,12 +105,10 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
if (info.mRotation)
{
float out = info.mRotation;
if ((rounded = (int)(info.mRotation / (float)AI_MATH_TWO_PI)))
if ((rounded = static_cast<int>((info.mRotation / static_cast<float>(AI_MATH_TWO_PI)))))
{
out -= rounded*(float)AI_MATH_PI;
ai_snprintf(szTemp, 512, "Texture coordinate rotation %f can be simplified to %f",info.mRotation,out);
DefaultLogger::get()->info(szTemp);
out -= rounded * static_cast<float>(AI_MATH_PI);
ASSIMP_LOG_INFO_F("Texture coordinate rotation ", info.mRotation, " can be simplified to ", out);
}
// Next step - convert negative rotation angles to positives
@ -149,7 +148,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
out = 1.f;
}
if (szTemp[0]) {
DefaultLogger::get()->info(szTemp);
ASSIMP_LOG_INFO(szTemp);
info.mTranslation.x = out;
}
}
@ -182,7 +181,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
out = 1.f;
}
if (szTemp[0]) {
DefaultLogger::get()->info(szTemp);
ASSIMP_LOG_INFO(szTemp);
info.mTranslation.y = out;
}
}
@ -220,7 +219,7 @@ inline const char* MappingModeToChar(aiTextureMapMode map)
// ------------------------------------------------------------------------------------------------
void TextureTransformStep::Execute( aiScene* pScene)
{
DefaultLogger::get()->debug("TransformUVCoordsProcess begin");
ASSIMP_LOG_DEBUG("TransformUVCoordsProcess begin");
/* We build a per-mesh list of texture transformations we'll need
@ -330,7 +329,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
}
if (mesh->mNumUVComponents[info.uvIndex] >= 3){
DefaultLogger::get()->warn("UV transformations on 3D mapping channels are not supported");
ASSIMP_LOG_WARN("UV transformations on 3D mapping channels are not supported");
continue;
}
@ -415,7 +414,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
++it2;
if ((*it2).lockedPos != AI_TT_UV_IDX_LOCK_NONE) {
DefaultLogger::get()->error("Channel mismatch, can't compute all transformations properly [design bug]");
ASSIMP_LOG_ERROR("Channel mismatch, can't compute all transformations properly [design bug]");
continue;
}
@ -448,10 +447,8 @@ void TextureTransformStep::Execute( aiScene* pScene)
if (size > AI_MAX_NUMBER_OF_TEXTURECOORDS) {
if (!DefaultLogger::isNullLogger()) {
::ai_snprintf(buffer,1024,"%u UV channels required but just %u available",
static_cast<unsigned int>(trafo.size()),AI_MAX_NUMBER_OF_TEXTURECOORDS);
DefaultLogger::get()->error(buffer);
ASSIMP_LOG_ERROR_F(static_cast<unsigned int>(trafo.size()), " UV channels required but just ",
AI_MAX_NUMBER_OF_TEXTURECOORDS, " available");
}
size = AI_MAX_NUMBER_OF_TEXTURECOORDS;
}
@ -486,7 +483,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
MappingModeToChar ((*it).mapU),
MappingModeToChar ((*it).mapV));
DefaultLogger::get()->info(buffer);
ASSIMP_LOG_INFO(buffer);
}
// Check whether we need a new buffer here
@ -559,12 +556,10 @@ void TextureTransformStep::Execute( aiScene* pScene)
if (!DefaultLogger::isNullLogger()) {
if (transformedChannels) {
::ai_snprintf(buffer,1024,"TransformUVCoordsProcess end: %u output channels (in: %u, modified: %u)",
outChannels,inChannels,transformedChannels);
DefaultLogger::get()->info(buffer);
ASSIMP_LOG_INFO_F("TransformUVCoordsProcess end: ", outChannels, " output channels (in: ", inChannels, ", modified: ", transformedChannels,")");
} else {
ASSIMP_LOG_DEBUG("TransformUVCoordsProcess finished");
}
else DefaultLogger::get()->debug("TransformUVCoordsProcess finished");
}
}