From a60b7696e3509b3e95d80f2e0557464b572bff62 Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Sun, 17 Feb 2019 11:44:02 +0100 Subject: [PATCH 1/4] Parse post process arguments when using info tool --- tools/assimp_cmd/Info.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/assimp_cmd/Info.cpp b/tools/assimp_cmd/Info.cpp index b504083d3..d730b9308 100644 --- a/tools/assimp_cmd/Info.cpp +++ b/tools/assimp_cmd/Info.cpp @@ -317,10 +317,15 @@ int Assimp_Info (const char* const* params, unsigned int num) { return 1; } - // do maximum post-processing unless -r was specified + // Parse post-processing flags unless -r was specified ImportData import; if (!raw) { - import.ppFlags = aiProcessPreset_TargetRealtime_MaxQuality; + // get import flags + ProcessStandardArguments(import, params + 1, num - 1); + + //No custom post process flags defined, we set all the post process flags active + if(import.ppFlags == 0) + import.ppFlags |= aiProcessPreset_TargetRealtime_MaxQuality; } // import the main model From 5fa750fda03b2f4d67493e2cccbf1ca7d9b61ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 22 May 2019 10:19:32 +0200 Subject: [PATCH 2/4] Fix code files encoding to make them all UTF-8 --- code/Importer/IFC/IFCBoolean.cpp | 2 +- code/res/resource.h | 4 +-- contrib/irrXML/irrString.h | 2 +- contrib/poly2tri/AUTHORS | 2 +- .../contrib/dotzlib/DotZLib/ChecksumImpl.cs | 4 +-- .../contrib/dotzlib/DotZLib/CircularBuffer.cs | 2 +- .../zlib/contrib/dotzlib/DotZLib/CodecBase.cs | 2 +- .../zlib/contrib/dotzlib/DotZLib/Deflater.cs | 2 +- .../zlib/contrib/dotzlib/DotZLib/DotZLib.cs | 2 +- .../contrib/dotzlib/DotZLib/GZipStream.cs | 2 +- .../zlib/contrib/dotzlib/DotZLib/Inflater.cs | 2 +- tools/assimp_view/stdafx.cpp | 4 +-- tools/assimp_view/stdafx.h | 26 +++++++++---------- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/code/Importer/IFC/IFCBoolean.cpp b/code/Importer/IFC/IFCBoolean.cpp index 337e1d40b..d30a87f62 100644 --- a/code/Importer/IFC/IFCBoolean.cpp +++ b/code/Importer/IFC/IFCBoolean.cpp @@ -256,7 +256,7 @@ bool IntersectsBoundaryProfile(const IfcVector3& e0, const IfcVector3& e1, const for( size_t i = 0, bcount = boundary.size(); i < bcount; ++i ) { IfcVector3 b01 = boundary[(i + 1) % bcount] - boundary[i]; IfcVector3 b12 = boundary[(i + 2) % bcount] - boundary[(i + 1) % bcount]; - IfcVector3 b1_side = IfcVector3(b01.y, -b01.x, 0.0); // rotated 90° clockwise in Z plane + IfcVector3 b1_side = IfcVector3(b01.y, -b01.x, 0.0); // rotated 90° clockwise in Z plane // Warning: rough estimate only. A concave poly with lots of small segments each featuring a small counter rotation // could fool the accumulation. Correct implementation would be sum( acos( b01 * b2) * sign( b12 * b1_side)) windingOrder += (b1_side.x*b12.x + b1_side.y*b12.y); diff --git a/code/res/resource.h b/code/res/resource.h index 37d39284f..c28c05073 100644 --- a/code/res/resource.h +++ b/code/res/resource.h @@ -2,8 +2,8 @@ // Microsoft Visual C++ generated include file. // Used by assimp.rc -// Nächste Standardwerte für neue Objekte -// +// Next standard values for new objects +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 diff --git a/contrib/irrXML/irrString.h b/contrib/irrXML/irrString.h index af21b8e51..ff0097b71 100644 --- a/contrib/irrXML/irrString.h +++ b/contrib/irrXML/irrString.h @@ -19,7 +19,7 @@ so you can assign unicode to string and ascii to string Note that the conversation between both is not done using an encoding. Known bugs: -Special characters like 'Ä', 'Ü' and 'Ö' are ignored in the +Special characters like 'Ä', 'Ãœ' and 'Ö' are ignored in the methods make_upper, make_lower and equals_ignore_case. */ template diff --git a/contrib/poly2tri/AUTHORS b/contrib/poly2tri/AUTHORS index 1736f14bb..aa390660d 100644 --- a/contrib/poly2tri/AUTHORS +++ b/contrib/poly2tri/AUTHORS @@ -1,7 +1,7 @@ Primary Contributors: Mason Green (C++, Python) - Thomas Åhlén (Java) + Thomas Ã…hlén (Java) Other Contributors: diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs index b110dae6a..cd1ef44eb 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -199,4 +199,4 @@ namespace DotZLib } #endregion -} \ No newline at end of file +} diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs index 9c8d60195..e7a88b9f4 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs index b0eb78a02..6ef6d8fab 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs index 9039f41f6..778a6794d 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/Deflater.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs index 90c7c3b38..a48ed4974 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs index f0eada1d2..07b2f7a9b 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs index d295f2680..8e900ae20 100644 --- a/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs +++ b/contrib/zlib/contrib/dotzlib/DotZLib/Inflater.cs @@ -1,5 +1,5 @@ // -// © Copyright Henrik Ravn 2004 +// © Copyright Henrik Ravn 2004 // // Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/tools/assimp_view/stdafx.cpp b/tools/assimp_view/stdafx.cpp index 709f0fd9a..bbbb7e0c0 100644 --- a/tools/assimp_view/stdafx.cpp +++ b/tools/assimp_view/stdafx.cpp @@ -1,8 +1,8 @@ // stdafx.cpp : Quelldatei, die nur die Standard-Includes einbindet. // assimp_view.pch ist der vorkompilierte Header. -// stdafx.obj enthält die vorkompilierten Typinformationen. +// stdafx.obj enthält die vorkompilierten Typinformationen. #include "stdafx.h" -// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H +// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H // und nicht in dieser Datei erforderlich sind. diff --git a/tools/assimp_view/stdafx.h b/tools/assimp_view/stdafx.h index 35104d4b0..d3f4692cb 100644 --- a/tools/assimp_view/stdafx.h +++ b/tools/assimp_view/stdafx.h @@ -1,26 +1,26 @@ -// stdafx.h : Includedatei für Standardsystem-Includedateien -// oder häufig verwendete projektspezifische Includedateien, -// die nur in unregelmäßigen Abständen geändert werden. +// stdafx.h : Includedatei für Standardsystem-Includedateien +// oder häufig verwendete projektspezifische Includedateien, +// die nur in unregelmäßigen Abständen geändert werden. // #pragma once -// Ändern Sie folgende Definitionen für Plattformen, die älter als die unten angegebenen sind. -// In MSDN finden Sie die neuesten Informationen über die entsprechenden Werte für die unterschiedlichen Plattformen. -#ifndef WINVER // Lassen Sie die Verwendung spezifischer Features von Windows XP oder später zu. -# define WINVER 0x0501 // Ändern Sie dies in den geeigneten Wert für andere Versionen von Windows. +// Ändern Sie folgende Definitionen für Plattformen, die älter als die unten angegebenen sind. +// In MSDN finden Sie die neuesten Informationen über die entsprechenden Werte für die unterschiedlichen Plattformen. +#ifndef WINVER // Lassen Sie die Verwendung spezifischer Features von Windows XP oder später zu. +# define WINVER 0x0501 // Ändern Sie dies in den geeigneten Wert für andere Versionen von Windows. #endif -#ifndef _WIN32_WINNT // Lassen Sie die Verwendung spezifischer Features von Windows XP oder später zu. -# define _WIN32_WINNT 0x0501 // Ändern Sie dies in den geeigneten Wert für andere Versionen von Windows. +#ifndef _WIN32_WINNT // Lassen Sie die Verwendung spezifischer Features von Windows XP oder später zu. +# define _WIN32_WINNT 0x0501 // Ändern Sie dies in den geeigneten Wert für andere Versionen von Windows. #endif -#ifndef _WIN32_WINDOWS // Lassen Sie die Verwendung spezifischer Features von Windows 98 oder später zu. -# define _WIN32_WINDOWS 0x0410 // Ändern Sie dies in den geeigneten Wert für Windows Me oder höher. +#ifndef _WIN32_WINDOWS // Lassen Sie die Verwendung spezifischer Features von Windows 98 oder später zu. +# define _WIN32_WINDOWS 0x0410 // Ändern Sie dies in den geeigneten Wert für Windows Me oder höher. #endif -#ifndef _WIN32_IE // Lassen Sie die Verwendung spezifischer Features von IE 6.0 oder später zu. -#define _WIN32_IE 0x0600 // Ändern Sie dies in den geeigneten Wert für andere Versionen von IE. +#ifndef _WIN32_IE // Lassen Sie die Verwendung spezifischer Features von IE 6.0 oder später zu. +#define _WIN32_IE 0x0600 // Ändern Sie dies in den geeigneten Wert für andere Versionen von IE. #endif // Windows-Headerdateien: From dff92d77331debe5eacaf07c2745fd755c549a01 Mon Sep 17 00:00:00 2001 From: Mark Gillard Date: Mon, 27 May 2019 21:14:50 +0300 Subject: [PATCH 3/4] quality-of-life improvements for Visual Studio --- .gitignore | 7 +++++++ include/assimp/defs.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 49cd60ca8..9dcb6623d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,12 @@ build *.sln *.ncb *.vcproj +*.vcxproj.user +*.VC.db +*.VC.db-shm +*.VC.db-wal +*.VC.opendb +*.ipch # Output bin/ @@ -32,6 +38,7 @@ cmake_uninstall.cmake *.dir/ assimp-config.cmake assimp-config-version.cmake +assimpTargets*.cmake # MakeFile Makefile diff --git a/include/assimp/defs.h b/include/assimp/defs.h index 4a177e3c3..2631263f5 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -293,7 +293,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef _MSC_VER # define AI_NO_EXCEPT noexcept #else -# if (_MSC_VER == 1915 ) +# if (_MSC_VER >= 1915 ) # define AI_NO_EXCEPT noexcept # else # define AI_NO_EXCEPT From 48ed2d2d3c6cc1fa73d3ced821b5189de569bc53 Mon Sep 17 00:00:00 2001 From: Mike Samsonov Date: Thu, 30 May 2019 10:54:44 +0100 Subject: [PATCH 4/4] Double precision fix --- code/FBXParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/FBXParser.cpp b/code/FBXParser.cpp index fe63866a0..5d5c2c6c1 100644 --- a/code/FBXParser.cpp +++ b/code/FBXParser.cpp @@ -643,9 +643,9 @@ void ParseVectorDataArray(std::vector& out, const Element& el) if (type == 'd') { const double* d = reinterpret_cast(&buff[0]); for (unsigned int i = 0; i < count3; ++i, d += 3) { - out.push_back(aiVector3D(static_cast(d[0]), - static_cast(d[1]), - static_cast(d[2]))); + out.push_back(aiVector3D(static_cast(d[0]), + static_cast(d[1]), + static_cast(d[2]))); } // for debugging /*for ( size_t i = 0; i < out.size(); i++ ) {