Conflicts:
	tools/assimp_cmd/ImageExtractor.cpp
This commit is contained in:
Kim Kulling
2015-07-08 00:40:35 +02:00
16 changed files with 127 additions and 92 deletions
+1 -1
View File
@@ -620,7 +620,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
face.mIndices[i] = cur++;
// copy vertex positions
if ((vertices - mesh->mVertices) >= mesh->mNumVertices) {
if (static_cast<unsigned>(vertices - mesh->mVertices) >= mesh->mNumVertices) {
throw DeadlyImportError("AC3D: Invalid number of vertices");
}
*vertices = object.vertices[entry.first] + object.translation;
+9 -1
View File
@@ -333,8 +333,16 @@ void ColladaLoader::BuildLightsForNode( const ColladaParser& pParser, const Coll
out->mAttenuationLinear = srcLight->mAttLinear;
out->mAttenuationQuadratic = srcLight->mAttQuadratic;
// collada doesn't differenciate between these color types
out->mColorDiffuse = out->mColorSpecular = out->mColorAmbient = srcLight->mColor*srcLight->mIntensity;
if (out->mType == aiLightSource_AMBIENT) {
out->mColorDiffuse = out->mColorSpecular = aiColor3D(0, 0, 0);
out->mColorAmbient = srcLight->mColor*srcLight->mIntensity;
}
else {
// collada doesn't differentiate between these color types
out->mColorDiffuse = out->mColorSpecular = srcLight->mColor*srcLight->mIntensity;
out->mColorAmbient = aiColor3D(0, 0, 0);
}
// convert falloff angle and falloff exponent in our representation, if given
if (out->mType == aiLightSource_SPOT) {
+9 -10
View File
@@ -84,29 +84,29 @@ const char* TokenTypeString(TokenType t)
// ------------------------------------------------------------------------------------------------
std::string AddOffset(const std::string& prefix, const std::string& text, unsigned int offset)
{
return static_cast<std::string>( (Formatter::format(),prefix," (offset 0x",std::hex,offset,") ",text) );
return static_cast<std::string>( (Formatter::format() << prefix << " (offset 0x" << std::hex << offset << ") " << text) );
}
// ------------------------------------------------------------------------------------------------
std::string AddLineAndColumn(const std::string& prefix, const std::string& text, unsigned int line, unsigned int column)
{
return static_cast<std::string>( (Formatter::format(),prefix," (line ",line,", col ",column,") ",text) );
return static_cast<std::string>( (Formatter::format() << prefix << " (line " << line << " << col " << column << ") " << text) );
}
// ------------------------------------------------------------------------------------------------
std::string AddTokenText(const std::string& prefix, const std::string& text, const Token* tok)
{
if(tok->IsBinary()) {
return static_cast<std::string>( (Formatter::format(),prefix,
" (",TokenTypeString(tok->Type()),
", offset 0x", std::hex, tok->Offset(),") ",
return static_cast<std::string>( (Formatter::format() << prefix <<
" (" << TokenTypeString(tok->Type()) <<
", offset 0x" << std::hex << tok->Offset() << ") " <<
text) );
}
return static_cast<std::string>( (Formatter::format(),prefix,
" (",TokenTypeString(tok->Type()),
", line ",tok->Line(),
", col ",tok->Column(),") ",
return static_cast<std::string>( (Formatter::format() << prefix <<
" (" << TokenTypeString(tok->Type()) <<
", line " << tok->Line() <<
", col " << tok->Column() << ") " <<
text) );
}
@@ -115,4 +115,3 @@ std::string AddTokenText(const std::string& prefix, const std::string& text, con
} // !Assimp
#endif