From 80acc1f24129b17bd1099a9caef278781beeefed Mon Sep 17 00:00:00 2001 From: Madrich Date: Mon, 17 Jul 2017 09:42:26 +0200 Subject: [PATCH] Fix Collada export image tag Fix compiler double issues --- code/ColladaExporter.cpp | 2 +- code/IFCLoader.cpp | 2 +- code/X3DImporter_Geometry3D.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index d701f90..745975e 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -552,7 +552,7 @@ void ColladaExporter::WriteImageEntry( const Surface& pSurface, const std::strin std::stringstream imageUrlEncoded; for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it ) { - if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '.' || *it == '/' || *it == '\\' ) + if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '-' || *it == '.' || *it == '/' || *it == '\\' ) imageUrlEncoded << *it; else imageUrlEncoded << '%' << std::hex << size_t( (unsigned char) *it) << std::dec; diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index 463803a..e8632fa 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -155,7 +155,7 @@ void IFCImporter::SetupProperties(const Importer* pImp) { settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true); settings.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true); - settings.conicSamplingAngle = std::min(std::max(pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f); + settings.conicSamplingAngle = std::min(std::max((float) pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f); settings.cylindricalTessellation = std::min(std::max(pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION, AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION), 3), 180); settings.skipAnnotations = true; } diff --git a/code/X3DImporter_Geometry3D.cpp b/code/X3DImporter_Geometry3D.cpp index 721221f..b2e9a28 100644 --- a/code/X3DImporter_Geometry3D.cpp +++ b/code/X3DImporter_Geometry3D.cpp @@ -949,7 +949,7 @@ void X3DImporter::ParseNode_Geometry3D_IndexedFaceSet() void X3DImporter::ParseNode_Geometry3D_Sphere() { std::string use, def; - float radius = 1; + ai_real radius = 1; bool solid = true; CX3DImporter_NodeElement* ne( nullptr ); -- 2.7.4