├── .gitattributes ├── .gitignore ├── Content └── MeshLoader.uasset ├── LICENSE ├── README.md ├── Resources └── Icon128.png ├── RuntimeMeshLoader.uplugin ├── Source └── RuntimeMeshLoader │ ├── Private │ ├── LoaderBPFunctionLibrary.cpp │ └── RuntimeMeshLoader.cpp │ ├── Public │ ├── LoaderBPFunctionLibrary.h │ └── RuntimeMeshLoader.h │ └── RuntimeMeshLoader.Build.cs └── ThirdParty └── assimp ├── bin ├── Mac │ ├── .DS_Store │ ├── Debug │ │ ├── assimpd │ │ ├── libassimpd.5.0.1.dylib │ │ ├── libassimpd.5.dylib │ │ ├── libassimpd.dylib │ │ └── unit │ └── Release │ │ ├── assimp │ │ ├── libassimp.5.0.1.dylib │ │ ├── libassimp.5.dylib │ │ ├── libassimp.dylib │ │ └── unit └── Win64 │ ├── Debug │ ├── assimp-vc141-mtd.dll │ ├── assimp-vc141-mtd.ilk │ ├── assimp-vc141-mtd.pdb │ ├── assimpd.exe │ ├── assimpd.ilk │ ├── assimpd.pdb │ ├── unit.exe │ ├── unit.ilk │ ├── unit.pdb │ ├── zlib.dll │ └── zlibstaticd.lib │ └── Release │ ├── assimp-vc141-mt.dll │ ├── assimp.exe │ ├── unit.exe │ └── zlib.dll ├── include ├── ._assimp-back └── assimp │ ├── .editorconfig │ ├── BaseImporter.h │ ├── Bitmap.h │ ├── BlobIOSystem.h │ ├── ByteSwapper.h │ ├── ColladaMetaData.h │ ├── Compiler │ ├── poppack1.h │ ├── pstdint.h │ └── pushpack1.h │ ├── CreateAnimMesh.h │ ├── DefaultIOStream.h │ ├── DefaultIOSystem.h │ ├── DefaultLogger.hpp │ ├── Defines.h │ ├── Exceptional.h │ ├── Exporter.hpp │ ├── GenericProperty.h │ ├── Hash.h │ ├── IOStream.hpp │ ├── IOStreamBuffer.h │ ├── IOSystem.hpp │ ├── Importer.hpp │ ├── LineSplitter.h │ ├── LogAux.h │ ├── LogStream.hpp │ ├── Logger.hpp │ ├── MathFunctions.h │ ├── MemoryIOWrapper.h │ ├── NullLogger.hpp │ ├── ParsingUtils.h │ ├── Profiler.h │ ├── ProgressHandler.hpp │ ├── RemoveComments.h │ ├── SGSpatialSort.h │ ├── SceneCombiner.h │ ├── SkeletonMeshBuilder.h │ ├── SmallVector.h │ ├── SmoothingGroups.h │ ├── SmoothingGroups.inl │ ├── SpatialSort.h │ ├── StandardShapes.h │ ├── StreamReader.h │ ├── StreamWriter.h │ ├── StringComparison.h │ ├── StringUtils.h │ ├── Subdivision.h │ ├── TinyFormatter.h │ ├── Vertex.h │ ├── XMLTools.h │ ├── XmlParser.h │ ├── ZipArchiveIOSystem.h │ ├── aabb.h │ ├── ai_assert.h │ ├── anim.h │ ├── camera.h │ ├── cexport.h │ ├── cfileio.h │ ├── cimport.h │ ├── color4.h │ ├── color4.inl │ ├── commonMetaData.h │ ├── config.h │ ├── config.h.in │ ├── defs.h │ ├── fast_atof.h │ ├── importerdesc.h │ ├── light.h │ ├── material.h │ ├── material.inl │ ├── matrix3x3.h │ ├── matrix3x3.inl │ ├── matrix4x4.h │ ├── matrix4x4.inl │ ├── mesh.h │ ├── metadata.h │ ├── pbrmaterial.h │ ├── port │ └── AndroidJNI │ │ └── AndroidJNIIOSystem.h │ ├── postprocess.h │ ├── qnan.h │ ├── quaternion.h │ ├── quaternion.inl │ ├── scene.h │ ├── texture.h │ ├── types.h │ ├── vector2.h │ ├── vector2.inl │ ├── vector3.h │ ├── vector3.inl │ └── version.h └── lib ├── .DS_Store-back ├── ._.DS_Store-back ├── Mac-old ├── libIrrXML.a ├── libassimp.4.1.0.dylib ├── libassimp.4.dylib └── libassimp.dylib ├── Win32-old ├── Debug │ ├── IrrXML.lib │ ├── IrrXML.pdb │ ├── assimp-vc140-mt.lib │ ├── zlibd.lib │ └── zlibstaticd.lib ├── IrrXML.lib ├── assimp-vc140-mt.lib ├── zlib.lib └── zlibstatic.lib ├── Win64-old ├── IrrXML.lib ├── assimp-vc140-mt.lib ├── zlib.lib └── zlibstatic.lib └── Win64 ├── Debug ├── assimp-vc141-mtd.lib └── zlibstaticd.lib └── Release ├── IrrXML.lib ├── assimp-vc141-mt.lib ├── zlib.lib └── zlibstatic.lib /.gitattributes: -------------------------------------------------------------------------------- 1 | *.exp filter=lfs diff=lfs merge=lfs -text 2 | *.ilk filter=lfs diff=lfs merge=lfs -text 3 | *.pdb filter=lfs diff=lfs merge=lfs -text 4 | *.dylib filter=lfs diff=lfs merge=lfs -text 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Binaries/ 2 | DerivedDataCache/ 3 | Intermediate/ 4 | Saved/ 5 | .vscode/ 6 | .vs/ 7 | *.VC.db 8 | *.opensdf 9 | *.opendb 10 | *.sdf 11 | *.sln 12 | *.suo 13 | *.xcodeproj 14 | *.xcworkspace 15 | *.exp 16 | /Plugins/QCorePlugin/.gitignore 17 | -------------------------------------------------------------------------------- /Content/MeshLoader.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/Content/MeshLoader.uasset -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Eric Liu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RuntimeMeshLoaderExtend 2 | 3 | RuntimeMeshLoaderExtend is extension for RuntimeMeshLoader about UE4.25 4 | 5 | Use this plugin with ProceduralMeshComponent and UStaticMeshComponent, you can load mesh with Blueprint or c++ in runtime,support relative and absolute Path. 6 | 7 | Dependancy Library: 8 | Assimp 5.1.X 9 | 10 | Support Platform 11 | Mac 12 | Windows 13 | 14 | Support file formats 15 | 3DS 16 | BLEND (Blender) 17 | DAE/Collada 18 | FBX 19 | IFC-STEP 20 | ASE 21 | DXF 22 | HMP 23 | MD2 24 | MD3 25 | MD5 26 | MDC 27 | MDL 28 | NFF 29 | PLY 30 | STL 31 | X 32 | OBJ 33 | OpenGEX 34 | SMD 35 | LWO 36 | LXO 37 | LWS 38 | TER 39 | AC3D 40 | MS3D 41 | COB 42 | Q3BSP 43 | XGL 44 | CSM 45 | BVH 46 | B3D 47 | NDO 48 | Ogre Binary 49 | Ogre XML 50 | Q3D 51 | ASSBIN (Assimp custom format) 52 | glTF (partial) 53 | 3MF 54 | -------------------------------------------------------------------------------- /Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/Resources/Icon128.png -------------------------------------------------------------------------------- /RuntimeMeshLoader.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "RuntimeMeshLoader", 6 | "Description": "", 7 | "Category": "Other", 8 | "CreatedBy": "", 9 | "CreatedByURL": "", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "EnabledByDefault": true, 14 | "CanContainContent": true, 15 | "IsBetaVersion": false, 16 | "Installed": false, 17 | "Modules": [ 18 | { 19 | "Name": "RuntimeMeshLoader", 20 | "Type": "Runtime", 21 | "LoadingPhase": "Default" 22 | } 23 | ], 24 | "Plugins": [ 25 | { 26 | "Name": "ProceduralMeshComponent", 27 | "Enabled": true 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Source/RuntimeMeshLoader/Private/RuntimeMeshLoader.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "RuntimeMeshLoader.h" 4 | 5 | #define LOCTEXT_NAMESPACE "FRuntimeMeshLoaderModule" 6 | 7 | 8 | 9 | void FRuntimeMeshLoaderModule::StartupModule() 10 | { 11 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 12 | 13 | //FPlatformProcess::AddDllDirectory(); 14 | const FString PluginDir = IPluginManager::Get().FindPlugin(TEXT("RuntimeMeshLoader"))->GetBaseDir(); 15 | 16 | const FString AssimpBinPath = PluginDir / TEXT ( PREPROCESSOR_TO_STRING(ThirdParty/assimp/Win64/Debug) ); 17 | const FString DLLPath = AssimpBinPath / TEXT ( PREPROCESSOR_TO_STRING(assimp-vc141-mtd.dll) ); 18 | 19 | FPlatformProcess::PushDllDirectory(*AssimpBinPath); 20 | 21 | this->AssimpDllHandle = FPlatformProcess::GetDllHandle(*DLLPath); 22 | 23 | FPlatformProcess::PopDllDirectory(*AssimpBinPath); 24 | } 25 | 26 | void FRuntimeMeshLoaderModule::ShutdownModule() 27 | { 28 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 29 | // we call this function before unloading the module. 30 | 31 | if(this->AssimpDllHandle) 32 | { 33 | FPlatformProcess::FreeDllHandle(this->AssimpDllHandle); 34 | } 35 | 36 | } 37 | 38 | #undef LOCTEXT_NAMESPACE 39 | 40 | IMPLEMENT_MODULE(FRuntimeMeshLoaderModule, RuntimeMeshLoader) -------------------------------------------------------------------------------- /Source/RuntimeMeshLoader/Public/LoaderBPFunctionLibrary.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | #include "ProceduralMeshComponent.h" 5 | #include "Kismet/BlueprintFunctionLibrary.h" 6 | #include "LoaderBPFunctionLibrary.generated.h" 7 | 8 | 9 | class UProceduralMeshComponent; 10 | class UStaticMesh; 11 | 12 | UENUM(BlueprintType) 13 | enum class EPathType : uint8 14 | { 15 | Absolute UMETA(DisplayName = "Absolute"), 16 | Relative UMETA(DisplayName = "Relative") 17 | }; 18 | 19 | USTRUCT(BlueprintType) 20 | struct FMeshInfo 21 | { 22 | GENERATED_USTRUCT_BODY() 23 | 24 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 25 | TArray Vertices; 26 | 27 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 28 | /** Vertices index */ 29 | TArray Triangles; 30 | 31 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 32 | TArray Normals; 33 | 34 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 35 | TArray UV0; 36 | 37 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 38 | TArray UV1; 39 | 40 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 41 | TArray UV2; 42 | 43 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 44 | TArray UV3; 45 | 46 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 47 | TArray VertexColors; 48 | 49 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 50 | TArray Tangents; 51 | 52 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 53 | FTransform RelativeTransform; 54 | }; 55 | 56 | USTRUCT(BlueprintType) 57 | struct FReturnedData 58 | { 59 | GENERATED_USTRUCT_BODY() 60 | 61 | public: 62 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 63 | /**/ 64 | bool bSuccess; 65 | 66 | /** Contain Mesh Count */ 67 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 68 | int32 NumMeshes; 69 | 70 | UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "ReturnedData") 71 | TArray meshInfo; 72 | }; 73 | 74 | 75 | 76 | 77 | /** 78 | * 79 | */ 80 | UCLASS() 81 | class RUNTIMEMESHLOADER_API ULoaderBPFunctionLibrary : public UBlueprintFunctionLibrary 82 | { 83 | GENERATED_BODY() 84 | public: 85 | 86 | /** */ 87 | UFUNCTION( BlueprintCallable, Category="MeshLoader") 88 | static FReturnedData LoadMesh(const FString& filepath, const FTransform& tran, EPathType type= EPathType:: Absolute ); 89 | 90 | /** only static mesh */ 91 | UFUNCTION(BlueprintCallable, Category="MeshLoader" ) 92 | static void LoadMeshToProceduralMesh(UProceduralMeshComponent* target, const FString& filepath, const FTransform& tran, EPathType type = EPathType::Absolute); 93 | 94 | /** */ 95 | UFUNCTION( BlueprintCallable, Category = "MeshLoader", meta = ( HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject" ) ) 96 | static UStaticMesh* LoadMeshToStaticMesh( UObject* WorldContextObject, 97 | const FString& filepath, 98 | const FTransform& tran, 99 | EPathType type = EPathType::Absolute 100 | ); 101 | /** */ 102 | UFUNCTION( BlueprintCallable, Category = "MeshLoader", meta = ( HidePin = "WorldContextObject",DefaultToSelf = "WorldContextObject" ) ) 103 | static UStaticMesh* LoadMeshToStaticMeshFromProceduralMesh(UObject* WorldContextObject, UProceduralMeshComponent* ProcMeshComp); 104 | 105 | 106 | UFUNCTION( BlueprintCallable, Category = "MeshLoader", meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject") ) 107 | static UStaticMesh* TryNewStaticMesh( UObject* WorldContextObject, UProceduralMeshComponent* ProcMeshComp); 108 | }; 109 | -------------------------------------------------------------------------------- /Source/RuntimeMeshLoader/Public/RuntimeMeshLoader.h: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "Modules/ModuleManager.h" 5 | 6 | #include "Interfaces/IPluginManager.h" 7 | #include "HAL/PlatformProcess.h" 8 | class FRuntimeMeshLoaderModule : public IModuleInterface 9 | { 10 | public: 11 | 12 | /** IModuleInterface implementation */ 13 | virtual void StartupModule () override; 14 | virtual void ShutdownModule() override; 15 | 16 | protected: 17 | void* AssimpDllHandle = nullptr; 18 | }; -------------------------------------------------------------------------------- /Source/RuntimeMeshLoader/RuntimeMeshLoader.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.IO; 5 | 6 | public class RuntimeMeshLoader : ModuleRules 7 | { 8 | /** 9 | * 10 | **/ 11 | private string ModulePath 12 | { 13 | get { return ModuleDirectory; } 14 | } 15 | 16 | /** 17 | * 18 | **/ 19 | private string ThirdPartyPath 20 | { 21 | get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); } 22 | } 23 | 24 | /** 25 | * 26 | **/ 27 | private string ProjectPath 28 | { 29 | // Change this according to your module's relative location to your project file. If there is any better way to do this I'm interested! 30 | // Assuming Source/ThirdParty/YourLib/ 31 | get { return Directory.GetParent(ModuleDirectory).Parent.Parent.ToString(); } 32 | } 33 | 34 | public RuntimeMeshLoader(ReadOnlyTargetRules Target) : base(Target) 35 | { 36 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 37 | 38 | PublicIncludePaths.AddRange( 39 | new string[] { 40 | "RuntimeMeshLoader/Public", 41 | Path.Combine(ThirdPartyPath, "assimp/include") 42 | // ... add public include paths required here ... 43 | } 44 | ); 45 | 46 | PrivateIncludePaths.AddRange( 47 | new string[] { 48 | "RuntimeMeshLoader/Private", 49 | // ... add other private include paths required here ... 50 | } 51 | ); 52 | 53 | 54 | PublicDependencyModuleNames.AddRange( 55 | new string[] 56 | { 57 | "Core", 58 | "CoreUObject", 59 | "Engine", 60 | "RHI", 61 | "RenderCore", 62 | "ProceduralMeshComponent", 63 | "MeshDescription", 64 | "StaticMeshDescription", 65 | "Projects" 66 | // ... add other public dependencies that you statically link with here ... 67 | } 68 | ); 69 | 70 | 71 | PrivateDependencyModuleNames.AddRange( 72 | new string[] 73 | { 74 | "Slate", 75 | "SlateCore", 76 | // ... add private dependencies that you statically link with here ... 77 | } 78 | ); 79 | 80 | 81 | DynamicallyLoadedModuleNames.AddRange( 82 | new string[] 83 | { 84 | } 85 | ); 86 | 87 | if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32)) 88 | { 89 | string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64" : "Win32"; 90 | // R 91 | string CompileMode = "Release"; 92 | 93 | string LibName = "assimp-vc141-mt"; 94 | string DLLName = "assimp-vc141-mt"; 95 | 96 | if ( Target.Configuration == UnrealTargetConfiguration.Debug || 97 | Target.Configuration == UnrealTargetConfiguration.DebugGame || 98 | Target.Configuration == UnrealTargetConfiguration.Development) 99 | { 100 | LibName += "d"; 101 | DLLName += "d"; 102 | CompileMode = "Debug"; 103 | } 104 | 105 | 106 | string libpath = Path.Combine(ThirdPartyPath, "assimp", "lib", PlatformString, CompileMode, LibName + ".lib"); 107 | string dllpath = Path.Combine(ThirdPartyPath, "assimp", "bin", PlatformString, CompileMode, DLLName + ".dll"); 108 | 109 | 110 | PublicAdditionalLibraries.Add(libpath); 111 | CopyToBinaries(dllpath, Target); 112 | 113 | RuntimeDependencies.Add(new RuntimeDependency(dllpath)); 114 | 115 | System.Console.WriteLine(@"################## " + libpath); 116 | System.Console.WriteLine(@"################## " + dllpath); 117 | } 118 | else if(Target.Platform == UnrealTargetPlatform.Mac) 119 | { 120 | //string PlatformString = "Mac"; 121 | //PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "assimp", "lib", PlatformString, "libassimp.4.1.0.dylib")); 122 | } 123 | } 124 | 125 | /** 126 | * 127 | **/ 128 | private void CopyToBinaries(string Filepath, ReadOnlyTargetRules Target) 129 | { 130 | 131 | string binariesDir = Path.Combine(this.ProjectPath, "Binaries", Target.Platform.ToString()) ; 132 | string filename = Path.GetFileName(Filepath) ; 133 | string PlatformString = ( Target.Platform == UnrealTargetPlatform.Win64 ) ? "Win64" : "Win32"; 134 | 135 | if (!Directory.Exists(binariesDir)) 136 | { 137 | Directory.CreateDirectory(binariesDir); 138 | } 139 | 140 | if ( !File.Exists(Path.Combine(binariesDir, filename)) ) 141 | { 142 | // System.Console.WriteLine("___________######################################_______" + Path.Combine(binariesDir, filename) + "``````````````" + Filepath); 143 | File.Copy(Filepath, Path.Combine(binariesDir, filename), true); 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Mac/.DS_Store -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Debug/assimpd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Mac/Debug/assimpd -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Debug/libassimpd.5.0.1.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:62ca5dba749999511dfc8e6b210aedee463eb0e631fdb61b9edf62980aa0349f 3 | size 57975696 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Debug/libassimpd.5.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1265b85aa058428e6ec11fe904a3abc5cb3ddd88ff3a5f90e00ef5e5d3dfad86 3 | size 22 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Debug/libassimpd.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:afeac956bafb7b3dcc9c6d5fe795775a4fdbe1c0d185bac3f86b0f50e7bb1143 3 | size 18 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Debug/unit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Mac/Debug/unit -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Release/assimp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Mac/Release/assimp -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Release/libassimp.5.0.1.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c5397c852452dab28f9c7b3c1fbe3c25a72bc834b0887dcac0921bcb0f9fd18b 3 | size 9577200 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Release/libassimp.5.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:eebaa8b4d0b0ece1cb077c984f93ccf4e6921b1d34023ba9e1171b8a8e53a38f 3 | size 21 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Release/libassimp.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3b5d632bec4e1d7b375fa6022a0f5f9873fecaf873e914aa74b1676f0d28f618 3 | size 17 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Mac/Release/unit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Mac/Release/unit -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/assimp-vc141-mtd.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Debug/assimp-vc141-mtd.dll -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/assimp-vc141-mtd.ilk: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5f4727c1a590ce91282efcf2daf25b796c2a103fa622301618ce85916fdb794c 3 | size 139445576 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/assimp-vc141-mtd.pdb: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bd339342a6a67bd13e8b799722a162e47d7a302f40185f2662415e3f20a14a3f 3 | size 100429824 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/assimpd.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Debug/assimpd.exe -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/assimpd.ilk: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:181be5c9282c28ef86760ac070ee40041b4a7d9bc2a3471374152e7a65b1a0ab 3 | size 1878812 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/assimpd.pdb: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6b830a215ed8b169dae79cb25ec46f542d067470a4f4d9040e166255a574d826 3 | size 2560000 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/unit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Debug/unit.exe -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/unit.ilk: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ad5a81dcc165095a20baf2224dfec0acd9f994a483dee6cd01a65187b797e4b3 3 | size 22717212 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/unit.pdb: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d930b13dc4389ace85e375294df193ada9c00948c3ca2161ce0484dace623193 3 | size 17223680 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/zlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Debug/zlib.dll -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Debug/zlibstaticd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Debug/zlibstaticd.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Release/assimp-vc141-mt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Release/assimp-vc141-mt.dll -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Release/assimp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Release/assimp.exe -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Release/unit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Release/unit.exe -------------------------------------------------------------------------------- /ThirdParty/assimp/bin/Win64/Release/zlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/bin/Win64/Release/zlib.dll -------------------------------------------------------------------------------- /ThirdParty/assimp/include/._assimp-back: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/include/._assimp-back -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/.editorconfig: -------------------------------------------------------------------------------- 1 | # See for details 2 | 3 | [*.{h,hpp,inl}] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | indent_size = 4 8 | indent_style = space 9 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Bitmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | 44 | /** @file Bitmap.h 45 | * @brief Defines bitmap format helper for textures 46 | * 47 | * Used for file formats which embed their textures into the model file. 48 | */ 49 | #pragma once 50 | #ifndef AI_BITMAP_H_INC 51 | #define AI_BITMAP_H_INC 52 | 53 | #ifdef __GNUC__ 54 | # pragma GCC system_header 55 | #endif 56 | 57 | #include "defs.h" 58 | #include 59 | #include 60 | 61 | struct aiTexture; 62 | 63 | namespace Assimp { 64 | 65 | class IOStream; 66 | 67 | class ASSIMP_API Bitmap { 68 | protected: 69 | 70 | struct Header { 71 | uint16_t type; 72 | uint32_t size; 73 | uint16_t reserved1; 74 | uint16_t reserved2; 75 | uint32_t offset; 76 | 77 | // We define the struct size because sizeof(Header) might return a wrong result because of structure padding. 78 | // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field). 79 | static const std::size_t header_size = 80 | sizeof(uint16_t) + // type 81 | sizeof(uint32_t) + // size 82 | sizeof(uint16_t) + // reserved1 83 | sizeof(uint16_t) + // reserved2 84 | sizeof(uint32_t); // offset 85 | }; 86 | 87 | struct DIB { 88 | uint32_t size; 89 | int32_t width; 90 | int32_t height; 91 | uint16_t planes; 92 | uint16_t bits_per_pixel; 93 | uint32_t compression; 94 | uint32_t image_size; 95 | int32_t x_resolution; 96 | int32_t y_resolution; 97 | uint32_t nb_colors; 98 | uint32_t nb_important_colors; 99 | 100 | // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding. 101 | // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field). 102 | static const std::size_t dib_size = 103 | sizeof(uint32_t) + // size 104 | sizeof(int32_t) + // width 105 | sizeof(int32_t) + // height 106 | sizeof(uint16_t) + // planes 107 | sizeof(uint16_t) + // bits_per_pixel 108 | sizeof(uint32_t) + // compression 109 | sizeof(uint32_t) + // image_size 110 | sizeof(int32_t) + // x_resolution 111 | sizeof(int32_t) + // y_resolution 112 | sizeof(uint32_t) + // nb_colors 113 | sizeof(uint32_t); // nb_important_colors 114 | }; 115 | 116 | static const std::size_t mBytesPerPixel = 4; 117 | 118 | public: 119 | static void Save(aiTexture* texture, IOStream* file); 120 | 121 | protected: 122 | static void WriteHeader(Header& header, IOStream* file); 123 | static void WriteDIB(DIB& dib, IOStream* file); 124 | static void WriteData(aiTexture* texture, IOStream* file); 125 | }; 126 | 127 | } 128 | 129 | #endif // AI_BITMAP_H_INC 130 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/ColladaMetaData.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file ColladaMetaData.h 44 | * Declares common metadata constants used by Collada files 45 | */ 46 | #pragma once 47 | #ifndef AI_COLLADAMETADATA_H_INC 48 | #define AI_COLLADAMETADATA_H_INC 49 | 50 | #define AI_METADATA_COLLADA_ID "Collada_id" 51 | #define AI_METADATA_COLLADA_SID "Collada_sid" 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Compiler/poppack1.h: -------------------------------------------------------------------------------- 1 | 2 | // =============================================================================== 3 | // May be included multiple times - resets structure packing to the defaults 4 | // for all supported compilers. Reverts the changes made by #include 5 | // 6 | // Currently this works on the following compilers: 7 | // MSVC 7,8,9 8 | // GCC 9 | // BORLAND (complains about 'pack state changed but not reverted', but works) 10 | // =============================================================================== 11 | 12 | #ifndef AI_PUSHPACK_IS_DEFINED 13 | # error pushpack1.h must be included after poppack1.h 14 | #endif 15 | 16 | // reset packing to the original value 17 | #if (defined(_MSC_VER) && !defined(__clang__)) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 18 | # pragma pack( pop ) 19 | #endif 20 | #undef PACK_STRUCT 21 | 22 | #undef AI_PUSHPACK_IS_DEFINED 23 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Compiler/pushpack1.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // =============================================================================== 4 | // May be included multiple times - sets structure packing to 1 5 | // for all supported compilers. #include reverts the changes. 6 | // 7 | // Currently this works on the following compilers: 8 | // MSVC 7,8,9 9 | // GCC 10 | // BORLAND (complains about 'pack state changed but not reverted', but works) 11 | // Clang 12 | // 13 | // 14 | // USAGE: 15 | // 16 | // struct StructToBePacked { 17 | // } PACK_STRUCT; 18 | // 19 | // =============================================================================== 20 | 21 | #ifdef AI_PUSHPACK_IS_DEFINED 22 | # error poppack1.h must be included after pushpack1.h 23 | #endif 24 | 25 | #if (defined(_MSC_VER) && !defined(__clang__)) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 26 | # pragma pack(push,1) 27 | # define PACK_STRUCT 28 | #elif defined( __GNUC__ ) || defined(__clang__) 29 | # if !defined(HOST_MINGW) 30 | # define PACK_STRUCT __attribute__((__packed__)) 31 | # else 32 | # define PACK_STRUCT __attribute__((gcc_struct, __packed__)) 33 | # endif 34 | #else 35 | # error Compiler not supported 36 | #endif 37 | 38 | #if defined(_MSC_VER) 39 | // C4103: Packing was changed after the inclusion of the header, probably missing #pragma pop 40 | # pragma warning (disable : 4103) 41 | #endif 42 | 43 | #define AI_PUSHPACK_IS_DEFINED 44 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/CreateAnimMesh.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file CreateAnimMesh.h 44 | * Create AnimMesh from Mesh 45 | */ 46 | #pragma once 47 | #ifndef INCLUDED_AI_CREATE_ANIM_MESH_H 48 | #define INCLUDED_AI_CREATE_ANIM_MESH_H 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #include 55 | 56 | namespace Assimp { 57 | 58 | /** 59 | * Create aiAnimMesh from aiMesh. 60 | * @param mesh The input mesh to create an animated mesh from. 61 | * @return The new created animated mesh. 62 | */ 63 | ASSIMP_API aiAnimMesh *aiCreateAnimMesh(const aiMesh *mesh); 64 | 65 | } // end of namespace Assimp 66 | 67 | #endif // INCLUDED_AI_CREATE_ANIM_MESH_H 68 | 69 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/DefaultIOStream.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file Default file I/O using fXXX()-family of functions */ 44 | #pragma once 45 | #ifndef AI_DEFAULTIOSTREAM_H_INC 46 | #define AI_DEFAULTIOSTREAM_H_INC 47 | 48 | #ifdef __GNUC__ 49 | # pragma GCC system_header 50 | #endif 51 | 52 | #include 53 | #include 54 | #include 55 | #include 56 | 57 | namespace Assimp { 58 | 59 | // ---------------------------------------------------------------------------------- 60 | //! @class DefaultIOStream 61 | //! @brief Default IO implementation, use standard IO operations 62 | //! @note An instance of this class can exist without a valid file handle 63 | //! attached to it. All calls fail, but the instance can nevertheless be 64 | //! used with no restrictions. 65 | class ASSIMP_API DefaultIOStream : public IOStream { 66 | friend class DefaultIOSystem; 67 | #if __ANDROID__ 68 | # if __ANDROID_API__ > 9 69 | # if defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) 70 | friend class AndroidJNIIOSystem; 71 | # endif // defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) 72 | # endif // __ANDROID_API__ > 9 73 | #endif // __ANDROID__ 74 | 75 | protected: 76 | DefaultIOStream() AI_NO_EXCEPT; 77 | DefaultIOStream(FILE* pFile, const std::string &strFilename); 78 | 79 | public: 80 | /** Destructor public to allow simple deletion to close the file. */ 81 | ~DefaultIOStream (); 82 | 83 | // ------------------------------------------------------------------- 84 | /// Read from stream 85 | size_t Read(void* pvBuffer, 86 | size_t pSize, 87 | size_t pCount); 88 | 89 | // ------------------------------------------------------------------- 90 | /// Write to stream 91 | size_t Write(const void* pvBuffer, 92 | size_t pSize, 93 | size_t pCount); 94 | 95 | // ------------------------------------------------------------------- 96 | /// Seek specific position 97 | aiReturn Seek(size_t pOffset, 98 | aiOrigin pOrigin); 99 | 100 | // ------------------------------------------------------------------- 101 | /// Get current seek position 102 | size_t Tell() const; 103 | 104 | // ------------------------------------------------------------------- 105 | /// Get size of file 106 | size_t FileSize() const; 107 | 108 | // ------------------------------------------------------------------- 109 | /// Flush file contents 110 | void Flush(); 111 | 112 | private: 113 | FILE* mFile; 114 | std::string mFilename; 115 | mutable size_t mCachedSize; 116 | }; 117 | 118 | // ---------------------------------------------------------------------------------- 119 | AI_FORCE_INLINE 120 | DefaultIOStream::DefaultIOStream() AI_NO_EXCEPT 121 | : mFile(nullptr) 122 | , mFilename("") 123 | , mCachedSize(SIZE_MAX) { 124 | // empty 125 | } 126 | 127 | // ---------------------------------------------------------------------------------- 128 | AI_FORCE_INLINE 129 | DefaultIOStream::DefaultIOStream (FILE* pFile, const std::string &strFilename) 130 | : mFile(pFile) 131 | , mFilename(strFilename) 132 | , mCachedSize(SIZE_MAX) { 133 | // empty 134 | } 135 | // ---------------------------------------------------------------------------------- 136 | 137 | } // ns assimp 138 | 139 | #endif //!!AI_DEFAULTIOSTREAM_H_INC 140 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/DefaultIOSystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file Default implementation of IOSystem using the standard C file functions */ 44 | #pragma once 45 | #ifndef AI_DEFAULTIOSYSTEM_H_INC 46 | #define AI_DEFAULTIOSYSTEM_H_INC 47 | 48 | #ifdef __GNUC__ 49 | # pragma GCC system_header 50 | #endif 51 | 52 | #include 53 | 54 | namespace Assimp { 55 | 56 | // --------------------------------------------------------------------------- 57 | /** Default implementation of IOSystem using the standard C file functions */ 58 | class ASSIMP_API DefaultIOSystem : public IOSystem { 59 | public: 60 | // ------------------------------------------------------------------- 61 | /** Tests for the existence of a file at the given path. */ 62 | bool Exists( const char* pFile) const; 63 | 64 | // ------------------------------------------------------------------- 65 | /** Returns the directory separator. */ 66 | char getOsSeparator() const; 67 | 68 | // ------------------------------------------------------------------- 69 | /** Open a new file with a given path. */ 70 | IOStream* Open( const char* pFile, const char* pMode = "rb"); 71 | 72 | // ------------------------------------------------------------------- 73 | /** Closes the given file and releases all resources associated with it. */ 74 | void Close( IOStream* pFile); 75 | 76 | // ------------------------------------------------------------------- 77 | /** Compare two paths */ 78 | bool ComparePaths (const char* one, const char* second) const; 79 | 80 | /** @brief get the file name of a full filepath 81 | * example: /tmp/archive.tar.gz -> archive.tar.gz 82 | */ 83 | static std::string fileName( const std::string &path ); 84 | 85 | /** @brief get the complete base name of a full filepath 86 | * example: /tmp/archive.tar.gz -> archive.tar 87 | */ 88 | static std::string completeBaseName( const std::string &path); 89 | 90 | /** @brief get the path of a full filepath 91 | * example: /tmp/archive.tar.gz -> /tmp/ 92 | */ 93 | static std::string absolutePath( const std::string &path); 94 | }; 95 | 96 | } //!ns Assimp 97 | 98 | #endif //AI_DEFAULTIOSYSTEM_H_INC 99 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | All rights reserved. 7 | 8 | Redistribution and use of this software in source and binary forms, 9 | with or without modification, are permitted provided that the 10 | following conditions are met: 11 | 12 | * Redistributions of source code must retain the above 13 | copyright notice, this list of conditions and the 14 | following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | * Neither the name of the assimp team, nor the names of its 22 | contributors may be used to endorse or promote products 23 | derived from this software without specific prior 24 | written permission of the assimp team. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | ---------------------------------------------------------------------- 39 | */ 40 | 41 | #pragma once 42 | #ifndef AI_DEFINES_H_INC 43 | #define AI_DEFINES_H_INC 44 | 45 | #ifdef __GNUC__ 46 | # pragma GCC system_header 47 | #endif 48 | 49 | // We need those constants, workaround for any platforms where nobody defined them yet 50 | #if (!defined SIZE_MAX) 51 | # define SIZE_MAX (~((size_t)0)) 52 | #endif 53 | 54 | #if (!defined UINT_MAX) 55 | # define UINT_MAX (~((unsigned int)0)) 56 | #endif 57 | 58 | #endif // AI_DEINES_H_INC 59 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Exceptional.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | All rights reserved. 7 | 8 | Redistribution and use of this software in source and binary forms, 9 | with or without modification, are permitted provided that the 10 | following conditions are met: 11 | 12 | * Redistributions of source code must retain the above 13 | copyright notice, this list of conditions and the 14 | following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | * Neither the name of the assimp team, nor the names of its 22 | contributors may be used to endorse or promote products 23 | derived from this software without specific prior 24 | written permission of the assimp team. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | ---------------------------------------------------------------------- 39 | */ 40 | 41 | #pragma once 42 | #ifndef AI_INCLUDED_EXCEPTIONAL_H 43 | #define AI_INCLUDED_EXCEPTIONAL_H 44 | 45 | #ifdef __GNUC__ 46 | #pragma GCC system_header 47 | #endif 48 | 49 | #include 50 | #include 51 | #include 52 | 53 | using std::runtime_error; 54 | 55 | #ifdef _MSC_VER 56 | #pragma warning(disable : 4275) 57 | #endif 58 | 59 | class ASSIMP_API DeadlyErrorBase : public runtime_error { 60 | protected: 61 | DeadlyErrorBase(Assimp::Formatter::format f); 62 | 63 | template 64 | DeadlyErrorBase(Assimp::Formatter::format f, U&& u, T&&... args) : 65 | DeadlyErrorBase(std::move(f << std::forward(u)), std::forward(args)...) {} 66 | }; 67 | 68 | // --------------------------------------------------------------------------- 69 | /** FOR IMPORTER PLUGINS ONLY: Simple exception class to be thrown if an 70 | * unrecoverable error occurs while importing. Loading APIs return 71 | * nullptr instead of a valid aiScene then. */ 72 | class ASSIMP_API DeadlyImportError : public DeadlyErrorBase { 73 | public: 74 | /** Constructor with arguments */ 75 | template 76 | explicit DeadlyImportError(T&&... args) : 77 | DeadlyErrorBase(Assimp::Formatter::format(), std::forward(args)...) {} 78 | }; 79 | 80 | class ASSIMP_API DeadlyExportError : public DeadlyErrorBase { 81 | public: 82 | /** Constructor with arguments */ 83 | template 84 | explicit DeadlyExportError(T&&... args) : 85 | DeadlyErrorBase(Assimp::Formatter::format(), std::forward(args)...) {} 86 | }; 87 | 88 | #ifdef _MSC_VER 89 | #pragma warning(default : 4275) 90 | #endif 91 | 92 | // --------------------------------------------------------------------------- 93 | template 94 | struct ExceptionSwallower { 95 | T operator()() const { 96 | return T(); 97 | } 98 | }; 99 | 100 | // --------------------------------------------------------------------------- 101 | template 102 | struct ExceptionSwallower { 103 | T *operator()() const { 104 | return nullptr; 105 | } 106 | }; 107 | 108 | // --------------------------------------------------------------------------- 109 | template <> 110 | struct ExceptionSwallower { 111 | aiReturn operator()() const { 112 | try { 113 | throw; 114 | } catch (std::bad_alloc &) { 115 | return aiReturn_OUTOFMEMORY; 116 | } catch (...) { 117 | return aiReturn_FAILURE; 118 | } 119 | } 120 | }; 121 | 122 | // --------------------------------------------------------------------------- 123 | template <> 124 | struct ExceptionSwallower { 125 | void operator()() const { 126 | return; 127 | } 128 | }; 129 | 130 | #define ASSIMP_BEGIN_EXCEPTION_REGION() \ 131 | { \ 132 | try { 133 | 134 | #define ASSIMP_END_EXCEPTION_REGION_WITH_ERROR_STRING(type, ASSIMP_END_EXCEPTION_REGION_errorString, ASSIMP_END_EXCEPTION_REGION_exception) \ 135 | } \ 136 | catch (const DeadlyImportError &e) { \ 137 | ASSIMP_END_EXCEPTION_REGION_errorString = e.what(); \ 138 | ASSIMP_END_EXCEPTION_REGION_exception = std::current_exception(); \ 139 | return ExceptionSwallower()(); \ 140 | } \ 141 | catch (...) { \ 142 | ASSIMP_END_EXCEPTION_REGION_errorString = "Unknown exception"; \ 143 | ASSIMP_END_EXCEPTION_REGION_exception = std::current_exception(); \ 144 | return ExceptionSwallower()(); \ 145 | } \ 146 | } 147 | 148 | #define ASSIMP_END_EXCEPTION_REGION(type) \ 149 | } \ 150 | catch (...) { \ 151 | return ExceptionSwallower()(); \ 152 | } \ 153 | } 154 | 155 | #endif // AI_INCLUDED_EXCEPTIONAL_H 156 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/GenericProperty.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | All rights reserved. 8 | 9 | Redistribution and use of this software in source and binary forms, 10 | with or without modification, are permitted provided that the 11 | following conditions are met: 12 | 13 | * Redistributions of source code must retain the above 14 | copyright notice, this list of conditions and the 15 | following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above 18 | copyright notice, this list of conditions and the 19 | following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | * Neither the name of the assimp team, nor the names of its 23 | contributors may be used to endorse or promote products 24 | derived from this software without specific prior 25 | written permission of the assimp team. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 33 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | ---------------------------------------------------------------------- 40 | */ 41 | 42 | #pragma once 43 | #ifndef AI_GENERIC_PROPERTY_H_INCLUDED 44 | #define AI_GENERIC_PROPERTY_H_INCLUDED 45 | 46 | #ifdef __GNUC__ 47 | # pragma GCC system_header 48 | #endif 49 | 50 | #include 51 | #include 52 | #include 53 | 54 | #include 55 | 56 | // ------------------------------------------------------------------------------------------------ 57 | template 58 | inline bool SetGenericProperty(std::map &list, 59 | const char *szName, const T &value) { 60 | ai_assert(nullptr != szName); 61 | const uint32_t hash = SuperFastHash(szName); 62 | 63 | typename std::map::iterator it = list.find(hash); 64 | if (it == list.end()) { 65 | list.insert(std::pair(hash, value)); 66 | return false; 67 | } 68 | (*it).second = value; 69 | 70 | return true; 71 | } 72 | 73 | // ------------------------------------------------------------------------------------------------ 74 | template 75 | inline const T &GetGenericProperty(const std::map &list, 76 | const char *szName, const T &errorReturn) { 77 | ai_assert(nullptr != szName); 78 | const uint32_t hash = SuperFastHash(szName); 79 | 80 | typename std::map::const_iterator it = list.find(hash); 81 | if (it == list.end()) { 82 | return errorReturn; 83 | } 84 | 85 | return (*it).second; 86 | } 87 | 88 | // ------------------------------------------------------------------------------------------------ 89 | // Special version for pointer types - they will be deleted when replaced with another value 90 | // passing nullptr removes the whole property 91 | template 92 | inline void SetGenericPropertyPtr(std::map &list, 93 | const char *szName, T *value, bool *bWasExisting = nullptr) { 94 | ai_assert(nullptr != szName); 95 | const uint32_t hash = SuperFastHash(szName); 96 | 97 | typename std::map::iterator it = list.find(hash); 98 | if (it == list.end()) { 99 | if (bWasExisting) { 100 | *bWasExisting = false; 101 | } 102 | 103 | list.insert(std::pair(hash, value)); 104 | return; 105 | } 106 | if ((*it).second != value) { 107 | delete (*it).second; 108 | (*it).second = value; 109 | } 110 | if (!value) { 111 | list.erase(it); 112 | } 113 | if (bWasExisting) { 114 | *bWasExisting = true; 115 | } 116 | } 117 | 118 | // ------------------------------------------------------------------------------------------------ 119 | template 120 | inline bool HasGenericProperty(const std::map &list, 121 | const char *szName) { 122 | ai_assert(nullptr != szName); 123 | const uint32_t hash = SuperFastHash(szName); 124 | 125 | typename std::map::const_iterator it = list.find(hash); 126 | if (it == list.end()) { 127 | return false; 128 | } 129 | 130 | return true; 131 | } 132 | 133 | #endif // !! AI_GENERIC_PROPERTY_H_INCLUDED 134 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | #pragma once 43 | #ifndef AI_HASH_H_INCLUDED 44 | #define AI_HASH_H_INCLUDED 45 | 46 | #ifdef __GNUC__ 47 | # pragma GCC system_header 48 | #endif 49 | 50 | #include 51 | #include 52 | 53 | // ------------------------------------------------------------------------------------------------ 54 | // Hashing function taken from 55 | // http://www.azillionmonkeys.com/qed/hash.html 56 | // (incremental version) 57 | // 58 | // This code is Copyright 2004-2008 by Paul Hsieh. It is used here in the belief that 59 | // Assimp's license is considered compatible with Pauls's derivative license as specified 60 | // on his web page. 61 | // 62 | // (stdint.h should have been been included here) 63 | // ------------------------------------------------------------------------------------------------ 64 | #undef get16bits 65 | #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ 66 | || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) 67 | #define get16bits(d) (*((const uint16_t *) (d))) 68 | #endif 69 | 70 | #if !defined (get16bits) 71 | #define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\ 72 | +(uint32_t)(((const uint8_t *)(d))[0]) ) 73 | #endif 74 | 75 | // ------------------------------------------------------------------------------------------------ 76 | inline uint32_t SuperFastHash (const char * data, uint32_t len = 0, uint32_t hash = 0) { 77 | uint32_t tmp; 78 | int rem; 79 | 80 | if (!data) return 0; 81 | if (!len)len = (uint32_t)::strlen(data); 82 | 83 | rem = len & 3; 84 | len >>= 2; 85 | 86 | /* Main loop */ 87 | for (;len > 0; len--) { 88 | hash += get16bits (data); 89 | tmp = (get16bits (data+2) << 11) ^ hash; 90 | hash = (hash << 16) ^ tmp; 91 | data += 2*sizeof (uint16_t); 92 | hash += hash >> 11; 93 | } 94 | 95 | /* Handle end cases */ 96 | switch (rem) { 97 | case 3: hash += get16bits (data); 98 | hash ^= hash << 16; 99 | hash ^= data[sizeof (uint16_t)] << 18; 100 | hash += hash >> 11; 101 | break; 102 | case 2: hash += get16bits (data); 103 | hash ^= hash << 11; 104 | hash += hash >> 17; 105 | break; 106 | case 1: hash += *data; 107 | hash ^= hash << 10; 108 | hash += hash >> 1; 109 | } 110 | 111 | /* Force "avalanching" of final 127 bits */ 112 | hash ^= hash << 3; 113 | hash += hash >> 5; 114 | hash ^= hash << 4; 115 | hash += hash >> 17; 116 | hash ^= hash << 25; 117 | hash += hash >> 6; 118 | 119 | return hash; 120 | } 121 | 122 | #endif // !! AI_HASH_H_INCLUDED 123 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/IOStream.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | /** @file IOStream.hpp 44 | * @brief File I/O wrappers for C++. 45 | */ 46 | 47 | #pragma once 48 | #ifndef AI_IOSTREAM_H_INC 49 | #define AI_IOSTREAM_H_INC 50 | 51 | #ifdef __GNUC__ 52 | # pragma GCC system_header 53 | #endif 54 | 55 | #include 56 | 57 | #ifndef __cplusplus 58 | # error This header requires C++ to be used. aiFileIO.h is the \ 59 | corresponding C interface. 60 | #endif 61 | 62 | namespace Assimp { 63 | 64 | // ---------------------------------------------------------------------------------- 65 | /** @brief CPP-API: Class to handle file I/O for C++ 66 | * 67 | * Derive an own implementation from this interface to provide custom IO handling 68 | * to the Importer. If you implement this interface, be sure to also provide an 69 | * implementation for IOSystem that creates instances of your custom IO class. 70 | */ 71 | class ASSIMP_API IOStream 72 | #ifndef SWIG 73 | : public Intern::AllocateFromAssimpHeap 74 | #endif 75 | { 76 | protected: 77 | /** Constructor protected, use IOSystem::Open() to create an instance. */ 78 | IOStream() AI_NO_EXCEPT; 79 | 80 | public: 81 | // ------------------------------------------------------------------- 82 | /** @brief Destructor. Deleting the object closes the underlying file, 83 | * alternatively you may use IOSystem::Close() to release the file. 84 | */ 85 | virtual ~IOStream(); 86 | 87 | // ------------------------------------------------------------------- 88 | /** @brief Read from the file 89 | * 90 | * See fread() for more details 91 | * This fails for write-only files */ 92 | virtual size_t Read(void* pvBuffer, 93 | size_t pSize, 94 | size_t pCount) = 0; 95 | 96 | // ------------------------------------------------------------------- 97 | /** @brief Write to the file 98 | * 99 | * See fwrite() for more details 100 | * This fails for read-only files */ 101 | virtual size_t Write(const void* pvBuffer, 102 | size_t pSize, 103 | size_t pCount) = 0; 104 | 105 | // ------------------------------------------------------------------- 106 | /** @brief Set the read/write cursor of the file 107 | * 108 | * Note that the offset is _negative_ for aiOrigin_END. 109 | * See fseek() for more details */ 110 | virtual aiReturn Seek(size_t pOffset, 111 | aiOrigin pOrigin) = 0; 112 | 113 | // ------------------------------------------------------------------- 114 | /** @brief Get the current position of the read/write cursor 115 | * 116 | * See ftell() for more details */ 117 | virtual size_t Tell() const = 0; 118 | 119 | // ------------------------------------------------------------------- 120 | /** @brief Returns filesize 121 | * Returns the filesize. */ 122 | virtual size_t FileSize() const = 0; 123 | 124 | // ------------------------------------------------------------------- 125 | /** @brief Flush the contents of the file buffer (for writers) 126 | * See fflush() for more details. 127 | */ 128 | virtual void Flush() = 0; 129 | }; //! class IOStream 130 | 131 | // ---------------------------------------------------------------------------------- 132 | AI_FORCE_INLINE 133 | IOStream::IOStream() AI_NO_EXCEPT { 134 | // empty 135 | } 136 | 137 | // ---------------------------------------------------------------------------------- 138 | AI_FORCE_INLINE 139 | IOStream::~IOStream() { 140 | // empty 141 | } 142 | // ---------------------------------------------------------------------------------- 143 | 144 | } //!namespace Assimp 145 | 146 | #endif //!!AI_IOSTREAM_H_INC 147 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/LogAux.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file LogAux.h 44 | * @brief Common logging usage patterns for importer implementations 45 | */ 46 | #pragma once 47 | #ifndef INCLUDED_AI_LOGAUX_H 48 | #define INCLUDED_AI_LOGAUX_H 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #include 55 | #include 56 | #include 57 | 58 | namespace Assimp { 59 | 60 | template 61 | class LogFunctions { 62 | public: 63 | // ------------------------------------------------------------------------------------------------ 64 | template 65 | static void ThrowException(T&&... args) 66 | { 67 | throw DeadlyImportError(Prefix(), args...); 68 | } 69 | 70 | // ------------------------------------------------------------------------------------------------ 71 | static void LogWarn(const Formatter::format& message) { 72 | if (!DefaultLogger::isNullLogger()) { 73 | ASSIMP_LOG_WARN(Prefix()+(std::string)message); 74 | } 75 | } 76 | 77 | // ------------------------------------------------------------------------------------------------ 78 | static void LogError(const Formatter::format& message) { 79 | if (!DefaultLogger::isNullLogger()) { 80 | ASSIMP_LOG_ERROR(Prefix()+(std::string)message); 81 | } 82 | } 83 | 84 | // ------------------------------------------------------------------------------------------------ 85 | static void LogInfo(const Formatter::format& message) { 86 | if (!DefaultLogger::isNullLogger()) { 87 | ASSIMP_LOG_INFO(Prefix()+(std::string)message); 88 | } 89 | } 90 | 91 | // ------------------------------------------------------------------------------------------------ 92 | static void LogDebug(const Formatter::format& message) { 93 | if (!DefaultLogger::isNullLogger()) { 94 | ASSIMP_LOG_DEBUG(Prefix()+(std::string)message); 95 | } 96 | } 97 | 98 | static void LogVerboseDebug(const Formatter::format& message) { 99 | if (!DefaultLogger::isNullLogger()) { 100 | ASSIMP_LOG_VERBOSE_DEBUG(Prefix()+(std::string)message); 101 | } 102 | } 103 | 104 | // https://sourceforge.net/tracker/?func=detail&atid=1067632&aid=3358562&group_id=226462 105 | #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 106 | 107 | // ------------------------------------------------------------------------------------------------ 108 | static void LogWarn (const char* message) { 109 | if (!DefaultLogger::isNullLogger()) { 110 | LogWarn(Formatter::format(message)); 111 | } 112 | } 113 | 114 | // ------------------------------------------------------------------------------------------------ 115 | static void LogError (const char* message) { 116 | if (!DefaultLogger::isNullLogger()) { 117 | LogError(Formatter::format(message)); 118 | } 119 | } 120 | 121 | // ------------------------------------------------------------------------------------------------ 122 | static void LogInfo (const char* message) { 123 | if (!DefaultLogger::isNullLogger()) { 124 | LogInfo(Formatter::format(message)); 125 | } 126 | } 127 | 128 | // ------------------------------------------------------------------------------------------------ 129 | static void LogDebug (const char* message) { 130 | if (!DefaultLogger::isNullLogger()) { 131 | LogDebug(Formatter::format(message)); 132 | } 133 | } 134 | 135 | // ------------------------------------------------------------------------------------------------ 136 | static void LogVerboseDebug (const char* message) { 137 | if (!DefaultLogger::isNullLogger()) { 138 | LogVerboseDebug(Formatter::format(message)); 139 | } 140 | } 141 | #endif 142 | 143 | private: 144 | static const char* Prefix(); 145 | 146 | }; 147 | } // ! Assimp 148 | 149 | #endif 150 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/LogStream.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file LogStream.hpp 44 | * @brief Abstract base class 'LogStream', representing an output log stream. 45 | */ 46 | #ifndef INCLUDED_AI_LOGSTREAM_H 47 | #define INCLUDED_AI_LOGSTREAM_H 48 | 49 | #include "types.h" 50 | 51 | namespace Assimp { 52 | 53 | class IOSystem; 54 | 55 | // ------------------------------------------------------------------------------------ 56 | /** @brief CPP-API: Abstract interface for log stream implementations. 57 | * 58 | * Several default implementations are provided, see #aiDefaultLogStream for more 59 | * details. Writing your own implementation of LogStream is just necessary if these 60 | * are not enough for your purpose. */ 61 | class ASSIMP_API LogStream 62 | #ifndef SWIG 63 | : public Intern::AllocateFromAssimpHeap 64 | #endif 65 | { 66 | protected: 67 | /** @brief Default constructor */ 68 | LogStream() AI_NO_EXCEPT; 69 | 70 | public: 71 | /** @brief Virtual destructor */ 72 | virtual ~LogStream(); 73 | 74 | // ------------------------------------------------------------------- 75 | /** @brief Overwrite this for your own output methods 76 | * 77 | * Log messages *may* consist of multiple lines and you shouldn't 78 | * expect a consistent formatting. If you want custom formatting 79 | * (e.g. generate HTML), supply a custom instance of Logger to 80 | * #DefaultLogger:set(). Usually you can *expect* that a log message 81 | * is exactly one line and terminated with a single \n character. 82 | * @param message Message to be written */ 83 | virtual void write(const char *message) = 0; 84 | 85 | // ------------------------------------------------------------------- 86 | /** @brief Creates a default log stream 87 | * @param streams Type of the default stream 88 | * @param name For aiDefaultLogStream_FILE: name of the output file 89 | * @param io For aiDefaultLogStream_FILE: IOSystem to be used to open the output 90 | * file. Pass nullptr for the default implementation. 91 | * @return New LogStream instance. */ 92 | static LogStream *createDefaultStream(aiDefaultLogStream stream, 93 | const char *name = "AssimpLog.txt", 94 | IOSystem *io = nullptr); 95 | 96 | }; // !class LogStream 97 | 98 | inline LogStream::LogStream() AI_NO_EXCEPT { 99 | // empty 100 | } 101 | 102 | inline LogStream::~LogStream() { 103 | // empty 104 | } 105 | 106 | // ------------------------------------------------------------------------------------ 107 | } // Namespace Assimp 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/MathFunctions.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | 42 | #pragma once 43 | 44 | #ifdef __GNUC__ 45 | # pragma GCC system_header 46 | #endif 47 | 48 | /** @file MathFunctions.h 49 | * @brief Implementation of math utility functions. 50 | * 51 | */ 52 | 53 | #include 54 | 55 | namespace Assimp { 56 | namespace Math { 57 | 58 | /// @brief Will return the greatest common divisor. 59 | /// @param a [in] Value a. 60 | /// @param b [in] Value b. 61 | /// @return The greatest common divisor. 62 | template 63 | inline IntegerType gcd( IntegerType a, IntegerType b ) { 64 | const IntegerType zero = (IntegerType)0; 65 | while ( true ) { 66 | if ( a == zero ) { 67 | return b; 68 | } 69 | b %= a; 70 | 71 | if ( b == zero ) { 72 | return a; 73 | } 74 | a %= b; 75 | } 76 | } 77 | 78 | /// @brief Will return the greatest common divisor. 79 | /// @param a [in] Value a. 80 | /// @param b [in] Value b. 81 | /// @return The greatest common divisor. 82 | template < typename IntegerType > 83 | inline IntegerType lcm( IntegerType a, IntegerType b ) { 84 | const IntegerType t = gcd (a,b); 85 | if (!t) { 86 | return t; 87 | } 88 | return a / t * b; 89 | } 90 | /// @brief Will return the smallest epsilon-value for the requested type. 91 | /// @return The numercical limit epsilon depending on its type. 92 | template 93 | inline T getEpsilon() { 94 | return std::numeric_limits::epsilon(); 95 | } 96 | 97 | /// @brief Will return the constant PI for the requested type. 98 | /// @return Pi 99 | // template 100 | // inline T PI() { 101 | // return static_cast(3.14159265358979323846); 102 | // } 103 | 104 | } // namespace Math 105 | } // namespace Assimp 106 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/NullLogger.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file NullLogger.hpp 44 | * @brief Dummy logger 45 | */ 46 | 47 | #ifndef INCLUDED_AI_NULLLOGGER_H 48 | #define INCLUDED_AI_NULLLOGGER_H 49 | 50 | #include "Logger.hpp" 51 | 52 | namespace Assimp { 53 | 54 | // --------------------------------------------------------------------------- 55 | /** @brief CPP-API: Empty logging implementation. 56 | * 57 | * Does nothing! Used by default if the application hasn't requested a 58 | * custom logger via #DefaultLogger::set() or #DefaultLogger::create(); */ 59 | class ASSIMP_API NullLogger 60 | : public Logger { 61 | 62 | public: 63 | 64 | /** @brief Logs a debug message */ 65 | void OnDebug(const char* message) { 66 | (void)message; //this avoids compiler warnings 67 | } 68 | 69 | /** @brief Logs a verbose debug message */ 70 | void OnVerboseDebug(const char *message) { 71 | (void)message; //this avoids compiler warnings 72 | } 73 | 74 | /** @brief Logs an info message */ 75 | void OnInfo(const char* message) { 76 | (void)message; //this avoids compiler warnings 77 | } 78 | 79 | /** @brief Logs a warning message */ 80 | void OnWarn(const char* message) { 81 | (void)message; //this avoids compiler warnings 82 | } 83 | 84 | /** @brief Logs an error message */ 85 | void OnError(const char* message) { 86 | (void)message; //this avoids compiler warnings 87 | } 88 | 89 | /** @brief Detach a still attached stream from logger */ 90 | bool attachStream(LogStream *pStream, unsigned int severity) { 91 | (void)pStream; (void)severity; //this avoids compiler warnings 92 | return false; 93 | } 94 | 95 | /** @brief Detach a still attached stream from logger */ 96 | bool detachStream(LogStream *pStream, unsigned int severity) { 97 | (void)pStream; (void)severity; //this avoids compiler warnings 98 | return false; 99 | } 100 | 101 | private: 102 | }; 103 | } 104 | #endif // !! AI_NULLLOGGER_H_INCLUDED 105 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Profiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file Profiler.h 44 | * @brief Utility to measure the respective runtime of each import step 45 | */ 46 | #pragma once 47 | #ifndef AI_INCLUDED_PROFILER_H 48 | #define AI_INCLUDED_PROFILER_H 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #include 55 | #include 56 | #include 57 | 58 | #include 59 | 60 | namespace Assimp { 61 | namespace Profiling { 62 | 63 | using namespace Formatter; 64 | 65 | // ------------------------------------------------------------------------------------------------ 66 | /** Simple wrapper around boost::timer to simplify reporting. Timings are automatically 67 | * dumped to the log file. 68 | */ 69 | class Profiler { 70 | public: 71 | Profiler() { 72 | // empty 73 | } 74 | 75 | 76 | /** Start a named timer */ 77 | void BeginRegion(const std::string& region) { 78 | regions[region] = std::chrono::system_clock::now(); 79 | ASSIMP_LOG_DEBUG((format("START `"),region,"`")); 80 | } 81 | 82 | 83 | /** End a specific named timer and write its end time to the log */ 84 | void EndRegion(const std::string& region) { 85 | RegionMap::const_iterator it = regions.find(region); 86 | if (it == regions.end()) { 87 | return; 88 | } 89 | 90 | std::chrono::duration elapsedSeconds = std::chrono::system_clock::now() - regions[region]; 91 | ASSIMP_LOG_DEBUG((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s")); 92 | } 93 | 94 | private: 95 | typedef std::map> RegionMap; 96 | RegionMap regions; 97 | }; 98 | 99 | } 100 | } 101 | 102 | #endif // AI_INCLUDED_PROFILER_H 103 | 104 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/ProgressHandler.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file ProgressHandler.hpp 44 | * @brief Abstract base class 'ProgressHandler'. 45 | */ 46 | #pragma once 47 | #ifndef AI_PROGRESSHANDLER_H_INC 48 | #define AI_PROGRESSHANDLER_H_INC 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #include 55 | 56 | namespace Assimp { 57 | 58 | // ------------------------------------------------------------------------------------ 59 | /** @brief CPP-API: Abstract interface for custom progress report receivers. 60 | * 61 | * Each #Importer instance maintains its own #ProgressHandler. The default 62 | * implementation provided by Assimp doesn't do anything at all. */ 63 | class ASSIMP_API ProgressHandler 64 | #ifndef SWIG 65 | : public Intern::AllocateFromAssimpHeap 66 | #endif 67 | { 68 | protected: 69 | /// @brief Default constructor 70 | ProgressHandler () AI_NO_EXCEPT { 71 | // empty 72 | } 73 | 74 | public: 75 | /// @brief Virtual destructor. 76 | virtual ~ProgressHandler () { 77 | } 78 | 79 | // ------------------------------------------------------------------- 80 | /** @brief Progress callback. 81 | * @param percentage An estimate of the current loading progress, 82 | * in percent. Or -1.f if such an estimate is not available. 83 | * 84 | * There are restriction on what you may do from within your 85 | * implementation of this method: no exceptions may be thrown and no 86 | * non-const #Importer methods may be called. It is 87 | * not generally possible to predict the number of callbacks 88 | * fired during a single import. 89 | * 90 | * @return Return false to abort loading at the next possible 91 | * occasion (loaders and Assimp are generally allowed to perform 92 | * all needed cleanup tasks prior to returning control to the 93 | * caller). If the loading is aborted, #Importer::ReadFile() 94 | * returns always nullptr. 95 | * */ 96 | virtual bool Update(float percentage = -1.f) = 0; 97 | 98 | // ------------------------------------------------------------------- 99 | /** @brief Progress callback for file loading steps 100 | * @param numberOfSteps The number of total post-processing 101 | * steps 102 | * @param currentStep The index of the current post-processing 103 | * step that will run, or equal to numberOfSteps if all of 104 | * them has finished. This number is always strictly monotone 105 | * increasing, although not necessarily linearly. 106 | * 107 | * @note This is currently only used at the start and the end 108 | * of the file parsing. 109 | * */ 110 | virtual void UpdateFileRead(int currentStep /*= 0*/, int numberOfSteps /*= 0*/) { 111 | float f = numberOfSteps ? currentStep / (float)numberOfSteps : 1.0f; 112 | Update( f * 0.5f ); 113 | } 114 | 115 | // ------------------------------------------------------------------- 116 | /** @brief Progress callback for post-processing steps 117 | * @param numberOfSteps The number of total post-processing 118 | * steps 119 | * @param currentStep The index of the current post-processing 120 | * step that will run, or equal to numberOfSteps if all of 121 | * them has finished. This number is always strictly monotone 122 | * increasing, although not necessarily linearly. 123 | * */ 124 | virtual void UpdatePostProcess(int currentStep /*= 0*/, int numberOfSteps /*= 0*/) { 125 | float f = numberOfSteps ? currentStep / (float)numberOfSteps : 1.0f; 126 | Update( f * 0.5f + 0.5f ); 127 | } 128 | 129 | 130 | // ------------------------------------------------------------------- 131 | /** @brief Progress callback for export steps. 132 | * @param numberOfSteps The number of total processing 133 | * steps 134 | * @param currentStep The index of the current post-processing 135 | * step that will run, or equal to numberOfSteps if all of 136 | * them has finished. This number is always strictly monotone 137 | * increasing, although not necessarily linearly. 138 | * */ 139 | virtual void UpdateFileWrite(int currentStep /*= 0*/, int numberOfSteps /*= 0*/) { 140 | float f = numberOfSteps ? currentStep / (float)numberOfSteps : 1.0f; 141 | Update(f * 0.5f); 142 | } 143 | }; // !class ProgressHandler 144 | 145 | // ------------------------------------------------------------------------------------ 146 | 147 | } // Namespace Assimp 148 | 149 | #endif // AI_PROGRESSHANDLER_H_INC 150 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/RemoveComments.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | All rights reserved. 8 | 9 | Redistribution and use of this software in source and binary forms, 10 | with or without modification, are permitted provided that the 11 | following conditions are met: 12 | 13 | * Redistributions of source code must retain the above 14 | copyright notice, this list of conditions and the 15 | following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above 18 | copyright notice, this list of conditions and the 19 | following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | * Neither the name of the assimp team, nor the names of its 23 | contributors may be used to endorse or promote products 24 | derived from this software without specific prior 25 | written permission of the assimp team. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 33 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | ---------------------------------------------------------------------- 40 | */ 41 | 42 | /** @file Declares a helper class, "CommentRemover", which can be 43 | * used to remove comments (single and multi line) from a text file. 44 | */ 45 | #pragma once 46 | #ifndef AI_REMOVE_COMMENTS_H_INC 47 | #define AI_REMOVE_COMMENTS_H_INC 48 | 49 | #ifdef __GNUC__ 50 | # pragma GCC system_header 51 | #endif 52 | 53 | #include 54 | 55 | namespace Assimp { 56 | 57 | // --------------------------------------------------------------------------- 58 | /** \brief Helper class to remove single and multi line comments from a file 59 | * 60 | * Some mesh formats like MD5 have comments that are quite similar 61 | * to those in C or C++ so this code has been moved to a separate 62 | * module. 63 | */ 64 | class ASSIMP_API CommentRemover { 65 | // class cannot be instanced 66 | CommentRemover() {} 67 | 68 | public: 69 | 70 | //! Remove single-line comments. The end of a line is 71 | //! expected to be either NL or CR or NLCR. 72 | //! \param szComment The start sequence of the comment, e.g. "//" 73 | //! \param szBuffer Buffer to work with 74 | //! \param chReplacement Character to be used as replacement 75 | //! for commented lines. By default this is ' ' 76 | static void RemoveLineComments(const char* szComment, 77 | char* szBuffer, char chReplacement = ' '); 78 | 79 | //! Remove multi-line comments. The end of a line is 80 | //! expected to be either NL or CR or NLCR. Multi-line comments 81 | //! may not be nested (as in C). 82 | //! \param szCommentStart The start sequence of the comment, e.g. "/*" 83 | //! \param szCommentEnd The end sequence of the comment, e.g. "*/" 84 | //! \param szBuffer Buffer to work with 85 | //! \param chReplacement Character to be used as replacement 86 | //! for commented lines. By default this is ' ' 87 | static void RemoveMultiLineComments(const char* szCommentStart, 88 | const char* szCommentEnd,char* szBuffer, 89 | char chReplacement = ' '); 90 | }; 91 | } // ! Assimp 92 | 93 | #endif // !! AI_REMOVE_COMMENTS_H_INC 94 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/SGSpatialSort.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** Small helper classes to optimize finding vertices close to a given location 44 | */ 45 | #pragma once 46 | #ifndef AI_D3DSSPATIALSORT_H_INC 47 | #define AI_D3DSSPATIALSORT_H_INC 48 | 49 | #ifdef __GNUC__ 50 | # pragma GCC system_header 51 | #endif 52 | 53 | #include 54 | #include 55 | #include 56 | 57 | namespace Assimp { 58 | 59 | // ---------------------------------------------------------------------------------- 60 | /** Specialized version of SpatialSort to support smoothing groups 61 | * This is used in by the 3DS, ASE and LWO loaders. 3DS and ASE share their 62 | * normal computation code in SmoothingGroups.inl, the LWO loader has its own 63 | * implementation to handle all details of its file format correctly. 64 | */ 65 | // ---------------------------------------------------------------------------------- 66 | class ASSIMP_API SGSpatialSort 67 | { 68 | public: 69 | 70 | SGSpatialSort(); 71 | 72 | // ------------------------------------------------------------------- 73 | /** Construction from a given face array, handling smoothing groups 74 | * properly 75 | */ 76 | explicit SGSpatialSort(const std::vector& vPositions); 77 | 78 | // ------------------------------------------------------------------- 79 | /** Add a vertex to the spatial sort 80 | * @param vPosition Vertex position to be added 81 | * @param index Index of the vrtex 82 | * @param smoothingGroup SmoothingGroup for this vertex 83 | */ 84 | void Add(const aiVector3D& vPosition, unsigned int index, 85 | unsigned int smoothingGroup); 86 | 87 | // ------------------------------------------------------------------- 88 | /** Prepare the spatial sorter for use. This step runs in O(logn) 89 | */ 90 | void Prepare(); 91 | 92 | /** Destructor */ 93 | ~SGSpatialSort(); 94 | 95 | // ------------------------------------------------------------------- 96 | /** Returns an iterator for all positions close to the given position. 97 | * @param pPosition The position to look for vertices. 98 | * @param pSG Only included vertices with at least one shared smooth group 99 | * @param pRadius Maximal distance from the position a vertex may have 100 | * to be counted in. 101 | * @param poResults The container to store the indices of the found 102 | * positions. Will be emptied by the call so it may contain anything. 103 | * @param exactMatch Specifies whether smoothing groups are bit masks 104 | * (false) or integral values (true). In the latter case, a vertex 105 | * cannot belong to more than one smoothing group. 106 | * @return An iterator to iterate over all vertices in the given area. 107 | */ 108 | // ------------------------------------------------------------------- 109 | void FindPositions( const aiVector3D& pPosition, uint32_t pSG, 110 | float pRadius, std::vector& poResults, 111 | bool exactMatch = false) const; 112 | 113 | protected: 114 | /** Normal of the sorting plane, normalized. The center is always at (0, 0, 0) */ 115 | aiVector3D mPlaneNormal; 116 | 117 | // ------------------------------------------------------------------- 118 | /** An entry in a spatially sorted position array. Consists of a 119 | * vertex index, its position and its pre-calculated distance from 120 | * the reference plane */ 121 | // ------------------------------------------------------------------- 122 | struct Entry { 123 | unsigned int mIndex; ///< The vertex referred by this entry 124 | aiVector3D mPosition; ///< Position 125 | uint32_t mSmoothGroups; 126 | float mDistance; ///< Distance of this vertex to the sorting plane 127 | 128 | Entry() AI_NO_EXCEPT 129 | : mIndex(0) 130 | , mPosition() 131 | , mSmoothGroups(0) 132 | , mDistance(0.0f) { 133 | // empty 134 | } 135 | 136 | Entry( unsigned int pIndex, const aiVector3D& pPosition, float pDistance,uint32_t pSG) 137 | : mIndex( pIndex) 138 | , mPosition( pPosition) 139 | , mSmoothGroups(pSG) 140 | , mDistance( pDistance) { 141 | // empty 142 | } 143 | 144 | bool operator < (const Entry& e) const { 145 | return mDistance < e.mDistance; 146 | } 147 | }; 148 | 149 | // all positions, sorted by distance to the sorting plane 150 | std::vector mPositions; 151 | }; 152 | 153 | } // end of namespace Assimp 154 | 155 | #endif // AI_SPATIALSORT_H_INC 156 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/SkeletonMeshBuilder.h: -------------------------------------------------------------------------------- 1 | /** Helper class to construct a dummy mesh for file formats containing only motion data */ 2 | 3 | /* 4 | Open Asset Import Library (assimp) 5 | ---------------------------------------------------------------------- 6 | 7 | Copyright (c) 2006-2020, assimp team 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the 14 | following conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | 42 | ---------------------------------------------------------------------- 43 | */ 44 | 45 | /** @file SkeletonMeshBuilder.h 46 | * Declares SkeletonMeshBuilder, a tiny utility to build dummy meshes 47 | * for animation skeletons. 48 | */ 49 | 50 | #pragma once 51 | #ifndef AI_SKELETONMESHBUILDER_H_INC 52 | #define AI_SKELETONMESHBUILDER_H_INC 53 | 54 | #ifdef __GNUC__ 55 | #pragma GCC system_header 56 | #endif 57 | 58 | #include 59 | #include 60 | 61 | struct aiMaterial; 62 | struct aiScene; 63 | struct aiNode; 64 | 65 | namespace Assimp { 66 | 67 | // --------------------------------------------------------------------------- 68 | /** 69 | * This little helper class constructs a dummy mesh for a given scene 70 | * the resembles the node hierarchy. This is useful for file formats 71 | * that don't carry any mesh data but only animation data. 72 | */ 73 | class ASSIMP_API SkeletonMeshBuilder { 74 | public: 75 | // ------------------------------------------------------------------- 76 | /** The constructor processes the given scene and adds a mesh there. 77 | * 78 | * Does nothing if the scene already has mesh data. 79 | * @param pScene The scene for which a skeleton mesh should be constructed. 80 | * @param root The node to start with. nullptr is the scene root 81 | * @param bKnobsOnly Set this to true if you don't want the connectors 82 | * between the knobs representing the nodes. 83 | */ 84 | SkeletonMeshBuilder(aiScene *pScene, aiNode *root = nullptr, 85 | bool bKnobsOnly = false); 86 | 87 | protected: 88 | // ------------------------------------------------------------------- 89 | /** Recursively builds a simple mesh representation for the given node 90 | * and also creates a joint for the node that affects this part of 91 | * the mesh. 92 | * @param pNode The node to build geometry for. 93 | */ 94 | void CreateGeometry(const aiNode *pNode); 95 | 96 | // ------------------------------------------------------------------- 97 | /** Creates the mesh from the internally accumulated stuff and returns it. 98 | */ 99 | aiMesh *CreateMesh(); 100 | 101 | // ------------------------------------------------------------------- 102 | /** Creates a dummy material and returns it. */ 103 | aiMaterial *CreateMaterial(); 104 | 105 | protected: 106 | /** space to assemble the mesh data: points */ 107 | std::vector mVertices; 108 | 109 | /** faces */ 110 | struct Face { 111 | unsigned int mIndices[3]; 112 | Face(); 113 | Face(unsigned int p0, unsigned int p1, unsigned int p2) { 114 | mIndices[0] = p0; 115 | mIndices[1] = p1; 116 | mIndices[2] = p2; 117 | } 118 | }; 119 | std::vector mFaces; 120 | 121 | /** bones */ 122 | std::vector mBones; 123 | 124 | bool mKnobsOnly; 125 | }; 126 | 127 | } // end of namespace Assimp 128 | 129 | #endif // AI_SKELETONMESHBUILDER_H_INC 130 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/SmallVector.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | All rights reserved. 8 | 9 | Redistribution and use of this software in source and binary forms, 10 | with or without modification, are permitted provided that the 11 | following conditions are met: 12 | 13 | * Redistributions of source code must retain the above 14 | copyright notice, this list of conditions and the 15 | following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above 18 | copyright notice, this list of conditions and the 19 | following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | * Neither the name of the assimp team, nor the names of its 23 | contributors may be used to endorse or promote products 24 | derived from this software without specific prior 25 | written permission of the assimp team. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 33 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | ---------------------------------------------------------------------- 40 | */ 41 | 42 | /** @file Defines small vector with inplace storage. 43 | Based on CppCon 2016: Chandler Carruth "High Performance Code 201: Hybrid Data Structures" */ 44 | 45 | #pragma once 46 | #ifndef AI_SMALLVECTOR_H_INC 47 | #define AI_SMALLVECTOR_H_INC 48 | 49 | #ifdef __GNUC__ 50 | # pragma GCC system_header 51 | #endif 52 | 53 | namespace Assimp { 54 | 55 | // -------------------------------------------------------------------------------------------- 56 | /// @brief Small vector with inplace storage. 57 | /// 58 | /// Reduces heap allocations when list is shorter. It uses a small array for a dedicated size. 59 | /// When the growing gets bigger than this small cache a dynamic growing algorithm will be 60 | /// used. 61 | // -------------------------------------------------------------------------------------------- 62 | template 63 | class SmallVector { 64 | public: 65 | /// @brief The default class constructor. 66 | SmallVector() : 67 | mStorage(mInplaceStorage), 68 | mSize(0), 69 | mCapacity(Capacity) { 70 | // empty 71 | } 72 | 73 | /// @brief The class destructor. 74 | ~SmallVector() { 75 | if (mStorage != mInplaceStorage) { 76 | delete [] mStorage; 77 | } 78 | } 79 | 80 | /// @brief Will push a new item. The capacity will grow in case of a too small capacity. 81 | /// @param item [in] The item to push at the end of the vector. 82 | void push_back(const T& item) { 83 | if (mSize < mCapacity) { 84 | mStorage[mSize++] = item; 85 | return; 86 | } 87 | 88 | push_back_and_grow(item); 89 | } 90 | 91 | /// @brief Will resize the vector. 92 | /// @param newSize [in] The new size. 93 | void resize(size_t newSize) { 94 | if (newSize > mCapacity) { 95 | grow(newSize); 96 | } 97 | mSize = newSize; 98 | } 99 | 100 | /// @brief Returns the current size of the vector. 101 | /// @return The current size. 102 | size_t size() const { 103 | return mSize; 104 | } 105 | 106 | /// @brief Returns a pointer to the first item. 107 | /// @return The first item as a pointer. 108 | T* begin() { 109 | return mStorage; 110 | } 111 | 112 | /// @brief Returns a pointer to the end. 113 | /// @return The end as a pointer. 114 | T* end() { 115 | return &mStorage[mSize]; 116 | } 117 | 118 | /// @brief Returns a const pointer to the first item. 119 | /// @return The first item as a const pointer. 120 | T* begin() const { 121 | return mStorage; 122 | } 123 | 124 | /// @brief Returns a const pointer to the end. 125 | /// @return The end as a const pointer. 126 | T* end() const { 127 | return &mStorage[mSize]; 128 | } 129 | 130 | SmallVector(const SmallVector &) = delete; 131 | SmallVector(SmallVector &&) = delete; 132 | SmallVector &operator = (const SmallVector &) = delete; 133 | SmallVector &operator = (SmallVector &&) = delete; 134 | 135 | private: 136 | void grow( size_t newCapacity) { 137 | T* oldStorage = mStorage; 138 | T* newStorage = new T[newCapacity]; 139 | 140 | std::memcpy(newStorage, oldStorage, mSize * sizeof(T)); 141 | 142 | mStorage = newStorage; 143 | mCapacity = newCapacity; 144 | 145 | if (oldStorage != mInplaceStorage) { 146 | delete [] oldStorage; 147 | } 148 | } 149 | 150 | void push_back_and_grow(const T& item) { 151 | grow(mCapacity + Capacity); 152 | 153 | mStorage[mSize++] = item; 154 | } 155 | 156 | T* mStorage; 157 | size_t mSize; 158 | size_t mCapacity; 159 | T mInplaceStorage[Capacity]; 160 | }; 161 | 162 | } // end namespace Assimp 163 | 164 | #endif // !! AI_SMALLVECTOR_H_INC 165 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/SmoothingGroups.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file Defines the helper data structures for importing 3DS files. 44 | http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */ 45 | 46 | #pragma once 47 | #ifndef AI_SMOOTHINGGROUPS_H_INC 48 | #define AI_SMOOTHINGGROUPS_H_INC 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #include 55 | 56 | #include 57 | #include 58 | 59 | // --------------------------------------------------------------------------- 60 | /** Helper structure representing a face with smoothing groups assigned */ 61 | struct FaceWithSmoothingGroup { 62 | FaceWithSmoothingGroup() AI_NO_EXCEPT 63 | : mIndices() 64 | , iSmoothGroup(0) { 65 | // in debug builds set all indices to a common magic value 66 | #ifdef ASSIMP_BUILD_DEBUG 67 | this->mIndices[0] = 0xffffffff; 68 | this->mIndices[1] = 0xffffffff; 69 | this->mIndices[2] = 0xffffffff; 70 | #endif 71 | } 72 | 73 | 74 | //! Indices. .3ds is using uint16. However, after 75 | //! an unique vertex set has been generated, 76 | //! individual index values might exceed 2^16 77 | uint32_t mIndices[3]; 78 | 79 | //! specifies to which smoothing group the face belongs to 80 | uint32_t iSmoothGroup; 81 | }; 82 | 83 | // --------------------------------------------------------------------------- 84 | /** Helper structure representing a mesh whose faces have smoothing 85 | groups assigned. This allows us to reuse the code for normal computations 86 | from smoothings groups for several loaders (3DS, ASE). All of them 87 | use face structures which inherit from #FaceWithSmoothingGroup, 88 | but as they add extra members and need to be copied by value we 89 | need to use a template here. 90 | */ 91 | template 92 | struct MeshWithSmoothingGroups 93 | { 94 | //! Vertex positions 95 | std::vector mPositions; 96 | 97 | //! Face lists 98 | std::vector mFaces; 99 | 100 | //! List of normal vectors 101 | std::vector mNormals; 102 | }; 103 | 104 | // --------------------------------------------------------------------------- 105 | /** Computes normal vectors for the mesh 106 | */ 107 | template 108 | void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups& sMesh); 109 | 110 | 111 | // include implementations 112 | #include "SmoothingGroups.inl" 113 | 114 | #endif // !! AI_SMOOTHINGGROUPS_H_INC 115 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/SmoothingGroups.inl: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | 42 | /** @file Generation of normal vectors basing on smoothing groups */ 43 | 44 | #pragma once 45 | #ifndef AI_SMOOTHINGGROUPS_INL_INCLUDED 46 | #define AI_SMOOTHINGGROUPS_INL_INCLUDED 47 | 48 | #ifdef __GNUC__ 49 | # pragma GCC system_header 50 | #endif 51 | 52 | #include 53 | 54 | #include 55 | 56 | using namespace Assimp; 57 | 58 | // ------------------------------------------------------------------------------------------------ 59 | template 60 | void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups& sMesh) 61 | { 62 | // First generate face normals 63 | sMesh.mNormals.resize(sMesh.mPositions.size(),aiVector3D()); 64 | for( unsigned int a = 0; a < sMesh.mFaces.size(); a++) 65 | { 66 | T& face = sMesh.mFaces[a]; 67 | 68 | aiVector3D* pV1 = &sMesh.mPositions[face.mIndices[0]]; 69 | aiVector3D* pV2 = &sMesh.mPositions[face.mIndices[1]]; 70 | aiVector3D* pV3 = &sMesh.mPositions[face.mIndices[2]]; 71 | 72 | aiVector3D pDelta1 = *pV2 - *pV1; 73 | aiVector3D pDelta2 = *pV3 - *pV1; 74 | aiVector3D vNor = pDelta1 ^ pDelta2; 75 | 76 | for (unsigned int c = 0; c < 3;++c) 77 | sMesh.mNormals[face.mIndices[c]] = vNor; 78 | } 79 | 80 | // calculate the position bounds so we have a reliable epsilon to check position differences against 81 | aiVector3D minVec( 1e10f, 1e10f, 1e10f), maxVec( -1e10f, -1e10f, -1e10f); 82 | for( unsigned int a = 0; a < sMesh.mPositions.size(); a++) 83 | { 84 | minVec.x = std::min( minVec.x, sMesh.mPositions[a].x); 85 | minVec.y = std::min( minVec.y, sMesh.mPositions[a].y); 86 | minVec.z = std::min( minVec.z, sMesh.mPositions[a].z); 87 | maxVec.x = std::max( maxVec.x, sMesh.mPositions[a].x); 88 | maxVec.y = std::max( maxVec.y, sMesh.mPositions[a].y); 89 | maxVec.z = std::max( maxVec.z, sMesh.mPositions[a].z); 90 | } 91 | const float posEpsilon = (maxVec - minVec).Length() * 1e-5f; 92 | std::vector avNormals; 93 | avNormals.resize(sMesh.mNormals.size()); 94 | 95 | // now generate the spatial sort tree 96 | SGSpatialSort sSort; 97 | for( typename std::vector::iterator i = sMesh.mFaces.begin(); 98 | i != sMesh.mFaces.end();++i) 99 | { 100 | for (unsigned int c = 0; c < 3;++c) 101 | sSort.Add(sMesh.mPositions[(*i).mIndices[c]],(*i).mIndices[c],(*i).iSmoothGroup); 102 | } 103 | sSort.Prepare(); 104 | 105 | std::vector vertexDone(sMesh.mPositions.size(),false); 106 | for( typename std::vector::iterator i = sMesh.mFaces.begin(); 107 | i != sMesh.mFaces.end();++i) 108 | { 109 | std::vector poResult; 110 | for (unsigned int c = 0; c < 3;++c) 111 | { 112 | unsigned int idx = (*i).mIndices[c]; 113 | if (vertexDone[idx])continue; 114 | 115 | sSort.FindPositions(sMesh.mPositions[idx],(*i).iSmoothGroup, 116 | posEpsilon,poResult); 117 | 118 | aiVector3D vNormals; 119 | for (std::vector::const_iterator 120 | a = poResult.begin(); 121 | a != poResult.end();++a) 122 | { 123 | vNormals += sMesh.mNormals[(*a)]; 124 | } 125 | vNormals.NormalizeSafe(); 126 | 127 | // write back into all affected normals 128 | for (std::vector::const_iterator 129 | a = poResult.begin(); 130 | a != poResult.end();++a) 131 | { 132 | idx = *a; 133 | avNormals [idx] = vNormals; 134 | vertexDone[idx] = true; 135 | } 136 | } 137 | } 138 | sMesh.mNormals = avNormals; 139 | } 140 | 141 | #endif // !! AI_SMOOTHINGGROUPS_INL_INCLUDED 142 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/StringUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | #pragma once 43 | #ifndef INCLUDED_AI_STRINGUTILS_H 44 | #define INCLUDED_AI_STRINGUTILS_H 45 | 46 | #ifdef __GNUC__ 47 | #pragma GCC system_header 48 | #endif 49 | 50 | #include 51 | 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | 59 | #ifdef _MSC_VER 60 | #define AI_SIZEFMT "%Iu" 61 | #else 62 | #define AI_SIZEFMT "%zu" 63 | #endif 64 | 65 | /// @fn ai_snprintf 66 | /// @brief The portable version of the function snprintf ( C99 standard ), which works on visual studio compilers 2013 and earlier. 67 | /// @param outBuf The buffer to write in 68 | /// @param size The buffer size 69 | /// @param format The format string 70 | /// @param ap The additional arguments. 71 | /// @return The number of written characters if the buffer size was big enough. If an encoding error occurs, a negative number is returned. 72 | #if defined(_MSC_VER) && _MSC_VER < 1900 73 | 74 | AI_FORCE_INLINE 75 | int c99_ai_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { 76 | int count(-1); 77 | if (0 != size) { 78 | count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); 79 | } 80 | if (count == -1) { 81 | count = _vscprintf(format, ap); 82 | } 83 | 84 | return count; 85 | } 86 | 87 | AI_FORCE_INLINE 88 | int ai_snprintf(char *outBuf, size_t size, const char *format, ...) { 89 | int count; 90 | va_list ap; 91 | 92 | va_start(ap, format); 93 | count = c99_ai_vsnprintf(outBuf, size, format, ap); 94 | va_end(ap); 95 | 96 | return count; 97 | } 98 | 99 | #elif defined(__MINGW32__) 100 | #define ai_snprintf __mingw_snprintf 101 | #else 102 | #define ai_snprintf snprintf 103 | #endif 104 | 105 | /// @fn to_string 106 | /// @brief The portable version of to_string ( some gcc-versions on embedded devices are not supporting this). 107 | /// @param value The value to write into the std::string. 108 | /// @return The value as a std::string 109 | template 110 | AI_FORCE_INLINE std::string to_string(T value) { 111 | std::ostringstream os; 112 | os << value; 113 | 114 | return os.str(); 115 | } 116 | 117 | /// @fn ai_strtof 118 | /// @brief The portable version of strtof. 119 | /// @param begin The first character of the string. 120 | /// @param end The last character 121 | /// @return The float value, 0.0f in cas of an error. 122 | AI_FORCE_INLINE 123 | float ai_strtof(const char *begin, const char *end) { 124 | if (nullptr == begin) { 125 | return 0.0f; 126 | } 127 | float val(0.0f); 128 | if (nullptr == end) { 129 | val = static_cast(::atof(begin)); 130 | } else { 131 | std::string::size_type len(end - begin); 132 | std::string token(begin, len); 133 | val = static_cast(::atof(token.c_str())); 134 | } 135 | 136 | return val; 137 | } 138 | 139 | /// @fn DecimalToHexa 140 | /// @brief The portable to convert a decimal value into a hexadecimal string. 141 | /// @param toConvert Value to convert 142 | /// @return The hexadecimal string, is empty in case of an error. 143 | template 144 | AI_FORCE_INLINE std::string DecimalToHexa(T toConvert) { 145 | std::string result; 146 | std::stringstream ss; 147 | ss << std::hex << toConvert; 148 | ss >> result; 149 | 150 | for (size_t i = 0; i < result.size(); ++i) { 151 | result[i] = (char)toupper(result[i]); 152 | } 153 | 154 | return result; 155 | } 156 | 157 | /// @brief translate RGBA to String 158 | /// @param r aiColor.r 159 | /// @param g aiColor.g 160 | /// @param b aiColor.b 161 | /// @param a aiColor.a 162 | /// @param with_head # 163 | /// @return The hexadecimal string, is empty in case of an error. 164 | AI_FORCE_INLINE std::string Rgba2Hex(int r, int g, int b, int a, bool with_head) { 165 | std::stringstream ss; 166 | if (with_head) { 167 | ss << "#"; 168 | } 169 | ss << std::hex << (r << 24 | g << 16 | b << 8 | a); 170 | 171 | return ss.str(); 172 | } 173 | 174 | // trim from start (in place) 175 | AI_FORCE_INLINE void ltrim(std::string &s) { 176 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { 177 | return !std::isspace(ch); 178 | })); 179 | } 180 | 181 | // trim from end (in place) 182 | AI_FORCE_INLINE void rtrim(std::string &s) { 183 | s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { 184 | return !std::isspace(ch); 185 | }).base(), 186 | s.end()); 187 | } 188 | 189 | // trim from both ends (in place) 190 | AI_FORCE_INLINE void trim(std::string &s) { 191 | ltrim(s); 192 | rtrim(s); 193 | } 194 | 195 | #endif // INCLUDED_AI_STRINGUTILS_H 196 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/Subdivision.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file Defines a helper class to evaluate subdivision surfaces.*/ 44 | #pragma once 45 | #ifndef AI_SUBDISIVION_H_INC 46 | #define AI_SUBDISIVION_H_INC 47 | 48 | #ifdef __GNUC__ 49 | # pragma GCC system_header 50 | #endif 51 | 52 | #include 53 | 54 | struct aiMesh; 55 | 56 | namespace Assimp { 57 | 58 | // ------------------------------------------------------------------------------ 59 | /** Helper class to evaluate subdivision surfaces. Different algorithms 60 | * are provided for choice. */ 61 | // ------------------------------------------------------------------------------ 62 | class ASSIMP_API Subdivider { 63 | public: 64 | 65 | /** Enumerates all supported subvidision algorithms */ 66 | enum Algorithm { 67 | CATMULL_CLARKE = 0x1 68 | }; 69 | 70 | virtual ~Subdivider(); 71 | 72 | // --------------------------------------------------------------- 73 | /** Create a subdivider of a specific type 74 | * 75 | * @param algo Algorithm to be used for subdivision 76 | * @return Subdivider instance. */ 77 | static Subdivider* Create (Algorithm algo); 78 | 79 | // --------------------------------------------------------------- 80 | /** Subdivide a mesh using the selected algorithm 81 | * 82 | * @param mesh First mesh to be subdivided. Must be in verbose 83 | * format. 84 | * @param out Receives the output mesh, allocated by me. 85 | * @param num Number of subdivisions to perform. 86 | * @param discard_input If true is passed, the input mesh is 87 | * deleted after the subdivision is complete. This can 88 | * improve performance because it allows the optimization 89 | * to reuse the existing mesh for intermediate results. 90 | * @pre out!=mesh*/ 91 | virtual void Subdivide ( aiMesh* mesh, 92 | aiMesh*& out, unsigned int num, 93 | bool discard_input = false) = 0; 94 | 95 | // --------------------------------------------------------------- 96 | /** Subdivide multiple meshes using the selected algorithm. This 97 | * avoids erroneous smoothing on objects consisting of multiple 98 | * per-material meshes. Usually, most 3d modellers smooth on a 99 | * per-object base, regardless the materials assigned to the 100 | * meshes. 101 | * 102 | * @param smesh Array of meshes to be subdivided. Must be in 103 | * verbose format. 104 | * @param nmesh Number of meshes in smesh. 105 | * @param out Receives the output meshes. The array must be 106 | * sufficiently large (at least @c nmesh elements) and may not 107 | * overlap the input array. Output meshes map one-to-one to 108 | * their corresponding input meshes. The meshes are allocated 109 | * by the function. 110 | * @param discard_input If true is passed, input meshes are 111 | * deleted after the subdivision is complete. This can 112 | * improve performance because it allows the optimization 113 | * of reusing existing meshes for intermediate results. 114 | * @param num Number of subdivisions to perform. 115 | * @pre nmesh != 0, smesh and out may not overlap*/ 116 | virtual void Subdivide ( 117 | aiMesh** smesh, 118 | size_t nmesh, 119 | aiMesh** out, 120 | unsigned int num, 121 | bool discard_input = false) = 0; 122 | 123 | }; 124 | 125 | inline 126 | Subdivider::~Subdivider() { 127 | // empty 128 | } 129 | 130 | } // end namespace Assimp 131 | 132 | 133 | #endif // !! AI_SUBDISIVION_H_INC 134 | 135 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/TinyFormatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file TinyFormatter.h 44 | * @brief Utility to format log messages more easily. Introduced 45 | * to get rid of the boost::format dependency. Much slinker, 46 | * basically just extends stringstream. 47 | */ 48 | #pragma once 49 | #ifndef INCLUDED_TINY_FORMATTER_H 50 | #define INCLUDED_TINY_FORMATTER_H 51 | 52 | #ifdef __GNUC__ 53 | # pragma GCC system_header 54 | #endif 55 | 56 | #include 57 | 58 | namespace Assimp { 59 | namespace Formatter { 60 | 61 | // ------------------------------------------------------------------------------------------------ 62 | /** stringstream utility. Usage: 63 | * @code 64 | * void writelog(const std::string&s); 65 | * void writelog(const std::wstring&s); 66 | * ... 67 | * writelog(format()<< "hi! this is a number: " << 4); 68 | * writelog(wformat()<< L"hi! this is a number: " << 4); 69 | * 70 | * @endcode */ 71 | template < typename T, 72 | typename CharTraits = std::char_traits, 73 | typename Allocator = std::allocator > 74 | class basic_formatter { 75 | public: 76 | typedef class std::basic_string string; 77 | typedef class std::basic_ostringstream stringstream; 78 | 79 | basic_formatter() { 80 | // empty 81 | } 82 | 83 | /* Allow basic_formatter's to be used almost interchangeably 84 | * with std::(w)string or const (w)char* arguments because the 85 | * conversion c'tor is called implicitly. */ 86 | template 87 | basic_formatter(const TT& sin) { 88 | underlying << sin; 89 | } 90 | 91 | basic_formatter(basic_formatter&& other) 92 | : underlying(std::move(other.underlying)) { 93 | } 94 | 95 | // The problem described here: 96 | // https://sourceforge.net/tracker/?func=detail&atid=1067632&aid=3358562&group_id=226462 97 | // can also cause trouble here. Apparently, older gcc versions sometimes copy temporaries 98 | // being bound to const ref& function parameters. Copying streams is not permitted, though. 99 | // This workaround avoids this by manually specifying a copy ctor. 100 | #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) 101 | explicit basic_formatter(const basic_formatter& other) { 102 | underlying << (string)other; 103 | } 104 | #endif 105 | 106 | operator string () const { 107 | return underlying.str(); 108 | } 109 | 110 | /* note - this is declared const because binding temporaries does only 111 | * work for const references, so many function prototypes will 112 | * include const basic_formatter& s but might still want to 113 | * modify the formatted string without the need for a full copy.*/ 114 | template 115 | const basic_formatter& operator << (const TToken& s) const { 116 | underlying << s; 117 | return *this; 118 | } 119 | 120 | template 121 | basic_formatter& operator << (const TToken& s) { 122 | underlying << s; 123 | return *this; 124 | } 125 | 126 | 127 | // comma operator overloaded as well, choose your preferred way. 128 | template 129 | const basic_formatter& operator, (const TToken& s) const { 130 | underlying << s; 131 | return *this; 132 | } 133 | 134 | template 135 | basic_formatter& operator, (const TToken& s) { 136 | underlying << s; 137 | return *this; 138 | } 139 | 140 | // Fix for MSVC8 141 | // See https://sourceforge.net/projects/assimp/forums/forum/817654/topic/4372824 142 | template 143 | basic_formatter& operator, (TToken& s) { 144 | underlying << s; 145 | return *this; 146 | } 147 | 148 | 149 | private: 150 | mutable stringstream underlying; 151 | }; 152 | 153 | 154 | typedef basic_formatter< char > format; 155 | typedef basic_formatter< wchar_t > wformat; 156 | 157 | } // ! namespace Formatter 158 | 159 | } // ! namespace Assimp 160 | 161 | #endif 162 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/XMLTools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | #pragma once 44 | #ifndef INCLUDED_ASSIMP_XML_TOOLS_H 45 | #define INCLUDED_ASSIMP_XML_TOOLS_H 46 | 47 | #ifdef __GNUC__ 48 | # pragma GCC system_header 49 | #endif 50 | 51 | #include 52 | 53 | namespace Assimp { 54 | // XML escape the 5 XML special characters (",',<,> and &) in |data| 55 | // Based on http://stackoverflow.com/questions/5665231 56 | std::string XMLEscape(const std::string& data) { 57 | std::string buffer; 58 | 59 | const size_t size = data.size(); 60 | buffer.reserve(size + size / 8); 61 | for(size_t i = 0; i < size; ++i) { 62 | const char c = data[i]; 63 | switch(c) { 64 | case '&' : 65 | buffer.append("&"); 66 | break; 67 | case '\"': 68 | buffer.append("""); 69 | break; 70 | case '\'': 71 | buffer.append("'"); 72 | break; 73 | case '<' : 74 | buffer.append("<"); 75 | break; 76 | case '>' : 77 | buffer.append(">"); 78 | break; 79 | default: 80 | buffer.append(&c, 1); 81 | break; 82 | } 83 | } 84 | return buffer; 85 | } 86 | } 87 | 88 | #endif // INCLUDED_ASSIMP_XML_TOOLS_H 89 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/ZipArchiveIOSystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | 44 | /** @file ZipArchiveIOSystem.h 45 | * @brief Implementation of IOSystem to read a ZIP file from another IOSystem 46 | */ 47 | 48 | #pragma once 49 | #ifndef AI_ZIPARCHIVEIOSYSTEM_H_INC 50 | #define AI_ZIPARCHIVEIOSYSTEM_H_INC 51 | 52 | #ifdef __GNUC__ 53 | # pragma GCC system_header 54 | #endif 55 | 56 | #include 57 | #include 58 | 59 | namespace Assimp { 60 | 61 | class ZipArchiveIOSystem : public IOSystem { 62 | public: 63 | //! Open a Zip using the proffered IOSystem 64 | ZipArchiveIOSystem(IOSystem* pIOHandler, const char *pFilename, const char* pMode = "r"); 65 | ZipArchiveIOSystem(IOSystem* pIOHandler, const std::string& rFilename, const char* pMode = "r"); 66 | virtual ~ZipArchiveIOSystem(); 67 | bool Exists(const char* pFilename) const override; 68 | char getOsSeparator() const override; 69 | IOStream* Open(const char* pFilename, const char* pMode = "rb") override; 70 | void Close(IOStream* pFile) override; 71 | 72 | // Specific to ZIP 73 | //! The file was opened and is a ZIP 74 | bool isOpen() const; 75 | 76 | //! Get the list of all files with their simplified paths 77 | //! Intended for use within Assimp library boundaries 78 | void getFileList(std::vector& rFileList) const; 79 | 80 | //! Get the list of all files with extension (must be lowercase) 81 | //! Intended for use within Assimp library boundaries 82 | void getFileListExtension(std::vector& rFileList, const std::string& extension) const; 83 | 84 | static bool isZipArchive(IOSystem* pIOHandler, const char *pFilename); 85 | static bool isZipArchive(IOSystem* pIOHandler, const std::string& rFilename); 86 | 87 | private: 88 | class Implement; 89 | Implement *pImpl = nullptr; 90 | }; 91 | 92 | } // Namespace Assimp 93 | 94 | #endif // AI_ZIPARCHIVEIOSYSTEM_H_INC 95 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/aabb.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | 42 | #pragma once 43 | #ifndef AI_AABB_H_INC 44 | #define AI_AABB_H_INC 45 | 46 | #ifdef __GNUC__ 47 | # pragma GCC system_header 48 | #endif 49 | 50 | #include 51 | 52 | struct aiAABB { 53 | C_STRUCT aiVector3D mMin; 54 | C_STRUCT aiVector3D mMax; 55 | 56 | #ifdef __cplusplus 57 | 58 | aiAABB() 59 | : mMin() 60 | , mMax() { 61 | // empty 62 | } 63 | 64 | aiAABB(const aiVector3D &min, const aiVector3D &max ) 65 | : mMin(min) 66 | , mMax(max) { 67 | // empty 68 | } 69 | 70 | ~aiAABB() { 71 | // empty 72 | } 73 | 74 | #endif // __cplusplus 75 | 76 | }; 77 | 78 | 79 | #endif // AI_AABB_H_INC 80 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/ai_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | #pragma once 42 | #ifndef AI_ASSERT_H_INC 43 | #define AI_ASSERT_H_INC 44 | 45 | #include 46 | 47 | #if defined(ASSIMP_BUILD_DEBUG) 48 | 49 | namespace Assimp 50 | { 51 | // Assert violation behavior can be customized: see AssertHandler.h. 52 | ASSIMP_API void aiAssertViolation(const char* failedExpression, const char* file, int line); 53 | } 54 | 55 | # define ai_assert(expression) (void)((!!(expression)) || (Assimp::aiAssertViolation(#expression, __FILE__, __LINE__), 0)) 56 | # define ai_assert_entry() ai_assert(false) 57 | 58 | #else 59 | # define ai_assert(expression) 60 | # define ai_assert_entry() 61 | #endif // ASSIMP_BUILD_DEBUG 62 | 63 | #endif // AI_ASSERT_H_INC 64 | 65 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/cfileio.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | 44 | /** @file cfileio.h 45 | * @brief Defines generic C routines to access memory-mapped files 46 | */ 47 | #pragma once 48 | #ifndef AI_FILEIO_H_INC 49 | #define AI_FILEIO_H_INC 50 | 51 | #ifdef __GNUC__ 52 | # pragma GCC system_header 53 | #endif 54 | 55 | #include 56 | 57 | #ifdef __cplusplus 58 | extern "C" { 59 | #endif 60 | 61 | struct aiFileIO; 62 | struct aiFile; 63 | 64 | // aiFile callbacks 65 | typedef size_t (*aiFileWriteProc) (C_STRUCT aiFile*, const char*, size_t, size_t); 66 | typedef size_t (*aiFileReadProc) (C_STRUCT aiFile*, char*, size_t,size_t); 67 | typedef size_t (*aiFileTellProc) (C_STRUCT aiFile*); 68 | typedef void (*aiFileFlushProc) (C_STRUCT aiFile*); 69 | typedef C_ENUM aiReturn (*aiFileSeek) (C_STRUCT aiFile*, size_t, C_ENUM aiOrigin); 70 | 71 | // aiFileIO callbacks 72 | typedef C_STRUCT aiFile* (*aiFileOpenProc) (C_STRUCT aiFileIO*, const char*, const char*); 73 | typedef void (*aiFileCloseProc) (C_STRUCT aiFileIO*, C_STRUCT aiFile*); 74 | 75 | // Represents user-defined data 76 | typedef char* aiUserData; 77 | 78 | // ---------------------------------------------------------------------------------- 79 | /** @brief C-API: File system callbacks 80 | * 81 | * Provided are functions to open and close files. Supply a custom structure to 82 | * the import function. If you don't, a default implementation is used. Use custom 83 | * file systems to enable reading from other sources, such as ZIPs 84 | * or memory locations. */ 85 | struct aiFileIO 86 | { 87 | /** Function used to open a new file 88 | */ 89 | aiFileOpenProc OpenProc; 90 | 91 | /** Function used to close an existing file 92 | */ 93 | aiFileCloseProc CloseProc; 94 | 95 | /** User-defined, opaque data */ 96 | aiUserData UserData; 97 | }; 98 | 99 | // ---------------------------------------------------------------------------------- 100 | /** @brief C-API: File callbacks 101 | * 102 | * Actually, it's a data structure to wrap a set of fXXXX (e.g fopen) 103 | * replacement functions. 104 | * 105 | * The default implementation of the functions utilizes the fXXX functions from 106 | * the CRT. However, you can supply a custom implementation to Assimp by 107 | * delivering a custom aiFileIO. Use this to enable reading from other sources, 108 | * such as ZIP archives or memory locations. */ 109 | struct aiFile 110 | { 111 | /** Callback to read from a file */ 112 | aiFileReadProc ReadProc; 113 | 114 | /** Callback to write to a file */ 115 | aiFileWriteProc WriteProc; 116 | 117 | /** Callback to retrieve the current position of 118 | * the file cursor (ftell()) 119 | */ 120 | aiFileTellProc TellProc; 121 | 122 | /** Callback to retrieve the size of the file, 123 | * in bytes 124 | */ 125 | aiFileTellProc FileSizeProc; 126 | 127 | /** Callback to set the current position 128 | * of the file cursor (fseek()) 129 | */ 130 | aiFileSeek SeekProc; 131 | 132 | /** Callback to flush the file contents 133 | */ 134 | aiFileFlushProc FlushProc; 135 | 136 | /** User-defined, opaque data 137 | */ 138 | aiUserData UserData; 139 | }; 140 | 141 | #ifdef __cplusplus 142 | } 143 | #endif 144 | #endif // AI_FILEIO_H_INC 145 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/color4.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | /** @file color4.h 44 | * @brief RGBA color structure, including operators when compiling in C++ 45 | */ 46 | #pragma once 47 | #ifndef AI_COLOR4D_H_INC 48 | #define AI_COLOR4D_H_INC 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #include 55 | 56 | #ifdef __cplusplus 57 | 58 | // ---------------------------------------------------------------------------------- 59 | /** Represents a color in Red-Green-Blue space including an 60 | * alpha component. Color values range from 0 to 1. */ 61 | // ---------------------------------------------------------------------------------- 62 | template 63 | class aiColor4t { 64 | public: 65 | aiColor4t() AI_NO_EXCEPT : r(), g(), b(), a() {} 66 | aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a) 67 | : r(_r), g(_g), b(_b), a(_a) {} 68 | explicit aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {} 69 | aiColor4t (const aiColor4t& o) = default; 70 | 71 | // combined operators 72 | const aiColor4t& operator += (const aiColor4t& o); 73 | const aiColor4t& operator -= (const aiColor4t& o); 74 | const aiColor4t& operator *= (TReal f); 75 | const aiColor4t& operator /= (TReal f); 76 | 77 | // comparison 78 | bool operator == (const aiColor4t& other) const; 79 | bool operator != (const aiColor4t& other) const; 80 | bool operator < (const aiColor4t& other) const; 81 | 82 | // color tuple access, rgba order 83 | inline TReal operator[](unsigned int i) const; 84 | inline TReal& operator[](unsigned int i); 85 | 86 | /** check whether a color is (close to) black */ 87 | inline bool IsBlack() const; 88 | 89 | // Red, green, blue and alpha color values 90 | TReal r, g, b, a; 91 | }; // !struct aiColor4D 92 | 93 | typedef aiColor4t aiColor4D; 94 | 95 | #else 96 | 97 | struct aiColor4D { 98 | ai_real r, g, b, a; 99 | }; 100 | 101 | #endif // __cplusplus 102 | 103 | #endif // AI_COLOR4D_H_INC 104 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/commonMetaData.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | 44 | /** @file commonMetaData.h 45 | * @brief Defines a set of common scene metadata keys. 46 | */ 47 | #pragma once 48 | #ifndef AI_COMMONMETADATA_H_INC 49 | #define AI_COMMONMETADATA_H_INC 50 | 51 | /// Scene metadata holding the name of the importer which loaded the source asset. 52 | /// This is always present if the scene was created from an imported asset. 53 | #define AI_METADATA_SOURCE_FORMAT "SourceAsset_Format" 54 | 55 | /// Scene metadata holding the version of the source asset as a string, if available. 56 | /// Not all formats add this metadata. 57 | #define AI_METADATA_SOURCE_FORMAT_VERSION "SourceAsset_FormatVersion" 58 | 59 | /// Scene metadata holding the name of the software which generated the source asset, if available. 60 | /// Not all formats add this metadata. 61 | #define AI_METADATA_SOURCE_GENERATOR "SourceAsset_Generator" 62 | 63 | /// Scene metadata holding the source asset copyright statement, if available. 64 | /// Not all formats add this metadata. 65 | #define AI_METADATA_SOURCE_COPYRIGHT "SourceAsset_Copyright" 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/importerdesc.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | 42 | /** @file importerdesc.h 43 | * @brief #aiImporterFlags, aiImporterDesc implementation. 44 | */ 45 | #pragma once 46 | #ifndef AI_IMPORTER_DESC_H_INC 47 | #define AI_IMPORTER_DESC_H_INC 48 | 49 | #ifdef __GNUC__ 50 | # pragma GCC system_header 51 | #endif 52 | 53 | #include 54 | 55 | /** Mixed set of flags for #aiImporterDesc, indicating some features 56 | * common to many importers*/ 57 | enum aiImporterFlags { 58 | /** Indicates that there is a textual encoding of the 59 | * file format; and that it is supported.*/ 60 | aiImporterFlags_SupportTextFlavour = 0x1, 61 | 62 | /** Indicates that there is a binary encoding of the 63 | * file format; and that it is supported.*/ 64 | aiImporterFlags_SupportBinaryFlavour = 0x2, 65 | 66 | /** Indicates that there is a compressed encoding of the 67 | * file format; and that it is supported.*/ 68 | aiImporterFlags_SupportCompressedFlavour = 0x4, 69 | 70 | /** Indicates that the importer reads only a very particular 71 | * subset of the file format. This happens commonly for 72 | * declarative or procedural formats which cannot easily 73 | * be mapped to #aiScene */ 74 | aiImporterFlags_LimitedSupport = 0x8, 75 | 76 | /** Indicates that the importer is highly experimental and 77 | * should be used with care. This only happens for trunk 78 | * (i.e. SVN) versions, experimental code is not included 79 | * in releases. */ 80 | aiImporterFlags_Experimental = 0x10 81 | }; 82 | 83 | /** Meta information about a particular importer. Importers need to fill 84 | * this structure, but they can freely decide how talkative they are. 85 | * A common use case for loader meta info is a user interface 86 | * in which the user can choose between various import/export file 87 | * formats. Building such an UI by hand means a lot of maintenance 88 | * as importers/exporters are added to Assimp, so it might be useful 89 | * to have a common mechanism to query some rough importer 90 | * characteristics. */ 91 | struct aiImporterDesc { 92 | /** Full name of the importer (i.e. Blender3D importer)*/ 93 | const char *mName; 94 | 95 | /** Original author (left blank if unknown or whole assimp team) */ 96 | const char *mAuthor; 97 | 98 | /** Current maintainer, left blank if the author maintains */ 99 | const char *mMaintainer; 100 | 101 | /** Implementation comments, i.e. unimplemented features*/ 102 | const char *mComments; 103 | 104 | /** These flags indicate some characteristics common to many 105 | importers. */ 106 | unsigned int mFlags; 107 | 108 | /** Minimum format version that can be loaded im major.minor format, 109 | both are set to 0 if there is either no version scheme 110 | or if the loader doesn't care. */ 111 | unsigned int mMinMajor; 112 | unsigned int mMinMinor; 113 | 114 | /** Maximum format version that can be loaded im major.minor format, 115 | both are set to 0 if there is either no version scheme 116 | or if the loader doesn't care. Loaders that expect to be 117 | forward-compatible to potential future format versions should 118 | indicate zero, otherwise they should specify the current 119 | maximum version.*/ 120 | unsigned int mMaxMajor; 121 | unsigned int mMaxMinor; 122 | 123 | /** List of file extensions this importer can handle. 124 | List entries are separated by space characters. 125 | All entries are lower case without a leading dot (i.e. 126 | "xml dae" would be a valid value. Note that multiple 127 | importers may respond to the same file extension - 128 | assimp calls all importers in the order in which they 129 | are registered and each importer gets the opportunity 130 | to load the file until one importer "claims" the file. Apart 131 | from file extension checks, importers typically use 132 | other methods to quickly reject files (i.e. magic 133 | words) so this does not mean that common or generic 134 | file extensions such as XML would be tediously slow. */ 135 | const char *mFileExtensions; 136 | }; 137 | 138 | /** \brief Returns the Importer description for a given extension. 139 | 140 | Will return a nullptr if no assigned importer desc. was found for the given extension 141 | \param extension [in] The extension to look for 142 | \return A pointer showing to the ImporterDesc, \see aiImporterDesc. 143 | */ 144 | ASSIMP_API const C_STRUCT aiImporterDesc *aiGetImporterDesc(const char *extension); 145 | 146 | #endif // AI_IMPORTER_DESC_H_INC 147 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/matrix3x3.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | 44 | /** @file matrix3x3.h 45 | * @brief Definition of a 3x3 matrix, including operators when compiling in C++ 46 | */ 47 | #pragma once 48 | #ifndef AI_MATRIX3X3_H_INC 49 | #define AI_MATRIX3X3_H_INC 50 | 51 | #ifdef __GNUC__ 52 | # pragma GCC system_header 53 | #endif 54 | 55 | #include 56 | 57 | #ifdef __cplusplus 58 | 59 | template class aiMatrix4x4t; 60 | template class aiVector2t; 61 | template class aiVector3t; 62 | 63 | // --------------------------------------------------------------------------- 64 | /** @brief Represents a row-major 3x3 matrix 65 | * 66 | * There's much confusion about matrix layouts (column vs. row order). 67 | * This is *always* a row-major matrix. Not even with the 68 | * #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect 69 | * matrix order - it just affects the handedness of the coordinate system 70 | * defined thereby. 71 | */ 72 | template 73 | class aiMatrix3x3t { 74 | public: 75 | aiMatrix3x3t() AI_NO_EXCEPT : 76 | a1(static_cast(1.0f)), a2(), a3(), 77 | b1(), b2(static_cast(1.0f)), b3(), 78 | c1(), c2(), c3(static_cast(1.0f)) {} 79 | 80 | aiMatrix3x3t ( TReal _a1, TReal _a2, TReal _a3, 81 | TReal _b1, TReal _b2, TReal _b3, 82 | TReal _c1, TReal _c2, TReal _c3) : 83 | a1(_a1), a2(_a2), a3(_a3), 84 | b1(_b1), b2(_b2), b3(_b3), 85 | c1(_c1), c2(_c2), c3(_c3) 86 | {} 87 | 88 | // matrix multiplication. 89 | aiMatrix3x3t& operator *= (const aiMatrix3x3t& m); 90 | aiMatrix3x3t operator * (const aiMatrix3x3t& m) const; 91 | 92 | // array access operators 93 | TReal* operator[] (unsigned int p_iIndex); 94 | const TReal* operator[] (unsigned int p_iIndex) const; 95 | 96 | // comparison operators 97 | bool operator== (const aiMatrix3x3t& m) const; 98 | bool operator!= (const aiMatrix3x3t& m) const; 99 | 100 | bool Equal(const aiMatrix3x3t& m, TReal epsilon = 1e-6) const; 101 | 102 | template 103 | operator aiMatrix3x3t () const; 104 | 105 | // ------------------------------------------------------------------- 106 | /** @brief Construction from a 4x4 matrix. The remaining parts 107 | * of the matrix are ignored. 108 | */ 109 | explicit aiMatrix3x3t( const aiMatrix4x4t& pMatrix); 110 | 111 | // ------------------------------------------------------------------- 112 | /** @brief Transpose the matrix 113 | */ 114 | aiMatrix3x3t& Transpose(); 115 | 116 | // ------------------------------------------------------------------- 117 | /** @brief Invert the matrix. 118 | * If the matrix is not invertible all elements are set to qnan. 119 | * Beware, use (f != f) to check whether a TReal f is qnan. 120 | */ 121 | aiMatrix3x3t& Inverse(); 122 | TReal Determinant() const; 123 | 124 | // ------------------------------------------------------------------- 125 | /** @brief Returns a rotation matrix for a rotation around z 126 | * @param a Rotation angle, in radians 127 | * @param out Receives the output matrix 128 | * @return Reference to the output matrix 129 | */ 130 | static aiMatrix3x3t& RotationZ(TReal a, aiMatrix3x3t& out); 131 | 132 | // ------------------------------------------------------------------- 133 | /** @brief Returns a rotation matrix for a rotation around 134 | * an arbitrary axis. 135 | * 136 | * @param a Rotation angle, in radians 137 | * @param axis Axis to rotate around 138 | * @param out To be filled 139 | */ 140 | static aiMatrix3x3t& Rotation( TReal a, const aiVector3t& axis, aiMatrix3x3t& out); 141 | 142 | // ------------------------------------------------------------------- 143 | /** @brief Returns a translation matrix 144 | * @param v Translation vector 145 | * @param out Receives the output matrix 146 | * @return Reference to the output matrix 147 | */ 148 | static aiMatrix3x3t& Translation( const aiVector2t& v, aiMatrix3x3t& out); 149 | 150 | // ------------------------------------------------------------------- 151 | /** @brief A function for creating a rotation matrix that rotates a 152 | * vector called "from" into another vector called "to". 153 | * Input : from[3], to[3] which both must be *normalized* non-zero vectors 154 | * Output: mtx[3][3] -- a 3x3 matrix in column-major form 155 | * Authors: Tomas Möller, John Hughes 156 | * "Efficiently Building a Matrix to Rotate One Vector to Another" 157 | * Journal of Graphics Tools, 4(4):1-4, 1999 158 | */ 159 | static aiMatrix3x3t& FromToMatrix(const aiVector3t& from, 160 | const aiVector3t& to, aiMatrix3x3t& out); 161 | 162 | public: 163 | TReal a1, a2, a3; 164 | TReal b1, b2, b3; 165 | TReal c1, c2, c3; 166 | }; 167 | 168 | typedef aiMatrix3x3t aiMatrix3x3; 169 | 170 | #else 171 | 172 | struct aiMatrix3x3 { 173 | ai_real a1, a2, a3; 174 | ai_real b1, b2, b3; 175 | ai_real c1, c2, c3; 176 | }; 177 | 178 | #endif // __cplusplus 179 | 180 | #endif // AI_MATRIX3X3_H_INC 181 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/pbrmaterial.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | 42 | /** @file pbrmaterial.h 43 | * @brief Defines the material system of the library 44 | */ 45 | #pragma once 46 | #ifndef AI_PBRMATERIAL_H_INC 47 | #define AI_PBRMATERIAL_H_INC 48 | 49 | #ifdef __GNUC__ 50 | # pragma GCC system_header 51 | #endif 52 | 53 | #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR "$mat.gltf.pbrMetallicRoughness.baseColorFactor", 0, 0 54 | #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR "$mat.gltf.pbrMetallicRoughness.metallicFactor", 0, 0 55 | #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR "$mat.gltf.pbrMetallicRoughness.roughnessFactor", 0, 0 56 | #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE aiTextureType_DIFFUSE, 1 57 | #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE aiTextureType_UNKNOWN, 0 58 | #define AI_MATKEY_GLTF_ALPHAMODE "$mat.gltf.alphaMode", 0, 0 59 | #define AI_MATKEY_GLTF_ALPHACUTOFF "$mat.gltf.alphaCutoff", 0, 0 60 | #define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS "$mat.gltf.pbrSpecularGlossiness", 0, 0 61 | #define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR "$mat.gltf.pbrMetallicRoughness.glossinessFactor", 0, 0 62 | #define AI_MATKEY_GLTF_UNLIT "$mat.gltf.unlit", 0, 0 63 | 64 | #define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE "$tex.file.texCoord" 65 | #define _AI_MATKEY_GLTF_MAPPINGNAME_BASE "$tex.mappingname" 66 | #define _AI_MATKEY_GLTF_MAPPINGID_BASE "$tex.mappingid" 67 | #define _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE "$tex.mappingfiltermag" 68 | #define _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE "$tex.mappingfiltermin" 69 | #define _AI_MATKEY_GLTF_SCALE_BASE "$tex.scale" 70 | #define _AI_MATKEY_GLTF_STRENGTH_BASE "$tex.strength" 71 | 72 | #define AI_MATKEY_GLTF_TEXTURE_TEXCOORD(type, N) _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, type, N 73 | #define AI_MATKEY_GLTF_MAPPINGNAME(type, N) _AI_MATKEY_GLTF_MAPPINGNAME_BASE, type, N 74 | #define AI_MATKEY_GLTF_MAPPINGID(type, N) _AI_MATKEY_GLTF_MAPPINGID_BASE, type, N 75 | #define AI_MATKEY_GLTF_MAPPINGFILTER_MAG(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, type, N 76 | #define AI_MATKEY_GLTF_MAPPINGFILTER_MIN(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, type, N 77 | #define AI_MATKEY_GLTF_TEXTURE_SCALE(type, N) _AI_MATKEY_GLTF_SCALE_BASE, type, N 78 | #define AI_MATKEY_GLTF_TEXTURE_STRENGTH(type, N) _AI_MATKEY_GLTF_STRENGTH_BASE, type, N 79 | 80 | #endif //!!AI_PBRMATERIAL_H_INC 81 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | All rights reserved. 7 | 8 | Redistribution and use of this software in source and binary forms, 9 | with or without modification, are permitted provided that the 10 | following conditions are met: 11 | 12 | * Redistributions of source code must retain the above 13 | copyright notice, this list of conditions and the 14 | following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | * Neither the name of the assimp team, nor the names of its 22 | contributors may be used to endorse or promote products 23 | derived from this software without specific prior 24 | written permission of the assimp team. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | ---------------------------------------------------------------------- 39 | */ 40 | 41 | /** @file Android implementation of IOSystem using the standard C file functions. 42 | * Aimed to ease the access to android assets */ 43 | 44 | #if __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) 45 | #ifndef AI_ANDROIDJNIIOSYSTEM_H_INC 46 | #define AI_ANDROIDJNIIOSYSTEM_H_INC 47 | 48 | #include 49 | #include 50 | #include 51 | #include 52 | 53 | namespace Assimp { 54 | 55 | // --------------------------------------------------------------------------- 56 | /** Android extension to DefaultIOSystem using the standard C file functions */ 57 | class ASSIMP_API AndroidJNIIOSystem : public DefaultIOSystem 58 | { 59 | public: 60 | 61 | /** Initialize android activity data */ 62 | std::string mApkWorkspacePath; 63 | AAssetManager* mApkAssetManager; 64 | 65 | /** Constructor. */ 66 | AndroidJNIIOSystem(ANativeActivity* activity); 67 | 68 | /** Destructor. */ 69 | ~AndroidJNIIOSystem(); 70 | 71 | // ------------------------------------------------------------------- 72 | /** Tests for the existence of a file at the given path. */ 73 | bool Exists( const char* pFile) const; 74 | 75 | // ------------------------------------------------------------------- 76 | /** Opens a file at the given path, with given mode */ 77 | IOStream* Open( const char* strFile, const char* strMode); 78 | 79 | // ------------------------------------------------------------------------------------------------ 80 | // Inits Android extractor 81 | void AndroidActivityInit(ANativeActivity* activity); 82 | 83 | // ------------------------------------------------------------------------------------------------ 84 | // Extracts android asset 85 | bool AndroidExtractAsset(std::string name); 86 | 87 | }; 88 | 89 | } //!ns Assimp 90 | 91 | #endif //AI_ANDROIDJNIIOSYSTEM_H_INC 92 | #endif //__ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) 93 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/qnan.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | 44 | /** @file qnan.h 45 | * @brief Some utilities for our dealings with qnans. 46 | * 47 | * @note Some loaders use qnans to mark invalid values tempoarily, also 48 | * Assimp explicitly enforces undefined normals to be set to qnan. 49 | * qnan utilities are available in standard libraries (C99 for example) 50 | * but last time I checked compiler coverage was so bad that I decided 51 | * to reinvent the wheel. 52 | */ 53 | #pragma once 54 | #ifndef AI_QNAN_H_INCLUDED 55 | #define AI_QNAN_H_INCLUDED 56 | 57 | #ifdef __GNUC__ 58 | # pragma GCC system_header 59 | #endif 60 | 61 | #include 62 | 63 | #include 64 | #include 65 | 66 | // --------------------------------------------------------------------------- 67 | /** Data structure to represent the bit pattern of a 32 Bit 68 | * IEEE 754 floating-point number. */ 69 | union _IEEESingle { 70 | float Float; 71 | struct 72 | { 73 | uint32_t Frac : 23; 74 | uint32_t Exp : 8; 75 | uint32_t Sign : 1; 76 | } IEEE; 77 | }; 78 | 79 | // --------------------------------------------------------------------------- 80 | /** Data structure to represent the bit pattern of a 64 Bit 81 | * IEEE 754 floating-point number. */ 82 | union _IEEEDouble { 83 | double Double; 84 | struct 85 | { 86 | uint64_t Frac : 52; 87 | uint64_t Exp : 11; 88 | uint64_t Sign : 1; 89 | } IEEE; 90 | }; 91 | 92 | // --------------------------------------------------------------------------- 93 | /** Check whether a given float is qNaN. 94 | * @param in Input value */ 95 | AI_FORCE_INLINE bool is_qnan(float in) { 96 | // the straightforward solution does not work: 97 | // return (in != in); 98 | // compiler generates code like this 99 | // load to 100 | // compare against 101 | 102 | // FIXME: Use stuff instead? I think fpclassify needs C99 103 | _IEEESingle temp; 104 | memcpy(&temp, &in, sizeof(float)); 105 | return (temp.IEEE.Exp == (1u << 8)-1 && 106 | temp.IEEE.Frac); 107 | } 108 | 109 | // --------------------------------------------------------------------------- 110 | /** Check whether a given double is qNaN. 111 | * @param in Input value */ 112 | AI_FORCE_INLINE bool is_qnan(double in) { 113 | // the straightforward solution does not work: 114 | // return (in != in); 115 | // compiler generates code like this 116 | // load to 117 | // compare against 118 | 119 | // FIXME: Use stuff instead? I think fpclassify needs C99 120 | _IEEEDouble temp; 121 | memcpy(&temp, &in, sizeof(in)); 122 | return (temp.IEEE.Exp == (1u << 11)-1 && 123 | temp.IEEE.Frac); 124 | } 125 | 126 | // --------------------------------------------------------------------------- 127 | /** @brief check whether a float is either NaN or (+/-) INF. 128 | * 129 | * Denorms return false, they're treated like normal values. 130 | * @param in Input value */ 131 | AI_FORCE_INLINE bool is_special_float(float in) { 132 | _IEEESingle temp; 133 | memcpy(&temp, &in, sizeof(float)); 134 | return (temp.IEEE.Exp == (1u << 8)-1); 135 | } 136 | 137 | // --------------------------------------------------------------------------- 138 | /** @brief check whether a double is either NaN or (+/-) INF. 139 | * 140 | * Denorms return false, they're treated like normal values. 141 | * @param in Input value */ 142 | AI_FORCE_INLINE bool is_special_float(double in) { 143 | _IEEESingle temp; 144 | memcpy(&temp, &in, sizeof(float)); 145 | return (temp.IEEE.Exp == (1u << 11)-1); 146 | } 147 | 148 | // --------------------------------------------------------------------------- 149 | /** Check whether a float is NOT qNaN. 150 | * @param in Input value */ 151 | template 152 | AI_FORCE_INLINE bool is_not_qnan(TReal in) { 153 | return !is_qnan(in); 154 | } 155 | 156 | // --------------------------------------------------------------------------- 157 | /** @brief Get a fresh qnan. */ 158 | AI_FORCE_INLINE ai_real get_qnan() { 159 | return std::numeric_limits::quiet_NaN(); 160 | } 161 | 162 | #endif // !! AI_QNAN_H_INCLUDED 163 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/quaternion.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Asset Import Library (assimp) 3 | ---------------------------------------------------------------------- 4 | 5 | Copyright (c) 2006-2020, assimp team 6 | 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the 12 | following conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | ---------------------------------------------------------------------- 41 | */ 42 | 43 | /** @file quaternion.h 44 | * @brief Quaternion structure, including operators when compiling in C++ 45 | */ 46 | #pragma once 47 | #ifndef AI_QUATERNION_H_INC 48 | #define AI_QUATERNION_H_INC 49 | 50 | #ifdef __cplusplus 51 | 52 | #ifdef __GNUC__ 53 | # pragma GCC system_header 54 | #endif 55 | 56 | #include 57 | 58 | template class aiVector3t; 59 | template class aiMatrix3x3t; 60 | 61 | // --------------------------------------------------------------------------- 62 | /** Represents a quaternion in a 4D vector. */ 63 | template 64 | class aiQuaterniont 65 | { 66 | public: 67 | aiQuaterniont() AI_NO_EXCEPT : w(1.0), x(), y(), z() {} 68 | aiQuaterniont(TReal pw, TReal px, TReal py, TReal pz) 69 | : w(pw), x(px), y(py), z(pz) {} 70 | 71 | /** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */ 72 | explicit aiQuaterniont( const aiMatrix3x3t& pRotMatrix); 73 | 74 | /** Construct from euler angles */ 75 | aiQuaterniont( TReal rotx, TReal roty, TReal rotz); 76 | 77 | /** Construct from an axis-angle pair */ 78 | aiQuaterniont( aiVector3t axis, TReal angle); 79 | 80 | /** Construct from a normalized quaternion stored in a vec3 */ 81 | explicit aiQuaterniont( aiVector3t normalized); 82 | 83 | /** Returns a matrix representation of the quaternion */ 84 | aiMatrix3x3t GetMatrix() const; 85 | 86 | public: 87 | 88 | bool operator== (const aiQuaterniont& o) const; 89 | bool operator!= (const aiQuaterniont& o) const; 90 | 91 | bool Equal(const aiQuaterniont& o, TReal epsilon = 1e-6) const; 92 | 93 | public: 94 | 95 | /** Normalize the quaternion */ 96 | aiQuaterniont& Normalize(); 97 | 98 | /** Compute quaternion conjugate */ 99 | aiQuaterniont& Conjugate (); 100 | 101 | /** Rotate a point by this quaternion */ 102 | aiVector3t Rotate (const aiVector3t& in) const; 103 | 104 | /** Multiply two quaternions */ 105 | aiQuaterniont operator* (const aiQuaterniont& two) const; 106 | 107 | public: 108 | 109 | /** Performs a spherical interpolation between two quaternions and writes the result into the third. 110 | * @param pOut Target object to received the interpolated rotation. 111 | * @param pStart Start rotation of the interpolation at factor == 0. 112 | * @param pEnd End rotation, factor == 1. 113 | * @param pFactor Interpolation factor between 0 and 1. Values outside of this range yield undefined results. 114 | */ 115 | static void Interpolate( aiQuaterniont& pOut, const aiQuaterniont& pStart, 116 | const aiQuaterniont& pEnd, TReal pFactor); 117 | 118 | public: 119 | 120 | //! w,x,y,z components of the quaternion 121 | TReal w, x, y, z; 122 | } ; 123 | 124 | typedef aiQuaterniont aiQuaternion; 125 | 126 | #else 127 | 128 | struct aiQuaternion { 129 | ai_real w, x, y, z; 130 | }; 131 | 132 | #endif 133 | 134 | #endif // AI_QUATERNION_H_INC 135 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/vector2.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | /** @file vector2.h 44 | * @brief 2D vector structure, including operators when compiling in C++ 45 | */ 46 | #pragma once 47 | #ifndef AI_VECTOR2D_H_INC 48 | #define AI_VECTOR2D_H_INC 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #ifdef __cplusplus 55 | # include 56 | #else 57 | # include 58 | #endif 59 | 60 | #include "defs.h" 61 | 62 | // ---------------------------------------------------------------------------------- 63 | /** Represents a two-dimensional vector. 64 | */ 65 | 66 | #ifdef __cplusplus 67 | template 68 | class aiVector2t { 69 | public: 70 | aiVector2t () : x(), y() {} 71 | aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {} 72 | explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {} 73 | aiVector2t (const aiVector2t& o) = default; 74 | 75 | void Set( TReal pX, TReal pY); 76 | TReal SquareLength() const ; 77 | TReal Length() const ; 78 | aiVector2t& Normalize(); 79 | 80 | const aiVector2t& operator += (const aiVector2t& o); 81 | const aiVector2t& operator -= (const aiVector2t& o); 82 | const aiVector2t& operator *= (TReal f); 83 | const aiVector2t& operator /= (TReal f); 84 | 85 | TReal operator[](unsigned int i) const; 86 | 87 | bool operator== (const aiVector2t& other) const; 88 | bool operator!= (const aiVector2t& other) const; 89 | 90 | bool Equal(const aiVector2t& other, TReal epsilon = 1e-6) const; 91 | 92 | aiVector2t& operator= (TReal f); 93 | const aiVector2t SymMul(const aiVector2t& o); 94 | 95 | template 96 | operator aiVector2t () const; 97 | 98 | TReal x, y; 99 | }; 100 | 101 | typedef aiVector2t aiVector2D; 102 | 103 | #else 104 | 105 | struct aiVector2D { 106 | ai_real x, y; 107 | }; 108 | 109 | #endif // __cplusplus 110 | 111 | #endif // AI_VECTOR2D_H_INC 112 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/vector3.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use of this software in source and binary forms, 13 | with or without modification, are permitted provided that the following 14 | conditions are met: 15 | 16 | * Redistributions of source code must retain the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the 22 | following disclaimer in the documentation and/or other 23 | materials provided with the distribution. 24 | 25 | * Neither the name of the assimp team, nor the names of its 26 | contributors may be used to endorse or promote products 27 | derived from this software without specific prior 28 | written permission of the assimp team. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | --------------------------------------------------------------------------- 42 | */ 43 | /** @file vector3.h 44 | * @brief 3D vector structure, including operators when compiling in C++ 45 | */ 46 | #pragma once 47 | #ifndef AI_VECTOR3D_H_INC 48 | #define AI_VECTOR3D_H_INC 49 | 50 | #ifdef __GNUC__ 51 | # pragma GCC system_header 52 | #endif 53 | 54 | #ifdef __cplusplus 55 | # include 56 | #else 57 | # include 58 | #endif 59 | 60 | #include 61 | 62 | #ifdef __cplusplus 63 | 64 | template class aiMatrix3x3t; 65 | template class aiMatrix4x4t; 66 | 67 | // --------------------------------------------------------------------------- 68 | /** Represents a three-dimensional vector. */ 69 | template 70 | class aiVector3t { 71 | public: 72 | aiVector3t() AI_NO_EXCEPT : x(), y(), z() {} 73 | aiVector3t(TReal _x, TReal _y, TReal _z) : x(_x), y(_y), z(_z) {} 74 | explicit aiVector3t (TReal _xyz ) : x(_xyz), y(_xyz), z(_xyz) {} 75 | aiVector3t( const aiVector3t& o ) = default; 76 | 77 | // combined operators 78 | const aiVector3t& operator += (const aiVector3t& o); 79 | const aiVector3t& operator -= (const aiVector3t& o); 80 | const aiVector3t& operator *= (TReal f); 81 | const aiVector3t& operator /= (TReal f); 82 | 83 | // transform vector by matrix 84 | aiVector3t& operator *= (const aiMatrix3x3t& mat); 85 | aiVector3t& operator *= (const aiMatrix4x4t& mat); 86 | 87 | // access a single element 88 | TReal operator[](unsigned int i) const; 89 | TReal& operator[](unsigned int i); 90 | 91 | // comparison 92 | bool operator== (const aiVector3t& other) const; 93 | bool operator!= (const aiVector3t& other) const; 94 | bool operator < (const aiVector3t& other) const; 95 | 96 | bool Equal(const aiVector3t& other, TReal epsilon = 1e-6) const; 97 | 98 | template 99 | operator aiVector3t () const; 100 | 101 | /** @brief Set the components of a vector 102 | * @param pX X component 103 | * @param pY Y component 104 | * @param pZ Z component */ 105 | void Set( TReal pX, TReal pY, TReal pZ); 106 | 107 | /** @brief Get the squared length of the vector 108 | * @return Square length */ 109 | TReal SquareLength() const; 110 | 111 | /** @brief Get the length of the vector 112 | * @return length */ 113 | TReal Length() const; 114 | 115 | 116 | /** @brief Normalize the vector */ 117 | aiVector3t& Normalize(); 118 | 119 | /** @brief Normalize the vector with extra check for zero vectors */ 120 | aiVector3t& NormalizeSafe(); 121 | 122 | /** @brief Componentwise multiplication of two vectors 123 | * 124 | * Note that vec*vec yields the dot product. 125 | * @param o Second factor */ 126 | const aiVector3t SymMul(const aiVector3t& o); 127 | 128 | TReal x, y, z; 129 | }; 130 | 131 | 132 | typedef aiVector3t aiVector3D; 133 | 134 | #else 135 | 136 | struct aiVector3D { 137 | ai_real x, y, z; 138 | }; 139 | 140 | #endif // __cplusplus 141 | 142 | #ifdef __cplusplus 143 | 144 | #endif // __cplusplus 145 | 146 | #endif // AI_VECTOR3D_H_INC 147 | -------------------------------------------------------------------------------- /ThirdParty/assimp/include/assimp/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | --------------------------------------------------------------------------- 3 | Open Asset Import Library (assimp) 4 | --------------------------------------------------------------------------- 5 | 6 | Copyright (c) 2006-2020, assimp team 7 | 8 | All rights reserved. 9 | 10 | Redistribution and use of this software in source and binary forms, 11 | with or without modification, are permitted provided that the following 12 | conditions are met: 13 | 14 | * Redistributions of source code must retain the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above 19 | copyright notice, this list of conditions and the 20 | following disclaimer in the documentation and/or other 21 | materials provided with the distribution. 22 | 23 | * Neither the name of the assimp team, nor the names of its 24 | contributors may be used to endorse or promote products 25 | derived from this software without specific prior 26 | written permission of the assimp team. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | --------------------------------------------------------------------------- 40 | */ 41 | 42 | /** @file version.h 43 | * @brief Functions to query the version of the Assimp runtime, check 44 | * compile flags, ... 45 | */ 46 | #pragma once 47 | #ifndef AI_VERSION_H_INC 48 | #define AI_VERSION_H_INC 49 | 50 | #include 51 | 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | // --------------------------------------------------------------------------- 57 | /** @brief Returns a string with legal copyright and licensing information 58 | * about Assimp. The string may include multiple lines. 59 | * @return Pointer to static string. 60 | */ 61 | ASSIMP_API const char* aiGetLegalString (void); 62 | 63 | // --------------------------------------------------------------------------- 64 | /** @brief Returns the current patch version number of Assimp. 65 | * @return Patch version of the Assimp runtime the application was 66 | * linked/built against 67 | */ 68 | ASSIMP_API unsigned int aiGetVersionPatch(void); 69 | 70 | // --------------------------------------------------------------------------- 71 | /** @brief Returns the current minor version number of Assimp. 72 | * @return Minor version of the Assimp runtime the application was 73 | * linked/built against 74 | */ 75 | ASSIMP_API unsigned int aiGetVersionMinor (void); 76 | 77 | // --------------------------------------------------------------------------- 78 | /** @brief Returns the current major version number of Assimp. 79 | * @return Major version of the Assimp runtime the application was 80 | * linked/built against 81 | */ 82 | ASSIMP_API unsigned int aiGetVersionMajor (void); 83 | 84 | // --------------------------------------------------------------------------- 85 | /** @brief Returns the repository revision of the Assimp runtime. 86 | * @return SVN Repository revision number of the Assimp runtime the 87 | * application was linked/built against. 88 | */ 89 | ASSIMP_API unsigned int aiGetVersionRevision (void); 90 | 91 | // --------------------------------------------------------------------------- 92 | /** @brief Returns the branch-name of the Assimp runtime. 93 | * @return The current branch name. 94 | */ 95 | ASSIMP_API const char *aiGetBranchName(); 96 | 97 | //! Assimp was compiled as a shared object (Windows: DLL) 98 | #define ASSIMP_CFLAGS_SHARED 0x1 99 | //! Assimp was compiled against STLport 100 | #define ASSIMP_CFLAGS_STLPORT 0x2 101 | //! Assimp was compiled as a debug build 102 | #define ASSIMP_CFLAGS_DEBUG 0x4 103 | 104 | //! Assimp was compiled with ASSIMP_BUILD_BOOST_WORKAROUND defined 105 | #define ASSIMP_CFLAGS_NOBOOST 0x8 106 | //! Assimp was compiled with ASSIMP_BUILD_SINGLETHREADED defined 107 | #define ASSIMP_CFLAGS_SINGLETHREADED 0x10 108 | //! Assimp was compiled with ASSIMP_BUILD_SINGLETHREADED defined 109 | #define ASSIMP_CFLAGS_DOUBLE_SUPPORT 0x20 110 | 111 | // --------------------------------------------------------------------------- 112 | /** @brief Returns assimp's compile flags 113 | * @return Any bitwise combination of the ASSIMP_CFLAGS_xxx constants. 114 | */ 115 | ASSIMP_API unsigned int aiGetCompileFlags(void); 116 | 117 | #ifdef __cplusplus 118 | } // end extern "C" 119 | #endif 120 | 121 | #endif // !! #ifndef AI_VERSION_H_INC 122 | 123 | -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/.DS_Store-back: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/.DS_Store-back -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/._.DS_Store-back: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/._.DS_Store-back -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Mac-old/libIrrXML.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Mac-old/libIrrXML.a -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Mac-old/libassimp.4.1.0.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1e440109d2effffec8978eb5d8bb68519513dd2ec1feaf2366e3aaa190449bbc 3 | size 10991572 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Mac-old/libassimp.4.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b3770df089c036869a93b5076f6d098a793bdf6d24746d77d00f02b52a933571 3 | size 1071 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Mac-old/libassimp.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:55cfce939791899c2031e0de67a96b6214cdc4d9bd23e57f421ba52776075c89 3 | size 1071 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/Debug/IrrXML.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/Debug/IrrXML.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/Debug/IrrXML.pdb: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4f9825187d512592e0565b5c45fb21b9c386be4e0b55dd96dd8a1d6c1d0a6f43 3 | size 487424 4 | -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/Debug/assimp-vc140-mt.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/Debug/assimp-vc140-mt.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/Debug/zlibd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/Debug/zlibd.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/Debug/zlibstaticd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/Debug/zlibstaticd.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/IrrXML.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/IrrXML.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/assimp-vc140-mt.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/assimp-vc140-mt.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/zlib.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win32-old/zlibstatic.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win32-old/zlibstatic.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64-old/IrrXML.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64-old/IrrXML.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64-old/assimp-vc140-mt.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64-old/assimp-vc140-mt.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64-old/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64-old/zlib.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64-old/zlibstatic.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64-old/zlibstatic.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64/Debug/assimp-vc141-mtd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64/Debug/assimp-vc141-mtd.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64/Debug/zlibstaticd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64/Debug/zlibstaticd.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64/Release/IrrXML.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64/Release/IrrXML.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64/Release/assimp-vc141-mt.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64/Release/assimp-vc141-mt.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64/Release/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64/Release/zlib.lib -------------------------------------------------------------------------------- /ThirdParty/assimp/lib/Win64/Release/zlibstatic.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linqingwudiv1/RuntimeMeshLoaderExtend/0284a3a568672e4e612bee371f95b2973329a38f/ThirdParty/assimp/lib/Win64/Release/zlibstatic.lib --------------------------------------------------------------------------------