瀏覽代碼

Merge branch 'master' of https://github.com/assimp/assimp

Kim Kulling 8 年之前
父節點
當前提交
f60f1544f7
共有 100 個文件被更改,包括 1070 次插入1047 次删除
  1. 7 0
      .gitattributes
  2. 205 173
      CHANGES
  3. 38 32
      CMakeLists.txt
  4. 160 160
      CREDITS
  5. 78 78
      LICENSE
  6. 148 143
      Readme.md
  7. 36 1
      assimp-config-version.cmake.in
  8. 7 4
      cmake-modules/FindPkgMacros.cmake
  9. 1 1
      cmake-modules/FindZLIB.cmake
  10. 1 1
      code/3DSExporter.h
  11. 4 4
      code/3DSHelper.h
  12. 1 0
      code/3DSLoader.cpp
  13. 1 0
      code/ACLoader.cpp
  14. 1 2
      code/AMFImporter.cpp
  15. 2 3
      code/AMFImporter.hpp
  16. 32 24
      code/AMFImporter_Postprocess.cpp
  17. 1 0
      code/ASELoader.cpp
  18. 1 1
      code/ASELoader.h
  19. 1 2
      code/ASEParser.cpp
  20. 1 0
      code/AssbinLoader.cpp
  21. 0 1
      code/AssbinLoader.h
  22. 1 1
      code/AssxmlExporter.cpp
  23. 1 1
      code/B3DImporter.cpp
  24. 0 1
      code/B3DImporter.h
  25. 1 0
      code/BVHLoader.cpp
  26. 1 0
      code/BaseImporter.cpp
  27. 1 2
      code/BaseImporter.h
  28. 0 2
      code/BaseProcess.h
  29. 59 81
      code/Bitmap.h
  30. 1 0
      code/BlenderDNA.cpp
  31. 1 2
      code/BlenderDNA.h
  32. 2 1
      code/BlenderDNA.inl
  33. 1 2
      code/BlenderIntermediate.h
  34. 8 6
      code/BlenderLoader.cpp
  35. 2 2
      code/BlenderScene.cpp
  36. 4 4
      code/BlobIOSystem.h
  37. 10 4
      code/CMakeLists.txt
  38. 1 1
      code/COBLoader.cpp
  39. 4 3
      code/COBScene.h
  40. 1 1
      code/CSMLoader.cpp
  41. 28 22
      code/ColladaExporter.cpp
  42. 0 1
      code/ColladaHelper.h
  43. 3 5
      code/ColladaLoader.cpp
  44. 9 6
      code/ColladaParser.cpp
  45. 0 1
      code/ColladaParser.h
  46. 47 113
      code/D3MFImporter.cpp
  47. 0 3
      code/D3MFImporter.h
  48. 0 1
      code/D3MFOpcPackage.cpp
  49. 0 1
      code/D3MFOpcPackage.h
  50. 2 0
      code/DXFLoader.cpp
  51. 1 0
      code/DXFLoader.h
  52. 2 2
      code/DefaultIOStream.cpp
  53. 2 2
      code/DefaultIOSystem.cpp
  54. 2 1
      code/DefaultLogger.cpp
  55. 1 1
      code/Exceptional.h
  56. 40 79
      code/Exporter.cpp
  57. 0 1
      code/FBXAnimation.cpp
  58. 2 0
      code/FBXCompileConfig.h
  59. 0 1
      code/FBXConverter.cpp
  60. 0 2
      code/FBXDeformer.cpp
  61. 1 1
      code/FBXDocument.cpp
  62. 1 3
      code/FBXImporter.cpp
  63. 0 2
      code/FBXModel.cpp
  64. 0 2
      code/FBXNodeAttribute.cpp
  65. 0 1
      code/FBXParser.cpp
  66. 3 2
      code/FBXProperties.h
  67. 0 1
      code/FBXTokenizer.h
  68. 1 0
      code/FBXUtil.cpp
  69. 0 1
      code/FBXUtil.h
  70. 42 1
      code/FileLogStream.h
  71. 1 0
      code/HMPLoader.cpp
  72. 0 5
      code/HMPLoader.h
  73. 0 1
      code/HalfLifeFileData.h
  74. 1 1
      code/IFCBoolean.cpp
  75. 2 2
      code/IFCGeometry.cpp
  76. 7 10
      code/IFCLoader.cpp
  77. 2 2
      code/IFCLoader.h
  78. 14 6
      code/IFCOpenings.cpp
  79. 2 2
      code/IFCProfile.cpp
  80. 1 1
      code/IFCUtil.cpp
  81. 0 2
      code/IOStreamBuffer.h
  82. 1 1
      code/IRRLoader.cpp
  83. 1 1
      code/IRRMeshLoader.cpp
  84. 4 2
      code/Importer.cpp
  85. 1 1
      code/Importer.h
  86. 3 0
      code/ImporterRegistry.cpp
  87. 2 1
      code/LWOLoader.cpp
  88. 2 0
      code/LWOLoader.h
  89. 1 1
      code/LWSLoader.cpp
  90. 0 2
      code/MD2FileData.h
  91. 2 0
      code/MD2Loader.cpp
  92. 1 2
      code/MD3Loader.cpp
  93. 1 0
      code/MD5Loader.cpp
  94. 1 0
      code/MDCLoader.cpp
  95. 1 1
      code/MDLLoader.cpp
  96. 1 1
      code/MDLMaterialLoader.cpp
  97. 2 1
      code/MS3DLoader.cpp
  98. 2 0
      code/NDOLoader.cpp
  99. 1 0
      code/NFFLoader.cpp
  100. 1 1
      code/OFFLoader.cpp

+ 7 - 0
.gitattributes

@@ -2,7 +2,14 @@
 *.cpp text eol=lf
 *.h text eol=lf
 *.c text eol=lf
+*.cc text eol=lf
+*.cpp text eol=lf
+*.rc text eol=lf
 *.hpp text eol=lf
 *.txt text eol=lf
 *.cmake text eol=lf
 *.sh text eol=lf
+CHANGES text eol=lf
+CREDITS text eol=lf
+LICENSE text eol=lf
+Readme.md text eol=lf

+ 205 - 173
CHANGES

@@ -1,173 +1,205 @@
-----------------------------------------------------------------------
-CHANGELOG
-----------------------------------------------------------------------
-
-3.2.1 (2016-10-01)
-
-FEATURES:
-  - Updated glTF exporter to meet 1.0 specification.
-
-FIXES/HOUSEKEEPING:
-  - Fixed glTF Validator errors for exported glTF format.
-
-ISSUES:
-  - Hard coded sampler setting for
-    - magFilter
-    - minFilter
-  - void* in ExportData for accessor max and min.
-
-
-
-3.2.0 (2015-11-03)
-
-FEATURES:
-  - OpenDDL-Parser is part of contrib-source.
-  - Experimental OpenGEX-support
-  - CI-check for linux and windows
-  - Coverity check added
-  - New regression testsuite.
-
-FIXES/HOUSEKEEPING:
-  - Hundreds of bugfixes  in all parts of the library
-  - Unified line endings
-
-
-API COMPATIBILITY:
-  - Removed precompiled header to increase build speed for linux
-
-
-3.1.1 (2014-06-15)
-
-FEATURES:
-   - Support for FBX 2013 and newer, binary and ASCII (this is partly
-     work from Google Summer of Code 2012)
-   - Support for OGRE binary mesh and skeleton format
-   - Updated BLEND support for newer Blender versions
-   - Support for arbitrary meta data, used to hold FBX and DAE metadata
-   - OBJ Export now produces smaller files
-   - Meshes can now have names, this is supported by the major importers
-   - Improved IFC geometry generation
-   - M3 support has been removed
-
-FIXES/HOUSEKEEPING:
-    - Hundreds of bugfixes in all parts of the library
-    - CMake is now the primary build system
-
-API COMPATIBILITY:
-    - 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData
-      and aiMesh::mName
-    - Export interface has been cleaned up and unified
-    - Other than that no relevant changes
-
-
-3.0 (2012-07-07)
-
-FEATURES:
-   - new export interface similar to the import API.
-   - Supported export formats: Collada, OBJ, PLY and STL
-   - added new import formats: XGL/ZGL, M3 (experimental)
-   - new postprocessing steps: Debone
-   - vastly improved IFC (Industry Foundation Classes) support
-   - introduced API to query importer meta information (such as supported
-       format versions, full name, maintainer info).
-   - reworked Ogre XML import
-   - C-API now supports per-import properties
-
-FIXES/HOUSEKEEPING:
-
-   - hundreds of bugfixes in all parts of the library
-   - unified naming and cleanup of public headers
-   - improved CMake build system
-   - templatized math library
-   - reduce dependency on boost.thread, only remaining spot
-     is synchronization for the C logging API
-
-API COMPATIBILITY:
-   - renamed headers, export interface, C API properties and meta data
-     prevent compatibility with code written for 2.0, but in
-     most cases these can be easily resolved
-   - Note: 3.0 is not binary compatible with 2.0
-
-
-
-
-2.0 (2010-11-21)
-
-FEATURES:
-   - Add support for static Blender (*.blend) scenes
-   - Add support for Q3BSP scenes
-   - Add a windows-based OpenGL sample featuring texturing & basic materials
-   - Add an experimental progress feedback interface.
-   - Vastly improved performance (up to 500%, depending on mesh size and
-     spatial structure) in some expensive postprocessing steps
-   - AssimpView now uses a reworked layout which leaves more space
-     to the scene hierarchy window
-
-   - Add C# bindings ('Assimp.NET')
-   - Keep BSD-licensed and otherwise free test files in separate
-     folders (./test/models and ./test/models-nonbsd).
-
-FIXES:
-   - Many Collada bugfixes, improve fault tolerance
-   - Fix possible crashes in the Obj loader
-   - Improve the Ogre XML loader
-   - OpenGL-sample now works with MinGW
-   - Fix Importer::FindLoader failing on uppercase file extensions
-   - Fix flawed path handling when locating external files
-   - Limit the maximum number of vertices, faces, face indices and
-     weights that Assimp is able to handle. This is to avoid
-     crashes due to overflowing counters.
-
-   - Updated XCode project files
-   - Further CMAKE build improvements
-
-
-API CHANGES:
-   - Add data structures for vertex-based animations (These are not
-     currently used, however ...)
-   - Some Assimp::Importer methods are const now.
-
-
-
-
-
-1.1 (2010-04-17)
-This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
-
-FEATURES:
-  - Vastly improved Collada support
-  - Add MS3D (Milkshape 3D) support
-  - Add support for Ogre XML static meshes
-  - Add experimental COB (TrueSpace) support
-  - Automatic test suite to quickly locate regressions
-  - D bindings (`dAssimp`)
-  - Python 2.n bindings (`PyAssimp`)
-  - Add basic support for Unicode input files (utf8, utf16 and utf32)
-  - Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats)
-  - Switch to a CMAKE-based build system including an install target for unix'es
-  - Automatic evaluation of subdivision surfaces for some formats.
-  - Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory`
-  - Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`)
-
-  - Move noboost files away from the public include directory
-  - Many, many bugfixes and improvements in existing loaders and postprocessing steps
-  - Documentation improved and clarified in many places.
-  - Add a sample on using Assimp in conjunction with OpenGL
-
-  - Distribution/packaging: comfortable SDK installer for Windows
-  - Distribution/packaging: improved release packages for other architectures
-
-CRITICAL FIXES:
-  - Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32)
-  - Fix automatic detection of file type if no file extension is given
-  - Improved exception safety and robustness, prevent leaking of exceptions through the C interface
-  - Fix possible heap corruption due to material properties pulled in incorrectly
-  - Avoid leaking in certain error scenarios
-  - Fix 64 bit compatibility problems in some loaders (i.e. MDL)
-
-BREAKING API CHANGES:
-  - None -
-
-MINOR API BEHAVIOUR CHANGES:
- - Change quaternion orientation to suit to the more common convention (-w).
- - aiString is utf8 now. Not yet consistent, however.
+----------------------------------------------------------------------
+CHANGELOG
+----------------------------------------------------------------------
+
+3.3.1 (2016-07-08)
+
+FIXES/HOUSEKEEPING:
+    - Setup of default precision for 17 exporters
+    - Fix xcode project files
+    - Fix BlenderTesselator: offsetof operator
+    - Invalid version in cmake file
+    - Update pstdint.h to latest greatest
+
+
+3.3.0 (2016-07-05)
+
+FEATURES:
+    - C++11 support enabled
+    - New regression-test-UI
+    - Experimental glTF-importer support
+    - OpenGEX: add support for cameras and lights
+    - C4D: update to latest Melange-SDK
+    - Add a gitter channel
+    - Coverity check enabled
+    - Switch to <...> include brackets for public headers 
+    - Enable export by pyAssimp
+    - CI: check windows build
+    - Add functionality to perform a singlepost-processing step
+    - many more, just check the history
+
+FIXES/HOUSEKEEPING:
+    - Fix of many resource leaks in unittests and main lib
+    - Fix iOS-buildfor X64
+    - Choosing zlib manually for cmake
+    - many more, just check the history
+
+
+3.2.1 (2016-010-10)
+
+FEATURES:
+  - Updated glTF exporter to meet 1.0 specification.
+
+FIXES/HOUSEKEEPING:
+  - Fixed glTF Validator errors for exported glTF format.
+
+ISSUES:
+  - Hard coded sampler setting for
+    - magFilter
+    - minFilter
+  - void* in ExportData for accessor max and min.
+
+
+3.2.0 (2015-11-03)
+
+FEATURES:
+  - OpenDDL-Parser is part of contrib-source.
+  - Experimental OpenGEX-support
+  - CI-check for linux and windows
+  - Coverity check added
+  - New regression testsuite.
+
+FIXES/HOUSEKEEPING:
+  - Hundreds of bugfixes  in all parts of the library
+  - Unified line endings
+
+
+API COMPATIBILITY:
+  - Removed precompiled header to increase build speed for linux
+
+
+3.1.1 (2014-06-15)
+
+FEATURES:
+   - Support for FBX 2013 and newer, binary and ASCII (this is partly
+     work from Google Summer of Code 2012)
+   - Support for OGRE binary mesh and skeleton format
+   - Updated BLEND support for newer Blender versions
+   - Support for arbitrary meta data, used to hold FBX and DAE metadata
+   - OBJ Export now produces smaller files
+   - Meshes can now have names, this is supported by the major importers
+   - Improved IFC geometry generation
+   - M3 support has been removed
+
+FIXES/HOUSEKEEPING:
+    - Hundreds of bugfixes in all parts of the library
+    - CMake is now the primary build system
+
+API COMPATIBILITY:
+    - 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData
+      and aiMesh::mName
+    - Export interface has been cleaned up and unified
+    - Other than that no relevant changes
+
+
+3.0 (2012-07-07)
+
+FEATURES:
+   - new export interface similar to the import API.
+   - Supported export formats: Collada, OBJ, PLY and STL
+   - added new import formats: XGL/ZGL, M3 (experimental)
+   - new postprocessing steps: Debone
+   - vastly improved IFC (Industry Foundation Classes) support
+   - introduced API to query importer meta information (such as supported
+       format versions, full name, maintainer info).
+   - reworked Ogre XML import
+   - C-API now supports per-import properties
+
+FIXES/HOUSEKEEPING:
+
+   - hundreds of bugfixes in all parts of the library
+   - unified naming and cleanup of public headers
+   - improved CMake build system
+   - templatized math library
+   - reduce dependency on boost.thread, only remaining spot
+     is synchronization for the C logging API
+
+API COMPATIBILITY:
+   - renamed headers, export interface, C API properties and meta data
+     prevent compatibility with code written for 2.0, but in
+     most cases these can be easily resolved
+   - Note: 3.0 is not binary compatible with 2.0
+
+
+
+
+2.0 (2010-11-21)
+
+FEATURES:
+   - Add support for static Blender (*.blend) scenes
+   - Add support for Q3BSP scenes
+   - Add a windows-based OpenGL sample featuring texturing & basic materials
+   - Add an experimental progress feedback interface.
+   - Vastly improved performance (up to 500%, depending on mesh size and
+     spatial structure) in some expensive postprocessing steps
+   - AssimpView now uses a reworked layout which leaves more space
+     to the scene hierarchy window
+
+   - Add C# bindings ('Assimp.NET')
+   - Keep BSD-licensed and otherwise free test files in separate
+     folders (./test/models and ./test/models-nonbsd).
+
+FIXES:
+   - Many Collada bugfixes, improve fault tolerance
+   - Fix possible crashes in the Obj loader
+   - Improve the Ogre XML loader
+   - OpenGL-sample now works with MinGW
+   - Fix Importer::FindLoader failing on uppercase file extensions
+   - Fix flawed path handling when locating external files
+   - Limit the maximum number of vertices, faces, face indices and
+     weights that Assimp is able to handle. This is to avoid
+     crashes due to overflowing counters.
+
+   - Updated XCode project files
+   - Further CMAKE build improvements
+
+
+API CHANGES:
+   - Add data structures for vertex-based animations (These are not
+     currently used, however ...)
+   - Some Assimp::Importer methods are const now.
+
+
+
+
+
+1.1 (2010-04-17)
+This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
+
+FEATURES:
+  - Vastly improved Collada support
+  - Add MS3D (Milkshape 3D) support
+  - Add support for Ogre XML static meshes
+  - Add experimental COB (TrueSpace) support
+  - Automatic test suite to quickly locate regressions
+  - D bindings (`dAssimp`)
+  - Python 2.n bindings (`PyAssimp`)
+  - Add basic support for Unicode input files (utf8, utf16 and utf32)
+  - Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats)
+  - Switch to a CMAKE-based build system including an install target for unix'es
+  - Automatic evaluation of subdivision surfaces for some formats.
+  - Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory`
+  - Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`)
+
+  - Move noboost files away from the public include directory
+  - Many, many bugfixes and improvements in existing loaders and postprocessing steps
+  - Documentation improved and clarified in many places.
+  - Add a sample on using Assimp in conjunction with OpenGL
+
+  - Distribution/packaging: comfortable SDK installer for Windows
+  - Distribution/packaging: improved release packages for other architectures
+
+CRITICAL FIXES:
+  - Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32)
+  - Fix automatic detection of file type if no file extension is given
+  - Improved exception safety and robustness, prevent leaking of exceptions through the C interface
+  - Fix possible heap corruption due to material properties pulled in incorrectly
+  - Avoid leaking in certain error scenarios
+  - Fix 64 bit compatibility problems in some loaders (i.e. MDL)
+
+BREAKING API CHANGES:
+  - None -
+
+MINOR API BEHAVIOUR CHANGES:
+ - Change quaternion orientation to suit to the more common convention (-w).
+ - aiString is utf8 now. Not yet consistent, however.

