Browse Source

Updated Assimp to v3.2

Florastamine 8 years ago
parent
commit
74e234a63d
79 changed files with 1262 additions and 384 deletions
  1. 3 0
      Source/ThirdParty/Assimp/CMakeLists.txt
  2. 7 8
      Source/ThirdParty/Assimp/INSTALL
  3. 6 1
      Source/ThirdParty/Assimp/Readme.md
  4. 2 2
      Source/ThirdParty/Assimp/code/ASEParser.h
  5. 1 1
      Source/ThirdParty/Assimp/code/Assimp.cpp
  6. 1 1
      Source/ThirdParty/Assimp/code/BVHLoader.h
  7. 6 6
      Source/ThirdParty/Assimp/code/BaseImporter.cpp
  8. 4 4
      Source/ThirdParty/Assimp/code/BaseImporter.h
  9. 2 2
      Source/ThirdParty/Assimp/code/BaseProcess.h
  10. 2 2
      Source/ThirdParty/Assimp/code/CInterfaceIOWrapper.h
  11. 3 0
      Source/ThirdParty/Assimp/code/CMakeLists.txt
  12. 1 1
      Source/ThirdParty/Assimp/code/ComputeUVMappingProcess.h
  13. 12 9
      Source/ThirdParty/Assimp/code/DefaultIOSystem.cpp
  14. 3 3
      Source/ThirdParty/Assimp/code/DefaultIOSystem.h
  15. 0 2
      Source/ThirdParty/Assimp/code/FBXParser.h
  16. 1 1
      Source/ThirdParty/Assimp/code/FBXProperties.h
  17. 0 3
      Source/ThirdParty/Assimp/code/HMPFileData.h
  18. 0 2
      Source/ThirdParty/Assimp/code/Hash.h
  19. 1 1
      Source/ThirdParty/Assimp/code/IFCBoolean.cpp
  20. 2 2
      Source/ThirdParty/Assimp/code/IFCOpenings.cpp
  21. 2 2
      Source/ThirdParty/Assimp/code/IRRLoader.h
  22. 0 1
      Source/ThirdParty/Assimp/code/IRRShared.h
  23. 1 1
      Source/ThirdParty/Assimp/code/Importer.h
  24. 2 2
      Source/ThirdParty/Assimp/code/LWOFileData.h
  25. 0 2
      Source/ThirdParty/Assimp/code/MD2FileData.h
  26. 0 2
      Source/ThirdParty/Assimp/code/MD3FileData.h
  27. 0 6
      Source/ThirdParty/Assimp/code/MD5Loader.cpp
  28. 6 4
      Source/ThirdParty/Assimp/code/MD5Parser.h
  29. 0 2
      Source/ThirdParty/Assimp/code/MDCFileData.h
  30. 0 1
      Source/ThirdParty/Assimp/code/MDLFileData.h
  31. 0 2
      Source/ThirdParty/Assimp/code/MaterialSystem.h
  32. 0 2
      Source/ThirdParty/Assimp/code/MemoryIOWrapper.h
  33. 0 2
      Source/ThirdParty/Assimp/code/NDOLoader.h
  34. 29 11
      Source/ThirdParty/Assimp/code/OFFLoader.cpp
  35. 9 1
      Source/ThirdParty/Assimp/code/ObjFileData.h
  36. 17 1
      Source/ThirdParty/Assimp/code/ObjFileImporter.cpp
  37. 52 5
      Source/ThirdParty/Assimp/code/ObjFileMtlImporter.cpp
  38. 2 1
      Source/ThirdParty/Assimp/code/ObjFileMtlImporter.h
  39. 5 2
      Source/ThirdParty/Assimp/code/ObjFileParser.cpp
  40. 0 2
      Source/ThirdParty/Assimp/code/OgreParsingUtils.h
  41. 2 2
      Source/ThirdParty/Assimp/code/OgreStructs.h
  42. 1 1
      Source/ThirdParty/Assimp/code/OgreXmlSerializer.h
  43. 1 1
      Source/ThirdParty/Assimp/code/PlyParser.cpp
  44. 1 1
      Source/ThirdParty/Assimp/code/Q3BSPFileImporter.cpp
  45. 1 1
      Source/ThirdParty/Assimp/code/Q3BSPZipArchive.h
  46. 1 3
      Source/ThirdParty/Assimp/code/Q3DLoader.h
  47. 2 2
      Source/ThirdParty/Assimp/code/RawLoader.h
  48. 1 3
      Source/ThirdParty/Assimp/code/SGSpatialSort.h
  49. 2 2
      Source/ThirdParty/Assimp/code/STLLoader.cpp
  50. 2 3
      Source/ThirdParty/Assimp/code/SceneCombiner.h
  51. 0 2
      Source/ThirdParty/Assimp/code/SmoothingGroups.h
  52. 1 1
      Source/ThirdParty/Assimp/code/StdOStreamLogStream.h
  53. 0 2
      Source/ThirdParty/Assimp/code/StringComparison.h
  54. 1 1
      Source/ThirdParty/Assimp/code/TinyFormatter.h
  55. 1 3
      Source/ThirdParty/Assimp/code/UnrealLoader.h
  56. 1 1
      Source/ThirdParty/Assimp/code/Version.cpp
  57. 2 3
      Source/ThirdParty/Assimp/code/XFileHelper.h
  58. 1 1
      Source/ThirdParty/Assimp/code/XFileParser.h
  59. 0 1
      Source/ThirdParty/Assimp/code/fast_atof.h
  60. 1 1
      Source/ThirdParty/Assimp/code/irrXMLWrapper.h
  61. 0 2
      Source/ThirdParty/Assimp/code/qnan.h
  62. 6 6
      Source/ThirdParty/Assimp/contrib/openddlparser/code/DDLNode.cpp
  63. 168 0
      Source/ThirdParty/Assimp/contrib/openddlparser/code/OpenDDLCommon.cpp
  64. 412 0
      Source/ThirdParty/Assimp/contrib/openddlparser/code/OpenDDLExport.cpp
  65. 77 45
      Source/ThirdParty/Assimp/contrib/openddlparser/code/OpenDDLParser.cpp
  66. 74 14
      Source/ThirdParty/Assimp/contrib/openddlparser/code/Value.cpp
  67. 4 0
      Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/DDLNode.h
  68. 111 149
      Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
  69. 88 0
      Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/OpenDDLExport.h
  70. 70 7
      Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/OpenDDLParser.h
  71. 29 1
      Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/Value.h
  72. 1 1
      Source/ThirdParty/Assimp/include/assimp/DefaultLogger.hpp
  73. 1 1
      Source/ThirdParty/Assimp/include/assimp/Logger.hpp
  74. 1 1
      Source/ThirdParty/Assimp/include/assimp/color4.h
  75. 12 12
      Source/ThirdParty/Assimp/include/assimp/material.h
  76. 0 2
      Source/ThirdParty/Assimp/include/assimp/metadata.h
  77. 2 2
      Source/ThirdParty/Assimp/include/assimp/quaternion.h
  78. 1 1
      Source/ThirdParty/Assimp/include/assimp/scene.h
  79. 1 2
      Source/ThirdParty/Assimp/include/assimp/types.h

+ 3 - 0
Source/ThirdParty/Assimp/CMakeLists.txt

@@ -675,6 +675,8 @@ SET( zlib_SRCS
 SOURCE_GROUP( zlib FILES ${zlib_SRCS})
 SOURCE_GROUP( zlib FILES ${zlib_SRCS})
 
 
 SET ( openddl_parser_SRCS
 SET ( openddl_parser_SRCS
+  contrib/openddlparser/code/OpenDDLExport.cpp 
+  contrib/openddlparser/code/OpenDDLCommon.cpp
   contrib/openddlparser/code/OpenDDLParser.cpp
   contrib/openddlparser/code/OpenDDLParser.cpp
   contrib/openddlparser/code/DDLNode.cpp
   contrib/openddlparser/code/DDLNode.cpp
   contrib/openddlparser/code/Value.cpp
   contrib/openddlparser/code/Value.cpp
@@ -683,6 +685,7 @@ SET ( openddl_parser_SRCS
   contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
   contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
   contrib/openddlparser/include/openddlparser/DDLNode.h
   contrib/openddlparser/include/openddlparser/DDLNode.h
   contrib/openddlparser/include/openddlparser/Value.h
   contrib/openddlparser/include/openddlparser/Value.h
+  contrib/openddlparser/include/openddlparser/OpenDDLExport.h
 )
 )
 SOURCE_GROUP( openddl_parser FILES ${openddl_parser_SRCS})
 SOURCE_GROUP( openddl_parser FILES ${openddl_parser_SRCS})
 
 

+ 7 - 8
Source/ThirdParty/Assimp/INSTALL

@@ -33,13 +33,12 @@ CMake is the preferred build system for Assimp. The minimum required version
 is 2.6. If you don't have it yet, downloads for CMake can be found on
 is 2.6. If you don't have it yet, downloads for CMake can be found on
 http://www.cmake.org/. 
 http://www.cmake.org/. 
 
 
-Building Assimp with CMake is 'business as usual' if you've used CMake
-before. All steps can be done either on the command line / shell or
-by using the CMake GUI tool, the choice is up to you. 
-
-First, invoke CMake to generate build files for a particular
-toolchain (for standard GNU makefiles: cmake -G 'Unix Makefiles').
-Afterwards, use the generated build files to perform the actual
-build. 
+For Unix:
 
 
+1. cmake CMakeLists.txt -G 'Unix Makefiles'
+2. make
 
 
+For Windows:
+1. Open a command prompt
+2. cmake CMakeLists.txt
+2. Open your default IDE and build it

+ 6 - 1
Source/ThirdParty/Assimp/Readme.md

@@ -113,7 +113,9 @@ If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflo
 For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
 For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
   [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions) 
   [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions) 
 
 
-And we also have an IRC-channel at freenode: #assetimporterlib .
+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
+
 ### Contributing ###
 ### Contributing ###
 
 
 Contributions to assimp are highly appreciated. The easiest way to get involved is to submit 
 Contributions to assimp are highly appreciated. The easiest way to get involved is to submit 
@@ -127,3 +129,6 @@ An _informal_ summary is: do whatever you want, but include Assimp's license tex
 and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
 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. 
 For the legal details, see the `LICENSE` file. 
 
 
+### Why this name ###
+
+Sorry, we're germans :-), no english native speakers ...

+ 2 - 2
Source/ThirdParty/Assimp/code/ASEParser.h

@@ -138,7 +138,7 @@ struct Bone
     }
     }
 
 
     //! Construction from an existing name
     //! Construction from an existing name
-    Bone( const std::string& name)
+    explicit Bone( const std::string& name)
         :   mName   (name)
         :   mName   (name)
     {}
     {}
 
 
@@ -216,7 +216,7 @@ struct BaseNode
     enum Type {Light, Camera, Mesh, Dummy} mType;
     enum Type {Light, Camera, Mesh, Dummy} mType;
 
 
     //! Constructor. Creates a default name for the node
     //! Constructor. Creates a default name for the node
-    BaseNode(Type _mType)
+    explicit BaseNode(Type _mType)
         : mType         (_mType)
         : mType         (_mType)
         , mProcessed    (false)
         , mProcessed    (false)
     {
     {

+ 1 - 1
Source/ThirdParty/Assimp/code/Assimp.cpp

@@ -110,7 +110,7 @@ static boost::mutex gLogStreamMutex;
 class LogToCallbackRedirector : public LogStream
 class LogToCallbackRedirector : public LogStream
 {
 {
 public:
 public:
-    LogToCallbackRedirector(const aiLogStream& s)
+    explicit LogToCallbackRedirector(const aiLogStream& s)
         : stream (s)    {
         : stream (s)    {
             ai_assert(NULL != s.callback);
             ai_assert(NULL != s.callback);
     }
     }

+ 1 - 1
Source/ThirdParty/Assimp/code/BVHLoader.h

@@ -83,7 +83,7 @@ class BVHLoader : public BaseImporter
         std::vector<float> mChannelValues; // motion data values for that node. Of size NumChannels * NumFrames
         std::vector<float> mChannelValues; // motion data values for that node. Of size NumChannels * NumFrames
 
 
         Node() { }
         Node() { }
-        Node( const aiNode* pNode) : mNode( pNode) { }
+        explicit Node( const aiNode* pNode) : mNode( pNode) { }
     };
     };
 
 
 public:
 public:

+ 6 - 6
Source/ThirdParty/Assimp/code/BaseImporter.cpp

@@ -63,7 +63,7 @@ using namespace Assimp;
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 // Constructor to be privately used by Importer
 BaseImporter::BaseImporter()
 BaseImporter::BaseImporter()
-: progress()
+: m_progress()
 {
 {
     // nothing to do here
     // nothing to do here
 }
 }
@@ -79,8 +79,8 @@ BaseImporter::~BaseImporter()
 // Imports the given file and returns the imported data.
 // Imports the given file and returns the imported data.
 aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile, IOSystem* pIOHandler)
 aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile, IOSystem* pIOHandler)
 {
 {
-    progress = pImp->GetProgressHandler();
-    ai_assert(progress);
+    m_progress = pImp->GetProgressHandler();
+    ai_assert(m_progress);
 
 
     // Gather configuration properties for this run
     // Gather configuration properties for this run
     SetupProperties( pImp );
     SetupProperties( pImp );
@@ -98,8 +98,8 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
 
 
     } catch( const std::exception& err )    {
     } catch( const std::exception& err )    {
         // extract error description
         // extract error description
-        mErrorText = err.what();
-        DefaultLogger::get()->error(mErrorText);
+        m_ErrorText = err.what();
+        DefaultLogger::get()->error(m_ErrorText);
         return NULL;
         return NULL;
     }
     }
 
 
