INtroduce new log macros.
This commit is contained in:
@@ -105,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
|
||||
@@ -150,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;
|
||||
}
|
||||
}
|
||||
@@ -183,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;
|
||||
}
|
||||
}
|
||||
@@ -221,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
|
||||
@@ -416,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;
|
||||
}
|
||||
|
||||
@@ -449,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;
|
||||
}
|
||||
@@ -487,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
|
||||
@@ -560,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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user