+ 38 - 32
CMakeLists.txt

@@ -1,7 +1,6 @@
 # Open Asset Import Library (assimp)
 # ----------------------------------------------------------------------
-#
-# Copyright (c) 2006-2016, assimp team
+# Copyright (c) 2006-2017, assimp team
 # All rights reserved.
 #
 # Redistribution and use of this software in source and binary forms,
@@ -33,7 +32,6 @@
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
 #----------------------------------------------------------------------
 SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
 cmake_minimum_required( VERSION 2.8 )
@@ -81,6 +79,12 @@ OPTION ( ASSIMP_COVERALLS
    OFF
 )
 
+OPTION ( BUILD_DOCS
+   "Build documentation using Doxygen."
+   OFF
+)
+add_subdirectory(doc)
+
 IF(MSVC)
   set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
   OPTION( ASSIMP_INSTALL_PDB
@@ -162,6 +166,10 @@ IF( UNIX )
   ENDIF()
 ENDIF()
 
+IF( UNIX )
+    include(GNUInstallDirs)
+ENDIF( UNIX )
+
 IF((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW)
   IF (BUILD_SHARED_LIBS AND CMAKE_SIZEOF_VOID_P EQUAL 8) # -fPIC is only required for shared libs on 64 bit
      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
@@ -185,9 +193,9 @@ if (ASSIMP_COVERALLS)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
 endif()
 
-INCLUDE (FindPkgConfig)
 INCLUDE_DIRECTORIES( include )
 
+INCLUDE (FindPkgMacros)
 INCLUDE (PrecompiledHeader)
 
 # If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
@@ -255,9 +263,7 @@ ENDIF(NOT ZLIB_FOUND)
 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
 
 # Search for unzip
-IF (PKG_CONFIG_FOUND)
-  PKG_CHECK_MODULES(UNZIP minizip)
-ENDIF (PKG_CONFIG_FOUND)
+use_pkgconfig(UNZIP minizip)
 
 IF ( ASSIMP_NO_EXPORT )
   ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
@@ -431,29 +437,29 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
 ENDIF()
 
 if(WIN32)
-	if (CMAKE_SIZEOF_VOID_P EQUAL 8)
-		SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
-		SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
-	elseif()
-		SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
-		SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
-	ENDIF()
-
-	if(MSVC12)
-		SET(ASSIMP_MSVC_VERSION "vc120")
-	elseif(MSVC14)
-		SET(ASSIMP_MSVC_VERSION "vc140")
-	ENDIF(MSVC12)
-
-	if(MSVC12 OR MSVC14)
-		add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll	${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp	${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib	${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll		${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll  VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
-		add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
-	ENDIF(MSVC12 OR MSVC14)
+  if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+    SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
+    SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
+  elseif()
+    SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
+    SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
+  ENDIF()
+
+  if(MSVC12)
+    SET(ASSIMP_MSVC_VERSION "vc120")
+  elseif(MSVC14)
+    SET(ASSIMP_MSVC_VERSION "vc140")
+  ENDIF(MSVC12)
+
+  if(MSVC12 OR MSVC14)
+    add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll	${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp	${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib	${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll		${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll  VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
+    add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb		${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
+  ENDIF(MSVC12 OR MSVC14)
 ENDIF (WIN32)

+ 160 - 160
CREDITS

@@ -1,160 +1,160 @@
-===============================================================
-Open Asset Import Library (Assimp)
-Developers and Contributors
-===============================================================
-
-The following is a non-exhaustive list of all constributors over the years.
-If you think your name should be listed here, drop us a line and we'll add you.
-
-- Alexander Gessler,
-3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
-
-- Thomas Schulze,
-X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
-
-- Kim Kulling,
-Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
-
-- R.Schmidt,
-Linux build, eclipse support.
-
-- Matthias Gubisch,
-Assimp.net
-Visual Studio 9 support, bugfixes.
-
-- Mark Sibly
-B3D-Loader, Assimp testing
-
-- Jonathan Klein
-Ogre Loader, VC2010 fixes and CMake fixes.
-
-- Sebastian Hempel,
-PyAssimp (first version)
-Compile-Bugfixes for mingw, add environment for static library support in make.
-
-- Jonathan Pokrass
-Supplied a bugfix concerning the scaling in the md3 loader.
-
-- Andrew Galante,
-Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
-
-- Andreas Nagel
-First Assimp testing & verification under Windows Vista 64 Bit.
-
-- Marius Schr�der
-Allowed us to use many of his models for screenshots and testing.
-
-- Christian Schubert
-Supplied various XFiles for testing purposes.
-
-- Tizian Wieland
-Searched the web for hundreds of test models for internal use
-
-- John Connors
-Supplied patches for linux and SCons.
-
-- T. R.
-The GUY who performed some of the CSM mocaps.
-
-- Andy Maloney
-Contributed fixes for the documentation and the doxygen markup
-
-- Zhao Lei
-Contributed several bugfixes fixing memory leaks and improving float parsing 
-
-- sueastside
-Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
-
-- Tobias Rittig
-Collada testing with Cinema 4D
-
-- Brad Grantham
-Improvements in OpenGL-Sample.
-
-- Robert Ramirez
-Add group loading feature to Obj-Loader.
-
-- Chris Maiwald
-Many bugreports, improving Assimp's portability, regular testing & feedback.
-
-- Stepan Hrbek
-Bugreport and fix for a obj-materialloader crash.
-
-- David Nadlinger
-D bindings, CMake install support. 
-
-- Dario Accornero
-Contributed several patches regarding Mac OS/XCode targets, bug reports.
-
-- Martin Walser (Samhayne)
-Contributed the 'SimpleTexturedOpenGl' sample.
-
-- Matthias Fauconneau
-Contributed a fix for the Q3-BSP loader.
-
-- J�rgen P. Tjern�
-Contributed updated and improved xcode workspaces
-
-- drparallax
-Contributed the /samples/SimpleAssimpViewX sample
-
-- Carsten Fuchs
-Contributed a fix for the Normalize method in aiQuaternion.
-
-- dbburgess
-Contributes a Android-specific build issue: log the hardware architecture for ARM.
-
-- alfiereinre7
-Contributes a obj-fileparser fix: missing tokens in the obj-token list.
-
-- Roman Kharitonov
-Contributes a fix for the configure script environment.
-
-- Ed Diana
-Contributed AssimpDelphi (/port/AssimpDelphi).
-
-- rdb 
-Contributes a bundle of fixes and improvements for the bsp-importer.
-
-- Mick P
-For contributing the De-bone postprocessing step and filing various bug reports.
-
-- Rosen Diankov
-Contributed patches to build assimp debian packages using cmake.
-
-- Mark Page
-Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
-
-- IOhannes
-Contributed the Debian build fixes ( architecture macro ).
-
-- gellule
-Several LWO and LWS fixes (pivoting). 
-
-- Marcel Metz
-GCC/Linux fixes for the SimpleOpenGL sample.
-
-- Brian Miller
-Bugfix for a compiler fix for iOS on arm.
-
-- S�verin Lemaignan
-Rewrite of PyAssimp, distutils and Python3 support
-
-- albert-wang
-Bugfixes for the collada parser
-
-- Ya ping Jin
-Bugfixes for uv-tanget calculation.
-
-- Jonne Nauha
-Ogre Binary format support
-
-- Filip Wasil, Tieto Poland Sp. z o.o.
-Android JNI asset extraction support
-
-- Richard Steffen
-Contributed ExportProperties interface
-Contributed X File exporter
-Contributed Step (stp) exporter
-
-
+===============================================================
+Open Asset Import Library (Assimp)
+Developers and Contributors
+===============================================================
+
+The following is a non-exhaustive list of all constributors over the years.
+If you think your name should be listed here, drop us a line and we'll add you.
+
+- Alexander Gessler,
+3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
+
+- Thomas Schulze,
+X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
+
+- Kim Kulling,
+Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
+
+- R.Schmidt,
+Linux build, eclipse support.
+
+- Matthias Gubisch,
+Assimp.net
+Visual Studio 9 support, bugfixes.
+
+- Mark Sibly
+B3D-Loader, Assimp testing
+
+- Jonathan Klein
+Ogre Loader, VC2010 fixes and CMake fixes.
+
+- Sebastian Hempel,
+PyAssimp (first version)
+Compile-Bugfixes for mingw, add environment for static library support in make.
+
+- Jonathan Pokrass
+Supplied a bugfix concerning the scaling in the md3 loader.
+
+- Andrew Galante,
+Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
+
+- Andreas Nagel
+First Assimp testing & verification under Windows Vista 64 Bit.
+
+- Marius Schr�der
+Allowed us to use many of his models for screenshots and testing.
+
+- Christian Schubert
+Supplied various XFiles for testing purposes.
+
+- Tizian Wieland
+Searched the web for hundreds of test models for internal use
+
+- John Connors
+Supplied patches for linux and SCons.
+
+- T. R.
+The GUY who performed some of the CSM mocaps.
+
+- Andy Maloney
+Contributed fixes for the documentation and the doxygen markup
+
+- Zhao Lei
+Contributed several bugfixes fixing memory leaks and improving float parsing 
+
+- sueastside
+Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
+
+- Tobias Rittig
+Collada testing with Cinema 4D
+
+- Brad Grantham
+Improvements in OpenGL-Sample.
+
+- Robert Ramirez
+Add group loading feature to Obj-Loader.
+
+- Chris Maiwald
+Many bugreports, improving Assimp's portability, regular testing & feedback.
+
+- Stepan Hrbek
+Bugreport and fix for a obj-materialloader crash.
+
+- David Nadlinger
+D bindings, CMake install support.
+
+- Dario Accornero
+Contributed several patches regarding Mac OS/XCode targets, bug reports.
+
+- Martin Walser (Samhayne)
+Contributed the 'SimpleTexturedOpenGl' sample.
+
+- Matthias Fauconneau
+Contributed a fix for the Q3-BSP loader.
+
+- Jørgen P. Tjernø
+Contributed updated and improved xcode workspaces
+
+- drparallax
+Contributed the /samples/SimpleAssimpViewX sample
+
+- Carsten Fuchs
+Contributed a fix for the Normalize method in aiQuaternion.
+
+- dbburgess
+Contributes a Android-specific build issue: log the hardware architecture for ARM.
+
+- alfiereinre7
+Contributes a obj-fileparser fix: missing tokens in the obj-token list.
+
+- Roman Kharitonov
+Contributes a fix for the configure script environment.
+
+- Ed Diana
+Contributed AssimpDelphi (/port/AssimpDelphi).
+
+- rdb
+Contributes a bundle of fixes and improvements for the bsp-importer.
+
+- Mick P
+For contributing the De-bone postprocessing step and filing various bug reports.
+
+- Rosen Diankov
+Contributed patches to build assimp debian packages using cmake.
+
+- Mark Page
+Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
+
+- IOhannes
+Contributed the Debian build fixes ( architecture macro ).
+
+- gellule
+Several LWO and LWS fixes (pivoting). 
+
+- Marcel Metz
+GCC/Linux fixes for the SimpleOpenGL sample.
+
+- Brian Miller
+Bugfix for a compiler fix for iOS on arm.
+
+- Séverin Lemaignan
+Rewrite of PyAssimp, distutils and Python3 support
+
+- albert-wang
+Bugfixes for the collada parser
+
+- Ya ping Jin
+Bugfixes for uv-tanget calculation.
+
+- Jonne Nauha
+Ogre Binary format support
+
+- Filip Wasil, Tieto Poland Sp. z o.o.
+Android JNI asset extraction support
+
+- Richard Steffen
+Contributed ExportProperties interface
+Contributed X File exporter
+Contributed Step (stp) exporter
+
+

+ 78 - 78
LICENSE

@@ -1,78 +1,78 @@
-Open Asset Import Library (assimp)
-
-Copyright (c) 2006-2016, assimp team
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the
-following conditions are met:
-
-* Redistributions of source code must retain the above
-  copyright notice, this list of conditions and the
-  following disclaimer.
-
-* Redistributions in binary form must reproduce the above
-  copyright notice, this list of conditions and the
-  following disclaimer in the documentation and/or other
-  materials provided with the distribution.
-
-* Neither the name of the assimp team, nor the names of its
-  contributors may be used to endorse or promote products
-  derived from this software without specific prior
-  written permission of the assimp team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-******************************************************************************
-
-AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
-These are 3d models for testing purposes, from various free sources
-on the internet. They are - unless otherwise stated - copyright of
-their respective creators, which may impose additional requirements
-on the use of their work. For any of these models, see
-<model-name>.source.txt for more legal information. Contact us if you
-are a copyright holder and believe that we credited you inproperly or
-if you don't want your files to appear in the repository.
-
-
-******************************************************************************
-
-Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
-http://code.google.com/p/poly2tri/
-
-All rights reserved.
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
-  this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Poly2Tri nor the names of its contributors may be
-  used to endorse or promote products derived from this software without specific
-  prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Open Asset Import Library (assimp)
+
+Copyright (c) 2006-2016, assimp team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+******************************************************************************
+
+AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
+These are 3d models for testing purposes, from various free sources
+on the internet. They are - unless otherwise stated - copyright of
+their respective creators, which may impose additional requirements
+on the use of their work. For any of these models, see
+<model-name>.source.txt for more legal information. Contact us if you
+are a copyright holder and believe that we credited you inproperly or
+if you don't want your files to appear in the repository.
+
+
+******************************************************************************
+
+Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
+http://code.google.com/p/poly2tri/
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+* Neither the name of Poly2Tri nor the names of its contributors may be
+  used to endorse or promote products derived from this software without specific
+  prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 148 - 143
Readme.md

@@ -1,143 +1,148 @@
-Open Asset Import Library (assimp)
-==================================
-
-[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
-[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
-<a href="https://scan.coverity.com/projects/5607">
-  <img alt="Coverity Scan Build Status"
-       src="https://scan.coverity.com/projects/5607/badge.svg"/>
-</a>
-[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
-<br>
-
-APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
-
-Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
-
-This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories.
-The current build status is:
-
-Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
-__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
-
-Please check our Wiki as well: https://github.com/assimp/assimp/wiki
-
-#### Supported file formats ####
-
-A full list [is here](http://assimp.org/main_features_formats.html).
-__Importers__:
-
-- 3DS
-- BLEND (Blender)
-- DAE/Collada
-- FBX
-- IFC-STEP
-- ASE
-- DXF
-- HMP
-- MD2
-- MD3
-- MD5
-- MDC
-- MDL
-- NFF
-- PLY
-- STL
-- X
-- OBJ
-- OpenGEX
-- SMD
-- LWO
-- LXO
-- LWS  
-- TER
-- AC3D
-- MS3D
-- COB
-- Q3BSP
-- XGL
-- CSM
-- BVH
-- B3D
-- NDO
-- Ogre Binary
-- Ogre XML
-- Q3D
-- ASSBIN (Assimp custom format)
-- glTF (partial)
-- 3MF
-
-Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
-
-- C4D (https://github.com/acgessler/assimp-cinema4d)
-
-__Exporters__:
-
-- DAE (Collada)
-- STL
-- OBJ
-- PLY
-- X
-- 3DS
-- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
-- ASSBIN
-- STEP
-- glTF (partial)
-
-### Building ###
-Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
-
-### Ports ###
-* [Android](port/AndroidJNI/README.md)
-* [Python](port/PyAssimp/README.md)
-* [.NET](port/AssimpNET/Readme.md)
-* [Pascal](port/AssimpPascal/Readme.md)
-* [Javascript (Alpha)](https://github.com/makc/assimp2json)
-
-#### Repository structure ####
-Open Asset Import Library is implemented in C++. The directory structure is:
-
-	/code		Source code
-	/contrib	Third-party libraries
-	/doc		Documentation (doxysource and pre-compiled docs)
-	/include	Public header C and C++ header files
-	/scripts 	Scripts used to generate the loading code for some formats
-	/port		Ports to other languages and scripts to maintain those.
-	/test		Unit- and regression tests, test suite of models
-	/tools		Tools (old assimp viewer, command line `assimp`)
-	/samples	A small number of samples to illustrate possible
-                        use cases for Assimp
-	/workspaces	Build environments for vc,xcode,... (deprecated,
-			CMake has superseeded all legacy build options!)
-
-
-### Where to get help ###
-For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
-(CHMs for Windows are included in some release packages and should be located right here in the root folder).
-
-If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
-
-For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
-  [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
-
-Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export.
-
-And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
-
-### Contributing ###
-Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
-a pull request with your changes against the main repository's `master` branch.
-
-### Donate ###
-If you like assimp, consider buying us a beer (or two):
-[Donate](http://sourceforge.net/donate/index.php?group_id=226462)
-
-### License ###
-Our license is based on the modified, __3-clause BSD__-License.
-
-An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
-and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
-For the legal details, see the `LICENSE` file.
-
-### Why this name ###
-Sorry, we're germans :-), no english native speakers ...
+Open Asset Import Library (assimp)
+==================================
+
+[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
+[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
+<a href="https://scan.coverity.com/projects/5607">
+  <img alt="Coverity Scan Build Status"
+       src="https://scan.coverity.com/projects/5607/badge.svg"/>
+</a>
+[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
+<br>
+
+APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
+
+Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
+
+This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories.
+The current build status is:
+
+Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
+
+And we also have an IRC-channel at freenode: #assetimporterlib . You can easily join us via: [KiwiIRC/freenote](https://kiwiirc.com/client/irc.freenode.net), choose your nickname and type
+> /join #assetimporterlib
+
+<br>
+__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
+
+Please check our Wiki as well: https://github.com/assimp/assimp/wiki
+
+#### Supported file formats ####
+
+A full list [is here](http://assimp.org/main_features_formats.html).
+__Importers__:
+
+- 3DS
+- BLEND (Blender)
+- DAE/Collada
+- FBX
+- IFC-STEP
+- ASE
+- DXF
+- HMP
+- MD2
+- MD3
+- MD5
+- MDC
+- MDL
+- NFF
+- PLY
+- STL
+- X
+- OBJ
+- OpenGEX
+- SMD
+- LWO
+- LXO
+- LWS  
+- TER
+- AC3D
+- MS3D
+- COB
+- Q3BSP
+- XGL
+- CSM
+- BVH
+- B3D
+- NDO
+- Ogre Binary
+- Ogre XML
+- Q3D
+- ASSBIN (Assimp custom format)
+- glTF (partial)
+- 3MF
+
+Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
+
+- C4D (https://github.com/acgessler/assimp-cinema4d)
+
+__Exporters__:
+
+- DAE (Collada)
+- STL
+- OBJ
+- PLY
+- X
+- 3DS
+- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
+- ASSBIN
+- STEP
+- glTF (partial)
+
+### Building ###
+Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
+
+### Ports ###
+* [Android](port/AndroidJNI/README.md)
+* [Python](port/PyAssimp/README.md)
+* [.NET](port/AssimpNET/Readme.md)
+* [Pascal](port/AssimpPascal/Readme.md)
+* [Javascript (Alpha)](https://github.com/makc/assimp2json)
+
+#### Repository structure ####
+Open Asset Import Library is implemented in C++. The directory structure is:
+
+	/code		Source code
+	/contrib	Third-party libraries
+	/doc		Documentation (doxysource and pre-compiled docs)
+	/include	Public header C and C++ header files
+	/scripts 	Scripts used to generate the loading code for some formats
+	/port		Ports to other languages and scripts to maintain those.
+	/test		Unit- and regression tests, test suite of models
+	/tools		Tools (old assimp viewer, command line `assimp`)
+	/samples	A small number of samples to illustrate possible
+                        use cases for Assimp
+	/workspaces	Build environments for vc,xcode,... (deprecated,
+			CMake has superseeded all legacy build options!)
+
+
+### Where to get help ###
+For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
+(CHMs for Windows are included in some release packages and should be located right here in the root folder).
+
+If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
+
+For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
+  [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
+
+Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export.
+
+And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
+
+### Contributing ###
+Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
+a pull request with your changes against the main repository's `master` branch.
+
+### Donate ###
+You can get a patron of Asset-Importer-Lib:
+<a href="https://www.patreon.com/bePatron?u=2790590" data-patreon-widget-type="become-patron-button">Become a Patron!</a><script async src="https://cdn6.patreon.com/becomePatronButton.bundle.js"></script>
+
+### License ###
+Our license is based on the modified, __3-clause BSD__-License.
+
+An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
+and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
+For the legal details, see the `LICENSE` file.
+
+### Why this name ###
+Sorry, we're germans :-), no english native speakers ...

+ 36 - 1
assimp-config-version.cmake.in

@@ -1,8 +1,43 @@
+# Open Asset Import Library (assimp)
+# ----------------------------------------------------------------------
+# Copyright (c) 2006-2017, assimp team
+# All rights reserved.
+#
+# Redistribution and use of this software in source and binary forms,
+# with or without modification, are permitted provided that the
+# following conditions are met:
+#
+# * Redistributions of source code must retain the above
+#   copyright notice, this list of conditions and the
+#   following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above
+#   copyright notice, this list of conditions and the
+#   following disclaimer in the documentation and/or other
+#   materials provided with the distribution.
+#
+# * Neither the name of the assimp team, nor the names of its
+#   contributors may be used to endorse or promote products
+#   derived from this software without specific prior
+#   written permission of the assimp team.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#----------------------------------------------------------------------
 set( PACKAGE_VERSION "@ASSIMP_VERSION@" )
 if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
   set(PACKAGE_VERSION_EXACT 1)
 endif()
-if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_SOVERSION@" )
+if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_VERSION@" )
   set(PACKAGE_VERSION_COMPATIBLE 1)
 elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
   # for now backward compatible if minor version is less

+ 7 - 4
cmake-modules/FindPkgMacros.cmake

@@ -59,10 +59,13 @@ endmacro(clear_if_changed)
 
 # Try to get some hints from pkg-config, if available
 macro(use_pkgconfig PREFIX PKGNAME)
-  find_package(PkgConfig)
-  if (PKG_CONFIG_FOUND)
-    pkg_check_modules(${PREFIX} ${PKGNAME})
-  endif ()
+  # Android does not support PKG_CONFIG so we disable it
+  IF ( NOT ANDROID )
+    find_package(PkgConfig)
+    if (PKG_CONFIG_FOUND)
+      pkg_check_modules(${PREFIX} ${PKGNAME})
+    endif ()
+  ENDIF ( NOT ANDROID )
 endmacro (use_pkgconfig)
 
 # Couple a set of release AND debug libraries (or frameworks)

+ 1 - 1
cmake-modules/FindZLIB.cmake

@@ -11,7 +11,7 @@
 # Once done, this will define
 #
 #  ZLIB_FOUND - system has ZLIB
-#  ZLIB_INCLUDE_DIRS - the ZLIB include directories 
+#  ZLIB_INCLUDE_DIRS - the ZLIB include directories
 #  ZLIB_LIBRARIES - link these to use ZLIB
 
 include(FindPkgMacros)

+ 1 - 1
code/3DSExporter.h

@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <memory>
 
 #include "StreamWriter.h"
-#include "./../include/assimp/material.h"
+#include <assimp/material.h>
 
 struct aiScene;
 struct aiNode;

+ 4 - 4
code/3DSHelper.h

@@ -48,10 +48,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "SmoothingGroups.h"
 #include "StringUtils.h"
 #include "qnan.h"
-#include "./../include/assimp/material.h"
-#include "./../include/assimp/camera.h"
-#include "./../include/assimp/light.h"
-#include "./../include/assimp/anim.h"
+#include <assimp/material.h>
+#include <assimp/camera.h>
+#include <assimp/light.h>
+#include <assimp/anim.h>
 #include <stdio.h> //sprintf
 
 namespace Assimp    {

+ 1 - 0
code/3DSLoader.cpp

@@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
 #include "StringComparison.h"
 
 using namespace Assimp;

+ 1 - 0
code/ACLoader.cpp

@@ -60,6 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/scene.h>
 #include <assimp/config.h>
 #include <assimp/IOSystem.hpp>
+#include <assimp/importerdesc.h>
 #include <memory>
 
 using namespace Assimp;

+ 1 - 2
code/AMFImporter.cpp

@@ -51,11 +51,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "AMFImporter_Macro.hpp"
 
 #include "fast_atof.h"
-#include "DefaultIOSystem.h"
+#include <assimp/DefaultIOSystem.h>
 
 // Header files, stdlib.
 #include <memory>
-#include <string>
 
 namespace Assimp
 {

+ 2 - 3
code/AMFImporter.hpp

@@ -52,9 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "AMFImporter_Node.hpp"
 
 // Header files, Assimp.
-#include "assimp/DefaultLogger.hpp"
-#include "assimp/importerdesc.h"
-#include "assimp/ProgressHandler.hpp"
+#include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
 #include "assimp/types.h"
 #include "BaseImporter.h"
 #include "irrXMLWrapper.h"

+ 32 - 24
code/AMFImporter_Postprocess.cpp

@@ -54,7 +54,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "StringUtils.h"
 
 // Header files, stdlib.
-#include <algorithm>
 #include <iterator>
 
 namespace Assimp
@@ -62,7 +61,7 @@ namespace Assimp
 
 aiColor4D AMFImporter::SPP_Material::GetColor(const float pX, const float pY, const float pZ) const
 {
-aiColor4D tcol;
+    aiColor4D tcol;
 
 	// Check if stored data are supported.
 	if(Composition.size() != 0)
@@ -93,8 +92,8 @@ aiColor4D tcol;
 void AMFImporter::PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector<aiVector3D>& pVertexCoordinateArray,
 														std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray) const
 {
-CAMFImporter_NodeElement_Vertices* vn = nullptr;
-size_t col_idx;
+    CAMFImporter_NodeElement_Vertices* vn = nullptr;
+    size_t col_idx;
 
 	// All data stored in "vertices", search for it.
 	for(CAMFImporter_NodeElement* ne_child: pNodeElement.Child)
@@ -142,8 +141,8 @@ size_t col_idx;
 size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B,
 																const std::string& pID_A)
 {
-size_t TextureConverted_Index;
-std::string TextureConverted_ID;
+    size_t TextureConverted_Index;
+    std::string TextureConverted_ID;
 
 	// check input data
 	if(pID_R.empty() && pID_G.empty() && pID_B.empty() && pID_A.empty())
@@ -261,11 +260,20 @@ std::string TextureConverted_ID;
 	size_t off_b = 0;
 
 	// Calculate size of the target array and rule how data will be copied.
-	if(!pID_R.empty()) { tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++; }
-	if(!pID_G.empty()) { tex_size += src_texture[1]->Data.size(); step++, off_b++; }
-	if(!pID_B.empty()) { tex_size += src_texture[2]->Data.size(); step++; }
-	if(!pID_A.empty()) { tex_size += src_texture[3]->Data.size(); step++; }
-
+    if ( nullptr != src_texture ) {
+        if(!pID_R.empty()) {
+            tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++;
+        }
+        if(!pID_G.empty()) {
+            tex_size += src_texture[1]->Data.size(); step++, off_b++;
+        }
+        if(!pID_B.empty()) {
+            tex_size += src_texture[2]->Data.size(); step++;
+        }
+        if(!pID_A.empty()) {
+            tex_size += src_texture[3]->Data.size(); step++;
+        }
+    }
 	// Create target array.
 	converted_texture.Data = new uint8_t[tex_size];
 	// And copy data
@@ -293,19 +301,19 @@ std::string TextureConverted_ID;
 
 void AMFImporter::PostprocessHelper_SplitFacesByTextureID(std::list<SComplexFace>& pInputList, std::list<std::list<SComplexFace> >& pOutputList_Separated)
 {
-auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool
-{
-	if((pTexMap1 == nullptr) && (pTexMap2 == nullptr)) return true;
-	if(pTexMap1 == nullptr) return false;
-	if(pTexMap2 == nullptr) return false;
-
-	if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false;
-	if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false;
-	if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false;
-	if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false;
-
-	return true;
-};
+    auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool
+    {
+	    if((pTexMap1 == nullptr) && (pTexMap2 == nullptr)) return true;
+	    if(pTexMap1 == nullptr) return false;
+	    if(pTexMap2 == nullptr) return false;
+
+	    if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false;
+	    if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false;
+	    if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false;
+	    if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false;
+
+	    return true;
+    };
 
 	pOutputList_Separated.clear();
 	if(pInputList.size() == 0) return;

+ 1 - 0
code/ASELoader.cpp

@@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 
 #include <memory>
 

+ 1 - 1
code/ASELoader.h

@@ -46,9 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "BaseImporter.h"
 #include <assimp/types.h>
+#include "ASEParser.h"
 
 struct aiNode;
-#include "ASEParser.h"
 
 namespace Assimp {
 

+ 1 - 2
code/ASEParser.cpp

@@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // internal headers
 #include "TextureTransform.h"
 #include "ASELoader.h"
-#include "MaterialSystem.h"
 #include "fast_atof.h"
 #include <assimp/DefaultLogger.hpp>
 
@@ -1858,7 +1857,7 @@ void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh)
             ++filePtr;
 
             // Face entry
-            if (TokenMatch(filePtr,"MESH_CFACE" ,11))
+            if (TokenMatch(filePtr,"MESH_CFACE" ,10))
             {
                 unsigned int aiValues[3];
                 unsigned int iIndex = 0;

+ 1 - 0
code/AssbinLoader.cpp

@@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/mesh.h>
 #include <assimp/anim.h>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 
 #ifdef ASSIMP_BUILD_NO_OWN_ZLIB
 #   include <zlib.h>

+ 0 - 1
code/AssbinLoader.h

@@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define AI_ASSBINIMPORTER_H_INC
 
 #include "BaseImporter.h"
-#include <assimp/types.h>
 
 struct aiMesh;
 struct aiNode;

+ 1 - 1
code/AssxmlExporter.cpp

@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *  ASSXML exporter main code
  */
 #include <stdarg.h>
-#include "./../include/assimp/version.h"
+#include <assimp/version.h>
 #include "ProcessHelper.h"
 #include <assimp/IOStream.hpp>
 #include <assimp/IOSystem.hpp>

+ 1 - 1
code/B3DImporter.cpp

@@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/anim.h>
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
-
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 using namespace std;

+ 0 - 1
code/B3DImporter.h

@@ -48,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/material.h>
 #include "BaseImporter.h"
 
-#include <string>
 #include <vector>
 
 struct aiNodeAnim;

+ 1 - 0
code/BVHLoader.cpp

@@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "TinyFormatter.h"
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 using namespace Assimp::Formatter;

+ 1 - 0
code/BaseImporter.cpp

@@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/scene.h>
 #include <assimp/Importer.hpp>
 #include <assimp/postprocess.h>
+#include <assimp/importerdesc.h>
 #include <ios>
 #include <list>
 #include <memory>

+ 1 - 2
code/BaseImporter.h

@@ -44,14 +44,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "Exceptional.h"
 
-#include <string>
-#include <map>
 #include <vector>
 #include <set>
 #include <assimp/types.h>
 #include <assimp/ProgressHandler.hpp>
 
 struct aiScene;
+struct aiImporterDesc;
 
 namespace Assimp    {
 

+ 0 - 2
code/BaseProcess.h

@@ -43,8 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BASEPROCESS_H
 
 #include <map>
-
-#include <assimp/types.h>
 #include "GenericProperty.h"
 
 struct aiScene;

+ 59 - 81
code/Bitmap.h

@@ -50,93 +50,71 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <stdint.h>
 #include <cstddef>
+
 struct aiTexture;
 
 namespace Assimp {
 
 class IOStream;
-class Bitmap {
-
-    protected:
-
-        struct Header {
-
-            uint16_t type;
-
-            uint32_t size;
-
-            uint16_t reserved1;
-
-            uint16_t reserved2;
-
-            uint32_t offset;
-
-            // We define the struct size because sizeof(Header) might return a wrong result because of structure padding.
-            // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
-            static const std::size_t header_size =
-                sizeof(uint16_t) + // type
-                sizeof(uint32_t) + // size
-                sizeof(uint16_t) + // reserved1
-                sizeof(uint16_t) + // reserved2
-                sizeof(uint32_t);  // offset
-
-        };
-
-        struct DIB {
-
-            uint32_t size;
-
-            int32_t width;
-
-            int32_t height;
-
-            uint16_t planes;
-
-            uint16_t bits_per_pixel;
-
-            uint32_t compression;
-
-            uint32_t image_size;
-
-            int32_t x_resolution;
-
-            int32_t y_resolution;
-
-            uint32_t nb_colors;
-
-            uint32_t nb_important_colors;
-
-            // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding.
-            // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
-            static const std::size_t dib_size =
-                sizeof(uint32_t) + // size
-                sizeof(int32_t) +  // width
-                sizeof(int32_t) +  // height
-                sizeof(uint16_t) + // planes
-                sizeof(uint16_t) + // bits_per_pixel
-                sizeof(uint32_t) + // compression
-                sizeof(uint32_t) + // image_size
-                sizeof(int32_t) +  // x_resolution
-                sizeof(int32_t) +  // y_resolution
-                sizeof(uint32_t) + // nb_colors
-                sizeof(uint32_t);  // nb_important_colors
-
-        };
-
-        static const std::size_t mBytesPerPixel = 4;
-
-    public:
-
-        static void Save(aiTexture* texture, IOStream* file);
-
-    protected:
-
-        static void WriteHeader(Header& header, IOStream* file);
-
-        static void WriteDIB(DIB& dib, IOStream* file);
-
-        static void WriteData(aiTexture* texture, IOStream* file);
 
+class Bitmap {
+protected:
+
+    struct Header {
+        uint16_t type;
+        uint32_t size;
+        uint16_t reserved1;
+        uint16_t reserved2;
+        uint32_t offset;
+
+        // We define the struct size because sizeof(Header) might return a wrong result because of structure padding.
+        // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
+        static const std::size_t header_size =
+            sizeof(uint16_t) + // type
+            sizeof(uint32_t) + // size
+            sizeof(uint16_t) + // reserved1
+            sizeof(uint16_t) + // reserved2
+            sizeof(uint32_t);  // offset
+    };
+
+    struct DIB {
+        uint32_t size;
+        int32_t width;
+        int32_t height;
+        uint16_t planes;
+        uint16_t bits_per_pixel;
+        uint32_t compression;
+        uint32_t image_size;
+        int32_t x_resolution;
+        int32_t y_resolution;
+        uint32_t nb_colors;
+        uint32_t nb_important_colors;
+
+        // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding.
+        // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
+        static const std::size_t dib_size =
+            sizeof(uint32_t) + // size
+            sizeof(int32_t) +  // width
+            sizeof(int32_t) +  // height
+            sizeof(uint16_t) + // planes
+            sizeof(uint16_t) + // bits_per_pixel
+            sizeof(uint32_t) + // compression
+            sizeof(uint32_t) + // image_size
+            sizeof(int32_t) +  // x_resolution
+            sizeof(int32_t) +  // y_resolution
+            sizeof(uint32_t) + // nb_colors
+            sizeof(uint32_t);  // nb_important_colors
+    };
+
+    static const std::size_t mBytesPerPixel = 4;
+
+public:
+    static void Save(aiTexture* texture, IOStream* file);
+
+protected:
+    static void WriteHeader(Header& header, IOStream* file);
+    static void WriteDIB(DIB& dib, IOStream* file);
+    static void WriteData(aiTexture* texture, IOStream* file);
 };
 
 }

+ 1 - 0
code/BlenderDNA.cpp

@@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BlenderDNA.h"
 #include "StreamReader.h"
 #include "fast_atof.h"
+#include "TinyFormatter.h"
 
 using namespace Assimp;
 using namespace Assimp::Blender;

+ 1 - 2
code/BlenderDNA.h

@@ -46,12 +46,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BLEND_DNA_H
 
 #include "BaseImporter.h"
-#include "TinyFormatter.h"
 #include "StreamReader.h"
 #include <assimp/DefaultLogger.hpp>
 #include <stdint.h>
 #include <memory>
-
+#include <map>
 
 // enable verbose log output. really verbose, so be careful.
 #ifdef ASSIMP_BUILD_DEBUG

+ 2 - 1
code/BlenderDNA.inl

@@ -46,9 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_BLEND_DNA_INL
 
 #include <memory>
+#include "TinyFormatter.h"
 
 namespace Assimp {
-    namespace Blender {
+namespace Blender {
 
 //--------------------------------------------------------------------------------
 const Field& Structure :: operator [] (const std::string& ss) const

+ 1 - 2
code/BlenderIntermediate.h

@@ -48,9 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BlenderLoader.h"
 #include "BlenderDNA.h"
 #include "BlenderScene.h"
-#include "BlenderSceneGen.h"
 #include <deque>
-#include "./../include/assimp/material.h"
+#include <assimp/material.h>
 
 struct aiTexture;
 

+ 8 - 6
code/BlenderLoader.cpp

@@ -54,12 +54,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BlenderBMesh.h"
 #include "StringUtils.h"
 #include <assimp/scene.h>
-#include "StringComparison.h"
+#include <assimp/importerdesc.h>
 
+#include "StringComparison.h"
 #include "StreamReader.h"
 #include "MemoryIOWrapper.h"
+
 #include <cctype>
-#include <cstdint>
 
 
 // zlib is needed for compressed blend files
@@ -96,8 +97,9 @@ static const aiImporterDesc blenderDesc = {
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 BlenderImporter::BlenderImporter()
-: modifier_cache(new BlenderModifierShowcase())
-{}
+: modifier_cache(new BlenderModifierShowcase()) {
+    // empty
+}
 
 // ------------------------------------------------------------------------------------------------
 // Destructor, private as well
@@ -145,8 +147,7 @@ void BlenderImporter::SetupProperties(const Importer* /*pImp*/)
     // nothing to be done for the moment
 }
 
-struct free_it
-{
+struct free_it {
     free_it(void* free) : free(free) {}
     ~free_it() {
         ::free(this->free);
@@ -165,6 +166,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
     free_it free_it_really(dest);
 #endif
 
+
     FileDatabase file;
     std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
     if (!stream) {

+ 2 - 2
code/BlenderScene.cpp

@@ -44,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
 
-#include "BlenderDNA.h"
 #include "BlenderScene.h"
 #include "BlenderSceneGen.h"
+#include "BlenderDNA.h"
 
 using namespace Assimp;
 using namespace Assimp::Blender;
@@ -522,7 +522,7 @@ template <> void Structure :: Convert<MVert> (
     ReadFieldArray<ErrorPolicy_Fail>(dest.co,"co",db);
     ReadFieldArray<ErrorPolicy_Fail>(dest.no,"no",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
-    ReadField<ErrorPolicy_Warn>(dest.mat_nr,"mat_nr",db);
+    //ReadField<ErrorPolicy_Warn>(dest.mat_nr,"mat_nr",db);
     ReadField<ErrorPolicy_Igno>(dest.bweight,"bweight",db);
 
     db.reader->IncPtr(size);

+ 4 - 4
code/BlobIOSystem.h

@@ -45,10 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_BLOBIOSYSTEM_H_INCLUDED
 #define AI_BLOBIOSYSTEM_H_INCLUDED
 
-#include "./../include/assimp/IOStream.hpp"
-#include "./../include/assimp/cexport.h"
-#include "./../include/assimp/IOSystem.hpp"
-#include "./../include/assimp/DefaultLogger.hpp"
+#include <assimp/IOStream.hpp>
+#include <assimp/cexport.h>
+#include <assimp/IOSystem.hpp>
+#include <assimp/DefaultLogger.hpp>
 #include <stdint.h>
 #include <set>
 #include <vector>

+ 10 - 4
code/CMakeLists.txt

@@ -93,6 +93,8 @@ SET( PUBLIC_HEADERS
   ${HEADER_PATH}/NullLogger.hpp
   ${HEADER_PATH}/cexport.h
   ${HEADER_PATH}/Exporter.hpp
+  ${HEADER_PATH}/DefaultIOStream.h
+  ${HEADER_PATH}/DefaultIOSystem.h
 )
 
 SET( Core_SRCS
@@ -125,9 +127,7 @@ SET( Common_SRCS
   ByteSwapper.h
   DefaultProgressHandler.h
   DefaultIOStream.cpp
-  DefaultIOStream.h
   DefaultIOSystem.cpp
-  DefaultIOSystem.h
   CInterfaceIOWrapper.cpp
   CInterfaceIOWrapper.h
   Hash.h
@@ -187,10 +187,16 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
   SOURCE_GROUP( C4D FILES ${C4D_SRCS})
 ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
 
+# if this variable is set to TRUE, the user can manually disable importers by setting
+# ASSIMP_BUILD_XXX_IMPORTER to FALSE for each importer
+# if this variable is set to FALSE, the user can manually enable importers by setting
+# ASSIMP_BUILD_XXX_IMPORTER to TRUE for each importer
+OPTION(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_IMPORTER value" TRUE)
+
 # macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
 # this way selective loaders can be compiled (reduces filesize + compile time)
 MACRO(ADD_ASSIMP_IMPORTER name)
-  OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" TRUE)
+  OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" ${ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT})
   IF(ASSIMP_BUILD_${name}_IMPORTER)
     LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
     SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
@@ -930,7 +936,7 @@ if(MSVC AND ASSIMP_INSTALL_PDB)
     DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
     CONFIGURATIONS Debug
   )
-  install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp.pdb
+  install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp${LIBRARY_SUFFIX}.pdb
     DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
     CONFIGURATIONS RelWithDebInfo
   )

+ 1 - 1
code/COBLoader.cpp

@@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
-
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 using namespace Assimp::COB;

+ 4 - 3
code/COBScene.h

@@ -46,12 +46,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <memory>
 #include <deque>
+#include <map>
 
 #include "BaseImporter.h"
-#include "./../include/assimp/material.h"
+#include <assimp/material.h>
 
-namespace Assimp    {
-    namespace COB {
+namespace Assimp {
+namespace COB {
 
 // ------------------
 /** Represents a single vertex index in a face */

+ 1 - 1
code/CSMLoader.cpp

@@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/anim.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
-
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 

+ 28 - 22
code/ColladaExporter.cpp

@@ -38,18 +38,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 */
 
-
-
 #ifndef ASSIMP_BUILD_NO_EXPORT
 #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
-#include "ColladaExporter.h"
 
+#include "ColladaExporter.h"
 #include "Bitmap.h"
 #include "fast_atof.h"
 #include "SceneCombiner.h"
-#include "DefaultIOSystem.h"
 #include "StringUtils.h"
 #include "XMLTools.h"
+#include <assimp/DefaultIOSystem.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/Exporter.hpp>
 #include <assimp/scene.h>
@@ -652,7 +650,7 @@ void ColladaExporter::WriteMaterials()
       if( materialCountWithThisName == 0 ) {
         materials[a].name = name.C_Str();
       } else {
-        materials[a].name = std::string(name.C_Str()) + to_string(materialCountWithThisName);  
+        materials[a].name = std::string(name.C_Str()) + to_string(materialCountWithThisName);
       }
     }
     for( std::string::iterator it = materials[a].name.begin(); it != materials[a].name.end(); ++it ) {
@@ -809,8 +807,8 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
     const std::string idstr = GetMeshId( pIndex);
     const std::string idstrEscaped = XMLEscape(idstr);
 
-  if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
-    return;
+    if ( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
+        return;
 
     // opening tag
     mOutput << startstr << "<geometry id=\"" << idstrEscaped << "\" name=\"" << idstrEscaped << "_name\" >" << endstr;
@@ -843,22 +841,10 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
     }
 
     // assemble vertex structure
+    // Only write input for POSITION since we will write other as shared inputs in polygon definition
     mOutput << startstr << "<vertices id=\"" << idstrEscaped << "-vertices" << "\">" << endstr;
     PushTag();
     mOutput << startstr << "<input semantic=\"POSITION\" source=\"#" << idstrEscaped << "-positions\" />" << endstr;
-    if( mesh->HasNormals() )
-        mOutput << startstr << "<input semantic=\"NORMAL\" source=\"#" << idstrEscaped << "-normals\" />" << endstr;
-    for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
-    {
-        if( mesh->HasTextureCoords(static_cast<unsigned int>(a)) )
-            mOutput << startstr << "<input semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" " /*<< "set=\"" << a << "\"" */ << " />" << endstr;
-    }
-    for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
-    {
-        if( mesh->HasVertexColors(static_cast<unsigned int>(a) ) )
-            mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " /*<< set=\"" << a << "\"" */ << " />" << endstr;
-    }
-
     PopTag();
     mOutput << startstr << "</vertices>" << endstr;
 
@@ -877,6 +863,19 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
         mOutput << startstr << "<lines count=\"" << countLines << "\" material=\"defaultMaterial\">" << endstr;
         PushTag();
         mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
+        if( mesh->HasNormals() )
+            mOutput << startstr << "<input semantic=\"NORMAL\" source=\"#" << idstrEscaped << "-normals\" />" << endstr;
+        for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
+        {
+            if( mesh->HasTextureCoords(static_cast<unsigned int>(a)) )
+                mOutput << startstr << "<input semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" " << "set=\"" << a << "\""  << " />" << endstr;
+        }
+        for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
+        {
+            if( mesh->HasVertexColors(static_cast<unsigned int>(a) ) )
+                mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " << "set=\"" << a << "\""  << " />" << endstr;
+        }
+
         mOutput << startstr << "<p>";
         for( size_t a = 0; a < mesh->mNumFaces; ++a )
         {
@@ -898,10 +897,17 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
         mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
         PushTag();
         mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
+        if( mesh->HasNormals() )
+            mOutput << startstr << "<input offset=\"0\" semantic=\"NORMAL\" source=\"#" << idstrEscaped << "-normals\" />" << endstr;
         for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
         {
-            if( mesh->HasTextureCoords(static_cast<unsigned int>(a) ) )
-                mOutput << startstr << "<input offset=\"0\" semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" set=\"" << a << "\" />" << endstr;
+            if( mesh->HasTextureCoords(static_cast<unsigned int>(a)) )
+                mOutput << startstr << "<input offset=\"0\" semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" " << "set=\"" << a << "\""  << " />" << endstr;
+        }
+        for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
+        {
+            if( mesh->HasVertexColors(static_cast<unsigned int>(a) ) )
+                mOutput << startstr << "<input offset=\"0\" semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " << "set=\"" << a << "\""  << " />" << endstr;
         }
 
         mOutput << startstr << "<vcount>";

+ 0 - 1
code/ColladaHelper.h

@@ -43,7 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_COLLADAHELPER_H_INC
 #define AI_COLLADAHELPER_H_INC
 
-#include <string>
 #include <map>
 #include <vector>
 #include <stdint.h>

+ 3 - 5
code/ColladaLoader.cpp

@@ -49,21 +49,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/Importer.hpp>
-#include "ColladaParser.h"
+#include <assimp/importerdesc.h>
 
+#include "ColladaParser.h"
 #include "fast_atof.h"
 #include "ParsingUtils.h"
 #include "SkeletonMeshBuilder.h"
-#include "Defines.h"
 #include "CreateAnimMesh.h"
 
 #include "time.h"
 #include "math.h"
 #include <algorithm>
-#include <cstdint>
 #include <numeric>
-#include "Defines.h"
-
+#include <assimp/Defines.h>
 
 using namespace Assimp;
 using namespace Assimp::Formatter;

+ 9 - 6
code/ColladaParser.cpp

@@ -1634,7 +1634,7 @@ void ColladaParser::ReadEffectColor( aiColor4D& pColor, Sampler& pSampler)
             }
             else if( IsElement( "texture"))
             {
-                // get name of source textur/sampler
+                // get name of source texture/sampler
                 int attrTex = GetAttribute( "texture");
                 pSampler.mName = mReader->getAttributeValue( attrTex);
 
@@ -2353,9 +2353,9 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
 		ThrowException( "Expected different index count in <p> element.");
 
 	// find the data for all sources
-  for( std::vector<InputChannel>::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it)
+    for( std::vector<InputChannel>::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it)
     {
-    InputChannel& input = *it;
+        InputChannel& input = *it;
         if( input.mResolved)
             continue;
 
@@ -2367,9 +2367,9 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
             acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource);
     }
     // and the same for the per-index channels
-  for( std::vector<InputChannel>::iterator it = pPerIndexChannels.begin(); it != pPerIndexChannels.end(); ++it)
-  {
-    InputChannel& input = *it;
+    for( std::vector<InputChannel>::iterator it = pPerIndexChannels.begin(); it != pPerIndexChannels.end(); ++it)
+    {
+        InputChannel& input = *it;
         if( input.mResolved)
             continue;
 
@@ -2451,6 +2451,9 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
     return numPrimitives;
 }
 
+///@note This function willn't work correctly if both PerIndex and PerVertex channels have same channels.
+///For example if TEXCOORD present in both <vertices> and <polylist> tags this function will create wrong uv coordinates.
+///It's not clear from COLLADA documentation is this allowed or not. For now only exporter fixed to avoid such behavior
 void ColladaParser::CopyVertex(size_t currentVertex, size_t numOffsets, size_t numPoints, size_t perVertexOffset, Mesh* pMesh, std::vector<InputChannel>& pPerIndexChannels, size_t currentPrimitive, const std::vector<size_t>& indices){
     // calculate the base offset of the vertex whose attributes we ant to copy
     size_t baseOffset = currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets;

+ 0 - 1
code/ColladaParser.h

@@ -49,7 +49,6 @@
 #include "ColladaHelper.h"
 #include <assimp/ai_assert.h>
 #include "TinyFormatter.h"
-#include <memory>
 
 namespace Assimp
 {

+ 47 - 113
code/D3MFImporter.cpp

@@ -43,24 +43,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "D3MFImporter.h"
 
 #include <assimp/scene.h>
-#include <assimp/IOStream.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
 #include "StringComparison.h"
 #include "StringUtils.h"
 
-
 #include <string>
-#include <sstream>
 #include <vector>
 #include <map>
-#include <algorithm>
 #include <cassert>
-#include <cstdlib>
 #include <memory>
 
-#include <assimp/ai_assert.h>
-
 #include "D3MFOpcPackage.h"
 #include <contrib/unzip/unzip.h>
 #include "irrXMLWrapper.h"
@@ -68,7 +62,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace Assimp {
 namespace D3MF {
 
-
 namespace XmlTag {
     static const std::string model     = "model";
     static const std::string metadata  = "metadata";
@@ -94,40 +87,28 @@ namespace XmlTag {
     static const std::string transform = "transform";
 }
 
-
-class XmlSerializer
-{
+class XmlSerializer {
 public:
     XmlSerializer(XmlReader* xmlReader)
-        : xmlReader(xmlReader)
-    {
-
+    : xmlReader(xmlReader) {
+        // empty
     }
 
-    void ImportXml(aiScene* scene)
-    {
-
-        scene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
-
+    void ImportXml(aiScene* scene) {
         scene->mRootNode = new aiNode();
         std::vector<aiNode*> children;
 
-        while(ReadToEndElement(D3MF::XmlTag::model))
-        {
-
-            if(xmlReader->getNodeName() == D3MF::XmlTag::object)
-            {
+        while(ReadToEndElement(D3MF::XmlTag::model)) {
+            if(xmlReader->getNodeName() == D3MF::XmlTag::object) {
                 children.push_back(ReadObject(scene));
-            }
-            else if(xmlReader->getNodeName() == D3MF::XmlTag::build)
-            {
-
+            } else if(xmlReader->getNodeName() == D3MF::XmlTag::build) {
+                // ???
             }
         }
 
-        if(scene->mRootNode->mName.length == 0)
-            scene->mRootNode->mName.Set("3MF");
-
+        if ( scene->mRootNode->mName.length == 0 ) {
+            scene->mRootNode->mName.Set( "3MF" );
+        }
 
         scene->mNumMeshes = static_cast<unsigned int>(meshes.size());
         scene->mMeshes = new aiMesh*[scene->mNumMeshes]();
@@ -138,12 +119,10 @@ public:
         scene->mRootNode->mChildren = new aiNode*[scene->mRootNode->mNumChildren]();
 
         std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);
-
     }
 
 private:
-    aiNode* ReadObject(aiScene* scene)
-    {
+    aiNode* ReadObject(aiScene* scene) {
         ScopeGuard<aiNode> node(new aiNode());
 
         std::vector<unsigned long> meshIds;
@@ -164,17 +143,14 @@ private:
 
         size_t meshIdx = meshes.size();
 
-        while(ReadToEndElement(D3MF::XmlTag::object))
-        {
-            if(xmlReader->getNodeName() == D3MF::XmlTag::mesh)
-            {
+        while(ReadToEndElement(D3MF::XmlTag::object)) {
+            if(xmlReader->getNodeName() == D3MF::XmlTag::mesh) {
                 auto mesh = ReadMesh();
 
                 mesh->mName.Set(name);
                 meshes.push_back(mesh);
                 meshIds.push_back(static_cast<unsigned long>(meshIdx));
                 meshIdx++;
-
             }
         }
 
@@ -185,49 +161,35 @@ private:
         std::copy(meshIds.begin(), meshIds.end(), node->mMeshes);
 
         return node.dismiss();
-
     }
 
-    aiMesh* ReadMesh()
-    {
+    aiMesh* ReadMesh() {
         aiMesh* mesh = new aiMesh();
-
-        while(ReadToEndElement(D3MF::XmlTag::mesh))
-        {
-            if(xmlReader->getNodeName() == D3MF::XmlTag::vertices)
-            {
+        while(ReadToEndElement(D3MF::XmlTag::mesh)) {
+            if(xmlReader->getNodeName() == D3MF::XmlTag::vertices) {
                 ImportVertices(mesh);
-            }
-            else if(xmlReader->getNodeName() == D3MF::XmlTag::triangles)
-            {
+            } else if(xmlReader->getNodeName() == D3MF::XmlTag::triangles) {
                 ImportTriangles(mesh);
             }
-
         }
 
-
         return mesh;
     }
 
-    void ImportVertices(aiMesh* mesh)
-    {
+    void ImportVertices(aiMesh* mesh) {
         std::vector<aiVector3D> vertices;
 
-        while(ReadToEndElement(D3MF::XmlTag::vertices))
-        {
-            if(xmlReader->getNodeName() == D3MF::XmlTag::vertex)
-            {
+        while ( ReadToEndElement(D3MF::XmlTag::vertices) ) {
+            if(xmlReader->getNodeName() == D3MF::XmlTag::vertex) {
                 vertices.push_back(ReadVertex());
             }
         }
         mesh->mNumVertices = static_cast<unsigned int>(vertices.size());
         mesh->mVertices = new aiVector3D[mesh->mNumVertices];
-
         std::copy(vertices.begin(), vertices.end(), mesh->mVertices);
-
     }
-    aiVector3D ReadVertex()
-    {
+
+    aiVector3D ReadVertex() {
         aiVector3D vertex;
 
         vertex.x = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
@@ -237,15 +199,11 @@ private:
         return vertex;
     }
 
-    void ImportTriangles(aiMesh* mesh)
-    {
+    void ImportTriangles(aiMesh* mesh) {
          std::vector<aiFace> faces;
 
-
-         while(ReadToEndElement(D3MF::XmlTag::triangles))
-         {
-             if(xmlReader->getNodeName() == D3MF::XmlTag::triangle)
-             {
+         while(ReadToEndElement(D3MF::XmlTag::triangles)) {
+             if(xmlReader->getNodeName() == D3MF::XmlTag::triangle) {
                  faces.push_back(ReadTriangle());
              }
          }
@@ -256,13 +214,10 @@ private:
 
 
         std::copy(faces.begin(), faces.end(), mesh->mFaces);
-
     }
 
-    aiFace ReadTriangle()
-    {
+    aiFace ReadTriangle() {
         aiFace face;
-
         face.mNumIndices = 3;
         face.mIndices = new unsigned int[face.mNumIndices];
         face.mIndices[0] = static_cast<unsigned int>(std::atoi(xmlReader->getAttributeValue(D3MF::XmlTag::v1.c_str())));
@@ -273,35 +228,25 @@ private:
     }
 
 private:
-
-    bool ReadToStartElement(const std::string& startTag)
-    {
-        while(xmlReader->read())
-        {
-            if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT && xmlReader->getNodeName() == startTag)
-            {
+    bool ReadToStartElement(const std::string& startTag) {
+        while(xmlReader->read()) {
+            if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT && xmlReader->getNodeName() == startTag) {
                 return true;
-            }
-            else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END &&
-                     xmlReader->getNodeName() == startTag)
-            {
+            } else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END &&
+                     xmlReader->getNodeName() == startTag) {
                 return false;
             }
         }
-        //DefaultLogger::get()->error("unexpected EOF, expected closing <" + closeTag + "> tag");
+//        DefaultLogger::get()->error("unexpected EOF, expected closing <" + closeTag + "> tag");
         return false;
     }
 
-    bool ReadToEndElement(const std::string& closeTag)
-    {
-        while(xmlReader->read())
-        {
+    bool ReadToEndElement(const std::string& closeTag) {
+        while(xmlReader->read()) {
             if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT) {
                 return true;
-            }
-            else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END
-                     && xmlReader->getNodeName() == closeTag)
-            {
+            } else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END
+                     && xmlReader->getNodeName() == closeTag) {
                 return false;
             }
         }
@@ -309,17 +254,13 @@ private:
         return false;
     }
 
-
 private:
     std::vector<aiMesh*> meshes;
     XmlReader* xmlReader;
-
-
 };
 
 } //namespace D3MF
 
-
 static const aiImporterDesc desc = {
     "3mf Importer",
     "",
@@ -333,19 +274,15 @@ static const aiImporterDesc desc = {
     "3mf"
 };
 
-
-D3MFImporter::D3MFImporter()
-{
-
+D3MFImporter::D3MFImporter() {
+    // empty
 }
 
-D3MFImporter::~D3MFImporter()
-{
-
+D3MFImporter::~D3MFImporter() {
+    // empty
 }
 
-bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const
-{
+bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const {
     const std::string extension = GetExtension(pFile);
     if(extension == "3mf") {
         return true;
@@ -358,18 +295,15 @@ bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool
     return false;
 }
 
-void D3MFImporter::SetupProperties(const Importer *pImp)
-{
-
+void D3MFImporter::SetupProperties(const Importer *pImp) {
+    // empty
 }
 
-const aiImporterDesc *D3MFImporter::GetInfo() const
-{
+const aiImporterDesc *D3MFImporter::GetInfo() const {
     return &desc;
 }
 
-void D3MFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler)
-{
+void D3MFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
     D3MF::D3MFOpcPackage opcPackage(pIOHandler, pFile);
 
     std::unique_ptr<CIrrXML_IOStreamReader> xmlStream(new CIrrXML_IOStreamReader(opcPackage.RootStream()));

+ 0 - 3
code/D3MFImporter.h

@@ -41,9 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_D3MFLOADER_H_INCLUDED
 #define AI_D3MFLOADER_H_INCLUDED
 
-#include <vector>
-#include <cstdint>
-
 #include "BaseImporter.h"
 
 namespace Assimp {

+ 0 - 1
code/D3MFOpcPackage.cpp

@@ -53,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <map>
 #include <algorithm>
 #include <cassert>
-#include <cstdlib>
 
 #include <contrib/unzip/unzip.h>
 

+ 0 - 1
code/D3MFOpcPackage.h

@@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef D3MFOPCPACKAGE_H
 #define D3MFOPCPACKAGE_H
 
-#include <string>
 #include <memory>
 
 #include <assimp/IOSystem.hpp>

+ 2 - 0
code/DXFLoader.cpp

@@ -54,6 +54,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "DXFHelper.h"
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
+
 #include <numeric>
 
 using namespace Assimp;

+ 1 - 0
code/DXFLoader.h

@@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define AI_DXFLOADER_H_INCLUDED
 
 #include "BaseImporter.h"
+#include <map>
 
 namespace Assimp    {
     namespace DXF {

+ 2 - 2
code/DefaultIOStream.cpp

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include <assimp/ai_assert.h>
-#include "DefaultIOStream.h"
+#include <assimp/DefaultIOStream.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -126,7 +126,7 @@ size_t DefaultIOStream::FileSize() const
         if (0 != err)
             return 0;
         mCachedSize = (size_t) (fileStat.st_size);
-#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__
+#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__ || defined __FreeBSD__
         struct stat fileStat;
         int err = stat(mFilename.c_str(), &fileStat );
         if (0 != err)

+ 2 - 2
code/DefaultIOSystem.cpp

@@ -40,10 +40,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 /** @file Default implementation of IOSystem using the standard C file functions */
 
-#include "DefaultIOSystem.h"
-#include "DefaultIOStream.h"
 #include "StringComparison.h"
 
+#include <assimp/DefaultIOSystem.h>
+#include <assimp/DefaultIOStream.h>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/ai_assert.h>
 #include <stdlib.h>

+ 2 - 1
code/DefaultLogger.cpp

@@ -43,13 +43,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *  @brief Implementation of DefaultLogger (and Logger)
  */
 
-#include "DefaultIOSystem.h"
 
 // Default log streams
 #include "Win32DebugLogStream.h"
 #include "StdOStreamLogStream.h"
 #include "FileLogStream.h"
 #include "StringUtils.h"
+
+#include <assimp/DefaultIOSystem.h>
 #include <assimp/NullLogger.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/ai_assert.h>

+ 1 - 1
code/Exceptional.h

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_EXCEPTIONAL_H
 
 #include <stdexcept>
-#include "DefaultIOStream.h"
+#include <assimp/DefaultIOStream.h>
 using std::runtime_error;
 
 #ifdef _MSC_VER

+ 40 - 79
code/Exporter.cpp

@@ -52,7 +52,6 @@ Here we implement only the C++ interface (Assimp::Exporter).
 
 #ifndef ASSIMP_BUILD_NO_EXPORT
 
-#include "DefaultIOSystem.h"
 #include "BlobIOSystem.h"
 #include "SceneCombiner.h"
 #include "BaseProcess.h"
@@ -64,11 +63,12 @@ Here we implement only the C++ interface (Assimp::Exporter).
 #include "Exceptional.h"
 #include "ScenePrivate.h"
 #include <memory>
+
+#include <assimp/DefaultIOSystem.h>
 #include <assimp/Exporter.hpp>
 #include <assimp/mesh.h>
 #include <assimp/postprocess.h>
 #include <assimp/scene.h>
-#include <memory>
 
 namespace Assimp {
 
@@ -201,65 +201,48 @@ public:
     std::vector<Exporter::ExportFormatEntry> mExporters;
 };
 
-
 } // end of namespace Assimp
 
-
-
-
-
 using namespace Assimp;
 
-
 // ------------------------------------------------------------------------------------------------
 Exporter :: Exporter()
-: pimpl(new ExporterPimpl())
-{
+: pimpl(new ExporterPimpl()) {
+    // empty
 }
 
-
 // ------------------------------------------------------------------------------------------------
-Exporter :: ~Exporter()
-{
+Exporter::~Exporter() {
     FreeBlob();
 
     delete pimpl;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-void Exporter :: SetIOHandler( IOSystem* pIOHandler)
-{
+void Exporter::SetIOHandler( IOSystem* pIOHandler) {
     pimpl->mIsDefaultIOHandler = !pIOHandler;
     pimpl->mIOSystem.reset(pIOHandler);
 }
 
-
 // ------------------------------------------------------------------------------------------------
-IOSystem* Exporter :: GetIOHandler() const
-{
+IOSystem* Exporter::GetIOHandler() const {
     return pimpl->mIOSystem.get();
 }
 
-
 // ------------------------------------------------------------------------------------------------
-bool Exporter :: IsDefaultIOHandler() const
-{
+bool Exporter::IsDefaultIOHandler() const {
     return pimpl->mIsDefaultIOHandler;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-const aiExportDataBlob* Exporter :: ExportToBlob(  const aiScene* pScene, const char* pFormatId, unsigned int, const ExportProperties* pProperties)
-{
+const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId,
+                                                unsigned int, const ExportProperties* pProperties ) {
     if (pimpl->blob) {
         delete pimpl->blob;
         pimpl->blob = NULL;
     }
 
-
     std::shared_ptr<IOSystem> old = pimpl->mIOSystem;
-
     BlobIOSystem* blobio = new BlobIOSystem();
     pimpl->mIOSystem = std::shared_ptr<IOSystem>( blobio );
 
@@ -274,10 +257,8 @@ const aiExportDataBlob* Exporter :: ExportToBlob(  const aiScene* pScene, const
     return pimpl->blob;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-bool IsVerboseFormat(const aiMesh* mesh)
-{
+bool IsVerboseFormat(const aiMesh* mesh) {
     // avoid slow vector<bool> specialization
     std::vector<unsigned int> seen(mesh->mNumVertices,0);
     for(unsigned int i = 0; i < mesh->mNumFaces; ++i) {
@@ -292,10 +273,8 @@ bool IsVerboseFormat(const aiMesh* mesh)
     return true;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-bool IsVerboseFormat(const aiScene* pScene)
-{
+bool IsVerboseFormat(const aiScene* pScene) {
     for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
         if(!IsVerboseFormat(pScene->mMeshes[i])) {
             return false;
@@ -304,10 +283,8 @@ bool IsVerboseFormat(const aiScene* pScene)
     return true;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing, const ExportProperties* pProperties)
-{
+aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing, const ExportProperties* pProperties) {
     ASSIMP_BEGIN_EXCEPTION_REGION();
 
     // when they create scenes from scratch, users will likely create them not in verbose
@@ -320,9 +297,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
     for (size_t i = 0; i < pimpl->mExporters.size(); ++i) {
         const Exporter::ExportFormatEntry& exp = pimpl->mExporters[i];
         if (!strcmp(exp.mDescription.id,pFormatId)) {
-
             try {
-
                 // Always create a full copy of the scene. We might optimize this one day,
                 // but for now it is the most pragmatic way.
                 aiScene* scenecopy_tmp = NULL;
@@ -341,18 +316,17 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
                     ? (priv->mPPStepsApplied & ~nonIdempotentSteps)
                     : 0u);
 
-                // If no extra postprocessing was specified, and we obtained this scene from an
+                // If no extra post-processing was specified, and we obtained this scene from an
                 // Assimp importer, apply the reverse steps automatically.
                 // TODO: either drop this, or document it. Otherwise it is just a bad surprise.
                 //if (!pPreprocessing && priv) {
                 //  pp |= (nonIdempotentSteps & priv->mPPStepsApplied);
                 //}
 
-                // If the input scene is not in verbose format, but there is at least postprocessing step that relies on it,
+                // If the input scene is not in verbose format, but there is at least post-processing step that relies on it,
                 // we need to run the MakeVerboseFormat step first.
                 bool must_join_again = false;
                 if (!is_verbose_format) {
-
                     bool verbosify = false;
                     for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
                         BaseProcess* const p = pimpl->mPostProcessingSteps[a];
@@ -423,8 +397,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
 
                 ExportProperties emptyProperties;  // Never pass NULL ExportProperties so Exporters don't have to worry.
                 exp.mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get(), pProperties ? pProperties : &emptyProperties);
-            }
-            catch (DeadlyExportError& err) {
+            } catch (DeadlyExportError& err) {
                 pimpl->mError = err.what();
                 return AI_FAILURE;
             }
@@ -437,64 +410,53 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
     return AI_FAILURE;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-const char* Exporter :: GetErrorString() const
-{
+const char* Exporter::GetErrorString() const {
     return pimpl->mError.c_str();
 }
 
 
 // ------------------------------------------------------------------------------------------------
-void Exporter :: FreeBlob( )
-{
+void Exporter::FreeBlob() {
     delete pimpl->blob;
     pimpl->blob = NULL;
 
     pimpl->mError = "";
 }
 
-
 // ------------------------------------------------------------------------------------------------
-const aiExportDataBlob* Exporter :: GetBlob() const
-{
+const aiExportDataBlob* Exporter::GetBlob() const {
     return pimpl->blob;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-const aiExportDataBlob* Exporter :: GetOrphanedBlob() const
-{
+const aiExportDataBlob* Exporter::GetOrphanedBlob() const {
     const aiExportDataBlob* tmp = pimpl->blob;
     pimpl->blob = NULL;
     return tmp;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-size_t Exporter :: GetExportFormatCount() const
-{
+size_t Exporter::GetExportFormatCount() const {
     return pimpl->mExporters.size();
 }
 
 // ------------------------------------------------------------------------------------------------
-const aiExportFormatDesc* Exporter :: GetExportFormatDescription( size_t pIndex ) const
-{
-    if (pIndex >= GetExportFormatCount()) {
+const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) const {
+    if (index >= GetExportFormatCount()) {
         return NULL;
     }
 
     // Return from static storage if the requested index is built-in.
-    if (pIndex < sizeof(gExporters) / sizeof(gExporters[0])) {
-        return &gExporters[pIndex].mDescription;
+    if (index < sizeof(gExporters) / sizeof(gExporters[0])) {
+        return &gExporters[index].mDescription;
     }
 
-    return &pimpl->mExporters[pIndex].mDescription;
+    return &pimpl->mExporters[index].mDescription;
 }
 
 // ------------------------------------------------------------------------------------------------
-aiReturn Exporter :: RegisterExporter(const ExportFormatEntry& desc)
-{
+aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) {
     for(const ExportFormatEntry& e : pimpl->mExporters) {
         if (!strcmp(e.mDescription.id,desc.mDescription.id)) {
             return aiReturn_FAILURE;
@@ -505,10 +467,8 @@ aiReturn Exporter :: RegisterExporter(const ExportFormatEntry& desc)
     return aiReturn_SUCCESS;
 }
 
-
 // ------------------------------------------------------------------------------------------------
-void Exporter :: UnregisterExporter(const char* id)
-{
+void Exporter::UnregisterExporter(const char* id) {
     for(std::vector<ExportFormatEntry>::iterator it = pimpl->mExporters.begin(); it != pimpl->mExporters.end(); ++it) {
         if (!strcmp((*it).mDescription.id,id)) {
             pimpl->mExporters.erase(it);
@@ -517,29 +477,30 @@ void Exporter :: UnregisterExporter(const char* id)
     }
 }
 
-ExportProperties :: ExportProperties() {}
+// ------------------------------------------------------------------------------------------------
+ExportProperties::ExportProperties() {
+    // empty
+}
 
+// ------------------------------------------------------------------------------------------------
 ExportProperties::ExportProperties(const ExportProperties &other)
-     : mIntProperties(other.mIntProperties),
-   mFloatProperties(other.mFloatProperties),
-   mStringProperties(other.mStringProperties),
-   mMatrixProperties(other.mMatrixProperties)
-{
-
+: mIntProperties(other.mIntProperties)
+, mFloatProperties(other.mFloatProperties)
+, mStringProperties(other.mStringProperties)
+, mMatrixProperties(other.mMatrixProperties) {
+    // empty
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // Set a configuration property
-bool ExportProperties :: SetPropertyInteger(const char* szName, int iValue)
-{
+bool ExportProperties::SetPropertyInteger(const char* szName, int iValue) {
     return SetGenericProperty<int>(mIntProperties, szName,iValue);
 }
 
 // ------------------------------------------------------------------------------------------------
 // Set a configuration property
-bool ExportProperties :: SetPropertyFloat(const char* szName, ai_real iValue)
-{
+bool ExportProperties::SetPropertyFloat(const char* szName, ai_real iValue) {
     return SetGenericProperty<ai_real>(mFloatProperties, szName,iValue);
 }
 

+ 0 - 1
code/FBXAnimation.cpp

@@ -48,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXParser.h"
 #include "FBXDocument.h"
 #include "FBXImporter.h"
-#include "FBXImportSettings.h"
 #include "FBXDocumentUtil.h"
 #include "FBXProperties.h"
 

+ 2 - 0
code/FBXCompileConfig.h

@@ -44,6 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
 #define INCLUDED_AI_FBX_COMPILECONFIG_H
 
+#include <map>
+
 //
 #if _MSC_VER > 1500 || (defined __GNUC___)
 #   define ASSIMP_FBX_USE_UNORDERED_MULTIMAP

+ 0 - 1
code/FBXConverter.cpp

@@ -58,7 +58,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <memory>
 
 #include <iterator>
-#include <sstream>
 #include <vector>
 
 namespace Assimp {

+ 0 - 2
code/FBXDeformer.cpp

@@ -47,9 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXParser.h"
 #include "FBXDocument.h"
 #include "FBXImporter.h"
-#include "FBXImportSettings.h"
 #include "FBXDocumentUtil.h"
-#include "FBXProperties.h"
 
 namespace Assimp {
 namespace FBX {

+ 1 - 1
code/FBXDocument.cpp

@@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <memory>
 #include <functional>
-
+#include <map>
 
 namespace Assimp {
 namespace FBX {

+ 1 - 3
code/FBXImporter.cpp

@@ -55,9 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "StreamReader.h"
 #include "MemoryIOWrapper.h"
 #include <assimp/Importer.hpp>
-
-#include <exception>
-#include <iterator>
+#include <assimp/importerdesc.h>
 
 namespace Assimp {
     template<> const std::string LogFunctions<FBXImporter>::log_prefix = "FBX: ";

+ 0 - 2
code/FBXModel.cpp

@@ -48,9 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXMeshGeometry.h"
 #include "FBXDocument.h"
 #include "FBXImporter.h"
-#include "FBXImportSettings.h"
 #include "FBXDocumentUtil.h"
-#include "FBXProperties.h"
 
 namespace Assimp {
 namespace FBX {

+ 0 - 2
code/FBXNodeAttribute.cpp

@@ -47,9 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXParser.h"
 #include "FBXDocument.h"
 #include "FBXImporter.h"
-#include "FBXImportSettings.h"
 #include "FBXDocumentUtil.h"
-#include "FBXProperties.h"
 
 namespace Assimp {
 namespace FBX {

+ 0 - 1
code/FBXParser.cpp

@@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #   include "../contrib/zlib/zlib.h"
 #endif
 
-
 #include "FBXTokenizer.h"
 #include "FBXParser.h"
 #include "FBXUtil.h"

+ 3 - 2
code/FBXProperties.h

@@ -44,14 +44,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_FBX_PROPERTIES_H
 #define INCLUDED_AI_FBX_PROPERTIES_H
 
-#include <map>
 #include "FBXCompileConfig.h"
 #include <memory>
+#include <string>
 
 namespace Assimp {
 namespace FBX {
 
-    class Element;
+// Forward declarations
+class Element;
 
 
 /** Represents a dynamic property. Type info added by deriving classes,

+ 0 - 1
code/FBXTokenizer.h

@@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_FBX_TOKENIZER_H
 #define INCLUDED_AI_FBX_TOKENIZER_H
 
-#include <memory>
 #include "FBXCompileConfig.h"
 #include <assimp/ai_assert.h>
 #include <vector>

+ 1 - 0
code/FBXUtil.cpp

@@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXTokenizer.h"
 
 #include "TinyFormatter.h"
+#include <string>
 
 #ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
 

+ 0 - 1
code/FBXUtil.h

@@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef INCLUDED_AI_FBX_UTIL_H
 #define INCLUDED_AI_FBX_UTIL_H
 
-#include <string>
 #include "FBXCompileConfig.h"
 #include "FBXTokenizer.h"
 

+ 42 - 1
code/FileLogStream.h

@@ -1,9 +1,50 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2017, assimp team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+copyright notice, this list of conditions and the
+following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the
+following disclaimer in the documentation and/or other
+materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+contributors may be used to endorse or promote products
+derived from this software without specific prior
+written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+/** @file FileLofStream.h
+*/
 #ifndef ASSIMP_FILELOGSTREAM_H_INC
 #define ASSIMP_FILELOGSTREAM_H_INC
 
 #include <assimp/LogStream.hpp>
 #include <assimp/IOStream.hpp>
-#include "DefaultIOSystem.h"
+#include <assimp/DefaultIOSystem.h>
 
 namespace Assimp    {
 

+ 1 - 0
code/HMPLoader.cpp

@@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 

+ 0 - 5
code/HMPLoader.h

@@ -44,11 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_HMPLOADER_H_INCLUDED
 #define AI_HMPLOADER_H_INCLUDED
 
-// public ASSIMP headers
-#include <assimp/types.h>
-#include <assimp/texture.h>
-#include <assimp/material.h>
-
 // internal headers
 #include "BaseImporter.h"
 #include "MDLLoader.h"

+ 0 - 1
code/HalfLifeFileData.h

@@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_MDLFILEHELPER2_H_INC
 #define AI_MDLFILEHELPER2_H_INC
 
-#include "MDLFileData.h"
 #include "./../include/assimp/Compiler/pushpack1.h"
 
 namespace Assimp    {

+ 1 - 1
code/IFCBoolean.cpp

@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "IFCUtil.h"
 #include "PolyTools.h"
 #include "ProcessHelper.h"
-#include "Defines.h"
+#include <assimp/Defines.h>
 
 #include <iterator>
 #include <tuple>

+ 2 - 2
code/IFCGeometry.cpp

@@ -258,7 +258,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
         return;
     }
 
-    const unsigned int cnt_segments = std::max(2u,static_cast<unsigned int>(16 * std::fabs(max_angle)/AI_MATH_HALF_PI_F));
+    const unsigned int cnt_segments = std::max(2u,static_cast<unsigned int>(conv.settings.cylindricalTessellation * std::fabs(max_angle)/AI_MATH_HALF_PI_F));
     const IfcFloat delta = max_angle/cnt_segments;
 
     has_area = has_area && std::fabs(max_angle) < AI_MATH_TWO_PI_F*0.99;
@@ -327,7 +327,7 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
         return;
     }
 
-    const unsigned int cnt_segments = 16;
+    const unsigned int cnt_segments = conv.settings.cylindricalTessellation;
     const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments;
 
     const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam);

+ 7 - 10
code/IFCLoader.cpp

@@ -58,10 +58,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "IFCUtil.h"
 
-#include "StreamReader.h"
 #include "MemoryIOWrapper.h"
 #include <assimp/scene.h>
 #include <assimp/Importer.hpp>
+#include <assimp/importerdesc.h>
 
 
 namespace Assimp {
@@ -108,7 +108,7 @@ static const aiImporterDesc desc = {
     0,
     0,
     0,
-    "ifc ifczip"
+    "ifc ifczip stp"
 };
 
 
@@ -128,11 +128,9 @@ IFCImporter::~IFCImporter()
 bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
     const std::string& extension = GetExtension(pFile);
-    if (extension == "ifc" || extension == "ifczip") {
+    if (extension == "ifc" || extension == "ifczip" || extension == "stp" ) {
         return true;
-    }
-
-    else if ((!extension.length() || checkSig) && pIOHandler)   {
+    } else if ((!extension.length() || checkSig) && pIOHandler)   {
         // note: this is the common identification for STEP-encoded files, so
         // it is only unambiguous as long as we don't support any further
         // file formats with STEP as their encoding.
@@ -155,11 +153,10 @@ const aiImporterDesc* IFCImporter::GetInfo () const
 void IFCImporter::SetupProperties(const Importer* pImp)
 {
     settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true);
-    settings.skipCurveRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS,true);
     settings.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true);
-
-    settings.conicSamplingAngle = 10.f;
-    settings.skipAnnotations = 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.cylindricalTessellation = std::min(std::max(pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION, AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION), 3), 180);
+	settings.skipAnnotations = true;
 }
 
 

+ 2 - 2
code/IFCLoader.h

@@ -107,18 +107,18 @@ public:
     {
         Settings()
             : skipSpaceRepresentations()
-            , skipCurveRepresentations()
             , useCustomTriangulation()
             , skipAnnotations()
             , conicSamplingAngle(10.f)
+			, cylindricalTessellation(32)
         {}
 
 
         bool skipSpaceRepresentations;
-        bool skipCurveRepresentations;
         bool useCustomTriangulation;
         bool skipAnnotations;
         float conicSamplingAngle;
+		int cylindricalTessellation;
     };
 
 

+ 14 - 6
code/IFCOpenings.cpp

@@ -901,13 +901,21 @@ size_t CloseWindows(ContourVector& contours,
             curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
             curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size());
 
+			bool reverseCountourFaces = false;
+
             // compare base poly normal and contour normal to detect if we need to reverse the face winding
-            IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal( curmesh.verts.data(), curmesh.vertcnt.front());
-            std::vector<IfcVector3> worldSpaceContourVtx( it->contour.size());
-            for( size_t a = 0; a < it->contour.size(); ++a )
-                worldSpaceContourVtx[a] = minv * IfcVector3( it->contour[a].x, it->contour[a].y, 0.0);
-            IfcVector3 contourNormal = TempMesh::ComputePolygonNormal( worldSpaceContourVtx.data(), worldSpaceContourVtx.size());
-            bool reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0;
+			if(curmesh.vertcnt.size() > 0) {
+				IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.verts.data(), curmesh.vertcnt.front());
+				
+				std::vector<IfcVector3> worldSpaceContourVtx(it->contour.size());
+				
+				for(size_t a = 0; a < it->contour.size(); ++a)
+					worldSpaceContourVtx[a] = minv * IfcVector3(it->contour[a].x, it->contour[a].y, 0.0);
+				
+				IfcVector3 contourNormal = TempMesh::ComputePolygonNormal(worldSpaceContourVtx.data(), worldSpaceContourVtx.size());
+				
+				reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0;
+			}
 
             // XXX this algorithm is really a bit inefficient - both in terms
             // of constant factor and of asymptotic runtime.

+ 2 - 2
code/IFCProfile.cpp

@@ -101,7 +101,7 @@ void ProcessOpenProfile(const IfcArbitraryOpenProfileDef& def, TempMesh& meshout
 }
 
 // ------------------------------------------------------------------------------------------------
-void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& /*conv*/)
+void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv)
 {
     if(const IfcRectangleProfileDef* const cprofile = def.ToPtr<IfcRectangleProfileDef>()) {
         const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
@@ -117,7 +117,7 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh&
         if(def.ToPtr<IfcCircleHollowProfileDef>()) {
             // TODO
         }
-        const size_t segments = 32;
+        const size_t segments = conv.settings.cylindricalTessellation;
         const IfcFloat delta = AI_MATH_TWO_PI_F/segments, radius = circle->Radius;
 
         meshout.verts.reserve(segments);

+ 1 - 1
code/IFCUtil.cpp

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "IFCUtil.h"
 #include "PolyTools.h"
 #include "ProcessHelper.h"
-#include "Defines.h"
+#include <assimp/Defines.h>
 
 namespace Assimp {
     namespace IFC {

+ 0 - 2
code/IOStreamBuffer.h

@@ -44,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOStream.hpp>
 #include "ParsingUtils.h"
 
-#include <iostream>
-
 namespace Assimp {
 
 // ---------------------------------------------------------------------------

+ 1 - 1
code/IRRLoader.cpp

@@ -65,7 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/scene.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/postprocess.h>
-
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 using namespace irr;

+ 1 - 1
code/IRRMeshLoader.cpp

@@ -54,9 +54,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/material.h>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 #include "Macros.h"
 
-
 using namespace Assimp;
 using namespace irr;
 using namespace irr::io;

+ 4 - 2
code/Importer.cpp

@@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <assimp/version.h>
 #include <assimp/config.h>
+#include <assimp/importerdesc.h>
 
 // ------------------------------------------------------------------------------------------------
 /* Uncomment this line to prevent Assimp from catching unknown exceptions.
@@ -65,8 +66,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "BaseImporter.h"
 #include "BaseProcess.h"
 
-#include "DefaultIOStream.h"
-#include "DefaultIOSystem.h"
 #include "DefaultProgressHandler.h"
 #include "GenericProperty.h"
 #include "ProcessHelper.h"
@@ -81,6 +80,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <memory>
 #include <cctype>
 
+#include <assimp/DefaultIOStream.h>
+#include <assimp/DefaultIOSystem.h>
+
 #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
 #   include "ValidateDataStructure.h"
 #endif

+ 1 - 1
code/Importer.h

@@ -44,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define INCLUDED_AI_IMPORTER_H
 
 #include <map>
-#include <string>
 #include <vector>
+#include <string>
 #include <assimp/matrix4x4.h>
 
 struct aiScene;

+ 3 - 0
code/ImporterRegistry.cpp

@@ -46,6 +46,9 @@ directly (unless you are adding new loaders), instead use the
 corresponding preprocessor flag to selectively disable formats.
 */
 
+#include <vector>
+#include "BaseImporter.h"
+
 // ------------------------------------------------------------------------------------------------
 // Importers
 // (include_new_importers_here)

+ 2 - 1
code/LWOLoader.cpp

@@ -54,10 +54,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "ProcessHelper.h"
 #include "ConvertToLHProcess.h"
 #include <assimp/IOSystem.hpp>
+#include <assimp/importerdesc.h>
 #include <memory>
 #include <sstream>
 #include <iomanip>
-
+#include <map>
 
 using namespace Assimp;
 

+ 2 - 0
code/LWOLoader.h

@@ -49,6 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "LWOFileData.h"
 #include "BaseImporter.h"
 
+#include <map>
+
 struct aiTexture;
 struct aiNode;
 struct aiMaterial;

+ 1 - 1
code/LWSLoader.cpp

@@ -58,9 +58,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
 #include <assimp/IOSystem.hpp>
+#include <assimp/importerdesc.h>
 #include <memory>
 
-
 using namespace Assimp;
 
 static const aiImporterDesc desc = {

+ 0 - 2
code/MD2FileData.h

@@ -46,8 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define AI_MD2FILEHELPER_H_INC
 
 #include <assimp/types.h>
-#include <assimp/mesh.h>
-#include <assimp/anim.h>
 #include <stdint.h>
 
 #include <assimp/Compiler/pushpack1.h>

+ 2 - 0
code/MD2Loader.cpp

@@ -50,6 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/Importer.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
+
 #include <memory>
 
 using namespace Assimp;

+ 1 - 2
code/MD3Loader.cpp

@@ -62,10 +62,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/material.h>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 #include <cctype>
 
-
-
 using namespace Assimp;
 
 static const aiImporterDesc desc = {

+ 1 - 0
code/MD5Loader.cpp

@@ -56,6 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/scene.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
 #include <memory>
 
 using namespace Assimp;

+ 1 - 0
code/MDCLoader.cpp

@@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/Importer.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 #include <memory>
 
 

+ 1 - 1
code/MDLLoader.cpp

@@ -58,10 +58,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
 
 #include <memory>
 
-
 using namespace Assimp;
 
 static const aiImporterDesc desc = {

+ 1 - 1
code/MDLMaterialLoader.cpp

@@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
+#include <assimp/Defines.h>
 #include "qnan.h"
-#include "Defines.h"
 
 
 using namespace Assimp;

+ 2 - 1
code/MS3DLoader.cpp

@@ -53,7 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
 #include <assimp/IOSystem.hpp>
-
+#include <assimp/importerdesc.h>
+#include <map>
 
 using namespace Assimp;
 

+ 2 - 0
code/NDOLoader.cpp

@@ -49,7 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 #include "StreamReader.h"
+#include <map>
 
 using namespace Assimp;
 

+ 1 - 0
code/NFFLoader.cpp

@@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/DefaultLogger.hpp>
 #include <assimp/scene.h>
+#include <assimp/importerdesc.h>
 #include <memory>
 
 

+ 1 - 1
code/OFFLoader.cpp

@@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOSystem.hpp>
 #include <assimp/scene.h>
 #include <assimp/DefaultLogger.hpp>
-
+#include <assimp/importerdesc.h>
 
 using namespace Assimp;
 

部分文件因文件數量過多而無法顯示