@@ -274,7 +274,7 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
 
 
         for (unsigned int i = 0; i < num; ++i) {
         for (unsigned int i = 0; i < num; ++i) {
             // also check against big endian versions of tokens with size 2,4
             // also check against big endian versions of tokens with size 2,4
-            // that's just for convinience, the chance that we cause conflicts
+            // that's just for convenience, the chance that we cause conflicts
             // is quite low and it can save some lines and prevent nasty bugs
             // is quite low and it can save some lines and prevent nasty bugs
             if (2 == size) {
             if (2 == size) {
                 uint16_t rev = *magic_u16;
                 uint16_t rev = *magic_u16;

+ 4 - 4
Source/ThirdParty/Assimp/code/BaseImporter.h

@@ -70,7 +70,7 @@ class IOStream;
 template <typename T>
 template <typename T>
 struct ScopeGuard
 struct ScopeGuard
 {
 {
-    ScopeGuard(T* obj) : obj(obj), mdismiss() {}
+    explicit ScopeGuard(T* obj) : obj(obj), mdismiss() {}
     ~ScopeGuard () throw() {
     ~ScopeGuard () throw() {
         if (!mdismiss) {
         if (!mdismiss) {
             delete obj;
             delete obj;
@@ -181,7 +181,7 @@ public:
      * string if there was no error.
      * string if there was no error.
      */
      */
     const std::string& GetErrorText() const {
     const std::string& GetErrorText() const {
-        return mErrorText;
+        return m_ErrorText;
     }
     }
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
@@ -362,10 +362,10 @@ public: // static utilities
 protected:
 protected:
 
 
     /** Error description in case there was one. */
     /** Error description in case there was one. */
-    std::string mErrorText;
+    std::string m_ErrorText;
 
 
     /** Currently set progress handler */
     /** Currently set progress handler */
-    ProgressHandler* progress;
+    ProgressHandler* m_progress;
 };
 };
 
 
 
 

+ 2 - 2
Source/ThirdParty/Assimp/code/BaseProcess.h

@@ -74,7 +74,7 @@ public:
     template <typename T>
     template <typename T>
     struct THeapData : public Base
     struct THeapData : public Base
     {
     {
-        THeapData(T* in)
+        explicit THeapData(T* in)
             : data (in)
             : data (in)
         {}
         {}
 
 
@@ -89,7 +89,7 @@ public:
     template <typename T>
     template <typename T>
     struct TStaticData : public Base
     struct TStaticData : public Base
     {
     {
-        TStaticData(T in)
+        explicit TStaticData(T in)
             : data (in)
             : data (in)
         {}
         {}
 
 

+ 2 - 2
Source/ThirdParty/Assimp/code/CInterfaceIOWrapper.h

@@ -57,7 +57,7 @@ class CIOStreamWrapper : public IOStream
     friend class CIOSystemWrapper;
     friend class CIOSystemWrapper;
 public:
 public:
 
 
-    CIOStreamWrapper(aiFile* pFile)
+    explicit CIOStreamWrapper(aiFile* pFile)
         : mFile(pFile)
         : mFile(pFile)
     {}
     {}
 
 
@@ -110,7 +110,7 @@ private:
 class CIOSystemWrapper : public IOSystem
 class CIOSystemWrapper : public IOSystem
 {
 {
 public:
 public:
-    CIOSystemWrapper(aiFileIO* pFile)
+    explicit CIOSystemWrapper(aiFileIO* pFile)
         : mFileSystem(pFile)
         : mFileSystem(pFile)
     {}
     {}
 
 

+ 3 - 0
Source/ThirdParty/Assimp/code/CMakeLists.txt

@@ -632,10 +632,13 @@ SOURCE_GROUP( unzip FILES ${unzip_SRCS})
 SET ( openddl_parser_SRCS
 SET ( openddl_parser_SRCS
   ../contrib/openddlparser/code/OpenDDLParser.cpp
   ../contrib/openddlparser/code/OpenDDLParser.cpp
   ../contrib/openddlparser/code/DDLNode.cpp
   ../contrib/openddlparser/code/DDLNode.cpp
+  ../contrib/openddlparser/code/OpenDDLCommon.cpp
+  ../contrib/openddlparser/code/OpenDDLExport.cpp
   ../contrib/openddlparser/code/Value.cpp
   ../contrib/openddlparser/code/Value.cpp
   ../contrib/openddlparser/include/openddlparser/OpenDDLParser.h
   ../contrib/openddlparser/include/openddlparser/OpenDDLParser.h
   ../contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
   ../contrib/openddlparser/include/openddlparser/OpenDDLParserUtils.h
   ../contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
   ../contrib/openddlparser/include/openddlparser/OpenDDLCommon.h
+  ../contrib/openddlparser/include/openddlparser/OpenDDLExport.h
   ../contrib/openddlparser/include/openddlparser/DDLNode.h
   ../contrib/openddlparser/include/openddlparser/DDLNode.h
   ../contrib/openddlparser/include/openddlparser/Value.h
   ../contrib/openddlparser/include/openddlparser/Value.h
 )
 )

+ 1 - 1
Source/ThirdParty/Assimp/code/ComputeUVMappingProcess.h

@@ -125,7 +125,7 @@ private:
     // temporary structure to describe a mapping
     // temporary structure to describe a mapping
     struct MappingInfo
     struct MappingInfo
     {
     {
-        MappingInfo(aiTextureMapping _type)
+        explicit MappingInfo(aiTextureMapping _type)
             : type  (_type)
             : type  (_type)
             , axis  (0.f,1.f,0.f)
             , axis  (0.f,1.f,0.f)
             , uv    (0u)
             , uv    (0u)

+ 12 - 9
Source/ThirdParty/Assimp/code/DefaultIOSystem.cpp

@@ -135,11 +135,11 @@ inline void MakeAbsolutePath (const char* in, char* _out)
 {
 {
     ai_assert(in && _out);
     ai_assert(in && _out);
     char* ret;
     char* ret;
-#ifdef _WIN32
-    ret = ::_fullpath(_out, in,PATHLIMIT);
+#if defined( _MSC_VER ) || defined( __MINGW32__ )
+    ret = ::_fullpath( _out, in, PATHLIMIT );
 #else
 #else
-        // use realpath
-        ret = realpath(in, _out);
+    // use realpath
+    ret = realpath(in, _out);
 #endif
 #endif
     if(!ret) {
     if(!ret) {
         // preserve the input path, maybe someone else is able to fix
         // preserve the input path, maybe someone else is able to fix
@@ -167,8 +167,8 @@ bool DefaultIOSystem::ComparePaths (const char* one, const char* second) const
     return !ASSIMP_stricmp(temp1,temp2);
     return !ASSIMP_stricmp(temp1,temp2);
 }
 }
 
 
-
-std::string DefaultIOSystem::fileName(std::string path)
+// ------------------------------------------------------------------------------------------------
+std::string DefaultIOSystem::fileName( const std::string &path )
 {
 {
     std::string ret = path;
     std::string ret = path;
     std::size_t last = ret.find_last_of("\\/");
     std::size_t last = ret.find_last_of("\\/");
@@ -177,7 +177,8 @@ std::string DefaultIOSystem::fileName(std::string path)
 }
 }
 
 
 
 
-std::string DefaultIOSystem::completeBaseName(std::string path)
+// ------------------------------------------------------------------------------------------------
+std::string DefaultIOSystem::completeBaseName( const std::string &path )
 {
 {
     std::string ret = fileName(path);
     std::string ret = fileName(path);
     std::size_t pos = ret.find_last_of('.');
     std::size_t pos = ret.find_last_of('.');
@@ -185,8 +186,8 @@ std::string DefaultIOSystem::completeBaseName(std::string path)
     return ret;
     return ret;
 }
 }
 
 
-
-std::string DefaultIOSystem::absolutePath(std::string path)
+// ------------------------------------------------------------------------------------------------
+std::string DefaultIOSystem::absolutePath( const std::string &path )
 {
 {
     std::string ret = path;
     std::string ret = path;
     std::size_t last = ret.find_last_of("\\/");
     std::size_t last = ret.find_last_of("\\/");
@@ -194,4 +195,6 @@ std::string DefaultIOSystem::absolutePath(std::string path)
     return ret;
     return ret;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
+
 #undef PATHLIMIT
 #undef PATHLIMIT

+ 3 - 3
Source/ThirdParty/Assimp/code/DefaultIOSystem.h

@@ -80,17 +80,17 @@ public:
     /** @brief get the file name of a full filepath
     /** @brief get the file name of a full filepath
      * example: /tmp/archive.tar.gz -> archive.tar.gz
      * example: /tmp/archive.tar.gz -> archive.tar.gz
      */
      */
-    static std::string fileName(std::string path);
+    static std::string fileName( const std::string &path );
 
 
     /** @brief get the complete base name of a full filepath
     /** @brief get the complete base name of a full filepath
      * example: /tmp/archive.tar.gz -> archive.tar
      * example: /tmp/archive.tar.gz -> archive.tar
      */
      */
-    static std::string completeBaseName(std::string path);
+    static std::string completeBaseName( const std::string &path);
 
 
     /** @brief get the path of a full filepath
     /** @brief get the path of a full filepath
      * example: /tmp/archive.tar.gz -> /tmp/
      * example: /tmp/archive.tar.gz -> /tmp/
      */
      */
-    static std::string absolutePath(std::string path);
+    static std::string absolutePath( const std::string &path);
 };
 };
 
 
 } //!ns Assimp
 } //!ns Assimp

+ 0 - 2
Source/ThirdParty/Assimp/code/FBXParser.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file  FBXParser.h
 /** @file  FBXParser.h
  *  @brief FBX parsing code
  *  @brief FBX parsing code
  */
  */

+ 1 - 1
Source/ThirdParty/Assimp/code/FBXProperties.h

@@ -87,7 +87,7 @@ class TypedProperty : public Property
 {
 {
 public:
 public:
 
 
-    TypedProperty(const T& value)
+    explicit TypedProperty(const T& value)
         : value(value)
         : value(value)
     {
     {
     }
     }

+ 0 - 3
Source/ThirdParty/Assimp/code/HMPFileData.h

@@ -37,9 +37,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
-
-// Modified by Lasse Oorni for Urho3D
-
 //!
 //!
 //! @file Data structures for the 3D Game Studio Heightmap format (HMP)
 //! @file Data structures for the 3D Game Studio Heightmap format (HMP)
 //!
 //!

+ 0 - 2
Source/ThirdParty/Assimp/code/Hash.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 #ifndef AI_HASH_H_INCLUDED
 #ifndef AI_HASH_H_INCLUDED
 #define AI_HASH_H_INCLUDED
 #define AI_HASH_H_INCLUDED
 
 

+ 1 - 1
Source/ThirdParty/Assimp/code/IFCBoolean.cpp

@@ -261,7 +261,7 @@ bool IntersectsBoundaryProfile(const IfcVector3& e0, const IfcVector3& e1, const
     for( size_t i = 0, bcount = boundary.size(); i < bcount; ++i ) {
     for( size_t i = 0, bcount = boundary.size(); i < bcount; ++i ) {
         IfcVector3 b01 = boundary[(i + 1) % bcount] - boundary[i];
         IfcVector3 b01 = boundary[(i + 1) % bcount] - boundary[i];
         IfcVector3 b12 = boundary[(i + 2) % bcount] - boundary[(i + 1) % bcount];
         IfcVector3 b12 = boundary[(i + 2) % bcount] - boundary[(i + 1) % bcount];
-        IfcVector3 b1_side = IfcVector3(b01.y, -b01.x, 0.0); // rotated 90° clockwise in Z plane
+        IfcVector3 b1_side = IfcVector3(b01.y, -b01.x, 0.0); // rotated 90� clockwise in Z plane
         // Warning: rough estimate only. A concave poly with lots of small segments each featuring a small counter rotation
         // Warning: rough estimate only. A concave poly with lots of small segments each featuring a small counter rotation
         // could fool the accumulation. Correct implementation would be sum( acos( b01 * b2) * sign( b12 * b1_side))
         // could fool the accumulation. Correct implementation would be sum( acos( b01 * b2) * sign( b12 * b1_side))
         windingOrder += (b1_side.x*b12.x + b1_side.y*b12.y);
         windingOrder += (b1_side.x*b12.x + b1_side.y*b12.y);

+ 2 - 2
Source/ThirdParty/Assimp/code/IFCOpenings.cpp

@@ -903,8 +903,8 @@ size_t CloseWindows(ContourVector& contours,
             curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
             curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
             curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size());
             curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size());
 
 
-            // compare base poly normal and contour normal to detect if we need to reverse the face winding
-            // Urho3D: modified to not use C++11
+            // compare base poly normal and contour normal to detect if we need to reverse the face winding 
+            // Urho3D: modified to not use C++11 
             IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal( &curmesh.verts[0], curmesh.vertcnt.front());
             IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal( &curmesh.verts[0], curmesh.vertcnt.front());
             std::vector<IfcVector3> worldSpaceContourVtx( it->contour.size());
             std::vector<IfcVector3> worldSpaceContourVtx( it->contour.size());
             for( size_t a = 0; a < it->contour.size(); ++a )
             for( size_t a = 0; a < it->contour.size(); ++a )

+ 2 - 2
Source/ThirdParty/Assimp/code/IRRLoader.h

@@ -113,7 +113,7 @@ private:
 
 
         } type;
         } type;
 
 
-        Animator(AT t = UNKNOWN)
+        explicit Animator(AT t = UNKNOWN)
             : type              (t)
             : type              (t)
             , speed             (0.001f)
             , speed             (0.001f)
             , direction         (0.f,1.f,0.f)
             , direction         (0.f,1.f,0.f)
@@ -163,7 +163,7 @@ private:
             ANIMMESH
             ANIMMESH
         } type;
         } type;
 
 
-        Node(ET t)
+        explicit Node(ET t)
             :   type                (t)
             :   type                (t)
             ,   scaling             (1.f,1.f,1.f) // assume uniform scaling by default
             ,   scaling             (1.f,1.f,1.f) // assume uniform scaling by default
             ,   parent()
             ,   parent()

+ 0 - 1
Source/ThirdParty/Assimp/code/IRRShared.h

@@ -1,5 +1,4 @@
 
 
-// Modified by Lasse Oorni for Urho3D
 
 
 /** @file  IRRShared.h
 /** @file  IRRShared.h
   * @brief Shared utilities for the IRR and IRRMESH loaders
   * @brief Shared utilities for the IRR and IRRMESH loaders

+ 1 - 1
Source/ThirdParty/Assimp/code/Importer.h

@@ -167,7 +167,7 @@ public:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Construct a batch loader from a given IO system to be used
     /** Construct a batch loader from a given IO system to be used
      *  to acess external files */
      *  to acess external files */
-    BatchLoader(IOSystem* pIO);
+    explicit BatchLoader(IOSystem* pIO);
     ~BatchLoader();
     ~BatchLoader();
 
 
 
 

+ 2 - 2
Source/ThirdParty/Assimp/code/LWOFileData.h

@@ -269,7 +269,7 @@ struct Face : public aiFace
     {}
     {}
 
 
     //! Construction from given type
     //! Construction from given type
-    Face(uint32_t _type)
+    explicit Face(uint32_t _type)
         : surfaceIndex  (0)
         : surfaceIndex  (0)
         , smoothGroup   (0)
         , smoothGroup   (0)
         , type          (_type)
         , type          (_type)
@@ -305,7 +305,7 @@ struct Face : public aiFace
  */
  */
 struct VMapEntry
 struct VMapEntry
 {
 {
-    VMapEntry(unsigned int _dims)
+    explicit VMapEntry(unsigned int _dims)
         :  dims(_dims)
         :  dims(_dims)
     {}
     {}
 
 

+ 0 - 2
Source/ThirdParty/Assimp/code/MD2FileData.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file  MD2FileData.h
 /** @file  MD2FileData.h
  *  @brief Defines helper data structures for importing MD2 files
  *  @brief Defines helper data structures for importing MD2 files
  *  http://linux.ucla.edu/~phaethon/q3/formats/md2-schoenblum.html
  *  http://linux.ucla.edu/~phaethon/q3/formats/md2-schoenblum.html

+ 0 - 2
Source/ThirdParty/Assimp/code/MD3FileData.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file Md3FileData.h
 /** @file Md3FileData.h
  *
  *
  *  @brief Defines helper data structures for importing MD3 files.
  *  @brief Defines helper data structures for importing MD3 files.

+ 0 - 6
Source/ThirdParty/Assimp/code/MD5Loader.cpp

@@ -285,9 +285,6 @@ void MD5Importer::AttachChilds_Mesh(int iParentID,aiNode* piParent, BoneList& bo
                 aiQuaternion quat;
                 aiQuaternion quat;
                 MD5::ConvertQuaternion ( bones[i].mRotationQuat, quat );
                 MD5::ConvertQuaternion ( bones[i].mRotationQuat, quat );
 
 
-                // FIX to get to Assimp's quaternion conventions
-                quat.w *= -1.f;
-
                 bones[i].mTransform = aiMatrix4x4 ( quat.GetMatrix());
                 bones[i].mTransform = aiMatrix4x4 ( quat.GetMatrix());
                 bones[i].mTransform.a4 = bones[i].mPositionXYZ.x;
                 bones[i].mTransform.a4 = bones[i].mPositionXYZ.x;
                 bones[i].mTransform.b4 = bones[i].mPositionXYZ.y;
                 bones[i].mTransform.b4 = bones[i].mPositionXYZ.y;
@@ -656,9 +653,6 @@ void MD5Importer::LoadMD5AnimFile ()
 
 
                     MD5::ConvertQuaternion(vTemp, qKey->mValue);
                     MD5::ConvertQuaternion(vTemp, qKey->mValue);
                     qKey->mTime = vKey->mTime = dTime;
                     qKey->mTime = vKey->mTime = dTime;
-
-                    // we need this to get to Assimp quaternion conventions
-                    qKey->mValue.w *= -1.f;
                 }
                 }
             }
             }
 
 

+ 6 - 4
Source/ThirdParty/Assimp/code/MD5Parser.h

@@ -38,7 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
 
 
 /** @file  MD5Parser.h
 /** @file  MD5Parser.h
  *  @brief Definition of the .MD5 parser class.
  *  @brief Definition of the .MD5 parser class.
@@ -268,6 +267,9 @@ inline void ConvertQuaternion (const aiVector3D& in, aiQuaternion& out) {
     if (t < 0.0f)
     if (t < 0.0f)
         out.w = 0.0f;
         out.w = 0.0f;
     else out.w = std::sqrt (t);
     else out.w = std::sqrt (t);
+
+    // Assimp convention.
+    out.w *= -1.f;
 }
 }
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -283,7 +285,7 @@ public:
      *
      *
      *  @param mSections List of file sections (output of MD5Parser)
      *  @param mSections List of file sections (output of MD5Parser)
      */
      */
-    MD5MeshParser(SectionList& mSections);
+    explicit MD5MeshParser(SectionList& mSections);
 
 
     //! List of all meshes
     //! List of all meshes
     MeshList mMeshes;
     MeshList mMeshes;
@@ -308,7 +310,7 @@ public:
      *
      *
      *  @param mSections List of file sections (output of MD5Parser)
      *  @param mSections List of file sections (output of MD5Parser)
      */
      */
-    MD5AnimParser(SectionList& mSections);
+    explicit MD5AnimParser(SectionList& mSections);
 
 
 
 
     //! Output frame rate
     //! Output frame rate
@@ -340,7 +342,7 @@ public:
      *
      *
      *  @param mSections List of file sections (output of MD5Parser)
      *  @param mSections List of file sections (output of MD5Parser)
      */
      */
-    MD5CameraParser(SectionList& mSections);
+    explicit MD5CameraParser(SectionList& mSections);
 
 
 
 
     //! Output frame rate
     //! Output frame rate

+ 0 - 2
Source/ThirdParty/Assimp/code/MDCFileData.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file Defines the helper data structures for importing MDC files
 /** @file Defines the helper data structures for importing MDC files
 
 
 **********************************************************************
 **********************************************************************

+ 0 - 1
Source/ThirdParty/Assimp/code/MDLFileData.h

@@ -38,7 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
 
 
 /**
 /**
  * @file  MDLFileData.h
  * @file  MDLFileData.h

+ 0 - 2
Source/ThirdParty/Assimp/code/MaterialSystem.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file MaterialSystem.h
 /** @file MaterialSystem.h
  *  Now that #MaterialHelper is gone, this file only contains some
  *  Now that #MaterialHelper is gone, this file only contains some
  *  internal material utility functions.
  *  internal material utility functions.

+ 0 - 2
Source/ThirdParty/Assimp/code/MemoryIOWrapper.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file MemoryIOWrapper.h
 /** @file MemoryIOWrapper.h
  *  Handy IOStream/IOSystem implemetation to read directly from a memory buffer */
  *  Handy IOStream/IOSystem implemetation to read directly from a memory buffer */
 #ifndef AI_MEMORYIOSTREAM_H_INC
 #ifndef AI_MEMORYIOSTREAM_H_INC

+ 0 - 2
Source/ThirdParty/Assimp/code/NDOLoader.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file NDOLoader.h
 /** @file NDOLoader.h
  *  Declaration of the Nendo importer class.
  *  Declaration of the Nendo importer class.
  */
  */

+ 29 - 11
Source/ThirdParty/Assimp/code/OFFLoader.cpp

@@ -138,9 +138,15 @@ void OFFImporter::InternReadFile( const std::string& pFile,
         throw DeadlyImportError("OFF: There are no valid faces");
         throw DeadlyImportError("OFF: There are no valid faces");
     }
     }
 
 
-    pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes = 1 ];
-    aiMesh* mesh = pScene->mMeshes[0] = new aiMesh();
-    aiFace* faces = mesh->mFaces = new aiFace [mesh->mNumFaces = numFaces];
+    pScene->mNumMeshes = 1;
+    pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ];
+
+    aiMesh* mesh = new aiMesh();
+    pScene->mMeshes[0] = mesh;
+
+    mesh->mNumFaces = numFaces;
+    aiFace* faces = new aiFace [mesh->mNumFaces];
+    mesh->mFaces = faces;
 
 
     std::vector<aiVector3D> tempPositions(numVertices);
     std::vector<aiVector3D> tempPositions(numVertices);
 
 
@@ -171,7 +177,8 @@ void OFFImporter::InternReadFile( const std::string& pFile,
             break;
             break;
         }
         }
         sz = line;SkipSpaces(&sz);
         sz = line;SkipSpaces(&sz);
-        if(!(faces->mNumIndices = strtoul10(sz,&sz)) || faces->mNumIndices > 9)
+        faces->mNumIndices = strtoul10(sz,&sz);
+        if(!(faces->mNumIndices) || faces->mNumIndices > 9)
         {
         {
             DefaultLogger::get()->error("OFF: Faces with zero indices aren't allowed");
             DefaultLogger::get()->error("OFF: Faces with zero indices aren't allowed");
             --mesh->mNumFaces;
             --mesh->mNumFaces;
@@ -185,43 +192,54 @@ void OFFImporter::InternReadFile( const std::string& pFile,
         throw DeadlyImportError("OFF: There are no valid faces");
         throw DeadlyImportError("OFF: There are no valid faces");
 
 
     // allocate storage for the output vertices
     // allocate storage for the output vertices
-    aiVector3D* verts = mesh->mVertices = new aiVector3D[mesh->mNumVertices];
+    std::vector<aiVector3D> verts;
+    verts.reserve(mesh->mNumVertices);
 
 
     // second: now parse all face indices
     // second: now parse all face indices
-    buffer = old;faces = mesh->mFaces;
+    buffer = old;
+    faces = mesh->mFaces;
     for (unsigned int i = 0, p = 0; i< mesh->mNumFaces;)
     for (unsigned int i = 0, p = 0; i< mesh->mNumFaces;)
     {
     {
         if(!GetNextLine(buffer,line))break;
         if(!GetNextLine(buffer,line))break;
 
 
         unsigned int idx;
         unsigned int idx;
         sz = line;SkipSpaces(&sz);
         sz = line;SkipSpaces(&sz);
-        if(!(idx = strtoul10(sz,&sz)) || idx > 9)
+        idx = strtoul10(sz,&sz);
+        if(!(idx) || idx > 9)
             continue;
             continue;
 
 
         faces->mIndices = new unsigned int [faces->mNumIndices];
         faces->mIndices = new unsigned int [faces->mNumIndices];
         for (unsigned int m = 0; m < faces->mNumIndices;++m)
         for (unsigned int m = 0; m < faces->mNumIndices;++m)
         {
         {
             SkipSpaces(&sz);
             SkipSpaces(&sz);
-            if ((idx = strtoul10(sz,&sz)) >= numVertices)
+            idx = strtoul10(sz,&sz);
+            if ((idx) >= numVertices)
             {
             {
                 DefaultLogger::get()->error("OFF: Vertex index is out of range");
                 DefaultLogger::get()->error("OFF: Vertex index is out of range");
                 idx = numVertices-1;
                 idx = numVertices-1;
             }
             }
             faces->mIndices[m] = p++;
             faces->mIndices[m] = p++;
-            *verts++ = tempPositions[idx];
+            verts.push_back(tempPositions[idx]);
         }
         }
         ++i;
         ++i;
         ++faces;
         ++faces;
     }
     }
 
 
+    if (mesh->mNumVertices != verts.size()) {
+        throw DeadlyImportError("OFF: Vertex count mismatch");
+    }
+    mesh->mVertices = new aiVector3D[verts.size()];
+    memcpy(mesh->mVertices, &verts[0], verts.size() * sizeof(aiVector3D));
     // generate the output node graph
     // generate the output node graph
     pScene->mRootNode = new aiNode();
     pScene->mRootNode = new aiNode();
     pScene->mRootNode->mName.Set("<OFFRoot>");
     pScene->mRootNode->mName.Set("<OFFRoot>");
-    pScene->mRootNode->mMeshes = new unsigned int [pScene->mRootNode->mNumMeshes = 1];
+    pScene->mRootNode->mNumMeshes = 1;
+    pScene->mRootNode->mMeshes = new unsigned int [pScene->mRootNode->mNumMeshes];
     pScene->mRootNode->mMeshes[0] = 0;
     pScene->mRootNode->mMeshes[0] = 0;
 
 
     // generate a default material
     // generate a default material
-    pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials = 1];
+    pScene->mNumMaterials = 1;
+    pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
     aiMaterial* pcMat = new aiMaterial();
     aiMaterial* pcMat = new aiMaterial();
 
 
     aiColor4D clr(0.6f,0.6f,0.6f,1.0f);
     aiColor4D clr(0.6f,0.6f,0.6f,1.0f);

+ 9 - 1
Source/ThirdParty/Assimp/code/ObjFileData.h

@@ -156,6 +156,7 @@ struct Material
     aiString textureEmissive;
     aiString textureEmissive;
     aiString textureBump;
     aiString textureBump;
     aiString textureNormal;
     aiString textureNormal;
+    aiString textureReflection[6];
     aiString textureSpecularity;
     aiString textureSpecularity;
     aiString textureOpacity;
     aiString textureOpacity;
     aiString textureDisp;
     aiString textureDisp;
@@ -167,6 +168,13 @@ struct Material
         TextureEmissiveType,
         TextureEmissiveType,
         TextureBumpType,
         TextureBumpType,
         TextureNormalType,
         TextureNormalType,
+        TextureReflectionSphereType,
+        TextureReflectionCubeTopType,
+        TextureReflectionCubeBottomType,
+        TextureReflectionCubeFrontType,
+        TextureReflectionCubeBackType,
+        TextureReflectionCubeLeftType,
+        TextureReflectionCubeRightType,
         TextureSpecularityType,
         TextureSpecularityType,
         TextureOpacityType,
         TextureOpacityType,
         TextureDispType,
         TextureDispType,
@@ -234,7 +242,7 @@ struct Mesh {
     bool m_hasNormals;
     bool m_hasNormals;
 
 
     /// Constructor
     /// Constructor
-    Mesh( const std::string &name ) 
+    explicit Mesh( const std::string &name ) 
     : m_name( name )
     : m_name( name )
     , m_pMaterial(NULL)
     , m_pMaterial(NULL)
     , m_uiNumIndices(0)
     , m_uiNumIndices(0)

+ 17 - 1
Source/ThirdParty/Assimp/code/ObjFileImporter.cpp

@@ -138,7 +138,7 @@ void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
     if ( pos != std::string::npos ) {
     if ( pos != std::string::npos ) {
         modelName = pFile.substr(pos+1, pFile.size() - pos - 1);
         modelName = pFile.substr(pos+1, pFile.size() - pos - 1);
         folderName = pFile.substr( 0, pos );
         folderName = pFile.substr( 0, pos );
-        if ( folderName.empty() ) {
+        if ( !folderName.empty() ) {
             pIOHandler->PushDirectory( folderName );
             pIOHandler->PushDirectory( folderName );
         }
         }
     } else {
     } else {
@@ -636,6 +636,22 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
             }
             }
         }
         }
 
 
+        if( 0 != pCurrentMaterial->textureReflection[0].length )
+        {
+            ObjFile::Material::TextureType type = 0 != pCurrentMaterial->textureReflection[1].length ?
+                ObjFile::Material::TextureReflectionCubeTopType :
+                ObjFile::Material::TextureReflectionSphereType;
+
+            unsigned count = type == ObjFile::Material::TextureReflectionSphereType ? 1 : 6;
+            for( unsigned i = 0; i < count; i++ )
+                mat->AddProperty(&pCurrentMaterial->textureReflection[i], AI_MATKEY_TEXTURE_REFLECTION(i));
+
+            if(pCurrentMaterial->clamp[type])
+                //TODO addTextureMappingModeProperty should accept an index to handle clamp option for each
+                //texture of a cubemap
+                addTextureMappingModeProperty(mat, aiTextureType_REFLECTION);
+        }
+
         if ( 0 != pCurrentMaterial->textureDisp.length )
         if ( 0 != pCurrentMaterial->textureDisp.length )
         {
         {
             mat->AddProperty( &pCurrentMaterial->textureDisp, AI_MATKEY_TEXTURE_DISPLACEMENT(0) );
             mat->AddProperty( &pCurrentMaterial->textureDisp, AI_MATKEY_TEXTURE_DISPLACEMENT(0) );

+ 52 - 5
Source/ThirdParty/Assimp/code/ObjFileMtlImporter.cpp

@@ -64,6 +64,7 @@ static const std::string BumpTexture1        = "map_bump";
 static const std::string BumpTexture2        = "map_Bump";
 static const std::string BumpTexture2        = "map_Bump";
 static const std::string BumpTexture3        = "bump";
 static const std::string BumpTexture3        = "bump";
 static const std::string NormalTexture       = "map_Kn";
 static const std::string NormalTexture       = "map_Kn";
+static const std::string ReflectionTexture   = "refl";
 static const std::string DisplacementTexture = "disp";
 static const std::string DisplacementTexture = "disp";
 static const std::string SpecularityTexture  = "map_ns";
 static const std::string SpecularityTexture  = "map_ns";
 
 
@@ -200,6 +201,7 @@ void ObjFileMtlImporter::load()
 
 
         case 'm':   // Texture
         case 'm':   // Texture
         case 'b':   // quick'n'dirty - for 'bump' sections
         case 'b':   // quick'n'dirty - for 'bump' sections
+        case 'r':   // quick'n'dirty - for 'refl' sections
             {
             {
                 getTexture();
                 getTexture();
                 m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
                 m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
@@ -332,6 +334,9 @@ void ObjFileMtlImporter::getTexture() {
         // Normal map
         // Normal map
         out = & m_pModel->m_pCurrentMaterial->textureNormal;
         out = & m_pModel->m_pCurrentMaterial->textureNormal;
         clampIndex = ObjFile::Material::TextureNormalType;
         clampIndex = ObjFile::Material::TextureNormalType;
+    } else if(!ASSIMP_strincmp( pPtr, ReflectionTexture.c_str(), ReflectionTexture.size() ) ) {
+        // Reflection texture(s)
+        //Do nothing here
     } else if (!ASSIMP_strincmp( pPtr, DisplacementTexture.c_str(), DisplacementTexture.size() ) ) {
     } else if (!ASSIMP_strincmp( pPtr, DisplacementTexture.c_str(), DisplacementTexture.size() ) ) {
         // Displacement texture
         // Displacement texture
         out = &m_pModel->m_pCurrentMaterial->textureDisp;
         out = &m_pModel->m_pCurrentMaterial->textureDisp;
@@ -346,7 +351,7 @@ void ObjFileMtlImporter::getTexture() {
     }
     }
 
 
     bool clamp = false;
     bool clamp = false;
-    getTextureOption(clamp);
+    getTextureOption(clamp, clampIndex, out);
     m_pModel->m_pCurrentMaterial->clamp[clampIndex] = clamp;
     m_pModel->m_pCurrentMaterial->clamp[clampIndex] = clamp;
 
 
     std::string texture;
     std::string texture;
@@ -369,7 +374,7 @@ void ObjFileMtlImporter::getTexture() {
  * Because aiMaterial supports clamp option, so we also want to return it
  * Because aiMaterial supports clamp option, so we also want to return it
  * /////////////////////////////////////////////////////////////////////////////
  * /////////////////////////////////////////////////////////////////////////////
  */
  */
-void ObjFileMtlImporter::getTextureOption(bool &clamp)
+void ObjFileMtlImporter::getTextureOption(bool &clamp, int &clampIndex, aiString *&out)
 {
 {
     m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
     m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
 
 
@@ -392,13 +397,55 @@ void ObjFileMtlImporter::getTextureOption(bool &clamp)
 
 
             skipToken = 2;
             skipToken = 2;
         }
         }
-        else if (  !ASSIMP_strincmp(pPtr, BlendUOption.c_str(), BlendUOption.size())
+        else if( !ASSIMP_strincmp( pPtr, TypeOption.c_str(), TypeOption.size() ) )
+        {
+            DataArrayIt it = getNextToken<DataArrayIt>( m_DataIt, m_DataItEnd );
+            char value[ 12 ];
+            CopyNextWord( it, m_DataItEnd, value, sizeof( value ) / sizeof( *value ) );
+            if( !ASSIMP_strincmp( value, "cube_top", 8 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionCubeTopType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[0];
+            }
+            else if( !ASSIMP_strincmp( value, "cube_bottom", 11 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionCubeBottomType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[1];
+            }
+            else if( !ASSIMP_strincmp( value, "cube_front", 10 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionCubeFrontType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[2];
+            }
+            else if( !ASSIMP_strincmp( value, "cube_back", 9 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionCubeBackType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[3];
+            }
+            else if( !ASSIMP_strincmp( value, "cube_left", 9 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionCubeLeftType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[4];
+            }
+            else if( !ASSIMP_strincmp( value, "cube_right", 10 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionCubeRightType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[5];
+            }
+            else if( !ASSIMP_strincmp( value, "sphere", 6 ) )
+            {
+                clampIndex = ObjFile::Material::TextureReflectionSphereType;
+                out = &m_pModel->m_pCurrentMaterial->textureReflection[0];
+            }
+
+            skipToken = 2;
+        }
+        else if (!ASSIMP_strincmp(pPtr, BlendUOption.c_str(), BlendUOption.size())
                 || !ASSIMP_strincmp(pPtr, BlendVOption.c_str(), BlendVOption.size())
                 || !ASSIMP_strincmp(pPtr, BlendVOption.c_str(), BlendVOption.size())
                 || !ASSIMP_strincmp(pPtr, BoostOption.c_str(), BoostOption.size())
                 || !ASSIMP_strincmp(pPtr, BoostOption.c_str(), BoostOption.size())
                 || !ASSIMP_strincmp(pPtr, ResolutionOption.c_str(), ResolutionOption.size())
                 || !ASSIMP_strincmp(pPtr, ResolutionOption.c_str(), ResolutionOption.size())
                 || !ASSIMP_strincmp(pPtr, BumpOption.c_str(), BumpOption.size())
                 || !ASSIMP_strincmp(pPtr, BumpOption.c_str(), BumpOption.size())
-                || !ASSIMP_strincmp(pPtr, ChannelOption.c_str(), ChannelOption.size())
-                || !ASSIMP_strincmp(pPtr, TypeOption.c_str(), TypeOption.size()) )
+                || !ASSIMP_strincmp(pPtr, ChannelOption.c_str(), ChannelOption.size()))
         {
         {
             skipToken = 2;
             skipToken = 2;
         }
         }

+ 2 - 1
Source/ThirdParty/Assimp/code/ObjFileMtlImporter.h

@@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <string>
 #include <string>
 
 
 struct aiColor3D;
 struct aiColor3D;
+struct aiString;
 
 
 namespace Assimp {
 namespace Assimp {
 
 
@@ -89,7 +90,7 @@ private:
     void createMaterial();
     void createMaterial();
     /// Get texture name from loaded data.
     /// Get texture name from loaded data.
     void getTexture();
     void getTexture();
-    void getTextureOption(bool &clamp);
+    void getTextureOption(bool &clamp, int &clampIndex, aiString *&out);
 
 
 private:
 private:
     //! Absolute pathname
     //! Absolute pathname

+ 5 - 2
Source/ThirdParty/Assimp/code/ObjFileParser.cpp

@@ -414,7 +414,7 @@ void ObjFileParser::getFace(aiPrimitiveType type)
 
 
     if ( pIndices->empty() ) {
     if ( pIndices->empty() ) {
         DefaultLogger::get()->error("Obj: Ignoring empty face");
         DefaultLogger::get()->error("Obj: Ignoring empty face");
-        // skip line and clean up 
+        // skip line and clean up
         m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
         m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
         delete pNormalID;
         delete pNormalID;
         delete pTexID;
         delete pTexID;
@@ -539,7 +539,10 @@ void ObjFileParser::getMaterialLib()
     const std::string strMatName(pStart, &(*m_DataIt));
     const std::string strMatName(pStart, &(*m_DataIt));
     std::string absName;
     std::string absName;
     if ( m_pIO->StackSize() > 0 ) {
     if ( m_pIO->StackSize() > 0 ) {
-        const std::string &path = m_pIO->CurrentDirectory();
+        std::string path = m_pIO->CurrentDirectory();
+        if ( '/' != *path.rbegin() ) {
+          path += '/';
+        }
         absName = path + strMatName;
         absName = path + strMatName;
     } else {
     } else {
         absName = strMatName;
         absName = strMatName;

+ 0 - 2
Source/ThirdParty/Assimp/code/OgreParsingUtils.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 #ifndef AI_OGREPARSINGUTILS_H_INC
 #ifndef AI_OGREPARSINGUTILS_H_INC
 #define AI_OGREPARSINGUTILS_H_INC
 #define AI_OGREPARSINGUTILS_H_INC
 
 

+ 2 - 2
Source/ThirdParty/Assimp/code/OgreStructs.h

@@ -381,8 +381,8 @@ typedef std::vector<VertexAnimationTrack> VertexAnimationTrackList;
 class Animation
 class Animation
 {
 {
 public:
 public:
-    Animation(Skeleton *parent);
-    Animation(Mesh *parent);
+    explicit Animation(Skeleton *parent);
+    explicit Animation(Mesh *parent);
 
 
     /// Returns the associated vertex data for a track in this animation.
     /// Returns the associated vertex data for a track in this animation.
     /** @note Only valid to call when parent Mesh is set. */
     /** @note Only valid to call when parent Mesh is set. */

+ 1 - 1
Source/ThirdParty/Assimp/code/OgreXmlSerializer.h

@@ -69,7 +69,7 @@ public:
     static bool ImportSkeleton(Assimp::IOSystem *pIOHandler, Mesh *mesh);
     static bool ImportSkeleton(Assimp::IOSystem *pIOHandler, Mesh *mesh);
 
 
 private:
 private:
-    OgreXmlSerializer(XmlReader *reader) :
+    explicit OgreXmlSerializer(XmlReader *reader) :
         m_reader(reader)
         m_reader(reader)
     {
     {
     }
     }

+ 1 - 1
Source/ThirdParty/Assimp/code/PlyParser.cpp

@@ -857,7 +857,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
 
 
     case EDT_UShort:
     case EDT_UShort:
         {
         {
-        int16_t i = *((uint16_t*)pCur);
+        uint16_t i = *((uint16_t*)pCur);
 
 
         // Swap endianess
         // Swap endianess
         if (p_bBE)ByteSwap::Swap(&i);
         if (p_bBE)ByteSwap::Swap(&i);

+ 1 - 1
Source/ThirdParty/Assimp/code/Q3BSPFileImporter.cpp

@@ -325,7 +325,7 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p
         matIdx++;
         matIdx++;
     }
     }
 
 
-    pScene->mNumMeshes = MeshArray.size();
+    pScene->mNumMeshes = static_cast<unsigned int>( MeshArray.size() );
     if ( pScene->mNumMeshes > 0 )
     if ( pScene->mNumMeshes > 0 )
     {
     {
         pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ];
         pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ];

+ 1 - 1
Source/ThirdParty/Assimp/code/Q3BSPZipArchive.h

@@ -90,7 +90,7 @@ class ZipFile : public IOStream {
 
 
     public:
     public:
 
 
-        ZipFile(size_t size);
+        explicit ZipFile(size_t size);
 
 
         ~ZipFile();
         ~ZipFile();
 
 

+ 1 - 3
Source/ThirdParty/Assimp/code/Q3DLoader.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file  Q3DLoader.h
 /** @file  Q3DLoader.h
  *  @brief Declaration of the Q3D importer class.
  *  @brief Declaration of the Q3D importer class.
  */
  */
@@ -110,7 +108,7 @@ private:
 
 
     struct Face
     struct Face
     {
     {
-        Face(unsigned int s)
+        explicit Face(unsigned int s)
             :   indices   (s)
             :   indices   (s)
             ,   uvindices (s)
             ,   uvindices (s)
             ,   mat       (0)
             ,   mat       (0)

+ 2 - 2
Source/ThirdParty/Assimp/code/RawLoader.h

@@ -88,7 +88,7 @@ private:
 
 
     struct MeshInformation
     struct MeshInformation
     {
     {
-        MeshInformation(const std::string& _name)
+        explicit MeshInformation(const std::string& _name)
             : name(_name)
             : name(_name)
         {
         {
             vertices.reserve(100);
             vertices.reserve(100);
@@ -103,7 +103,7 @@ private:
 
 
     struct GroupInformation
     struct GroupInformation
     {
     {
-        GroupInformation(const std::string& _name)
+        explicit GroupInformation(const std::string& _name)
             : name(_name)
             : name(_name)
         {
         {
             meshes.reserve(10);
             meshes.reserve(10);

+ 1 - 3
Source/ThirdParty/Assimp/code/SGSpatialSort.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** Small helper classes to optimise finding vertizes close to a given location
 /** Small helper classes to optimise finding vertizes close to a given location
  */
  */
 #ifndef AI_D3DSSPATIALSORT_H_INC
 #ifndef AI_D3DSSPATIALSORT_H_INC
@@ -73,7 +71,7 @@ public:
     /** Construction from a given face array, handling smoothing groups
     /** Construction from a given face array, handling smoothing groups
      *  properly
      *  properly
      */
      */
-    SGSpatialSort(const std::vector<aiVector3D>& vPositions);
+    explicit SGSpatialSort(const std::vector<aiVector3D>& vPositions);
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Add a vertex to the spatial sort
     /** Add a vertex to the spatial sort

+ 2 - 2
Source/ThirdParty/Assimp/code/STLLoader.cpp

@@ -74,7 +74,7 @@ static const aiImporterDesc desc = {
 // 1) 80 byte header
 // 1) 80 byte header
 // 2) 4 byte face count
 // 2) 4 byte face count
 // 3) 50 bytes per face
 // 3) 50 bytes per face
-bool IsBinarySTL(const char* buffer, unsigned int fileSize) {
+static bool IsBinarySTL(const char* buffer, unsigned int fileSize) {
     if( fileSize < 84 ) {
     if( fileSize < 84 ) {
         return false;
         return false;
     }
     }
@@ -88,7 +88,7 @@ bool IsBinarySTL(const char* buffer, unsigned int fileSize) {
 // An ascii STL buffer will begin with "solid NAME", where NAME is optional.
 // An ascii STL buffer will begin with "solid NAME", where NAME is optional.
 // Note: The "solid NAME" check is necessary, but not sufficient, to determine
 // Note: The "solid NAME" check is necessary, but not sufficient, to determine
 // if the buffer is ASCII; a binary header could also begin with "solid NAME".
 // if the buffer is ASCII; a binary header could also begin with "solid NAME".
-bool IsAsciiSTL(const char* buffer, unsigned int fileSize) {
+static bool IsAsciiSTL(const char* buffer, unsigned int fileSize) {
     if (IsBinarySTL(buffer, fileSize))
     if (IsBinarySTL(buffer, fileSize))
         return false;
         return false;
 
 

+ 2 - 3
Source/ThirdParty/Assimp/code/SceneCombiner.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file Declares a helper class, "SceneCombiner" providing various
 /** @file Declares a helper class, "SceneCombiner" providing various
  *  utilities to merge scenes.
  *  utilities to merge scenes.
  */
  */
@@ -58,6 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #else
 #else
 #include "../include/assimp/Compiler/pstdint.h"
 #include "../include/assimp/Compiler/pstdint.h"
 #endif
 #endif
+//#include "../include/assimp/Compiler/pstdint.h"
 
 
 #include <vector>
 #include <vector>
 
 
@@ -172,7 +171,7 @@ struct SceneHelper
         id[0] = 0;
         id[0] = 0;
     }
     }
 
 
-    SceneHelper (aiScene* _scene)
+    explicit SceneHelper (aiScene* _scene)
         : scene     (_scene)
         : scene     (_scene)
         , idlen     (0)
         , idlen     (0)
     {
     {

+ 0 - 2
Source/ThirdParty/Assimp/code/SmoothingGroups.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file Defines the helper data structures for importing 3DS files.
 /** @file Defines the helper data structures for importing 3DS files.
 http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */
 http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */
 
 

+ 1 - 1
Source/ThirdParty/Assimp/code/StdOStreamLogStream.h

@@ -16,7 +16,7 @@ public:
     /** @brief  Construction from an existing std::ostream
     /** @brief  Construction from an existing std::ostream
      *  @param _ostream Output stream to be used
      *  @param _ostream Output stream to be used
     */
     */
-    StdOStreamLogStream(std::ostream& _ostream);
+    explicit StdOStreamLogStream(std::ostream& _ostream);
 
 
     /** @brief  Destructor  */
     /** @brief  Destructor  */
     ~StdOStreamLogStream();
     ~StdOStreamLogStream();

+ 0 - 2
Source/ThirdParty/Assimp/code/StringComparison.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file Definition of platform independent string workers:
 /** @file Definition of platform independent string workers:
 
 
    ASSIMP_itoa10
    ASSIMP_itoa10

+ 1 - 1
Source/ThirdParty/Assimp/code/TinyFormatter.h

@@ -97,7 +97,7 @@ public:
     // being bound to const ref& function parameters. Copying streams is not permitted, though.
     // being bound to const ref& function parameters. Copying streams is not permitted, though.
     // This workaround avoids this by manually specifying a copy ctor.
     // This workaround avoids this by manually specifying a copy ctor.
 #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
 #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-    basic_formatter(const basic_formatter& other) {
+    explicit basic_formatter(const basic_formatter& other) {
         underlying << (string)other;
         underlying << (string)other;
     }
     }
 #endif
 #endif

+ 1 - 3
Source/ThirdParty/Assimp/code/UnrealLoader.h

@@ -38,8 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file  UnrealLoader.h
 /** @file  UnrealLoader.h
  *  @brief Declaration of the .3d (UNREAL) importer class.
  *  @brief Declaration of the .3d (UNREAL) importer class.
  */
  */
@@ -94,7 +92,7 @@ struct TempMat  {
         ,   numFaces    (0)
         ,   numFaces    (0)
     {}
     {}
 
 
-    TempMat(const Triangle& in)
+    explicit TempMat(const Triangle& in)
         :   type        ((Unreal::MeshFlags)in.mType)
         :   type        ((Unreal::MeshFlags)in.mType)
         ,   tex         (in.mTextureNum)
         ,   tex         (in.mTextureNum)
         ,   numFaces    (0)
         ,   numFaces    (0)

+ 1 - 1
Source/ThirdParty/Assimp/code/Version.cpp

@@ -6,7 +6,7 @@
 #include "ScenePrivate.h"
 #include "ScenePrivate.h"
 
 
 static const unsigned int MajorVersion = 3;
 static const unsigned int MajorVersion = 3;
-static const unsigned int MinorVersion = 1;
+static const unsigned int MinorVersion = 2;
 
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 // Legal information string - dont't remove this.
 // Legal information string - dont't remove this.

+ 2 - 3
Source/ThirdParty/Assimp/code/XFileHelper.h

@@ -38,7 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
 
 
 /** @file Defines the helper data structures for importing XFiles */
 /** @file Defines the helper data structures for importing XFiles */
 #ifndef AI_XFILEHELPER_H_INC
 #ifndef AI_XFILEHELPER_H_INC
@@ -135,7 +134,7 @@ struct Mesh
 
 
     std::vector<Bone> mBones;
     std::vector<Bone> mBones;
 
 
-    Mesh(const std::string &pName = "") { mName = pName; mNumTextures = 0; mNumColorSets = 0; }
+    explicit Mesh(const std::string &pName = "") { mName = pName; mNumTextures = 0; mNumColorSets = 0; }
 };
 };
 
 
 /** Helper structure to represent a XFile frame */
 /** Helper structure to represent a XFile frame */
@@ -148,7 +147,7 @@ struct Node
     std::vector<Mesh*> mMeshes;
     std::vector<Mesh*> mMeshes;
 
 
     Node() { mParent = NULL; }
     Node() { mParent = NULL; }
-    Node( Node* pParent) { mParent = pParent; }
+    explicit Node( Node* pParent) { mParent = pParent; }
     ~Node()
     ~Node()
     {
     {
         for( unsigned int a = 0; a < mChildren.size(); a++)
         for( unsigned int a = 0; a < mChildren.size(); a++)

+ 1 - 1
Source/ThirdParty/Assimp/code/XFileParser.h

@@ -68,7 +68,7 @@ public:
     /** Constructor. Creates a data structure out of the XFile given in the memory block.
     /** Constructor. Creates a data structure out of the XFile given in the memory block.
      * @param pBuffer Null-terminated memory buffer containing the XFile
      * @param pBuffer Null-terminated memory buffer containing the XFile
      */
      */
-    XFileParser( const std::vector<char>& pBuffer);
+    explicit XFileParser( const std::vector<char>& pBuffer);
 
 
     /** Destructor. Destroys all imported data along with it */
     /** Destructor. Destroys all imported data along with it */
     ~XFileParser();
     ~XFileParser();

+ 0 - 1
Source/ThirdParty/Assimp/code/fast_atof.h

@@ -26,7 +26,6 @@
 #else
 #else
 #include "../include/assimp/Compiler/pstdint.h"
 #include "../include/assimp/Compiler/pstdint.h"
 #endif
 #endif
-
 #include <stdexcept>
 #include <stdexcept>
 
 
 #include "StringComparison.h"
 #include "StringComparison.h"

+ 1 - 1
Source/ThirdParty/Assimp/code/irrXMLWrapper.h

@@ -76,7 +76,7 @@ public:
 
 
     // ----------------------------------------------------------------------------------
     // ----------------------------------------------------------------------------------
     //! Construction from an existing IOStream
     //! Construction from an existing IOStream
-    CIrrXML_IOStreamReader(IOStream* _stream)
+    explicit CIrrXML_IOStreamReader(IOStream* _stream)
         : stream (_stream)
         : stream (_stream)
         , t (0)
         , t (0)
     {
     {

+ 0 - 2
Source/ThirdParty/Assimp/code/qnan.h

@@ -39,8 +39,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /**  @file  qnan.h
 /**  @file  qnan.h
  *   @brief Some utilities for our dealings with qnans.
  *   @brief Some utilities for our dealings with qnans.
  *
  *

+ 6 - 6
Source/ThirdParty/Assimp/contrib/openddlparser/code/DDLNode.cpp

@@ -49,11 +49,7 @@ static void releaseReferencedNames( Reference *ref ) {
         return;
         return;
     }
     }
 
 
-    if( ref->m_referencedName ) {
-        for( size_t i = 0; i < ref->m_numRefs; i++ ) {
-            delete ref->m_referencedName;
-        }
-    }
+    delete ref;
 }
 }
 
 
 DDLNode::DDLNode( const std::string &type, const std::string &name, size_t idx, DDLNode *parent )
 DDLNode::DDLNode( const std::string &type, const std::string &name, size_t idx, DDLNode *parent )
@@ -121,7 +117,6 @@ const std::string &DDLNode::getType() const {
     return m_type;
     return m_type;
 }
 }
 
 
-
 void DDLNode::setName( const std::string &name ) {
 void DDLNode::setName( const std::string &name ) {
     m_name = name;
     m_name = name;
 }
 }
@@ -143,6 +138,10 @@ bool DDLNode::hasProperty( const std::string &name ) {
     return ( ddl_nullptr != prop );
     return ( ddl_nullptr != prop );
 }
 }
 
 
+bool DDLNode::hasProperties() const {
+    return( ddl_nullptr != m_properties );
+}
+
 Property *DDLNode::findPropertyByName( const std::string &name ) {
 Property *DDLNode::findPropertyByName( const std::string &name ) {
     if( name.empty() ) {
     if( name.empty() ) {
         return ddl_nullptr;
         return ddl_nullptr;
@@ -151,6 +150,7 @@ Property *DDLNode::findPropertyByName( const std::string &name ) {
     if( ddl_nullptr == m_properties ) {
     if( ddl_nullptr == m_properties ) {
         return ddl_nullptr;
         return ddl_nullptr;
     }
     }
+
     Property *current( m_properties );
     Property *current( m_properties );
     while( ddl_nullptr != current ) {
     while( ddl_nullptr != current ) {
         int res = strncmp( current->m_key->m_text.m_buffer, name.c_str(), name.size() );
         int res = strncmp( current->m_key->m_text.m_buffer, name.c_str(), name.size() );

+ 168 - 0
Source/ThirdParty/Assimp/contrib/openddlparser/code/OpenDDLCommon.cpp

@@ -0,0 +1,168 @@
+/*-----------------------------------------------------------------------------------------------
+The MIT License (MIT)
+
+Copyright (c) 2014-2015 Kim Kulling
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-----------------------------------------------------------------------------------------------*/
+#include <openddlparser/OpenDDLCommon.h>
+#include <openddlparser/DDLNode.h>
+
+BEGIN_ODDLPARSER_NS
+
+Text::Text( const char *buffer, size_t numChars )
+: m_capacity( 0 )
+, m_len( 0 )
+, m_buffer( ddl_nullptr ) {
+    set( buffer, numChars );
+}
+
+Text::~Text() {
+    clear();
+}
+
+void Text::clear() {
+    delete[] m_buffer;
+    m_buffer = ddl_nullptr;
+    m_capacity = 0;
+    m_len = 0;
+}
+
+void Text::set( const char *buffer, size_t numChars ) {
+    clear();
+    if( numChars > 0 ) {
+        m_len = numChars;
+        m_capacity = m_len + 1;
+        m_buffer = new char[ m_capacity ];
+        strncpy( m_buffer, buffer, numChars );
+        m_buffer[ numChars ] = '\0';
+    }
+}
+
+bool Text::operator == ( const std::string &name ) const {
+    if( m_len != name.size() ) {
+        return false;
+    }
+    const int res( strncmp( m_buffer, name.c_str(), name.size() ) );
+
+    return ( 0 == res );
+}
+
+bool Text::operator == ( const Text &rhs ) const {
+    if( m_len != rhs.m_len ) {
+        return false;
+    }
+
+    const int res( strncmp( m_buffer, rhs.m_buffer, m_len ) );
+
+    return ( 0 == res );
+}
+
+Identifier::Identifier( const char buffer[], size_t len )
+: m_text( buffer, len ) {
+    // empty
+}
+
+Identifier::Identifier( const char buffer[] )
+: m_text( buffer, strlen( buffer ) ) {
+    // empty
+}
+
+Identifier::~Identifier() {
+    // empty
+}
+
+bool Identifier::operator == ( const Identifier &rhs ) const {
+    return m_text == rhs.m_text;
+}
+
+Name::Name( NameType type, Identifier *id )
+: m_type( type )
+, m_id( id ) {
+    // empty
+}
+
+Name::~Name() {
+    m_id = ddl_nullptr;
+}
+
+Reference::Reference()
+: m_numRefs( 0 )
+, m_referencedName( ddl_nullptr ) {
+    // empty
+}
+
+Reference::Reference( size_t numrefs, Name **names )
+: m_numRefs( numrefs )
+, m_referencedName( ddl_nullptr ) {
+    m_referencedName = new Name *[ numrefs ];
+    for( size_t i = 0; i < numrefs; i++ ) {
+        Name *name = new Name( names[ i ]->m_type, names[ i ]->m_id );
+        m_referencedName[ i ] = name;
+    }
+}
+
+Reference::~Reference() {
+    for( size_t i = 0; i < m_numRefs; i++ ) {
+        delete m_referencedName[ i ];
+    }
+    m_numRefs = 0;
+    m_referencedName = ddl_nullptr;
+}
+
+Property::Property( Identifier *id )
+: m_key( id )
+, m_value( ddl_nullptr )
+, m_ref( ddl_nullptr )
+, m_next( ddl_nullptr ) {
+    // empty
+}
+
+Property::~Property() {
+    m_key = ddl_nullptr;
+    m_value = ddl_nullptr;
+    m_ref = ddl_nullptr;;
+    m_next = ddl_nullptr;;
+}
+
+DataArrayList::DataArrayList()
+: m_numItems( 0 )
+, m_dataList( ddl_nullptr )
+, m_next( ddl_nullptr ) {
+    // empty
+}
+
+DataArrayList::~DataArrayList() {
+    // empty
+}
+
+Context::Context()
+: m_root( ddl_nullptr ) {
+    // empty
+}
+
+Context::~Context() {
+    m_root = ddl_nullptr;
+}
+
+void Context::clear() {
+    delete m_root;
+    m_root = ddl_nullptr;
+}
+
+END_ODDLPARSER_NS

+ 412 - 0
Source/ThirdParty/Assimp/contrib/openddlparser/code/OpenDDLExport.cpp

@@ -0,0 +1,412 @@
+/*-----------------------------------------------------------------------------------------------
+The MIT License (MIT)
+
+Copyright (c) 2014-2015 Kim Kulling
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-----------------------------------------------------------------------------------------------*/
+#include <openddlparser/OpenDDLExport.h>
+#include <openddlparser/DDLNode.h>
+#include <openddlparser/Value.h>
+#include <openddlparser/OpenDDLParser.h>
+
+#include <sstream>
+
+BEGIN_ODDLPARSER_NS
+
+IOStreamBase::IOStreamBase()
+: m_file( ddl_nullptr ) {
+    // empty
+}
+IOStreamBase::~IOStreamBase() {
+    // empty
+}
+
+bool IOStreamBase::open( const std::string &name ) {
+    m_file = ::fopen( name.c_str(), "a" );
+    if (m_file == ddl_nullptr) {
+        return false;
+    }
+    
+    return true;
+}
+
+bool IOStreamBase::close() {
+    if (ddl_nullptr == m_file) {
+        return false;
+    }
+
+    ::fclose( m_file );
+    m_file = ddl_nullptr;
+
+    return true;
+}
+
+void IOStreamBase::write( const std::string &statement ) {
+    if (ddl_nullptr == m_file) {
+        return;
+    }
+
+    ::fwrite( statement.c_str(), sizeof( char ), statement.size(), m_file );
+}
+
+struct DDLNodeIterator {
+    const DDLNode::DllNodeList &m_childs;
+    size_t m_idx;
+
+    DDLNodeIterator( const DDLNode::DllNodeList &childs ) 
+    : m_childs( childs )
+    , m_idx( 0 ) {
+        // empty
+    }
+
+    ~DDLNodeIterator() {
+        // empty
+    }
+
+    bool getNext( DDLNode **node ) {
+        if( m_childs.size() > (m_idx+1) ) {
+            m_idx++;
+            *node = m_childs[ m_idx ];
+            return true;
+        }
+
+        return false;
+    }
+};
+
+static void writeLineEnd( std::string &statement ) {
+    statement += "\n";
+}
+
+OpenDDLExport::OpenDDLExport( IOStreamBase *stream )
+: m_stream( stream ) {
+    if (ddl_nullptr == m_stream) {
+        m_stream = new IOStreamBase();
+    }
+}
+
+OpenDDLExport::~OpenDDLExport() {
+    if (ddl_nullptr != m_stream) {
+        m_stream->close();
+    }
+    delete m_stream;
+}
+
+bool OpenDDLExport::exportContext( Context *ctx, const std::string &filename ) {
+    if( ddl_nullptr == ctx ) {
+        return false;
+    }
+
+    DDLNode *root( ctx->m_root );
+    if ( ddl_nullptr == root ) {
+        return true;
+    }
+
+    if (!filename.empty()) {
+        if (!m_stream->open( filename )) {
+            return false;
+        }
+    }
+
+    const bool retValue( handleNode( root ) );
+    
+    return retValue;
+}
+
+bool OpenDDLExport::handleNode( DDLNode *node ) {
+    if( ddl_nullptr == node ) {
+        return true;
+    }
+
+    const DDLNode::DllNodeList &childs = node->getChildNodeList();
+    if( childs.empty() ) {
+        return true;
+    }
+    DDLNode *current( ddl_nullptr );
+    DDLNodeIterator it( childs );
+    std::string statement;
+    bool success( true );
+    while( it.getNext( &current ) ) {
+        if( ddl_nullptr != current ) {
+            success |= writeNode( current, statement );
+            if( !handleNode( current ) ) {
+                success = false;
+            }
+        }
+    }
+
+    return success;
+}
+
+bool OpenDDLExport::writeToStream( const std::string &statement ) {
+    if (ddl_nullptr == m_stream ) {
+        return false;
+    }
+
+    if ( !statement.empty()) {
+        m_stream->write( statement );
+    }
+
+    return true;
+}
+
+bool OpenDDLExport::writeNode( DDLNode *node, std::string &statement ) {
+    bool success( true );
+    writeNodeHeader( node, statement );
+    if (node->hasProperties()) {
+        success |= writeProperties( node, statement );
+    }
+    writeLineEnd( statement );
+
+    statement = "}";
+    DataArrayList *al( node->getDataArrayList() );
+    if ( ddl_nullptr != al ) {
+        writeValueType( al->m_dataList->m_type, al->m_numItems, statement );
+        writeValueArray( al, statement );
+    }
+    Value *v( node->getValue() );
+    if (ddl_nullptr != v ) {
+        writeValueType( v->m_type, 1, statement );
+        statement = "{";
+        writeLineEnd( statement );
+        writeValue( v, statement );
+        statement = "}";
+        writeLineEnd( statement );
+    }
+    statement = "}";
+    writeLineEnd( statement );
+
+    writeToStream( statement );
+
+    return true;
+}
+
+bool OpenDDLExport::writeNodeHeader( DDLNode *node, std::string &statement ) {
+    if (ddl_nullptr == node) {
+        return false;
+    }
+
+    statement += node->getType();
+    const std::string &name( node->getName() );
+    if ( !name.empty() ) {
+        statement += " ";
+        statement += "$";
+        statement += name;
+    }
+
+    return true;
+}
+
+bool OpenDDLExport::writeProperties( DDLNode *node, std::string &statement ) {
+    if ( ddl_nullptr == node ) {
+        return false;
+    }
+
+    Property *prop( node->getProperties() );
+    // if no properties are there, return
+    if ( ddl_nullptr == prop ) {
+        return true;
+    }
+
+    if ( ddl_nullptr != prop ) {
+        // for instance (attrib = "position", bla=2)
+        statement += "(";
+        bool first( true );
+        while ( ddl_nullptr != prop ) {
+            if (!first) {
+                statement += ", ";
+            } else {
+                first = false;
+            }
+            statement += std::string( prop->m_key->m_text.m_buffer );
+            statement += " = ";
+            writeValue( prop->m_value, statement );
+            prop = prop->m_next;
+        }
+
+        statement += ")";
+    }
+
+    return true;
+}
+
+bool OpenDDLExport::writeValueType( Value::ValueType type, size_t numItems, std::string &statement ) {
+    if ( Value::ddl_types_max == type) {
+        return false;
+    }
+
+    const std::string typeStr( getTypeToken( type ) );
+    statement += typeStr;
+    // if we have an array to write
+    if ( numItems > 1 ) {
+        statement += "[";
+        char buffer[ 256 ];
+        ::memset( buffer, '\0', 256 * sizeof( char ) );
+        sprintf( buffer, "%d", numItems );
+        statement += buffer;
+        statement += "]";
+    }
+
+    return true;
+}
+
+bool OpenDDLExport::writeValue( Value *val, std::string &statement ) {
+    if (ddl_nullptr == val) {
+        return false;
+    }
+
+    switch ( val->m_type ) {
+        case Value::ddl_bool:
+            if ( true == val->getBool() ) {
+                statement += "true";
+            } else {
+                statement += "false";
+            }
+            break;
+        case Value::ddl_int8: 
+            {
+                std::stringstream stream;
+                const int i = static_cast<int>( val->getInt8() );
+                stream << i;
+                statement += stream.str();
+            }
+            break;
+        case Value::ddl_int16:
+            {
+                std::stringstream stream;
+                char buffer[ 256 ];
+                ::memset( buffer, '\0', 256 * sizeof( char ) );
+                sprintf( buffer, "%d", val->getInt16() );
+                statement += buffer;
+        }
+            break;
+        case Value::ddl_int32:
+            {
+                std::stringstream stream;
+                char buffer[ 256 ];
+                ::memset( buffer, '\0', 256 * sizeof( char ) );
+                const int i = static_cast< int >( val->getInt32() );
+                sprintf( buffer, "%d", i );
+                statement += buffer;
+            }
+            break;
+        case Value::ddl_int64:
+            {
+                std::stringstream stream;
+                const int i = static_cast< int >( val->getInt64() );
+                stream << i;
+                statement += stream.str();
+        }
+            break;
+        case Value::ddl_unsigned_int8:
+            {
+                std::stringstream stream;
+                const int i = static_cast< unsigned int >( val->getUnsignedInt8() );
+                stream << i;
+                statement += stream.str();
+            }
+            break;
+        case Value::ddl_unsigned_int16:
+            {
+                std::stringstream stream;
+                const int i = static_cast< unsigned int >( val->getUnsignedInt16() );
+                stream << i;
+                statement += stream.str();
+            }
+            break;
+        case Value::ddl_unsigned_int32:
+            {
+                std::stringstream stream;
+                const int i = static_cast< unsigned int >( val->getUnsignedInt32() );
+                stream << i;
+                statement += stream.str();
+            }
+            break;
+        case Value::ddl_unsigned_int64:
+            {
+                std::stringstream stream;
+                const int i = static_cast< unsigned int >( val->getUnsignedInt64() );
+                stream << i;
+                statement += stream.str();
+            }
+            break;
+        case Value::ddl_half:
+            break;
+        case Value::ddl_float:
+            {
+                std::stringstream stream;
+                stream << val->getFloat();
+                statement += stream.str();
+            }
+            break;
+        case Value::ddl_double:
+            break;
+        case Value::ddl_string:
+            {
+                std::stringstream stream;
+                stream << val->getString();
+                statement += "\"";
+                statement += stream.str();
+                statement += "\"";
+             }
+            break;
+        case Value::ddl_ref:
+            break;
+        case Value::ddl_none:
+        case Value::ddl_types_max:
+        default:
+            break;
+    }
+
+    return true;
+}
+
+bool OpenDDLExport::writeValueArray( DataArrayList *al, std::string &statement ) {
+    if (ddl_nullptr == al) {
+        return false;
+    }
+
+    if (0 == al->m_numItems) {
+        return true;
+    }
+
+    DataArrayList *nextDataArrayList = al ;
+    Value *nextValue( nextDataArrayList->m_dataList );
+    while (ddl_nullptr != nextDataArrayList) {
+        if (ddl_nullptr != nextDataArrayList) {
+            statement += "{ ";
+            nextValue = nextDataArrayList->m_dataList;
+            size_t idx( 0 );
+            while (ddl_nullptr != nextValue) {
+                if (idx > 0) {
+                    statement += ", ";
+                }
+                writeValue( nextValue, statement );
+                nextValue = nextValue->m_next;
+                idx++;
+            }
+            statement += " }";
+        }
+        nextDataArrayList = nextDataArrayList->m_next;
+    }
+
+    return true;
+}
+
+END_ODDLPARSER_NS

+ 77 - 45
Source/ThirdParty/Assimp/contrib/openddlparser/code/OpenDDLParser.cpp

@@ -21,6 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 -----------------------------------------------------------------------------------------------*/
 -----------------------------------------------------------------------------------------------*/
 #include <openddlparser/OpenDDLParser.h>
 #include <openddlparser/OpenDDLParser.h>
+#include <openddlparser/OpenDDLExport.h>
 
 
 #include <cassert>
 #include <cassert>
 #include <iostream>
 #include <iostream>
@@ -36,17 +37,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
 BEGIN_ODDLPARSER_NS
 BEGIN_ODDLPARSER_NS
 
 
-static const char *Version = "0.1.0";
+static const char *Version = "0.3.0";
 
 
 namespace Grammar {
 namespace Grammar {
-    static const char * const OpenBracketToken   = "{";
-    static const char * const CloseBracketToken  = "}";
-    static const char * const OpenPropertyToken  = "(";
-    static const char * const ClosePropertyToken = ")";
-    static const char * const BoolTrue           = "true";
-    static const char * const BoolFalse          = "false";
-    static const char * const RefToken           = "ref";
-    static const char * const CommaSeparator     = ",";
+    static const char *OpenBracketToken   = "{";
+    static const char *CloseBracketToken  = "}";
+    static const char *OpenPropertyToken  = "(";
+    static const char *ClosePropertyToken = ")";
+    static const char *OpenArrayToken     = "[";
+    static const char *CloseArrayToken    = "]";
+    static const char *BoolTrue           = "true";
+    static const char *BoolFalse          = "false";
+    static const char *CommaSeparator     = ",";
 
 
     static const char* PrimitiveTypeToken[ Value::ddl_types_max ] = {
     static const char* PrimitiveTypeToken[ Value::ddl_types_max ] = {
         "bool",
         "bool",
@@ -66,6 +68,9 @@ namespace Grammar {
     };
     };
 } // Namespace Grammar
 } // Namespace Grammar
 
 
+const char *getTypeToken( Value::ValueType  type ) {
+    return Grammar::PrimitiveTypeToken[ type ];
+}
 
 
 static void logInvalidTokenError( char *in, const std::string &exp, OpenDDLParser::logCallback callback ) {
 static void logInvalidTokenError( char *in, const std::string &exp, OpenDDLParser::logCallback callback ) {
     std::stringstream stream;
     std::stringstream stream;
@@ -206,6 +211,17 @@ bool OpenDDLParser::parse() {
     return true;
     return true;
 }
 }
 
 
+bool OpenDDLParser::exportContext( Context *ctx, const std::string &filename ) {
+    if( ddl_nullptr == ctx ) {
+        return false;
+    }
+    
+    OpenDDLExport myExporter;
+    return myExporter.exportContext( ctx, filename );
+
+    return false;
+}
+
 char *OpenDDLParser::parseNextNode( char *in, char *end ) {
 char *OpenDDLParser::parseNextNode( char *in, char *end ) {
     in = parseHeader( in, end );
     in = parseHeader( in, end );
     in = parseStructure( in, end );
     in = parseStructure( in, end );
@@ -215,7 +231,8 @@ char *OpenDDLParser::parseNextNode( char *in, char *end ) {
 
 
 static void dumpId( Identifier *id ) {
 static void dumpId( Identifier *id ) {
     if( ddl_nullptr != id ) {
     if( ddl_nullptr != id ) {
-        std::cout << id->m_text.m_buffer << std::endl;
+        if ( ddl_nullptr != id->m_text.m_buffer ) { }
+            std::cout << id->m_text.m_buffer << std::endl;
     }
     }
 }
 }
 
 
@@ -234,19 +251,19 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
     in = lookForNextToken( in, end );
     in = lookForNextToken( in, end );
     Property *first( ddl_nullptr );
     Property *first( ddl_nullptr );
     if( ddl_nullptr != id ) {
     if( ddl_nullptr != id ) {
-        if( *in == '(' ) {
+        if( *in == Grammar::OpenPropertyToken[ 0 ] ) {
             in++;
             in++;
             Property *prop( ddl_nullptr ), *prev( ddl_nullptr );
             Property *prop( ddl_nullptr ), *prev( ddl_nullptr );
-            while( *in != ')' && in != end ) {
+            while( *in != Grammar::ClosePropertyToken[ 0 ] && in != end ) {
                 in = OpenDDLParser::parseProperty( in, end, &prop );
                 in = OpenDDLParser::parseProperty( in, end, &prop );
                 in = lookForNextToken( in, end );
                 in = lookForNextToken( in, end );
 
 
-                if( *in != ',' && *in != ')' ) {
-                    logInvalidTokenError( in, ")", m_logCallback );
+                if( *in != Grammar::CommaSeparator[ 0 ] && *in != Grammar::ClosePropertyToken[ 0 ] ) {
+                    logInvalidTokenError( in, Grammar::ClosePropertyToken, m_logCallback );
                     return in;
                     return in;
                 }
                 }
                 
                 
-                if( ddl_nullptr != prop && *in != ',' ) {
+                if( ddl_nullptr != prop && *in != Grammar::CommaSeparator[ 0 ] ) {
                     if( ddl_nullptr == first ) {
                     if( ddl_nullptr == first ) {
                         first = prop;
                         first = prop;
                     }
                     }
@@ -348,13 +365,13 @@ char *OpenDDLParser::parseStructureBody( char *in, char *end, bool &error ) {
     if( Value::ddl_none != type ) {
     if( Value::ddl_none != type ) {
         // parse a primitive data type
         // parse a primitive data type
         in = lookForNextToken( in, end );
         in = lookForNextToken( in, end );
-        if( *in == '{' ) {
+        if( *in == Grammar::OpenBracketToken[ 0 ] ) {
             Reference *refs( ddl_nullptr );
             Reference *refs( ddl_nullptr );
             DataArrayList *dtArrayList( ddl_nullptr );
             DataArrayList *dtArrayList( ddl_nullptr );
             Value *values( ddl_nullptr );
             Value *values( ddl_nullptr );
             if( 1 == arrayLen ) {
             if( 1 == arrayLen ) {
                 size_t numRefs( 0 ), numValues( 0 );
                 size_t numRefs( 0 ), numValues( 0 );
-                in = parseDataList( in, end, &values, numValues, &refs, numRefs );
+                in = parseDataList( in, end, type, &values, numValues, &refs, numRefs );
                 setNodeValues( top(), values );
                 setNodeValues( top(), values );
                 setNodeReferences( top(), refs );
                 setNodeReferences( top(), refs );
             } else if( arrayLen > 1 ) {
             } else if( arrayLen > 1 ) {
@@ -435,10 +452,10 @@ void OpenDDLParser::normalizeBuffer( std::vector<char> &buffer) {
             newBuffer.push_back( buffer[ readIdx ] );
             newBuffer.push_back( buffer[ readIdx ] );
         } else {
         } else {
             if( isComment<char>( c, end ) ) {
             if( isComment<char>( c, end ) ) {
-                readIdx++;
+                ++readIdx;
                 // skip the comment and the rest of the line
                 // skip the comment and the rest of the line
                 while( !isEndofLine( buffer[ readIdx ] ) ) {
                 while( !isEndofLine( buffer[ readIdx ] ) ) {
-                    readIdx++;
+                    ++readIdx;
                 }
                 }
             }
             }
         }
         }
@@ -493,9 +510,9 @@ char *OpenDDLParser::parseIdentifier( char *in, char *end, Identifier **id ) {
     // get size of id
     // get size of id
     size_t idLen( 0 );
     size_t idLen( 0 );
     char *start( in );
     char *start( in );
-    while( !isSeparator( *in ) && !isNewLine( *in ) && ( in != end ) && *in != '(' && *in != ')' ) {
-        in++;
-        idLen++;
+    while( !isSeparator( *in ) && !isNewLine( *in ) && ( in != end ) && *in != Grammar::OpenPropertyToken[ 0 ] && *in != Grammar::ClosePropertyToken[ 0 ] ) {
+        ++in;
+        ++idLen;
     }
     }
     
     
     const size_t len( idLen );
     const size_t len( idLen );
@@ -529,14 +546,14 @@ char *OpenDDLParser::parsePrimitiveDataType( char *in, char *end, Value::ValueTy
     }
     }
 
 
     bool ok( true );
     bool ok( true );
-    if( *in == '[' ) {
+    if( *in == Grammar::OpenArrayToken[ 0 ] ) {
         ok = false;
         ok = false;
         in++;
         in++;
         char *start( in );
         char *start( in );
         while ( in != end ) {
         while ( in != end ) {
             in++;
             in++;
-            if( *in == ']' ) {
-                len = atoi( start );
+            if( *in == Grammar::CloseArrayToken[ 0 ] ) {
+                len = ::atoi( start );
                 ok = true;
                 ok = true;
                 in++;
                 in++;
                 break;
                 break;
@@ -562,9 +579,9 @@ char *OpenDDLParser::parseReference( char *in, char *end, std::vector<Name*> &na
     if( nextName ) {
     if( nextName ) {
         names.push_back( nextName );
         names.push_back( nextName );
     }
     }
-    while( ',' == *in ) {
+    while( Grammar::CommaSeparator[ 0 ] == *in ) {
         in = getNextSeparator( in, end );
         in = getNextSeparator( in, end );
-        if( ',' == *in ) {
+        if( Grammar::CommaSeparator[ 0 ] == *in ) {
             in = parseName( in, end, &nextName );
             in = parseName( in, end, &nextName );
             if( nextName ) {
             if( nextName ) {
                 names.push_back( nextName );
                 names.push_back( nextName );
@@ -802,7 +819,7 @@ char *OpenDDLParser::parseProperty( char *in, char *end, Property **prop ) {
     return in;
     return in;
 }
 }
 
 
-char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, size_t &numValues, Reference **refs, size_t &numRefs ) {
+char *OpenDDLParser::parseDataList( char *in, char *end, Value::ValueType type, Value **data, size_t &numValues, Reference **refs, size_t &numRefs ) {
     *data = ddl_nullptr;
     *data = ddl_nullptr;
     numValues = numRefs = 0;
     numValues = numRefs = 0;
     if( ddl_nullptr == in || in == end ) {
     if( ddl_nullptr == in || in == end ) {
@@ -816,21 +833,35 @@ char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, size_t &n
         while( '}' != *in ) {
         while( '}' != *in ) {
             current = ddl_nullptr;
             current = ddl_nullptr;
             in = lookForNextToken( in, end );
             in = lookForNextToken( in, end );
-            if( isInteger( in, end ) ) {
-                in = parseIntegerLiteral( in, end, &current );
-            } else if( isFloat( in, end ) ) {
-                in = parseFloatingLiteral( in, end, &current );
-            } else if( isStringLiteral( *in ) ) {
-                in = parseStringLiteral( in, end, &current );
-            } else if( isHexLiteral( in, end ) ) {
-                in = parseHexaLiteral( in, end, &current );
-            } else {                          // reference data
-                std::vector<Name*> names;
-                in = parseReference( in, end, names );
-                if( !names.empty() ) {
-                    Reference *ref = new Reference( names.size(), &names[ 0 ] );
-                    *refs = ref;
-                    numRefs = names.size();
+            if (Value::ddl_none == type) {
+                if (isInteger( in, end )) {
+                    in = parseIntegerLiteral( in, end, &current );
+                }
+                else if (isFloat( in, end )) {
+                    in = parseFloatingLiteral( in, end, &current );
+                }
+                else if (isStringLiteral( *in )) {
+                    in = parseStringLiteral( in, end, &current );
+                }
+                else if (isHexLiteral( in, end )) {
+                    in = parseHexaLiteral( in, end, &current );
+                }
+                else {                          // reference data
+                    std::vector<Name*> names;
+                    in = parseReference( in, end, names );
+                    if (!names.empty()) {
+                        Reference *ref = new Reference( names.size(), &names[ 0 ] );
+                        *refs = ref;
+                        numRefs = names.size();
+                    }
+                }
+            } else {
+                if (Value::ddl_int32 == type) {
+                    in = parseIntegerLiteral( in, end, &current );
+                } else if (Value::ddl_float == type) {
+                    in = parseFloatingLiteral( in, end, &current );
+                } else if (Value::ddl_string == type) {
+                    in = parseStringLiteral( in, end, &current );
                 }
                 }
             }
             }
 
 
@@ -846,7 +877,7 @@ char *OpenDDLParser::parseDataList( char *in, char *end, Value **data, size_t &n
             }
             }
 
 
             in = getNextSeparator( in, end );
             in = getNextSeparator( in, end );
-            if( ',' != *in && '}' != *in && !isSpace( *in ) ) {
+            if( ',' != *in && Grammar::CloseBracketToken[ 0 ] != *in && !isSpace( *in ) ) {
                 break;
                 break;
             }
             }
         }
         }
@@ -879,7 +910,8 @@ char *OpenDDLParser::parseDataArrayList( char *in, char *end, DataArrayList **da
         do {
         do {
             size_t numRefs( 0 ), numValues( 0 );
             size_t numRefs( 0 ), numValues( 0 );
             currentValue = ddl_nullptr;
             currentValue = ddl_nullptr;
-            in = parseDataList( in, end, &currentValue, numValues, &refs, numRefs );
+            Value::ValueType type( Value::ddl_none );
+            in = parseDataList( in, end, type, &currentValue, numValues, &refs, numRefs );
             if( ddl_nullptr != currentValue ) {
             if( ddl_nullptr != currentValue ) {
                 if( ddl_nullptr == prev ) {
                 if( ddl_nullptr == prev ) {
                     *dataList = createDataArrayList( currentValue, numValues );
                     *dataList = createDataArrayList( currentValue, numValues );

+ 74 - 14
Source/ThirdParty/Assimp/contrib/openddlparser/code/Value.cpp

@@ -27,6 +27,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
 BEGIN_ODDLPARSER_NS
 BEGIN_ODDLPARSER_NS
 
 
+static Value::Iterator end( ddl_nullptr );
+
 Value::Iterator::Iterator()
 Value::Iterator::Iterator()
 : m_start( ddl_nullptr )
 : m_start( ddl_nullptr )
 , m_current( ddl_nullptr ) {
 , m_current( ddl_nullptr ) {
@@ -39,6 +41,12 @@ Value::Iterator::Iterator( Value *start )
     // empty
     // empty
 }
 }
 
 
+Value::Iterator::Iterator( const Iterator &rhs )
+: m_start( rhs.m_start )
+, m_current( rhs.m_current ) {
+    // empty
+}
+
 Value::Iterator::~Iterator() {
 Value::Iterator::~Iterator() {
     // empty
     // empty
 }
 }
@@ -61,6 +69,38 @@ Value *Value::Iterator::getNext() {
     return v;
     return v;
 }
 }
 
 
+const Value::Iterator Value::Iterator::operator++( int ) {
+    if( ddl_nullptr == m_current ) {
+        return end;
+    }
+
+    m_current = m_current->getNext();
+    Iterator inst( m_current );
+
+    return inst;
+}
+
+Value::Iterator &Value::Iterator::operator++( ) {
+    if( ddl_nullptr == m_current ) {
+        return end;
+    }
+
+    m_current = m_current->getNext();
+
+    return *this;
+}
+
+bool Value::Iterator::operator == ( const Iterator &rhs ) const {
+    return ( m_current == rhs.m_current );
+}
+
+Value *Value::Iterator::operator->( ) const {
+    if(ddl_nullptr == m_current ) {
+        return ddl_nullptr;
+    }
+    return m_current;
+}
+
 Value::Value( ValueType type )
 Value::Value( ValueType type )
 : m_type( type )
 : m_type( type )
 , m_size( 0 )
 , m_size( 0 )
@@ -80,7 +120,7 @@ void Value::setBool( bool value ) {
 
 
 bool Value::getBool() {
 bool Value::getBool() {
     assert( ddl_bool == m_type );
     assert( ddl_bool == m_type );
-    return ( *m_data ) ? true : false;
+    return ( *m_data == 1 );
 }
 }
 
 
 void Value::setInt8( int8 value ) {
 void Value::setInt8( int8 value ) {
@@ -100,7 +140,9 @@ void Value::setInt16( int16 value ) {
 
 
 int16 Value::getInt16() {
 int16 Value::getInt16() {
     assert( ddl_int16 == m_type );
     assert( ddl_int16 == m_type );
-    return ( int16 ) ( *m_data );
+    int16 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setInt32( int32 value ) {
 void Value::setInt32( int32 value ) {
@@ -110,16 +152,21 @@ void Value::setInt32( int32 value ) {
 
 
 int32 Value::getInt32() {
 int32 Value::getInt32() {
     assert( ddl_int32 == m_type );
     assert( ddl_int32 == m_type );
-    return ( int32 ) ( *m_data );
+    int32 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setInt64( int64 value ) {
 void Value::setInt64( int64 value ) {
-    assert( ddl_int32 == m_type );
+    assert( ddl_int64 == m_type );
     ::memcpy( m_data, &value, m_size );
     ::memcpy( m_data, &value, m_size );
 }
 }
 
 
 int64 Value::getInt64() {
 int64 Value::getInt64() {
-    return ( int64 ) ( *m_data );
+    assert( ddl_int64 == m_type );
+    int64 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setUnsignedInt8( uint8 value ) {
 void Value::setUnsignedInt8( uint8 value ) {
@@ -129,7 +176,9 @@ void Value::setUnsignedInt8( uint8 value ) {
 
 
 uint8 Value::getUnsignedInt8() const {
 uint8 Value::getUnsignedInt8() const {
     assert( ddl_unsigned_int8 == m_type );
     assert( ddl_unsigned_int8 == m_type );
-    return ( uint8 ) ( *m_data );
+    uint8 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setUnsignedInt16( uint16 value ) {
 void Value::setUnsignedInt16( uint16 value ) {
@@ -139,7 +188,9 @@ void Value::setUnsignedInt16( uint16 value ) {
 
 
 uint16 Value::getUnsignedInt16() const {
 uint16 Value::getUnsignedInt16() const {
     assert( ddl_unsigned_int16 == m_type );
     assert( ddl_unsigned_int16 == m_type );
-    return ( uint8 ) ( *m_data );
+    uint16 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setUnsignedInt32( uint32 value ) {
 void Value::setUnsignedInt32( uint32 value ) {
@@ -149,7 +200,9 @@ void Value::setUnsignedInt32( uint32 value ) {
 
 
 uint32 Value::getUnsignedInt32() const {
 uint32 Value::getUnsignedInt32() const {
     assert( ddl_unsigned_int32 == m_type );
     assert( ddl_unsigned_int32 == m_type );
-    return ( uint8 ) ( *m_data );
+    uint32 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setUnsignedInt64( uint64 value ) {
 void Value::setUnsignedInt64( uint64 value ) {
@@ -159,7 +212,9 @@ void Value::setUnsignedInt64( uint64 value ) {
 
 
 uint64 Value::getUnsignedInt64() const {
 uint64 Value::getUnsignedInt64() const {
     assert( ddl_unsigned_int64 == m_type );
     assert( ddl_unsigned_int64 == m_type );
-    return ( uint64 ) ( *m_data );
+    uint64 i;
+    ::memcpy( &i, m_data, m_size );
+    return i;
 }
 }
 
 
 void Value::setFloat( float value ) {
 void Value::setFloat( float value ) {
@@ -185,6 +240,7 @@ void Value::setDouble( double value ) {
 }
 }
 
 
 double Value::getDouble() const {
 double Value::getDouble() const {
+    assert( ddl_double == m_type );
     double v;
     double v;
     ::memcpy( &v, m_data, m_size );
     ::memcpy( &v, m_data, m_size );
     return v;
     return v;
@@ -196,6 +252,7 @@ void Value::setString( const std::string &str ) {
     m_data[ str.size() ] = '\0';
     m_data[ str.size() ] = '\0';
 }
 }
 const char *Value::getString() const {
 const char *Value::getString() const {
+    assert( ddl_string == m_type );
     return (const char*) m_data;
     return (const char*) m_data;
 }
 }
 
 
@@ -271,22 +328,25 @@ Value *ValueAllocator::allocPrimData( Value::ValueType type, size_t len ) {
             data->m_size = sizeof( bool );
             data->m_size = sizeof( bool );
             break;
             break;
         case Value::ddl_int8:
         case Value::ddl_int8:
-            data->m_size = sizeof( char );
+            data->m_size = sizeof( int8 );
             break;
             break;
         case Value::ddl_int16:
         case Value::ddl_int16:
-            data->m_size = sizeof( short );
+            data->m_size = sizeof( int16 );
             break;
             break;
         case Value::ddl_int32:
         case Value::ddl_int32:
-            data->m_size = sizeof( int );
+            data->m_size = sizeof( int32 );
             break;
             break;
         case Value::ddl_int64:
         case Value::ddl_int64:
             data->m_size = sizeof( int64 );
             data->m_size = sizeof( int64 );
             break;
             break;
         case Value::ddl_unsigned_int8:
         case Value::ddl_unsigned_int8:
-            data->m_size = sizeof( unsigned char );
+            data->m_size = sizeof( uint8 );
+            break;
+        case Value::ddl_unsigned_int16:
+            data->m_size = sizeof( uint16 );
             break;
             break;
         case Value::ddl_unsigned_int32:
         case Value::ddl_unsigned_int32:
-            data->m_size = sizeof( unsigned int );
+            data->m_size = sizeof( uint32 );
             break;
             break;
         case Value::ddl_unsigned_int64:
         case Value::ddl_unsigned_int64:
             data->m_size = sizeof( uint64 );
             data->m_size = sizeof( uint64 );

+ 4 - 0
Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/DDLNode.h

@@ -101,6 +101,10 @@ public:
     /// @return true, if a corresponding property is assigned to the node, false if not.
     /// @return true, if a corresponding property is assigned to the node, false if not.
     bool hasProperty( const std::string &name );
     bool hasProperty( const std::string &name );
 
 
+    ///	@brief  Will return true, if any properties are assigned to the node instance.
+    ///	@return True, if properties are assigned.
+    bool hasProperties() const;
+
     ///	@brief  Search for a given property and returns it. Will return ddl_nullptr if no property was found.
     ///	@brief  Search for a given property and returns it. Will return ddl_nullptr if no property was found.
     /// @param  name    [in] The name for the property to look for.
     /// @param  name    [in] The name for the property to look for.
     /// @return The property or ddl_nullptr if no property was found.
     /// @return The property or ddl_nullptr if no property was found.

+ 111 - 149
Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/OpenDDLCommon.h

@@ -20,15 +20,13 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 -----------------------------------------------------------------------------------------------*/
 -----------------------------------------------------------------------------------------------*/
-
-// Modified by Lasse Oorni for Urho3D
-
 #pragma once
 #pragma once
 
 
 #include <cstddef>
 #include <cstddef>
 #include <vector>
 #include <vector>
 #include <string>
 #include <string>
 
 
+#include <stdio.h>
 #include <string.h>
 #include <string.h>
 #ifndef _WIN32
 #ifndef _WIN32
 #  include <inttypes.h>
 #  include <inttypes.h>
@@ -62,10 +60,11 @@ BEGIN_ODDLPARSER_NS
     // All C++11 constructs
     // All C++11 constructs
 #   define ddl_nullptr nullptr
 #   define ddl_nullptr nullptr
 #else
 #else
-    // Fallback for older compilers
+    // Fall-back for older compilers
 #   define ddl_nullptr NULL
 #   define ddl_nullptr NULL
 #endif // OPENDDL_NO_USE_CPP11
 #endif // OPENDDL_NO_USE_CPP11
 
 
+// Forward declarations
 class DDLNode;
 class DDLNode;
 class Value;
 class Value;
 
 
@@ -75,6 +74,7 @@ struct Reference;
 struct Property;
 struct Property;
 struct DataArrayList;
 struct DataArrayList;
 
 
+// Platform-specific typedefs
 #ifdef _WIN32
 #ifdef _WIN32
 typedef signed __int64    int64_impl;
 typedef signed __int64    int64_impl;
 typedef unsigned __int64  uint64_impl;
 typedef unsigned __int64  uint64_impl;
@@ -93,65 +93,36 @@ typedef unsigned short    uint16;  ///< Unsigned integer, 2 byte
 typedef unsigned int      uint32;  ///< Unsigned integer, 4 byte
 typedef unsigned int      uint32;  ///< Unsigned integer, 4 byte
 typedef uint64_impl       uint64;  ///< Unsigned integer, 8 byte
 typedef uint64_impl       uint64;  ///< Unsigned integer, 8 byte
 
 
-///	@brief  Description of the type of a name.
-enum NameType {
-    GlobalName, ///< Name is global.
-    LocalName   ///< Name is local.
-};
+///	@brief  Stores a text.
+///
+/// A text is stored in a simple character buffer. Texts buffer can be 
+/// greater than the number of stored characters in them.
+struct DLL_ODDLPARSER_EXPORT Text {
+    size_t m_capacity;  ///< The capacity of the text.
+    size_t m_len;       ///< The length of the text.
+    char *m_buffer;     ///< The buffer with the text.
 
 
-///	@brief  Stores a text
-struct Text {
-    size_t m_capacity;
-    size_t m_len;
-    char *m_buffer;
-
-    Text( const char *buffer, size_t numChars )
-    : m_capacity( 0 )
-    , m_len( 0 )
-    , m_buffer( ddl_nullptr ) {
-        set( buffer, numChars );
-    }
-
-    ~Text() {
-        clear();
-    }
-
-    void clear() {
-        delete[] m_buffer;
-        m_buffer = ddl_nullptr;
-        m_capacity = 0;
-        m_len = 0;
-    }
-
-    void set( const char *buffer, size_t numChars ) {
-        clear();
-        if( numChars > 0 ) {
-            m_len = numChars;
-            m_capacity = m_len + 1;
-            m_buffer = new char[ m_capacity ];
-            strncpy( m_buffer, buffer, numChars );
-            m_buffer[ numChars ] = '\0';
-        }
-    }
-
-    bool operator == ( const std::string &name ) const {
-        if( m_len != name.size() ) {
-            return false;
-        }
-        const int res( strncmp( m_buffer, name.c_str(), name.size() ) );
-        
-        return ( 0 == res );
-    }
-
-    bool operator == ( const Text &rhs ) const {
-        if( m_len != rhs.m_len ) {
-            return false;
-        }
-
-        const int res( strncmp( m_buffer, rhs.m_buffer, m_len ) );
-        
-        return ( 0 == res );
-    }
+    ///	@brief  The constructor with a given text buffer.
+    /// @param  buffer      [in] The buffer.
+    /// @param  numChars    [in] The number of characters in the buffer.
+    Text( const char *buffer, size_t numChars );
+
+    ///	@brief  The destructor.
+    ~Text();
+
+    ///	@brief  Clears the text.
+    void clear();
+
+    ///	@brief  Set a new text.
+    /// @param  buffer      [in] The buffer.
+    /// @param  numChars    [in] The number of characters in the buffer.
+    void set( const char *buffer, size_t numChars );
+
+    ///	@brief  The compare operator for std::strings.
+    bool operator == ( const std::string &name ) const;
+
+    ///	@brief  The compare operator for Texts.
+    bool operator == ( const Text &rhs ) const;
 
 
 private:
 private:
     Text( const Text & );
     Text( const Text & );
@@ -159,38 +130,48 @@ private:
 };
 };
 
 
 ///	@brief  Stores an OpenDDL-specific identifier type.
 ///	@brief  Stores an OpenDDL-specific identifier type.
-struct Identifier {
-    Text m_text;
+struct DLL_ODDLPARSER_EXPORT Identifier {
+    Text m_text;    ///< The text element.
 
 
-    Identifier( char buffer[], size_t len )
-        : m_text( buffer, len ) {
-        // empty
-    }
+    ///	@brief  The constructor with a sized buffer full of characters.
+    ///	@param  buffer  [in] The identifier buffer.
+    ///	@param  len     [in] The length of the buffer
+    Identifier( const char buffer[], size_t len );
 
 
-    Identifier( char buffer[] )
-    : m_text( buffer, strlen( buffer ) ) {
-        // empty
-    }
+    ///	@brief  The constructor with a buffer full of characters.
+    ///	@param  buffer  [in] The identifier buffer.
+    /// @remark Buffer must be null-terminated.
+    Identifier( const char buffer[] );
 
 
-    bool operator == ( const Identifier &rhs ) const {
-        return m_text == rhs.m_text;
-    }
+    ///	@brief  The destructor.
+    ~Identifier();
+    
+    ///	@brief  The compare operator.
+    bool operator == ( const Identifier &rhs ) const;
 
 
 private:
 private:
     Identifier( const Identifier & );
     Identifier( const Identifier & );
     Identifier &operator = ( const Identifier & );
     Identifier &operator = ( const Identifier & );
 };
 };
 
 
+///	@brief  Description of the type of a name.
+enum NameType {
+    GlobalName, ///< Name is global.
+    LocalName   ///< Name is local.
+};
+
 ///	@brief  Stores an OpenDDL-specific name
 ///	@brief  Stores an OpenDDL-specific name
-struct Name {
-    NameType    m_type;
-    Identifier *m_id;
+struct DLL_ODDLPARSER_EXPORT Name {
+    NameType    m_type; ///< The type of the name ( @see NameType ).
+    Identifier *m_id;   ///< The id.
 
 
-    Name( NameType type, Identifier *id )
-        : m_type( type )
-        , m_id( id ) {
-        // empty
-    }
+    ///	@brief  The constructor with the type and the id.
+    ///	@param  type    [in] The name type.
+    ///	@param  id      [in] The id.
+    Name( NameType type, Identifier *id );
+
+    ///	@brief  The destructor.
+    ~Name();
 
 
 private:
 private:
     Name( const Name & );
     Name( const Name & );
@@ -198,33 +179,20 @@ private:
 };
 };
 
 
 ///	@brief  Stores a bundle of references.
 ///	@brief  Stores a bundle of references.
-struct Reference {
-    size_t   m_numRefs;
-    Name   **m_referencedName;
-
-    Reference()
-    : m_numRefs( 0 )
-    , m_referencedName( ddl_nullptr ) {
-        // empty
-    }
+struct DLL_ODDLPARSER_EXPORT Reference {
+    size_t   m_numRefs;         ///< The number of stored references.
+    Name   **m_referencedName;  ///< The reference names.
+
+    ///	@brief  The default constructor.
+    Reference();
      
      
-    Reference( size_t numrefs, Name **names )
-    : m_numRefs( numrefs )
-    , m_referencedName( ddl_nullptr ) {
-        m_referencedName = new Name *[ numrefs ];
-        for( size_t i = 0; i < numrefs; i++ ) {
-            Name *name = new Name( names[ i ]->m_type, names[ i ]->m_id );
-            m_referencedName[ i ] = name;
-        }
-    }
-
-    ~Reference() {
-        for( size_t i = 0; i < m_numRefs; i++ ) {
-            delete m_referencedName[ i ];
-        }
-        m_numRefs = 0;
-        m_referencedName = ddl_nullptr;
-    }
+    ///	@brief  The constructor with an array of ref names.
+    /// @param  numrefs     [in] The number of ref names.
+    /// @param  names       [in] The ref names.
+    Reference( size_t numrefs, Name **names );
+
+    ///	@brief  The destructor.
+    ~Reference();
 
 
 private:
 private:
     Reference( const Reference & );
     Reference( const Reference & );
@@ -232,26 +200,21 @@ private:
 };
 };
 
 
 ///	@brief  Stores a property list.
 ///	@brief  Stores a property list.
-struct Property {
-    Identifier *m_key;
-    Value *m_value;
-    Reference *m_ref;
-    Property *m_next;
-
-    Property( Identifier *id )
-    : m_key( id )
-    , m_value( ddl_nullptr )
-    , m_ref( ddl_nullptr )
-    , m_next( ddl_nullptr ) {
-        // empty
-    }
-
-    ~Property() {
-        m_key = ddl_nullptr;
-        m_value = ddl_nullptr;
-        m_ref = ddl_nullptr;;
-        m_next = ddl_nullptr;;
-    }
+struct DLL_ODDLPARSER_EXPORT Property {
+    Identifier *m_key;      ///< The identifier / key of the property.
+    Value      *m_value;    ///< The value assigned to its key / id ( ddl_nullptr if none ).
+    Reference  *m_ref;      ///< References assigned to its key / id ( ddl_nullptr if none ).
+    Property   *m_next;     ///< The next property ( ddl_nullptr if none ).
+
+    ///	@brief  The default constructor.
+    Property();
+
+    ///	@brief  The constructor for initialization.
+    /// @param  id      [in] The identifier
+    Property( Identifier *id );
+
+    ///	@brief  The destructor.
+    ~Property();
 
 
 private:
 private:
     Property( const Property & );
     Property( const Property & );
@@ -259,17 +222,16 @@ private:
 };
 };
 
 
 ///	@brief  Stores a data array list.
 ///	@brief  Stores a data array list.
-struct DataArrayList {
-    size_t m_numItems;
-    Value *m_dataList;
-    DataArrayList *m_next;
-
-    DataArrayList()
-        : m_numItems( 0 )
-        , m_dataList( ddl_nullptr )
-        , m_next( ddl_nullptr ) {
-        // empty
-    }
+struct DLL_ODDLPARSER_EXPORT DataArrayList {
+    size_t         m_numItems;  ///< The number of items in the list.
+    Value         *m_dataList;  ///< The data list ( ee Value ).
+    DataArrayList *m_next;      ///< The next data array list ( ddl_nullptr if last ).
+
+    ///	@brief  The default constructor for initialization.
+    DataArrayList();
+
+    ///	@brief  The destructor.
+    ~DataArrayList();
 
 
 private:
 private:
     DataArrayList( const DataArrayList & ); 
     DataArrayList( const DataArrayList & ); 
@@ -277,17 +239,17 @@ private:
 };
 };
 
 
 ///	@brief  Stores the context of a parsed OpenDDL declaration.
 ///	@brief  Stores the context of a parsed OpenDDL declaration.
-struct Context {
-    DDLNode *m_root;
+struct DLL_ODDLPARSER_EXPORT Context {
+    DDLNode *m_root;    ///< The root node of the OpenDDL node tree.
+
+    ///	@brief  Constructor for initialization.
+    Context();
 
 
-    Context()
-        : m_root( ddl_nullptr ) {
-        // empty
-    }
+    ///	@brief  Destructor.
+    ~Context();
 
 
-    ~Context() {
-        m_root = ddl_nullptr;
-    }
+    ///	@brief  Clears the whole node tree.
+    void clear();
 
 
 private:
 private:
     Context( const Context & );
     Context( const Context & );

+ 88 - 0
Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/OpenDDLExport.h

@@ -0,0 +1,88 @@
+/*-----------------------------------------------------------------------------------------------
+The MIT License (MIT)
+
+Copyright (c) 2014-2015 Kim Kulling
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-----------------------------------------------------------------------------------------------*/
+#pragma once
+
+#include <openddlparser/OpenDDLCommon.h>
+#include <openddlparser/Value.h>
+
+BEGIN_ODDLPARSER_NS
+
+//-------------------------------------------------------------------------------------------------
+/// @ingroup    IOStreamBase
+///	@brief      This class represents the stream to write out.
+//-------------------------------------------------------------------------------------------------
+class DLL_ODDLPARSER_EXPORT IOStreamBase {
+public:
+    IOStreamBase();
+    virtual ~IOStreamBase();
+    virtual bool open( const std::string &anme );
+    virtual bool close();
+    virtual void write( const std::string &statement );
+
+private:
+    FILE *m_file;
+};
+
+//-------------------------------------------------------------------------------------------------
+///
+/// @ingroup    OpenDDLParser
+///	@brief      This class represents the OpenDDLExporter.
+///
+//-------------------------------------------------------------------------------------------------
+class DLL_ODDLPARSER_EXPORT OpenDDLExport {
+public:
+    ///	@brief  The class constructor
+    OpenDDLExport( IOStreamBase *stream = ddl_nullptr );
+
+    ///	@brief  The class destructor.
+    ~OpenDDLExport();
+
+    ///	@brief  Export the data of a parser context.
+    /// @param  ctx         [in] Pointer to the context.
+    /// @param  filename    [in] The filename for the export.
+    /// @return True in case of success, false in case of an error.
+    bool exportContext( Context *ctx, const std::string &filename );
+
+    ///	@brief  Handles a node export.
+    /// @param  node        [in] The node to handle with.
+    /// @return True in case of success, false in case of an error.
+    bool handleNode( DDLNode *node );
+
+    ///	@brief  Writes the statement to the stream.
+    /// @param  statement   [in]  The content to write.
+    /// @return True in case of success, false in case of an error.
+    bool writeToStream( const std::string &statement );
+
+protected:
+    bool writeNode( DDLNode *node, std::string &statement );
+    bool writeNodeHeader( DDLNode *node, std::string &statement );
+    bool writeProperties( DDLNode *node, std::string &statement );
+    bool writeValueType( Value::ValueType type, size_t numItems, std::string &statement );
+    bool writeValue( Value *val, std::string &statement );
+    bool writeValueArray( DataArrayList *al, std::string &statement );
+
+private:
+    IOStreamBase *m_stream;
+};
+
+END_ODDLPARSER_NS

+ 70 - 7
Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/OpenDDLParser.h

@@ -39,6 +39,11 @@ struct Identifier;
 struct Reference;
 struct Reference;
 struct Property;
 struct Property;
 
 
+///	@brief  Utility function to search for the next token or the end of the buffer.
+/// @param  in      [in] The start position in the buffer.
+/// @param  end     [in] The end position in the buffer.
+///	@return Pointer showing to the next token or the end of the buffer.
+///	@detail Will not increase buffer when already a valid buffer was found.
 template<class T>
 template<class T>
 inline
 inline
 T *lookForNextToken( T *in, T *end ) {
 T *lookForNextToken( T *in, T *end ) {
@@ -48,13 +53,19 @@ T *lookForNextToken( T *in, T *end ) {
     return in;
     return in;
 }
 }
 
 
+///	@brief  Utility function to go for the next token or the end of the buffer.
+/// @param  in      [in] The start position in the buffer.
+/// @param  end     [in] The end position in the buffer.
+///	@return Pointer showing to the next token or the end of the buffer.
+///	@detail Will  increase buffer by a minimum of one.
 template<class T>
 template<class T>
 inline
 inline
 T *getNextToken( T *in, T *end ) {
 T *getNextToken( T *in, T *end ) {
     T *tmp( in );
     T *tmp( in );
-    while( ( isSpace( *in ) || isNewLine( *in ) || ',' == *in ) && ( in != end ) ) {
+    in = lookForNextToken( in, end );
+    /*while( ( isSpace( *in ) || isNewLine( *in ) || ',' == *in ) && ( in != end ) ) {
         in++;
         in++;
-    }
+    }*/
     if( tmp == in ) {
     if( tmp == in ) {
         in++;
         in++;
     }
     }
@@ -69,22 +80,78 @@ enum LogSeverity {
     ddl_error_msg       ///< Parser errors
     ddl_error_msg       ///< Parser errors
 };
 };
 
 
+DLL_ODDLPARSER_EXPORT const char *getTypeToken( Value::ValueType  type );
+
+//-------------------------------------------------------------------------------------------------
+///	@class		OpenDDLParser
+///	@ingroup	OpenDDLParser
+
+///
+///	@brief  This is the main API for the OpenDDL-parser.
+///
+/// Use instances of this class to manage the parsing and handling of your parser contexts.
+//-------------------------------------------------------------------------------------------------
 class DLL_ODDLPARSER_EXPORT OpenDDLParser {
 class DLL_ODDLPARSER_EXPORT OpenDDLParser {
 public:
 public:
+    ///	@brief  The log callback function pointer.
     typedef void( *logCallback )( LogSeverity severity, const std::string &msg );
     typedef void( *logCallback )( LogSeverity severity, const std::string &msg );
 
 
 public:
 public:
+    ///	@brief  The default class constructor.
     OpenDDLParser();
     OpenDDLParser();
+
+    ///	@brief  The class constructor.
+    ///	@param  buffer      [in] The buffer
+    ///	@param  len         [in] Size of the buffer
     OpenDDLParser( char *buffer, size_t len );
     OpenDDLParser( char *buffer, size_t len );
+
+    ///	@brief  The class destructor.
     ~OpenDDLParser();
     ~OpenDDLParser();
+
+    ///	@brief  Setter for an own log callback function.
+    /// @param  callback    [in] The own callback.
     void setLogCallback( logCallback callback );
     void setLogCallback( logCallback callback );
+
+    ///	@brief  Getter for the log callback.
+    /// @return The current log callback.
     logCallback getLogCallback() const;
     logCallback getLogCallback() const;
+
+    ///	@brief  Assigns a new buffer to parse.
+    ///	@param  buffer      [in] The buffer
+    ///	@param  len         [in] Size of the buffer
     void setBuffer( char *buffer, size_t len );
     void setBuffer( char *buffer, size_t len );
+
+    ///	@brief  Assigns a new buffer to parse.
+    /// @param  buffer      [in] The buffer as a std::vector.
     void setBuffer( const std::vector<char> &buffer );
     void setBuffer( const std::vector<char> &buffer );
+
+    ///	@brief  Returns the buffer pointer.
+    /// @return The buffer pointer.
     const char *getBuffer() const;
     const char *getBuffer() const;
+    
+    /// @brief  Returns the size of the buffer.
+    /// @return The buffer size.
     size_t getBufferSize() const;
     size_t getBufferSize() const;
+    
+    ///	@brief  Clears all parser data, including buffer and active context.
     void clear();
     void clear();
+
+    ///	@brief  Starts the parsing of the OpenDDL-file.
+    /// @return True in case of success, false in case of an error.
+    /// @remark In case of errors check log.
     bool parse();
     bool parse();
+
+    bool exportContext( Context *ctx, const std::string &filename );
+
+    ///	@brief  Returns the root node.
+    /// @return The root node.
+    DDLNode *getRoot() const;
+
+    ///	@brief  Returns the parser context, only available in case of a succeeded parsing.
+    /// @return Pointer to the active context or ddl_nullptr.
+    Context *getContext() const;
+
+public: // parser helpers
     char *parseNextNode( char *current, char *end );
     char *parseNextNode( char *current, char *end );
     char *parseHeader( char *in, char *end );
     char *parseHeader( char *in, char *end );
     char *parseStructure( char *in, char *end );
     char *parseStructure( char *in, char *end );
@@ -92,10 +159,6 @@ public:
     void pushNode( DDLNode *node );
     void pushNode( DDLNode *node );
     DDLNode *popNode();
     DDLNode *popNode();
     DDLNode *top();
     DDLNode *top();
-    DDLNode *getRoot() const;
-    Context *getContext() const;
-
-public: // static parser helpers
     static void normalizeBuffer( std::vector<char> &buffer );
     static void normalizeBuffer( std::vector<char> &buffer );
     static char *parseName( char *in, char *end, Name **name );
     static char *parseName( char *in, char *end, Name **name );
     static char *parseIdentifier( char *in, char *end, Identifier **id );
     static char *parseIdentifier( char *in, char *end, Identifier **id );
@@ -107,7 +170,7 @@ public: // static parser helpers
     static char *parseStringLiteral( char *in, char *end, Value **stringData );
     static char *parseStringLiteral( char *in, char *end, Value **stringData );
     static char *parseHexaLiteral( char *in, char *end, Value **data );
     static char *parseHexaLiteral( char *in, char *end, Value **data );
     static char *parseProperty( char *in, char *end, Property **prop );
     static char *parseProperty( char *in, char *end, Property **prop );
-    static char *parseDataList( char *in, char *end, Value **data, size_t &numValues, Reference **refs, size_t &numRefs );
+    static char *parseDataList( char *in, char *end, Value::ValueType type, Value **data, size_t &numValues, Reference **refs, size_t &numRefs );
     static char *parseDataArrayList( char *in, char *end, DataArrayList **dataList );
     static char *parseDataArrayList( char *in, char *end, DataArrayList **dataList );
     static const char *getVersion();
     static const char *getVersion();
 
 

+ 29 - 1
Source/ThirdParty/Assimp/contrib/openddlparser/include/openddlparser/Value.h

@@ -61,6 +61,8 @@ public:
         /// @param  start   [in] The first value for iteration,
         /// @param  start   [in] The first value for iteration,
         Iterator( Value *start );
         Iterator( Value *start );
 
 
+        Iterator( const Iterator &rhs );
+
         ///	@brief  The class destructor.
         ///	@brief  The class destructor.
         ~Iterator();
         ~Iterator();
 
 
@@ -71,13 +73,27 @@ public:
         ///	@brief  Returns the next item and moves the iterator to it.
         ///	@brief  Returns the next item and moves the iterator to it.
         ///	@return The next value, is ddl_nullptr in case of being the last item.
         ///	@return The next value, is ddl_nullptr in case of being the last item.
         Value *getNext();
         Value *getNext();
+        
+        ///	@brief  The post-increment operator.
+        const Iterator operator++( int );
+        
+        ///	@brief  The pre-increment operator.
+        Iterator &operator++( );
+
+        ///	@brief  The compare operator.
+        /// @param  rhs [in] The instance to compare.
+        /// @return true if equal.
+        bool operator == ( const Iterator &rhs ) const;
+
+        /// @brief  The * operator.
+        /// @return The instance or ddl_nullptr if end of list is reached.
+        Value *operator->( ) const;
 
 
     private:
     private:
         Value *m_start;
         Value *m_start;
         Value *m_current;
         Value *m_current;
 
 
     private:
     private:
-        Iterator( const Iterator & );
         Iterator &operator = ( const Iterator & );
         Iterator &operator = ( const Iterator & );
     };
     };
 
 
@@ -135,11 +151,23 @@ public:
     size_t m_size;
     size_t m_size;
     unsigned char *m_data;
     unsigned char *m_data;
     Value *m_next;
     Value *m_next;
+
+private:
+    Value &operator =( const Value & );
+    Value( const Value  & );
 };
 };
 
 
+///------------------------------------------------------------------------------------------------
+///	@brief  This class implements the value allocator.
+///------------------------------------------------------------------------------------------------
 struct DLL_ODDLPARSER_EXPORT ValueAllocator {
 struct DLL_ODDLPARSER_EXPORT ValueAllocator {
     static Value *allocPrimData( Value::ValueType type, size_t len = 1 );
     static Value *allocPrimData( Value::ValueType type, size_t len = 1 );
     static void releasePrimData( Value **data );
     static void releasePrimData( Value **data );
+
+private:
+    ValueAllocator();
+    ValueAllocator( const ValueAllocator  & );
+    ValueAllocator &operator = ( const ValueAllocator & );
 };
 };
 
 
 END_ODDLPARSER_NS
 END_ODDLPARSER_NS

+ 1 - 1
Source/ThirdParty/Assimp/include/assimp/DefaultLogger.hpp

@@ -135,7 +135,7 @@ private:
     // ----------------------------------------------------------------------
     // ----------------------------------------------------------------------
     /** @briefPrivate construction for internal use by create().
     /** @briefPrivate construction for internal use by create().
      *  @param severity Logging granularity  */
      *  @param severity Logging granularity  */
-    DefaultLogger(LogSeverity severity);
+    explicit DefaultLogger(LogSeverity severity);
 
 
     // ----------------------------------------------------------------------
     // ----------------------------------------------------------------------
     /** @briefDestructor    */
     /** @briefDestructor    */

+ 1 - 1
Source/ThirdParty/Assimp/include/assimp/Logger.hpp

@@ -160,7 +160,7 @@ protected:
     Logger();
     Logger();
 
 
     /** Construction with a given log severity */
     /** Construction with a given log severity */
-    Logger(LogSeverity severity);
+    explicit Logger(LogSeverity severity);
 
 
     // ----------------------------------------------------------------------
     // ----------------------------------------------------------------------
     /** @brief Called as a request to write a specific debug message
     /** @brief Called as a request to write a specific debug message

+ 1 - 1
Source/ThirdParty/Assimp/include/assimp/color4.h

@@ -59,7 +59,7 @@ public:
     aiColor4t () : r(), g(), b(), a() {}
     aiColor4t () : r(), g(), b(), a() {}
     aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a)
     aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a)
         : r(_r), g(_g), b(_b), a(_a) {}
         : r(_r), g(_g), b(_b), a(_a) {}
-    aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {}
+    explicit aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {}
     aiColor4t (const aiColor4t& o)
     aiColor4t (const aiColor4t& o)
         : r(o.r), g(o.g), b(o.b), a(o.a) {}
         : r(o.r), g(o.g), b(o.b), a(o.a) {}
 
 

+ 12 - 12
Source/ThirdParty/Assimp/include/assimp/material.h

@@ -735,7 +735,7 @@ public:
         C_STRUCT aiString* path,
         C_STRUCT aiString* path,
         aiTextureMapping* mapping   = NULL,
         aiTextureMapping* mapping   = NULL,
         unsigned int* uvindex       = NULL,
         unsigned int* uvindex       = NULL,
-        float* blend                   = NULL,
+        float* blend                = NULL,
         aiTextureOp* op             = NULL,
         aiTextureOp* op             = NULL,
         aiTextureMapMode* mapmode   = NULL) const;
         aiTextureMapMode* mapmode   = NULL) const;
 
 
@@ -1344,9 +1344,9 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty(
  *   arrays remains unmodified and pMax is set to 0.*/
  *   arrays remains unmodified and pMax is set to 0.*/
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
 ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
-     const C_STRUCT aiMaterial* pMat,
+    const C_STRUCT aiMaterial* pMat,
     const char* pKey,
     const char* pKey,
-     unsigned int type,
+    unsigned int type,
     unsigned int index,
     unsigned int index,
     float* pOut,
     float* pOut,
     unsigned int* pMax);
     unsigned int* pMax);
@@ -1376,7 +1376,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
 inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
 inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
     const char* pKey,
     const char* pKey,
     unsigned int type,
     unsigned int type,
-   unsigned int index,
+    unsigned int index,
     float* pOut)
     float* pOut)
 {
 {
     return aiGetMaterialFloatArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0);
     return aiGetMaterialFloatArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0);
@@ -1397,11 +1397,11 @@ inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
  *
  *
  * See the sample for aiGetMaterialFloatArray for more information.*/
  * See the sample for aiGetMaterialFloatArray for more information.*/
 ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
 ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
-    const char* pKey,
+     const char* pKey,
      unsigned int  type,
      unsigned int  type,
      unsigned int  index,
      unsigned int  index,
-    int* pOut,
-    unsigned int* pMax);
+     int* pOut,
+     unsigned int* pMax);
 
 
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
@@ -1437,9 +1437,9 @@ inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
 ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
     const char* pKey,
     const char* pKey,
-     unsigned int type,
+    unsigned int type,
     unsigned int index,
     unsigned int index,
-     C_STRUCT aiColor4D* pOut);
+    C_STRUCT aiColor4D* pOut);
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -1449,9 +1449,9 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* pMat,
 ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* pMat,
     const char* pKey,
     const char* pKey,
-     unsigned int type,
+    unsigned int type,
     unsigned int index,
     unsigned int index,
-     C_STRUCT aiUVTransform* pOut);
+    C_STRUCT aiUVTransform* pOut);
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -1461,7 +1461,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* p
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
 ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
     const char* pKey,
     const char* pKey,
-     unsigned int type,
+    unsigned int type,
     unsigned int index,
     unsigned int index,
     C_STRUCT aiString* pOut);
     C_STRUCT aiString* pOut);
 
 

+ 0 - 2
Source/ThirdParty/Assimp/include/assimp/metadata.h

@@ -39,8 +39,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 
 
-// Modified by Lasse Oorni for Urho3D
-
 /** @file metadata.h
 /** @file metadata.h
  *  @brief Defines the data structures for holding node meta information.
  *  @brief Defines the data structures for holding node meta information.
  */
  */

+ 2 - 2
Source/ThirdParty/Assimp/include/assimp/quaternion.h

@@ -60,7 +60,7 @@ public:
         : w(pw), x(px), y(py), z(pz) {}
         : w(pw), x(px), y(py), z(pz) {}
 
 
     /** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */
     /** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */
-    aiQuaterniont( const aiMatrix3x3t<TReal>& pRotMatrix);
+    explicit aiQuaterniont( const aiMatrix3x3t<TReal>& pRotMatrix);
 
 
     /** Construct from euler angles */
     /** Construct from euler angles */
     aiQuaterniont( TReal rotx, TReal roty, TReal rotz);
     aiQuaterniont( TReal rotx, TReal roty, TReal rotz);
@@ -69,7 +69,7 @@ public:
     aiQuaterniont( aiVector3t<TReal> axis, TReal angle);
     aiQuaterniont( aiVector3t<TReal> axis, TReal angle);
 
 
     /** Construct from a normalized quaternion stored in a vec3 */
     /** Construct from a normalized quaternion stored in a vec3 */
-    aiQuaterniont( aiVector3t<TReal> normalized);
+    explicit aiQuaterniont( aiVector3t<TReal> normalized);
 
 
     /** Returns a matrix representation of the quaternion */
     /** Returns a matrix representation of the quaternion */
     aiMatrix3x3t<TReal> GetMatrix() const;
     aiMatrix3x3t<TReal> GetMatrix() const;

+ 1 - 1
Source/ThirdParty/Assimp/include/assimp/scene.h

@@ -135,7 +135,7 @@ struct aiNode
 
 
 
 
     /** Construction from a specific name */
     /** Construction from a specific name */
-    aiNode(const std::string& name)
+    explicit aiNode(const std::string& name)
         // set all members to zero by default
         // set all members to zero by default
         : mName(name)
         : mName(name)
         , mParent(NULL)
         , mParent(NULL)

+ 1 - 2
Source/ThirdParty/Assimp/include/assimp/types.h

@@ -47,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 // Some runtime headers
 // Some runtime headers
 #include <sys/types.h>
 #include <sys/types.h>
-#include <memory.h>
 #include <math.h>
 #include <math.h>
 #include <stddef.h>
 #include <stddef.h>
 #include <string.h>
 #include <string.h>
@@ -161,7 +160,7 @@ struct aiColor3D
 #ifdef __cplusplus
 #ifdef __cplusplus
     aiColor3D () : r(0.0f), g(0.0f), b(0.0f) {}
     aiColor3D () : r(0.0f), g(0.0f), b(0.0f) {}
     aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
     aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
-    aiColor3D (float _r) : r(_r), g(_r), b(_r) {}
+    explicit aiColor3D (float _r) : r(_r), g(_r), b(_r) {}
     aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
     aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
 
 
     /** Component-wise comparison */
     /** Component-wise comparison */