Change Assimp to Silk.NET.Assimp implementation (#1719)
* Changed Assimp binding to Silk.Net.Assimp * Converted Stride.Importer.Assimp to a C# library and changed assimp binding to Silk.Net.Assimp * Converted Stride.Importer.Common to a C# library as this did not contain any native code
This commit is contained in:
Родитель
b96860acf8
Коммит
7b84fed673
|
@ -28,8 +28,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00-Targets.Private", "00-Ta
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "80-Shaders", "80-Shaders", "{10D145AF-C8AE-428F-A80F-CA1B591D0DB2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3D-Exporters", "3D-Exporters", "{47FFA9CA-781D-427E-9A41-365D789DD4B1}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "50-Presentation", "50-Presentation", "{75A820AB-0F21-40F2-9448-5D7F495B97A0}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Internals", "Internals", "{860946E4-CC77-4FDA-A4FD-3DB2A502A696}"
|
||||
|
@ -97,8 +95,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Presentation",
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Presentation.Tests", "..\sources\presentation\Stride.Core.Presentation.Tests\Stride.Core.Presentation.Tests.csproj", "{C223FCD7-CDCC-4943-9E11-9C2CC8FA9FC4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stride.Importer.Assimp", "..\sources\tools\Stride.Importer.Assimp\Stride.Importer.Assimp.vcxproj", "{C2306552-6C42-464C-8981-32FEF4F9458D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Irony", "..\sources\shaders\Irony\Irony.csproj", "{D81F5C91-D7DB-46E5-BC99-49488FB6814C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Games", "..\sources\engine\Stride.Games\Stride.Games.csproj", "{42780CBD-3FE7-48E3-BD5B-59945EA20137}"
|
||||
|
@ -111,14 +107,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.ProjectGenerator", "
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Audio.Tests.Windows", "..\sources\engine\Stride.Audio.Tests\Stride.Audio.Tests.Windows.csproj", "{7AF4B563-AAD3-42FF-B91E-84B9D34D904A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Assimp", "..\sources\tools\Stride.Assimp\Stride.Assimp.csproj", "{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.BuildEngine.Tests", "..\sources\buildengine\Stride.Core.BuildEngine.Tests\Stride.Core.BuildEngine.Tests.csproj", "{09F32307-595A-4CBB-BF7C-F055DA1F70EE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.BuildEngine.Common", "..\sources\buildengine\Stride.Core.BuildEngine.Common\Stride.Core.BuildEngine.Common.csproj", "{7732CB84-A39A-4ADF-B740-FD32A352FA8A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stride.Assimp.Translation", "..\sources\tools\Stride.Assimp.Translation\Stride.Assimp.Translation.vcxproj", "{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core", "..\sources\core\Stride.Core\Stride.Core.csproj", "{0E916AB7-5A6C-4820-8AB1-AA492FE66D68}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Mathematics", "..\sources\core\Stride.Core.Mathematics\Stride.Core.Mathematics.csproj", "{1677B922-CCF0-44DE-B57E-1CDD3D2B8E8A}"
|
||||
|
@ -177,8 +169,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Design", "..\so
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Graphics.Regression", "..\sources\engine\Stride.Graphics.Regression\Stride.Graphics.Regression.csproj", "{D002FEB1-00A6-4AB1-A83F-1F253465E64D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stride.Importer.Common", "..\sources\tools\Stride.Importer.Common\Stride.Importer.Common.vcxproj", "{43A6E62E-1B1C-4630-ABB8-C3F716004645}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.StorageTool", "..\sources\tools\Stride.StorageTool\Stride.StorageTool.csproj", "{942A5B1D-2B3D-4B30-98DE-336CE93F4F12}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.ProjectTemplating", "..\sources\tools\Stride.Core.ProjectTemplating\Stride.Core.ProjectTemplating.csproj", "{2E2382F7-9576-49F0-AE43-93AFD7DB2368}"
|
||||
|
@ -321,6 +311,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.NuGetLoader", "..\so
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Engine.NoAssets.Tests.Windows", "..\sources\engine\Stride.Engine.NoAssets.Tests\Stride.Engine.NoAssets.Tests.Windows.csproj", "{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Importer.Assimp", "..\sources\tools\Stride.Importer.Assimp\Stride.Importer.Assimp.csproj", "{967BA05D-4AC4-4848-AEFD-894EF2309E4D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Importer.Common", "..\sources\tools\Stride.Importer.Common\Stride.Importer.Common.csproj", "{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -432,16 +426,6 @@ Global
|
|||
{C223FCD7-CDCC-4943-9E11-9C2CC8FA9FC4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C223FCD7-CDCC-4943-9E11-9C2CC8FA9FC4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{C223FCD7-CDCC-4943-9E11-9C2CC8FA9FC4}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Debug|Mixed Platforms.Build.0 = Debug|x64
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Release|Mixed Platforms.ActiveCfg = Release|x64
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Release|Mixed Platforms.Build.0 = Release|x64
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D}.Release|Win32.Build.0 = Release|Win32
|
||||
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D81F5C91-D7DB-46E5-BC99-49488FB6814C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
|
@ -500,14 +484,6 @@ Global
|
|||
{7AF4B563-AAD3-42FF-B91E-84B9D34D904A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7AF4B563-AAD3-42FF-B91E-84B9D34D904A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{7AF4B563-AAD3-42FF-B91E-84B9D34D904A}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{09F32307-595A-4CBB-BF7C-F055DA1F70EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{09F32307-595A-4CBB-BF7C-F055DA1F70EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{09F32307-595A-4CBB-BF7C-F055DA1F70EE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
|
@ -524,16 +500,6 @@ Global
|
|||
{7732CB84-A39A-4ADF-B740-FD32A352FA8A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7732CB84-A39A-4ADF-B740-FD32A352FA8A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{7732CB84-A39A-4ADF-B740-FD32A352FA8A}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Debug|Mixed Platforms.Build.0 = Debug|x64
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Release|Mixed Platforms.ActiveCfg = Release|x64
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Release|Mixed Platforms.Build.0 = Release|x64
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}.Release|Win32.Build.0 = Release|Win32
|
||||
{0E916AB7-5A6C-4820-8AB1-AA492FE66D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E916AB7-5A6C-4820-8AB1-AA492FE66D68}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E916AB7-5A6C-4820-8AB1-AA492FE66D68}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
|
@ -824,16 +790,6 @@ Global
|
|||
{D002FEB1-00A6-4AB1-A83F-1F253465E64D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D002FEB1-00A6-4AB1-A83F-1F253465E64D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D002FEB1-00A6-4AB1-A83F-1F253465E64D}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Debug|Mixed Platforms.Build.0 = Debug|x64
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Release|Mixed Platforms.ActiveCfg = Release|x64
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Release|Mixed Platforms.Build.0 = Release|x64
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645}.Release|Win32.Build.0 = Release|Win32
|
||||
{942A5B1D-2B3D-4B30-98DE-336CE93F4F12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{942A5B1D-2B3D-4B30-98DE-336CE93F4F12}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{942A5B1D-2B3D-4B30-98DE-336CE93F4F12}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
|
@ -1422,12 +1378,35 @@ Global
|
|||
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Release|Win32.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{47FFA9CA-781D-427E-9A41-365D789DD4B1} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
|
||||
{860946E4-CC77-4FDA-A4FD-3DB2A502A696} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
|
||||
{6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
|
||||
{4A15BAAD-AA37-4754-A2BF-8D4049211E36} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
|
||||
|
@ -1442,17 +1421,14 @@ Global
|
|||
{F2D52EDB-BC17-4243-B06D-33CD20F87A7F} = {10D145AF-C8AE-428F-A80F-CA1B591D0DB2}
|
||||
{47AFCC2E-E9F0-47D6-9D75-9E646546A92B} = {75A820AB-0F21-40F2-9448-5D7F495B97A0}
|
||||
{C223FCD7-CDCC-4943-9E11-9C2CC8FA9FC4} = {52AE329E-B588-40D0-A578-8D0DB1BD83E5}
|
||||
{C2306552-6C42-464C-8981-32FEF4F9458D} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
|
||||
{D81F5C91-D7DB-46E5-BC99-49488FB6814C} = {10D145AF-C8AE-428F-A80F-CA1B591D0DB2}
|
||||
{42780CBD-3FE7-48E3-BD5B-59945EA20137} = {4C142567-C42B-40F5-B092-798882190209}
|
||||
{7F7BFF79-C400-435F-B359-56A2EF8956E0} = {4A15BAAD-AA37-4754-A2BF-8D4049211E36}
|
||||
{C485CE61-3006-4C99-ACB3-A737F5CEBAE7} = {4A15BAAD-AA37-4754-A2BF-8D4049211E36}
|
||||
{4B299721-18EA-4B6D-AFD5-2D6E188B97BD} = {860946E4-CC77-4FDA-A4FD-3DB2A502A696}
|
||||
{7AF4B563-AAD3-42FF-B91E-84B9D34D904A} = {A7ED9F01-7D78-4381-90A6-D50E51C17250}
|
||||
{F61D86B5-7C3D-4441-957D-A0A6D2FA69CA} = {47FFA9CA-781D-427E-9A41-365D789DD4B1}
|
||||
{09F32307-595A-4CBB-BF7C-F055DA1F70EE} = {B175D318-B4D0-49EA-9AEF-A54ACA2F03DC}
|
||||
{7732CB84-A39A-4ADF-B740-FD32A352FA8A} = {25F10A0B-7259-404C-86BE-FD2363C92F72}
|
||||
{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8} = {47FFA9CA-781D-427E-9A41-365D789DD4B1}
|
||||
{0E916AB7-5A6C-4820-8AB1-AA492FE66D68} = {2E93E2B5-4500-4E47-9B65-E705218AB578}
|
||||
{1677B922-CCF0-44DE-B57E-1CDD3D2B8E8A} = {2E93E2B5-4500-4E47-9B65-E705218AB578}
|
||||
{5210FB81-B807-49BB-AF0D-31FB6A83A572} = {2E93E2B5-4500-4E47-9B65-E705218AB578}
|
||||
|
@ -1482,7 +1458,6 @@ Global
|
|||
{0EA748AF-E1DC-4788-BA50-8BABD56F220C} = {F5F744B5-803E-4180-B82A-8B1F0BCD6579}
|
||||
{66581DAD-70AD-4475-AE47-C6C0DF1EC5E2} = {25F10A0B-7259-404C-86BE-FD2363C92F72}
|
||||
{D002FEB1-00A6-4AB1-A83F-1F253465E64D} = {A7ED9F01-7D78-4381-90A6-D50E51C17250}
|
||||
{43A6E62E-1B1C-4630-ABB8-C3F716004645} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
|
||||
{942A5B1D-2B3D-4B30-98DE-336CE93F4F12} = {860946E4-CC77-4FDA-A4FD-3DB2A502A696}
|
||||
{2E2382F7-9576-49F0-AE43-93AFD7DB2368} = {860946E4-CC77-4FDA-A4FD-3DB2A502A696}
|
||||
{550C1B7C-B7AD-46DF-ACF3-C36AEF35D5FF} = {5D2D3BE8-9910-45CA-8E45-95660DA4C563}
|
||||
|
@ -1543,6 +1518,8 @@ Global
|
|||
{D5B023BE-010F-44A8-ABF1-DB6F3BCEA392} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
|
||||
{7FA381C8-8EBE-4515-969D-01369CC47D0E} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
|
||||
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1} = {A7ED9F01-7D78-4381-90A6-D50E51C17250}
|
||||
{967BA05D-4AC4-4848-AEFD-894EF2309E4D} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
|
||||
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FF877973-604D-4EA7-B5F5-A129961F9EF2}
|
||||
|
|
|
@ -14,11 +14,6 @@ namespace Stride.Assets.Models
|
|||
{
|
||||
public class AssimpAssetImporter : ModelAssetImporter
|
||||
{
|
||||
static AssimpAssetImporter()
|
||||
{
|
||||
NativeLibraryHelper.PreloadLibrary("assimp-vc140-mt", typeof(AssimpAssetImporter));
|
||||
}
|
||||
|
||||
// Supported file extensions for this importer
|
||||
internal const string FileExtensions = ".dae;.3ds;.gltf;.glb;.obj;.blend;.x;.md2;.md3;.dxf;.ply;.stl;.stp";
|
||||
|
||||
|
@ -33,7 +28,7 @@ namespace Stride.Assets.Models
|
|||
/// <inheritdoc/>
|
||||
public override EntityInfo GetEntityInfo(UFile localPath, Logger logger, AssetImporterParameters importParameters)
|
||||
{
|
||||
var meshConverter = new Importer.AssimpNET.MeshConverter(logger);
|
||||
var meshConverter = new Importer.Assimp.MeshConverter(logger);
|
||||
|
||||
if (!importParameters.InputParameters.TryGet(DeduplicateMaterialsKey, out var deduplicateMaterials))
|
||||
deduplicateMaterials = true; // Dedupe is the default value
|
||||
|
@ -45,7 +40,7 @@ namespace Stride.Assets.Models
|
|||
/// <inheritdoc/>
|
||||
public override void GetAnimationDuration(UFile localPath, Logger logger, AssetImporterParameters importParameters, out TimeSpan startTime, out TimeSpan endTime)
|
||||
{
|
||||
var meshConverter = new Importer.AssimpNET.MeshConverter(logger);
|
||||
var meshConverter = new Importer.Assimp.MeshConverter(logger);
|
||||
var sceneData = meshConverter.ConvertAnimation(localPath.FullPath, "");
|
||||
|
||||
startTime = CompressedTimeSpan.MaxValue; // This will go down, so we start from positive infinity
|
||||
|
|
|
@ -32,9 +32,9 @@ namespace Stride.Assets.Models
|
|||
return supportedExtensions.Any(supExt => supExt.Equals(extToLower));
|
||||
}
|
||||
|
||||
private Stride.Importer.AssimpNET.MeshConverter CreateMeshConverter(ICommandContext commandContext)
|
||||
private Stride.Importer.Assimp.MeshConverter CreateMeshConverter(ICommandContext commandContext)
|
||||
{
|
||||
return new Stride.Importer.AssimpNET.MeshConverter(commandContext.Logger)
|
||||
return new Stride.Importer.Assimp.MeshConverter(commandContext.Logger)
|
||||
{
|
||||
AllowUnsignedBlendIndices = this.AllowUnsignedBlendIndices,
|
||||
};
|
||||
|
|
|
@ -13,10 +13,8 @@
|
|||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\tools\Stride.Assimp\Stride.Assimp.csproj" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\..\tools\Stride.Assimp.Translation\Stride.Assimp.Translation.vcxproj" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\..\tools\Stride.Importer.Assimp\Stride.Importer.Assimp.vcxproj" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\..\tools\Stride.Importer.Common\Stride.Importer.Common.vcxproj" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\..\tools\Stride.Importer.Assimp\Stride.Importer.Assimp.csproj" />
|
||||
<ProjectReference Include="..\..\tools\Stride.Importer.Common\Stride.Importer.Common.csproj" />
|
||||
<ProjectReference Include="..\..\tools\Stride.Importer.FBX\Stride.Importer.FBX.vcxproj" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\Stride.Assets\Stride.Assets.csproj" />
|
||||
</ItemGroup>
|
||||
|
@ -34,10 +32,7 @@
|
|||
<ItemGroup>
|
||||
<!-- Needed by .NET Core runtime to be able to load C++/CLI assemblies -->
|
||||
<BuildOutputInPackage Include="$(OutputPath)ijwhost.dll" Condition="Exists('$(OutputPath)ijwhost.dll')" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Assimp.dll" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Assimp.Translation.dll" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.Assimp.dll" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.Assimp.ssdeps" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.FBX.dll" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.FBX.ssdeps" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.Common.dll" />
|
||||
|
@ -46,7 +41,6 @@
|
|||
|
||||
<Target Name="_StrideIncludeNativeLibs">
|
||||
<ItemGroup>
|
||||
<TfmSpecificPackageFile Include="$(OutputPath)runtimes\win-x64\native\assimp-vc140-mt.dll" PackagePath="runtimes\win-x64\native\assimp-vc140-mt.dll" />
|
||||
<TfmSpecificPackageFile Include="$(OutputPath)runtimes\win-x64\native\libfbxsdk.dll" PackagePath="runtimes\win-x64\native\libfbxsdk.dll" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#pragma once
|
||||
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#define _AI_MATKEY_TEXTYPE_BASE "$tex.type"
|
||||
#define _AI_MATKEY_TEXCOLOR_BASE "$tex.color"
|
||||
#define _AI_MATKEY_TEXALPHA_BASE "$tex.alpha"
|
||||
|
||||
#define AI_MATKEY_TEXTYPE(type, N) _AI_MATKEY_TEXTYPE_BASE,type,N
|
||||
#define AI_MATKEY_TEXCOLOR(type,N) _AI_MATKEY_TEXCOLOR_BASE,type,N
|
||||
#define AI_MATKEY_TEXALPHA(type,N) _AI_MATKEY_TEXALPHA_BASE,type,N
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration of the different types of node in the new Assimp's material stack.
|
||||
/// Don't forget to update the dictionnary in Materials.cpp when modifying this enum.
|
||||
/// </summary>
|
||||
enum aiStackType {
|
||||
aiStackType_ColorType,
|
||||
aiStackType_TextureType,
|
||||
aiStackType_BlendOpType,
|
||||
aiStackType_NumberTypes
|
||||
};
|
||||
/// <summary>
|
||||
/// Enumeration of the new Assimp's flags.
|
||||
/// </summary>
|
||||
enum aiStackFlags {
|
||||
aiStackFlags_Invert = 1,
|
||||
aiStackFlags_ReplaceAlpha = 2
|
||||
};
|
||||
#define aiStackFlags_NumbeFlags 2
|
||||
/// <summary>
|
||||
/// Enumeration of the different operations in the new Assimp's material stack.
|
||||
/// Don't forget to update the dictionnary in Materials.cpp when modifying this enum.
|
||||
/// </summary>
|
||||
enum aiStackOperation {
|
||||
aiStackOperation_Add = 0,
|
||||
aiStackOperation_Add3ds,
|
||||
aiStackOperation_AddMaya,
|
||||
aiStackOperation_Average,
|
||||
aiStackOperation_Color,
|
||||
aiStackOperation_ColorBurn,
|
||||
aiStackOperation_ColorDodge,
|
||||
aiStackOperation_Darken3ds,
|
||||
aiStackOperation_DarkenMaya,
|
||||
aiStackOperation_Desaturate,
|
||||
aiStackOperation_Difference3ds,
|
||||
aiStackOperation_DifferenceMaya,
|
||||
aiStackOperation_Divide,
|
||||
aiStackOperation_Exclusion,
|
||||
aiStackOperation_HardLight,
|
||||
aiStackOperation_HardMix,
|
||||
aiStackOperation_Hue,
|
||||
aiStackOperation_Illuminate,
|
||||
aiStackOperation_In,
|
||||
aiStackOperation_Lighten3ds,
|
||||
aiStackOperation_LightenMaya,
|
||||
aiStackOperation_LinearBurn,
|
||||
aiStackOperation_LinearDodge,
|
||||
aiStackOperation_Multiply3ds,
|
||||
aiStackOperation_MultiplyMaya,
|
||||
aiStackOperation_None,
|
||||
aiStackOperation_Out,
|
||||
aiStackOperation_Over3ds,
|
||||
aiStackOperation_Overlay3ds,
|
||||
aiStackOperation_OverMaya,
|
||||
aiStackOperation_PinLight,
|
||||
aiStackOperation_Saturate,
|
||||
aiStackOperation_Saturation,
|
||||
aiStackOperation_Screen,
|
||||
aiStackOperation_SoftLight,
|
||||
aiStackOperation_Substract3ds,
|
||||
aiStackOperation_SubstractMaya,
|
||||
aiStackOperation_Value,
|
||||
aiStackOperation_Mask,
|
||||
aiStackOperation_Unknown,
|
||||
aiStackOperation_NumberOperations
|
||||
};
|
|
@ -1,176 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#pragma once
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include "Extension.h"
|
||||
|
||||
#pragma make_public(aiMaterial)
|
||||
#pragma make_public(aiTextureType)
|
||||
|
||||
using namespace Stride::Core::Mathematics;
|
||||
using namespace Stride::AssimpNet;
|
||||
namespace Stride {
|
||||
namespace AssimpNet {
|
||||
namespace NetTranslation {
|
||||
/// <summary>
|
||||
/// Class used to translate Assimp's cpp materials datas to c#.
|
||||
/// </summary>
|
||||
public ref class Materials {
|
||||
public:
|
||||
/// <summary>
|
||||
/// Converts an Assimp's material stack operation From c++ to c#.
|
||||
/// </summary>
|
||||
static array<Material::Operation>^ convertAssimpStackOperationCppToCs = {
|
||||
Material::Operation::Add, //aiStackOperation_Add
|
||||
Material::Operation::Add3ds, //aiStackOperation_Add3ds
|
||||
Material::Operation::AddMaya, //aiStackOperation_AddMaya
|
||||
Material::Operation::Average, //aiStackOperation_Average
|
||||
Material::Operation::Color, //aiStackOperation_Color
|
||||
Material::Operation::ColorBurn, //aiStackOperation_ColorBurn
|
||||
Material::Operation::ColorDodge, //aiStackOperation_ColorDodge
|
||||
Material::Operation::Darken3ds, //aiStackOperation_Darken3ds
|
||||
Material::Operation::DarkenMaya, //aiStackOperation_DarkenMaya
|
||||
Material::Operation::Desaturate, //aiStackOperation_Desaturate
|
||||
Material::Operation::Difference3ds, //aiStackOperation_Difference3ds
|
||||
Material::Operation::DifferenceMaya,//aiStackOperation_DifferenceMaya
|
||||
Material::Operation::Divide, //aiStackOperation_Divide
|
||||
Material::Operation::Exclusion, //aiStackOperation_Exclusion
|
||||
Material::Operation::HardLight, //aiStackOperation_HardLight
|
||||
Material::Operation::HardMix, //aiStackOperation_HardMix
|
||||
Material::Operation::Hue, //aiStackOperation_Hue
|
||||
Material::Operation::Illuminate, //aiStackOperation_Illuminate
|
||||
Material::Operation::In, //aiStackOperation_In
|
||||
Material::Operation::Lighten3ds, //aiStackOperation_Lighten3ds
|
||||
Material::Operation::LightenMaya, //aiStackOperation_LightenMaya
|
||||
Material::Operation::LinearBurn, //aiStackOperation_LinearBurn
|
||||
Material::Operation::LinearDodge, //aiStackOperation_LinearDodge
|
||||
Material::Operation::Multiply3ds, //aiStackOperation_Multiply3ds
|
||||
Material::Operation::MultiplyMaya, //aiStackOperation_MultiplyMaya
|
||||
Material::Operation::None, //aiStackOperation_None
|
||||
Material::Operation::Out, //aiStackOperation_Out
|
||||
Material::Operation::Over3ds, //aiStackOperation_Over3ds
|
||||
Material::Operation::Overlay3ds, //aiStackOperation_Overlay3ds
|
||||
Material::Operation::OverMaya, //aiStackOperation_OverMaya
|
||||
Material::Operation::PinLight, //aiStackOperation_PinLight
|
||||
Material::Operation::Saturate, //aiStackOperation_Saturate
|
||||
Material::Operation::Saturation, //aiStackOperation_Saturation
|
||||
Material::Operation::Screen, //aiStackOperation_Screen
|
||||
Material::Operation::SoftLight, //aiStackOperation_SoftLight
|
||||
Material::Operation::Substract3ds, //aiStackOperation_Substract3ds
|
||||
Material::Operation::SubstractMaya, //aiStackOperation_SubstractMaya
|
||||
Material::Operation::Value, //aiStackOperation_Value
|
||||
Material::Operation::Mask //aiStackOperation_Mask
|
||||
};
|
||||
/// <summary>
|
||||
/// Converts an Assimp's material stack node type From c++ to c#.
|
||||
/// </summary>
|
||||
static array<Material::StackType>^ convertAssimpStackTypeCppToCs = {
|
||||
Material::StackType::Color, // aiStackType_ColorType
|
||||
Material::StackType::Texture, // aiStackType_TextureType
|
||||
Material::StackType::Operation // aiStackType_BlemdOpType
|
||||
};
|
||||
static array<Material::MappingMode>^ convertAssimpMappingModeCppToCs = {
|
||||
Material::MappingMode::Wrap, // aiTextureMapMode_Wrap
|
||||
Material::MappingMode::Clamp, // aiTextureMapMode_Clamp
|
||||
Material::MappingMode::Mirror, // aiTextureMapMode_Mirror
|
||||
Material::MappingMode::Decal // aiTextureMapMode_Decal
|
||||
};
|
||||
/// <summary>
|
||||
/// Converts an Assimp's material stack From c++ to c#.
|
||||
/// </summary>
|
||||
/// <param name="material">The material contaning the stack to convert.</param>
|
||||
/// <param name="type">The type of the stack to convert.</param>
|
||||
/// <returns></returns>
|
||||
static Material::Stack^ convertAssimpStackCppToCs(aiMaterial *material, const aiTextureType type) {
|
||||
Material::Stack^ ret = gcnew Material::Stack;
|
||||
unsigned int count = material->GetTextureCount(type);
|
||||
// As it is represented now, the base color is at the bottom of the stack
|
||||
|
||||
/*aiString path;
|
||||
aiTextureMapping mapping;
|
||||
unsigned int index;
|
||||
float blend;
|
||||
aiTextureOp textureOp;
|
||||
aiTextureMapMode mapMode;
|
||||
material->GetTexture(type, 0, &path, &mapping, &index, &blend, &textureOp, &mapMode);*/
|
||||
|
||||
/*
|
||||
if (type == aiTextureType_AMBIENT) {
|
||||
aiColor3D ambient;
|
||||
material->Get(AI_MATKEY_COLOR_AMBIENT, ambient);
|
||||
ret->Push(gcnew Material::StackColor(Color3(ambient.r, ambient.g, ambient.b), 1.f, 1.f, 0));
|
||||
}
|
||||
if (type == aiTextureType_DIFFUSE) {
|
||||
aiColor3D diffuse;
|
||||
material->Get(AI_MATKEY_COLOR_DIFFUSE, diffuse);
|
||||
ret->Push(gcnew Material::StackColor(Color3(diffuse.r, diffuse.g, diffuse.b), 1.f, 1.f, 0));
|
||||
}
|
||||
if (type == aiTextureType_SPECULAR) {
|
||||
aiColor3D specular;
|
||||
material->Get(AI_MATKEY_COLOR_SPECULAR, specular);
|
||||
ret->Push(gcnew Material::StackColor(Color3(specular.r, specular.g, specular.b), 1.f, 1.f, 0));
|
||||
}
|
||||
if (type == aiTextureType_EMISSIVE) {
|
||||
aiColor3D emissive;
|
||||
material->Get(AI_MATKEY_COLOR_EMISSIVE, emissive);
|
||||
ret->Push(gcnew Material::StackColor(Color3(emissive.r, emissive.g, emissive.b), 1.f, 1.f, 0));
|
||||
}
|
||||
*/
|
||||
// Process the material stack
|
||||
for (int iEl = count-1; iEl >= 0; --iEl) {
|
||||
Material::StackElement^ el;
|
||||
// Common properties
|
||||
int elType, elFlags;
|
||||
float elAlpha, elBlend;
|
||||
// Operation-specific properties
|
||||
int elOp;
|
||||
// Color-specific properties
|
||||
aiColor3D elColor;
|
||||
// Texture-specific properties
|
||||
aiString elTexPath;
|
||||
int elTexChannel, elMappingModeU, elMappingModeV;
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXALPHA(type, iEl), elAlpha))
|
||||
elAlpha = 1.f; // default alpha
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXBLEND(type, iEl), elBlend))
|
||||
elBlend = 1.f; // default blend
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXFLAGS(type, iEl), elFlags))
|
||||
elFlags = 0; // default flags (no flags)
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXTYPE(type, iEl), elType))
|
||||
elType = aiStackType_TextureType; //continue; // error !
|
||||
switch (elType) {
|
||||
case aiStackType_BlendOpType:
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXOP(type, iEl), elOp))
|
||||
continue; // error !
|
||||
el = gcnew Material::StackOperation(convertAssimpStackOperationCppToCs[elOp], elAlpha, elBlend, elFlags);
|
||||
break;
|
||||
case aiStackType_ColorType:
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXCOLOR(type, iEl), elColor))
|
||||
continue; // error !
|
||||
el = gcnew Material::StackColor(Color3(elColor.r, elColor.g, elColor.b), elAlpha, elBlend, elFlags);
|
||||
break;
|
||||
case aiStackType_TextureType:
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_TEXTURE(type, iEl), elTexPath))
|
||||
continue; // error !
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_UVWSRC(type, iEl), elTexChannel))
|
||||
elTexChannel = 0; // default channel
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_MAPPINGMODE_U(type, iEl), elMappingModeU))
|
||||
elMappingModeU = aiTextureMapMode_Wrap; // default mapping mode
|
||||
if (AI_SUCCESS != material->Get(AI_MATKEY_MAPPINGMODE_V(type, iEl), elMappingModeV))
|
||||
elMappingModeV = aiTextureMapMode_Wrap; // default mapping mode
|
||||
el = gcnew Material::StackTexture(gcnew System::String(elTexPath.C_Str()),
|
||||
elTexChannel,
|
||||
convertAssimpMappingModeCppToCs[elMappingModeU],
|
||||
convertAssimpMappingModeCppToCs[elMappingModeV],
|
||||
elAlpha,
|
||||
elBlend,
|
||||
elFlags);
|
||||
}
|
||||
ret->Push(el);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,153 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\targets\Stride.props" />
|
||||
<PropertyGroup>
|
||||
<StrideProjectType>Cpp</StrideProjectType>
|
||||
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
|
||||
<StrideBuildTags>WindowsTools</StrideBuildTags>
|
||||
<StrideAssemblyProcessorOptions />
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{FCDF1B87-1C76-46EB-AD6A-D55EF5F195B8}</ProjectGuid>
|
||||
<RootNamespace>Stride.AssimpNet.NetTranslation</RootNamespace>
|
||||
<ProjectName>Stride.Assimp.Translation</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<CLRSupport>NetCore</CLRSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<CLRSupport>NetCore</CLRSupport>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<OutDir>bin\$(TargetFramework)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>obj\$(TargetFramework)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<OutDir>bin\$(TargetFramework)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>obj\$(TargetFramework)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include;</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Assimp.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include;</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Assimp.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include;</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Assimp.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib;</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include;</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Assimp.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib;</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Extension.h" />
|
||||
<ClCompile Include="Materials.cpp">
|
||||
<FileType>CppHeader</FileType>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Mathematics\Stride.Core.Mathematics.csproj">
|
||||
<Project>{1677b922-ccf0-44de-b57e-1cdd3d2b8e8a}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Stride.Assimp\Stride.Assimp.csproj">
|
||||
<Project>{f61d86b5-7c3d-4441-957d-a0a6d2fa69ca}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(StrideSdkTargets)" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Extension.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Materials.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,302 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Stride.Core.Mathematics;
|
||||
|
||||
namespace Stride
|
||||
{
|
||||
namespace AssimpNet
|
||||
{
|
||||
namespace Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of the different types of node in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public enum StackType
|
||||
{
|
||||
Color = 0,
|
||||
Texture,
|
||||
Operation
|
||||
}
|
||||
/// <summary>
|
||||
/// Enumeration of the new Assimp's flags.
|
||||
/// </summary>
|
||||
public enum Flags
|
||||
{
|
||||
Invert = 1,
|
||||
ReplaceAlpha = 2
|
||||
}
|
||||
/// <summary>
|
||||
/// Enumeration of the different operations in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public enum Operation
|
||||
{
|
||||
Add = 0,
|
||||
Add3ds,
|
||||
AddMaya,
|
||||
Average,
|
||||
Color,
|
||||
ColorBurn,
|
||||
ColorDodge,
|
||||
Darken3ds,
|
||||
DarkenMaya,
|
||||
Desaturate,
|
||||
Difference3ds,
|
||||
DifferenceMaya,
|
||||
Divide,
|
||||
Exclusion,
|
||||
HardLight,
|
||||
HardMix,
|
||||
Hue,
|
||||
Illuminate,
|
||||
In,
|
||||
Lighten3ds,
|
||||
LightenMaya,
|
||||
LinearBurn,
|
||||
LinearDodge,
|
||||
Multiply3ds,
|
||||
MultiplyMaya,
|
||||
None,
|
||||
Out,
|
||||
Over3ds,
|
||||
Overlay3ds,
|
||||
OverMaya,
|
||||
PinLight,
|
||||
Saturate,
|
||||
Saturation,
|
||||
Screen,
|
||||
SoftLight,
|
||||
Substract3ds,
|
||||
SubstractMaya,
|
||||
Value,
|
||||
Mask
|
||||
}
|
||||
/// <summary>
|
||||
/// Enumeration of the different mapping modes in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public enum MappingMode
|
||||
{
|
||||
Wrap,
|
||||
Clamp,
|
||||
Decal,
|
||||
Mirror
|
||||
}
|
||||
/// <summary>
|
||||
/// Class representing an element in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public abstract class StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackElement"/> class.
|
||||
/// </summary>
|
||||
/// <param name="Alpha">The alpha of the node.</param>
|
||||
/// <param name="Blend">The blending coefficient of the node.</param>
|
||||
/// <param name="flags">The flags of the node.</param>
|
||||
/// <param name="Type">The type of the node.</param>
|
||||
public StackElement(float Alpha, float Blend, int flags, StackType Type)
|
||||
{
|
||||
alpha = Alpha;
|
||||
blend = Blend;
|
||||
type = Type;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the alpha of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The alpha of the node.
|
||||
/// </value>
|
||||
public float alpha { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the blending coefficient of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The blending coefficient of the node.
|
||||
/// </value>
|
||||
public float blend { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the flags of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The flags of the node.
|
||||
/// </value>
|
||||
public int flags { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the type of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The type of the node.
|
||||
/// </value>
|
||||
public StackType type { get; private set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Class representing an operation in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public class StackOperation : StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackOperation"/> class.
|
||||
/// </summary>
|
||||
/// <param name="Operation">The operation of the node.</param>
|
||||
/// <param name="Alpha">The alpha of the node.</param>
|
||||
/// <param name="Blend">The blending coefficient of the node.</param>
|
||||
/// <param name="Flags">The flags.</param>
|
||||
public StackOperation(Operation Operation, float Alpha = 1.0f, float Blend = 1.0f, int Flags = 0)
|
||||
: base(Alpha, Blend, Flags, StackType.Operation)
|
||||
{
|
||||
operation = Operation;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the operation of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The operation of the node.
|
||||
/// </value>
|
||||
public Operation operation { get; private set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Class representing a color in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public class StackColor : StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackColor"/> class.
|
||||
/// </summary>
|
||||
/// <param name="Color">The color of the node.</param>
|
||||
/// <param name="Alpha">The alpha of the node.</param>
|
||||
/// <param name="Blend">The blending coefficient of the node.</param>
|
||||
/// <param name="Flags">The flags of the node.</param>
|
||||
public StackColor(Color3 Color, float Alpha = 1.0f, float Blend = 1.0f, int Flags = 0)
|
||||
: base(Alpha, Blend, Flags, StackType.Color)
|
||||
{
|
||||
color = Color;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the color of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The color of the node.
|
||||
/// </value>
|
||||
public Color3 color { get; private set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Class representing a texture in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public class StackTexture : StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackTexture"/> class.
|
||||
/// </summary>
|
||||
/// <param name="TexturePath">The texture path.</param>
|
||||
/// <param name="Channel">The uv channel used by the texture.</param>
|
||||
/// <param name="MappingModeU">The U mapping mode.</param>
|
||||
/// <param name="MappingModeV">The V mapping mode.</param>
|
||||
/// <param name="Alpha">The alpha of the node.</param>
|
||||
/// <param name="Blend">The blending coefficient of the node.</param>
|
||||
/// <param name="Flags">The flags of the node.</param>
|
||||
public StackTexture(String TexturePath, int Channel, MappingMode MappingModeU, MappingMode MappingModeV, float Alpha = 1.0f, float Blend = 1.0F, int Flags = 0)
|
||||
: base(Alpha, Blend, Flags, StackType.Texture)
|
||||
{
|
||||
texturePath = TexturePath;
|
||||
channel = Channel;
|
||||
mappingModeU = MappingModeU;
|
||||
mappingModeV = MappingModeV;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the texture path.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The texture path.
|
||||
/// </value>
|
||||
public String texturePath { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the uv channel.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The uv channel.
|
||||
/// </value>
|
||||
public int channel { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the U mapping mode.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The U mapping mode.
|
||||
/// </value>
|
||||
public MappingMode mappingModeU { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the Vmapping mode.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The V mapping mode.
|
||||
/// </value>
|
||||
public MappingMode mappingModeV { get; private set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Class representing the new Assimp's material stack in c#.
|
||||
/// </summary>
|
||||
public class Stack
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Stack"/> class.
|
||||
/// </summary>
|
||||
public Stack()
|
||||
{
|
||||
stack = new Stack<StackElement>();
|
||||
}
|
||||
/// <summary>
|
||||
/// The internal stack.
|
||||
/// </summary>
|
||||
private Stack<StackElement> stack;
|
||||
/// <summary>
|
||||
/// Gets the size of the stack.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The size of the stack.
|
||||
/// </value>
|
||||
private int Count { get { return stack.Count; } }
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the stack is empty.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if the stack is empty; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool IsEmpty { get { return stack.Count == 0; } }
|
||||
/// <summary>
|
||||
/// Pushes the specified element.
|
||||
/// </summary>
|
||||
/// <param name="element">The element.</param>
|
||||
public void Push(StackElement element)
|
||||
{
|
||||
stack.Push(element);
|
||||
}
|
||||
/// <summary>
|
||||
/// Pops an element.
|
||||
/// </summary>
|
||||
/// <returns>The element.</returns>
|
||||
public StackElement Pop()
|
||||
{
|
||||
return stack.Pop();
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the top element of the stack.
|
||||
/// </summary>
|
||||
/// <returns>The top element of the stack.</returns>
|
||||
public StackElement Peek()
|
||||
{
|
||||
return stack.Peek();
|
||||
}
|
||||
/// <summary>
|
||||
/// Clears the stack.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
stack.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("52f2a331-0906-4418-ba99-87bb87e51085")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,12 +0,0 @@
|
|||
<Project>
|
||||
<Import Project="..\..\targets\Stride.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
|
||||
<StrideBuildTags>WindowsTools</StrideBuildTags>
|
||||
<StrideAssemblyProcessorOptions/>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Mathematics\Stride.Core.Mathematics.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(StrideSdkTargets)" />
|
||||
</Project>
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Reflection;
|
||||
using namespace System::Runtime::CompilerServices;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
using namespace System::Security::Permissions;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly:AssemblyTitleAttribute("StrideImporterAssimp")];
|
||||
[assembly:AssemblyDescriptionAttribute("")];
|
||||
[assembly:AssemblyConfigurationAttribute("")];
|
||||
[assembly:AssemblyCompanyAttribute("")];
|
||||
[assembly:AssemblyProductAttribute("StrideImporterAssimp")];
|
||||
[assembly:AssemblyCopyrightAttribute("Copyright (c) 2012")];
|
||||
[assembly:AssemblyTrademarkAttribute("")];
|
||||
[assembly:AssemblyCultureAttribute("")];
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the value or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly:AssemblyVersionAttribute("1.0.*")];
|
||||
|
||||
[assembly:ComVisible(false)];
|
||||
|
||||
[assembly:CLSCompliantAttribute(true)];
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of the new Assimp's flags.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum Flags
|
||||
{
|
||||
None = 0,
|
||||
Invert = 1,
|
||||
ReplaceAlpha = 2
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of the different mapping modes in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public enum MappingMode
|
||||
{
|
||||
Wrap,
|
||||
Clamp,
|
||||
Decal,
|
||||
Mirror
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing the new Assimp's material stack in c#.
|
||||
/// </summary>
|
||||
public class MaterialStack
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MaterialStack"/> class.
|
||||
/// </summary>
|
||||
public MaterialStack()
|
||||
{
|
||||
stack = new Stack<StackElement>();
|
||||
}
|
||||
/// <summary>
|
||||
/// The internal stack.
|
||||
/// </summary>
|
||||
private Stack<StackElement> stack;
|
||||
/// <summary>
|
||||
/// Gets the size of the stack.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The size of the stack.
|
||||
/// </value>
|
||||
private int Count { get { return stack.Count; } }
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the stack is empty.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if the stack is empty; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool IsEmpty { get { return stack.Count == 0; } }
|
||||
/// <summary>
|
||||
/// Pushes the specified element.
|
||||
/// </summary>
|
||||
/// <param name="element">The element.</param>
|
||||
public void Push(StackElement element)
|
||||
{
|
||||
stack.Push(element);
|
||||
}
|
||||
/// <summary>
|
||||
/// Pops an element.
|
||||
/// </summary>
|
||||
/// <returns>The element.</returns>
|
||||
public StackElement Pop()
|
||||
{
|
||||
return stack.Pop();
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the top element of the stack.
|
||||
/// </summary>
|
||||
/// <returns>The top element of the stack.</returns>
|
||||
public StackElement Peek()
|
||||
{
|
||||
return stack.Peek();
|
||||
}
|
||||
/// <summary>
|
||||
/// Clears the stack.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
stack.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using Silk.NET.Assimp;
|
||||
using Stride.Core.Mathematics;
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
public static unsafe class Materials
|
||||
{
|
||||
public const string MatKeyTexTypeBase = "$tex.type";
|
||||
public const string MatKeyTexColorBase = "$tex.color";
|
||||
public const string MatKeyTexAlphaBase = "$tex.alpha";
|
||||
|
||||
/// <summary>
|
||||
/// Converts an Assimp's material stack operation From c++ to c#.
|
||||
/// </summary>
|
||||
public static readonly Operation[] ConvertAssimpStackOperationCppToCs = new Operation[]
|
||||
{
|
||||
Operation.Add, //aiStackOperation_Add
|
||||
Operation.Add3ds, //aiStackOperation_Add3ds
|
||||
Operation.AddMaya, //aiStackOperation_AddMaya
|
||||
Operation.Average, //aiStackOperation_Average
|
||||
Operation.Color, //aiStackOperation_Color
|
||||
Operation.ColorBurn, //aiStackOperation_ColorBurn
|
||||
Operation.ColorDodge, //aiStackOperation_ColorDodge
|
||||
Operation.Darken3ds, //aiStackOperation_Darken3ds
|
||||
Operation.DarkenMaya, //aiStackOperation_DarkenMaya
|
||||
Operation.Desaturate, //aiStackOperation_Desaturate
|
||||
Operation.Difference3ds, //aiStackOperation_Difference3ds
|
||||
Operation.DifferenceMaya,//aiStackOperation_DifferenceMaya
|
||||
Operation.Divide, //aiStackOperation_Divide
|
||||
Operation.Exclusion, //aiStackOperation_Exclusion
|
||||
Operation.HardLight, //aiStackOperation_HardLight
|
||||
Operation.HardMix, //aiStackOperation_HardMix
|
||||
Operation.Hue, //aiStackOperation_Hue
|
||||
Operation.Illuminate, //aiStackOperation_Illuminate
|
||||
Operation.In, //aiStackOperation_In
|
||||
Operation.Lighten3ds, //aiStackOperation_Lighten3ds
|
||||
Operation.LightenMaya, //aiStackOperation_LightenMaya
|
||||
Operation.LinearBurn, //aiStackOperation_LinearBurn
|
||||
Operation.LinearDodge, //aiStackOperation_LinearDodge
|
||||
Operation.Multiply3ds, //aiStackOperation_Multiply3ds
|
||||
Operation.MultiplyMaya, //aiStackOperation_MultiplyMaya
|
||||
Operation.None, //aiStackOperation_None
|
||||
Operation.Out, //aiStackOperation_Out
|
||||
Operation.Over3ds, //aiStackOperation_Over3ds
|
||||
Operation.Overlay3ds, //aiStackOperation_Overlay3ds
|
||||
Operation.OverMaya, //aiStackOperation_OverMaya
|
||||
Operation.PinLight, //aiStackOperation_PinLight
|
||||
Operation.Saturate, //aiStackOperation_Saturate
|
||||
Operation.Saturation, //aiStackOperation_Saturation
|
||||
Operation.Screen, //aiStackOperation_Screen
|
||||
Operation.SoftLight, //aiStackOperation_SoftLight
|
||||
Operation.Substract3ds, //aiStackOperation_Substract3ds
|
||||
Operation.SubstractMaya, //aiStackOperation_SubstractMaya
|
||||
Operation.Value, //aiStackOperation_Value
|
||||
Operation.Mask //aiStackOperation_Mask
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Converts an Assimp's material stack node type From c++ to c#.
|
||||
/// </summary>
|
||||
public static readonly StackElementType[] ConvertAssimpStackTypeCppToCs = new StackElementType[]
|
||||
{
|
||||
StackElementType.Color, // aiStackType_ColorType
|
||||
StackElementType.Texture, // aiStackType_TextureType
|
||||
StackElementType.Operation // aiStackType_BlemdOpType
|
||||
};
|
||||
|
||||
public static readonly MappingMode[] ConvertAssimpMappingModeCppToCs = new MappingMode[]
|
||||
{
|
||||
MappingMode.Wrap, // aiTextureMapMode_Wrap
|
||||
MappingMode.Clamp, // aiTextureMapMode_Clamp
|
||||
MappingMode.Mirror, // aiTextureMapMode_Mirror
|
||||
MappingMode.Decal // aiTextureMapMode_Decal
|
||||
};
|
||||
|
||||
public static unsafe MaterialStack ConvertAssimpStackCppToCs(Silk.NET.Assimp.Assimp assimp, Silk.NET.Assimp.Material* material, Silk.NET.Assimp.TextureType type)
|
||||
{
|
||||
var ret = new MaterialStack();
|
||||
var count = (int)assimp.GetMaterialTextureCount(material, type);
|
||||
|
||||
// Process the material stack
|
||||
for (int iEl = count - 1; iEl >= 0; --iEl)
|
||||
{
|
||||
StackElement el;
|
||||
// Common properties
|
||||
int elType = 0, elFlags = 0;
|
||||
float elAlpha = 0.0f, elBlend = 0.0f;
|
||||
// Operation-specific properties
|
||||
int elOp = 0;
|
||||
// Color-specific properties
|
||||
var elColor = new System.Numerics.Vector4();
|
||||
// Texture-specific properties
|
||||
var elTexPath = new AssimpString();
|
||||
int elTexChannel = 0, elMappingModeU = 0, elMappingModeV = 0;
|
||||
uint pMax = 0;
|
||||
|
||||
if (assimp.GetMaterialFloatArray(material, MatKeyTexAlphaBase, (uint)type, (uint)iEl, ref elAlpha, ref pMax) != Return.Success)
|
||||
elAlpha = 1.0f; // default alpha
|
||||
if (assimp.GetMaterialFloatArray(material, Silk.NET.Assimp.Assimp.MaterialTexblendBase, (uint)type, (uint)iEl, ref elBlend, ref pMax) != Return.Success)
|
||||
elBlend = 1.0f; // default blend
|
||||
if (assimp.GetMaterialIntegerArray(material, Silk.NET.Assimp.Assimp.MaterialTexflagsBase, (uint)type, (uint)iEl, ref elFlags, ref pMax) != Return.Success)
|
||||
elFlags = 0; // default flags (no flags)
|
||||
if (assimp.GetMaterialIntegerArray(material, MatKeyTexTypeBase, (uint)type, (uint)iEl, ref elType, ref pMax) != Return.Success)
|
||||
elType = (int)StackElementType.Texture;//continue; // error !
|
||||
|
||||
switch ((StackElementType)elType)
|
||||
{
|
||||
case StackElementType.Operation:
|
||||
if (assimp.GetMaterialIntegerArray(material, Silk.NET.Assimp.Assimp.MaterialTexopBase, (uint)type, (uint)iEl, ref elOp, ref pMax) != Return.Success)
|
||||
continue; // error !
|
||||
|
||||
el = new StackOperation(ConvertAssimpStackOperationCppToCs[elOp], elAlpha, elBlend, elFlags);
|
||||
break;
|
||||
case StackElementType.Color:
|
||||
if (assimp.GetMaterialColor(material, MatKeyTexColorBase, (uint)type, (uint)iEl, ref elColor) != Return.Success)
|
||||
continue; // error !
|
||||
el = new StackColor(new Color3(elColor.X, elColor.Y, elColor.Z), elAlpha, elBlend, elFlags);
|
||||
break;
|
||||
case StackElementType.Texture:
|
||||
if (assimp.GetMaterialString(material, Silk.NET.Assimp.Assimp.MaterialTextureBase, (uint)type, (uint)iEl, ref elTexPath) != Return.Success)
|
||||
continue; // error !
|
||||
if (assimp.GetMaterialIntegerArray(material, Silk.NET.Assimp.Assimp.MaterialUvwsrcBase, (uint)type, (uint)iEl, ref elTexChannel, ref pMax) != Return.Success)
|
||||
elTexChannel = 0; // default channel
|
||||
if (assimp.GetMaterialIntegerArray(material, Silk.NET.Assimp.Assimp.MaterialMappingmodeUBase, (uint)type, (uint)iEl, ref elMappingModeU, ref pMax) != Return.Success)
|
||||
elMappingModeU = (int)TextureMapMode.Wrap; // default mapping mode
|
||||
if (assimp.GetMaterialIntegerArray(material, Silk.NET.Assimp.Assimp.MaterialMappingmodeVBase, (uint)type, (uint)iEl, ref elMappingModeV, ref pMax) != Return.Success)
|
||||
elMappingModeV = (int)TextureMapMode.Wrap; // default mapping mode
|
||||
|
||||
el = new StackTexture(
|
||||
elTexPath.AsString,
|
||||
elTexChannel,
|
||||
ConvertAssimpMappingModeCppToCs[elMappingModeU],
|
||||
ConvertAssimpMappingModeCppToCs[elMappingModeV],
|
||||
elAlpha,
|
||||
elBlend,
|
||||
elFlags);
|
||||
break;
|
||||
default:
|
||||
// error !
|
||||
continue;
|
||||
}
|
||||
|
||||
ret.Push(el);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of the different operations in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public enum Operation
|
||||
{
|
||||
Add = 0,
|
||||
Add3ds,
|
||||
AddMaya,
|
||||
Average,
|
||||
Color,
|
||||
ColorBurn,
|
||||
ColorDodge,
|
||||
Darken3ds,
|
||||
DarkenMaya,
|
||||
Desaturate,
|
||||
Difference3ds,
|
||||
DifferenceMaya,
|
||||
Divide,
|
||||
Exclusion,
|
||||
HardLight,
|
||||
HardMix,
|
||||
Hue,
|
||||
Illuminate,
|
||||
In,
|
||||
Lighten3ds,
|
||||
LightenMaya,
|
||||
LinearBurn,
|
||||
LinearDodge,
|
||||
Multiply3ds,
|
||||
MultiplyMaya,
|
||||
None,
|
||||
Out,
|
||||
Over3ds,
|
||||
Overlay3ds,
|
||||
OverMaya,
|
||||
PinLight,
|
||||
Saturate,
|
||||
Saturation,
|
||||
Screen,
|
||||
SoftLight,
|
||||
Substract3ds,
|
||||
SubstractMaya,
|
||||
Value,
|
||||
Mask
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using Stride.Core.Mathematics;
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing a color in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public class StackColor : StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackColor"/> class.
|
||||
/// </summary>
|
||||
/// <param name="color">The color of the node.</param>
|
||||
/// <param name="alpha">The alpha of the node.</param>
|
||||
/// <param name="blend">The blending coefficient of the node.</param>
|
||||
/// <param name="flags">The flags of the node.</param>
|
||||
public StackColor(Color3 color, float alpha = 1.0f, float blend = 1.0f, int flags = 0)
|
||||
: base(alpha, blend, flags, StackElementType.Color)
|
||||
{
|
||||
Color = color;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the color of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The color of the node.
|
||||
/// </value>
|
||||
public Color3 Color { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing an element in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public abstract class StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackElement"/> class.
|
||||
/// </summary>
|
||||
/// <param name="alpha">The alpha of the node.</param>
|
||||
/// <param name="blend">The blending coefficient of the node.</param>
|
||||
/// <param name="flags">The flags of the node.</param>
|
||||
/// <param name="type">The type of the node.</param>
|
||||
public StackElement(float alpha, float blend, int flags, StackElementType type)
|
||||
{
|
||||
Alpha = alpha;
|
||||
Blend = blend;
|
||||
Type = type;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the alpha of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The alpha of the node.
|
||||
/// </value>
|
||||
public float Alpha { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the blending coefficient of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The blending coefficient of the node.
|
||||
/// </value>
|
||||
public float Blend { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the flags of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The flags of the node.
|
||||
/// </value>
|
||||
public int Flags { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the type of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The type of the node.
|
||||
/// </value>
|
||||
public StackElementType Type { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of the different types of node in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public enum StackElementType
|
||||
{
|
||||
Color = 0,
|
||||
Texture,
|
||||
Operation
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing an operation in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public class StackOperation : StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackOperation"/> class.
|
||||
/// </summary>
|
||||
/// <param name="operation">The operation of the node.</param>
|
||||
/// <param name="alpha">The alpha of the node.</param>
|
||||
/// <param name="blend">The blending coefficient of the node.</param>
|
||||
/// <param name="flags">The flags.</param>
|
||||
public StackOperation(Operation operation, float alpha = 1.0f, float blend = 1.0f, int flags = 0)
|
||||
: base(alpha, blend, flags, StackElementType.Operation)
|
||||
{
|
||||
Operation = operation;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the operation of the node.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The operation of the node.
|
||||
/// </value>
|
||||
public Operation Operation { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Assimp.Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Class representing a texture in the new Assimp's material stack.
|
||||
/// </summary>
|
||||
public class StackTexture : StackElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StackTexture"/> class.
|
||||
/// </summary>
|
||||
/// <param name="texturePath">The texture path.</param>
|
||||
/// <param name="channel">The uv channel used by the texture.</param>
|
||||
/// <param name="mappingModeU">The U mapping mode.</param>
|
||||
/// <param name="mappingModeV">The V mapping mode.</param>
|
||||
/// <param name="alpha">The alpha of the node.</param>
|
||||
/// <param name="blend">The blending coefficient of the node.</param>
|
||||
/// <param name="flags">The flags of the node.</param>
|
||||
public StackTexture(string texturePath, int channel, MappingMode mappingModeU, MappingMode mappingModeV, float alpha = 1.0f, float blend = 1.0F, int flags = 0)
|
||||
: base(alpha, blend, flags, StackElementType.Texture)
|
||||
{
|
||||
TexturePath = texturePath;
|
||||
Channel = channel;
|
||||
MappingModeU = mappingModeU;
|
||||
MappingModeV = mappingModeV;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the texture path.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The texture path.
|
||||
/// </value>
|
||||
public string TexturePath { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the uv channel.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The uv channel.
|
||||
/// </value>
|
||||
public int Channel { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the U mapping mode.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The U mapping mode.
|
||||
/// </value>
|
||||
public MappingMode MappingModeU { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets the Vmapping mode.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The V mapping mode.
|
||||
/// </value>
|
||||
public MappingMode MappingModeV { get; private set; }
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,38 +0,0 @@
|
|||
========================================================================
|
||||
DYNAMIC LINK LIBRARY : Stride.Importer.Assimp Project Overview
|
||||
========================================================================
|
||||
|
||||
AppWizard has created this Stride.Importer.Assimp DLL for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your Stride.Importer.Assimp application.
|
||||
|
||||
Stride.Importer.Assimp.vcxproj
|
||||
This is the main project file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the version of Visual C++ that generated the file, and
|
||||
information about the platforms, configurations, and project features selected with the
|
||||
Application Wizard.
|
||||
|
||||
Stride.Importer.Assimp.vcxproj.filters
|
||||
This is the filters file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the association between the files in your project
|
||||
and the filters. This association is used in the IDE to show grouping of files with
|
||||
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
|
||||
"Source Files" filter).
|
||||
|
||||
Stride.Importer.Assimp.cpp
|
||||
This is the main DLL source file.
|
||||
|
||||
Stride.Importer.Assimp.h
|
||||
This file contains a class declaration.
|
||||
|
||||
AssemblyInfo.cpp
|
||||
Contains custom attributes for modifying assembly metadata.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
|
@ -1,5 +0,0 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// Stride.Importer.Assimp.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
|
@ -1,21 +0,0 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma warning( disable : 4945 )
|
||||
|
||||
#include "assimp/Importer.hpp"
|
||||
#include "assimp/Scene.h"
|
||||
#include "assimp/IOSystem.hpp"
|
||||
#pragma make_public(aiScene)
|
||||
|
||||
#include "assimp/PostProcess.h"
|
||||
|
||||
#include <msclr/marshal_cppstd.h>
|
||||
|
||||
#include "UtilityFunctions.h"
|
||||
|
||||
#include <vector>
|
||||
#include <stack>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,25 @@
|
|||
<Project>
|
||||
<Import Project="..\..\targets\Stride.props" />
|
||||
<PropertyGroup>
|
||||
<StrideAssemblyProcessor>true</StrideAssemblyProcessor>
|
||||
<StrideAssemblyProcessorOptions>$(StrideAssemblyProcessorDefaultOptions)</StrideAssemblyProcessorOptions>
|
||||
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
|
||||
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Analysis\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Silk.NET.Assimp" Version="2.17.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Stride.Importer.Common\Stride.Importer.Common.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(StrideSdkTargets)" />
|
||||
</Project>
|
|
@ -1,257 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\targets\Stride.props" />
|
||||
<PropertyGroup>
|
||||
<StrideProjectType>Cpp</StrideProjectType>
|
||||
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
|
||||
<StrideBuildTags>WindowsTools</StrideBuildTags>
|
||||
<StrideAssemblyProcessorOptions>
|
||||
</StrideAssemblyProcessorOptions>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C2306552-6C42-464C-8981-32FEF4F9458D}</ProjectGuid>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>Stride.Importer.Assimp</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CLRSupport>NetCore</CLRSupport>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CLRSupport>NetCore</CLRSupport>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>bin\$(TargetFramework)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>obj\$(TargetFramework)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>bin\$(TargetFramework)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>obj\$(TargetFramework)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/ignore:4049 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Command>xcopy /D /Y "..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll" "$(TargetDir)$(Platform)\"</Command>
|
||||
<Outputs>$(TargetDir)$(Platform)\assimp-vc140-mt.dll;%(Outputs)</Outputs>
|
||||
<Inputs>..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll</Inputs>
|
||||
<TreatOutputAsContent>true</TreatOutputAsContent>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Command>xcopy /D /Y "..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll" "$(TargetDir)$(Platform)\"</Command>
|
||||
<Outputs>$(TargetDir)$(Platform)\assimp-vc140-mt.dll;%(Outputs)</Outputs>
|
||||
<Inputs>..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll</Inputs>
|
||||
<TreatOutputAsContent>true</TreatOutputAsContent>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>/ignore:4049 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Command>xcopy /D /Y "..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll" "$(TargetDir)$(Platform)\"</Command>
|
||||
<Outputs>$(TargetDir)$(Platform)\assimp-vc140-mt.dll;%(Outputs)</Outputs>
|
||||
<Inputs>..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll</Inputs>
|
||||
<TreatOutputAsContent>true</TreatOutputAsContent>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>..\..\..\deps\assimp\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>assimp-vc140-mt.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\assimp\lib\x64\</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Command>xcopy /D /Y "..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll" "$(TargetDir)$(Platform)\"</Command>
|
||||
<Outputs>$(TargetDir)$(Platform)\assimp-vc140-mt.dll;%(Outputs)</Outputs>
|
||||
<Inputs>..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll</Inputs>
|
||||
<TreatOutputAsContent>true</TreatOutputAsContent>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BulletSharp">
|
||||
<HintPath>..\..\..\deps\BulletPhysics\BulletSharp.NetStandard.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Stride.Importer.Common\ImporterUtils.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="Stdafx.h" />
|
||||
<ClInclude Include="UtilityFunctions.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AssemblyInfo.cpp" />
|
||||
<ClCompile Include="Stride.Importer.Assimp.cpp" />
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UtilityFunctions.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="app.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="app.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<StrideNativeLib Include="..\..\..\deps\assimp\bin\x64\assimp-vc140-mt.dll">
|
||||
<Link>runtimes\win-x64\native\%(Filename)%(Extension)</Link>
|
||||
<RelativePath>runtimes\win-x64\native\%(Filename)%(Extension)</RelativePath>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</StrideNativeLib>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\assets\Stride.Core.Assets\Stride.Core.Assets.csproj">
|
||||
<Project>{1e54a9a2-4439-4444-ae57-6d2ed3c0dc47}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Design\Stride.Core.Design.csproj">
|
||||
<Project>{66581dad-70ad-4475-ae47-c6c0df1ec5e2}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Assets\Stride.Assets.csproj">
|
||||
<Project>{39ae9c77-e94b-404f-8768-b6261b3c1e0e}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Engine\Stride.Engine.csproj">
|
||||
<Project>{c121a566-555e-42b9-9b0a-1696529a9088}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Rendering\Stride.Rendering.csproj">
|
||||
<Project>{ad4fdc24-b64d-4ed7-91aa-62c9eda12fa4}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core\Stride.Core.csproj">
|
||||
<Project>{0e916ab7-5a6c-4820-8ab1-aa492fe66d68}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Graphics\Stride.Graphics.csproj">
|
||||
<Project>{fb06c76a-6bb7-40be-9afa-fec13b045fb5}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.IO\Stride.Core.IO.csproj">
|
||||
<Project>{1de01410-22c9-489b-9796-1addab1f64e5}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Serialization\Stride.Core.Serialization.csproj">
|
||||
<Project>{5210fb81-b807-49bb-af0d-31fb6a83a572}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\shaders\Stride.Core.Shaders\Stride.Core.Shaders.csproj">
|
||||
<Project>{f2d52edb-bc17-4243-b06d-33cd20f87a7f}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Mathematics\Stride.Core.Mathematics.csproj">
|
||||
<Project>{1677b922-ccf0-44de-b57e-1cdd3d2b8e8a}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Shaders\Stride.Shaders.csproj">
|
||||
<Project>{273bdd15-7392-4078-91f0-af23594a3d7b}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride\Stride.csproj">
|
||||
<Project>{72390339-b2a1-4f61-a800-31ed0975b515}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Stride.Assimp.Translation\Stride.Assimp.Translation.vcxproj">
|
||||
<Project>{fcdf1b87-1c76-46eb-ad6a-d55ef5f195b8}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\buildengine\Stride.Core.BuildEngine.Common\Stride.Core.BuildEngine.Common.csproj">
|
||||
<Project>{7732cb84-a39a-4adf-b740-fd32a352fa8a}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Stride.Assimp\Stride.Assimp.csproj">
|
||||
<Project>{f61d86b5-7c3d-4441-957d-a0a6d2fa69ca}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Stride.Importer.Common\Stride.Importer.Common.vcxproj">
|
||||
<Project>{43a6e62e-1b1c-4630-abb8-c3f716004645}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(StrideSdkTargets)" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UtilityFunctions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Stride.Importer.Common\ImporterUtils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Stride.Importer.Assimp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AssemblyInfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UtilityFunctions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="app.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="app.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,100 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#include "Stdafx.h"
|
||||
|
||||
#include "UtilityFunctions.h"
|
||||
|
||||
using namespace System::Text;
|
||||
using namespace Stride::Engine;
|
||||
|
||||
|
||||
String^ aiStringToString(aiString str)
|
||||
{
|
||||
// Assimp aiString underlying encoding is UTF-8
|
||||
// Windows String underlying encoding is UTF-16
|
||||
Encoding^ srcEncoding = Encoding::UTF8;
|
||||
|
||||
const char* pAiData = str.C_Str(); // pointer to the underlying data of he aiString
|
||||
// Check `str' cannot be more than the size of a int.
|
||||
array<unsigned char>^ buffer = gcnew array<unsigned char>((int) str.length);
|
||||
for(unsigned int i=0; i<str.length; ++i)
|
||||
buffer[i] = pAiData[i];
|
||||
|
||||
return srcEncoding->GetString(buffer);
|
||||
}
|
||||
|
||||
Color aiColor4ToColor(aiColor4D color)
|
||||
{
|
||||
Color ret(color.r, color.g, color.b, color.a);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Color3 aiColor3ToColor3(aiColor3D color)
|
||||
{
|
||||
Color3 ret(color.r, color.g, color.b);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Color4 aiColor3ToColor4(aiColor3D color)
|
||||
{
|
||||
Color4 ret(color.r, color.g, color.b, 1.0f);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Matrix aiMatrixToMatrix(aiMatrix4x4 mat)
|
||||
{
|
||||
Matrix ret( mat.a1, mat.b1, mat.c1, mat.d1,
|
||||
mat.a2, mat.b2, mat.c2, mat.d2,
|
||||
mat.a3, mat.b3, mat.c3, mat.d3,
|
||||
mat.a4, mat.b4, mat.c4, mat.d4);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Vector2 aiVector2ToVector2(aiVector2D vec)
|
||||
{
|
||||
Vector2 ret(vec.x, vec.y);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Vector3 aiVector3ToVector3(aiVector3D vec)
|
||||
{
|
||||
Vector3 ret(vec.x, vec.y, vec.z);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Quaternion aiQuaternionToQuaternion(aiQuaterniont<float> quat)
|
||||
{
|
||||
Quaternion ret(quat.x, quat.y, quat.z, quat.w);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CompressedTimeSpan aiTimeToXkTimeSpan(double time, double aiTickPerSecond)
|
||||
{
|
||||
double sdTime = CompressedTimeSpan::TicksPerSecond / aiTickPerSecond * time;
|
||||
return CompressedTimeSpan((long)sdTime);
|
||||
}
|
||||
|
||||
|
||||
Vector3 QuaternionToEulerAngles(Quaternion q)
|
||||
{
|
||||
Vector3 ret;
|
||||
|
||||
// source wikipedia => http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles#Conversion
|
||||
ret.X = (float)Math::Atan2(2.f * q.X * q.W + 2.f * q.Y * q.Z, 1 - 2.f * (q.X*q.X + q.Y*q.Y));
|
||||
|
||||
auto sinY = Math::Min(1.0, Math::Max(-1.0, 2.0 * ( q.W * q.Y - q.Z * q.X ))); // with approximation value can exceed 1 and lead to invalid Arcsinus.
|
||||
ret.Y = (float)Math::Asin(sinY);
|
||||
|
||||
ret.Z = (float)Math::Atan2(2.f * q.W * q.Z + 2.f * q.Y * q.X, 1 - 2.f * (q.Y*q.Y + q.Z*q.Z));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Vector3 FlipYZAxis(Vector3 input, bool shouldFlip)
|
||||
{
|
||||
if(!shouldFlip)
|
||||
return input;
|
||||
|
||||
return Vector3(input.X, input.Z, -input.Y);
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#include "Stdafx.h"
|
||||
|
||||
|
||||
using namespace System;
|
||||
using namespace Stride::Animations;
|
||||
using namespace Stride::Core::Diagnostics;
|
||||
using namespace Stride::Core::Mathematics;
|
||||
|
||||
// Assimp types convertion
|
||||
String^ aiStringToString(aiString str);
|
||||
Color aiColor4ToColor(aiColor4D color);
|
||||
Color3 aiColor3ToColor3(aiColor3D color);
|
||||
Color4 aiColor3ToColor4(aiColor3D color);
|
||||
Matrix aiMatrixToMatrix(aiMatrix4x4 mat);
|
||||
Vector2 aiVector2ToVector2(aiVector2D vec);
|
||||
Vector3 aiVector3ToVector3(aiVector3D vec);
|
||||
Quaternion aiQuaternionToQuaternion(aiQuaterniont<float> quat);
|
||||
CompressedTimeSpan aiTimeToXkTimeSpan(double time, double tickPerSecond);
|
||||
|
||||
// Others
|
||||
Vector3 QuaternionToEulerAngles(Quaternion q);
|
||||
Vector3 FlipYZAxis(Vector3 input, bool shouldFlip);
|
|
@ -0,0 +1,63 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using Silk.NET.Assimp;
|
||||
using Stride.Animations;
|
||||
using Stride.Core.Mathematics;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Stride.Importer.Assimp
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
public const int AI_MAX_NUMBER_OF_TEXTURECOORDS = 8;
|
||||
public const int AI_MAX_NUMBER_OF_COLOR_SETS = 8;
|
||||
|
||||
public static Matrix ToStrideMatrix(this Matrix4x4 matrix)
|
||||
{
|
||||
// Note the order. Matrices from Assimp has to be transposed
|
||||
return new Matrix(
|
||||
matrix.M11, matrix.M21, matrix.M31, matrix.M41,
|
||||
matrix.M12, matrix.M22, matrix.M32, matrix.M42,
|
||||
matrix.M13, matrix.M23, matrix.M33, matrix.M43,
|
||||
matrix.M14, matrix.M24, matrix.M34, matrix.M44);
|
||||
}
|
||||
|
||||
public static Core.Mathematics.Vector3 ToStrideVector3(this System.Numerics.Vector3 v)
|
||||
=> new Core.Mathematics.Vector3(v.X, v.Y, v.Z);
|
||||
|
||||
public static Color ToStrideColor(this System.Numerics.Vector4 v)
|
||||
=> new Color(v.X, v.Y, v.Z, v.W);
|
||||
|
||||
public static Core.Mathematics.Quaternion ToStrideQuaternion(this AssimpQuaternion q)
|
||||
=> new Core.Mathematics.Quaternion(q.X, q.Y, q.Z, q.W);
|
||||
|
||||
public static unsafe uint GetNumUVChannels(Silk.NET.Assimp.Mesh* mesh)
|
||||
{
|
||||
var n = 0;
|
||||
while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mesh->MTextureCoords[n] != null)
|
||||
{
|
||||
++n;
|
||||
}
|
||||
|
||||
return (uint)n;
|
||||
}
|
||||
|
||||
public static unsafe uint GetNumColorChannels(Silk.NET.Assimp.Mesh* mesh)
|
||||
{
|
||||
var n = 0;
|
||||
while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mesh->MColors[n] != null)
|
||||
{
|
||||
++n;
|
||||
}
|
||||
|
||||
return (uint)n;
|
||||
}
|
||||
|
||||
public static CompressedTimeSpan AiTimeToStrideTimeSpan(double time, double aiTickPerSecond)
|
||||
{
|
||||
var sdTime = CompressedTimeSpan.TicksPerSecond / aiTickPerSecond * time;
|
||||
return new CompressedTimeSpan((int)sdTime);
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
sources/tools/Stride.Importer.Assimp/app.ico
Двоичные данные
sources/tools/Stride.Importer.Assimp/app.ico
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 9.9 KiB |
Двоичные данные
sources/tools/Stride.Importer.Assimp/app.rc
Двоичные данные
sources/tools/Stride.Importer.Assimp/app.rc
Двоичный файл не отображается.
Двоичные данные
sources/tools/Stride.Importer.Assimp/msbuild.binlog
Двоичные данные
sources/tools/Stride.Importer.Assimp/msbuild.binlog
Двоичный файл не отображается.
|
@ -1,3 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by app.rc
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Stride.Animations;
|
||||
|
||||
namespace Stride.Importer.Common
|
||||
{
|
||||
public class AnimationInfo
|
||||
{
|
||||
public TimeSpan Duration;
|
||||
public Dictionary<string, AnimationClip> AnimationClips = new();
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Reflection;
|
||||
using namespace System::Runtime::CompilerServices;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
using namespace System::Security::Permissions;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly:AssemblyTitleAttribute("StrideImporterCommon")];
|
||||
[assembly:AssemblyDescriptionAttribute("")];
|
||||
[assembly:AssemblyConfigurationAttribute("")];
|
||||
[assembly:AssemblyCompanyAttribute("")];
|
||||
[assembly:AssemblyProductAttribute("StrideImporterCommon")];
|
||||
[assembly:AssemblyCopyrightAttribute("Copyright (c) 2013")];
|
||||
[assembly:AssemblyTrademarkAttribute("")];
|
||||
[assembly:AssemblyCultureAttribute("")];
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the value or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly:AssemblyVersionAttribute("1.0.*")];
|
||||
|
||||
[assembly:ComVisible(false)];
|
||||
|
||||
[assembly:CLSCompliantAttribute(true)];
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Stride.Assets.Materials;
|
||||
|
||||
namespace Stride.Importer.Common
|
||||
{
|
||||
public class EntityInfo
|
||||
{
|
||||
public List<string> TextureDependencies;
|
||||
public Dictionary<string, MaterialAsset> Materials;
|
||||
public List<string> AnimationNodes;
|
||||
public List<MeshParameters> Models;
|
||||
public List<NodeInfo> Nodes;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Stride.Assets.Materials;
|
||||
|
||||
namespace Stride.Importer.Common
|
||||
{
|
||||
public class MeshMaterials
|
||||
{
|
||||
public Dictionary<string, MaterialAsset> Materials;
|
||||
public List<MeshParameters> Models;
|
||||
public List<string> BoneNodes;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Stride.Importer.Common
|
||||
{
|
||||
public class MeshParameters
|
||||
{
|
||||
public string MaterialName;
|
||||
public string MeshName;
|
||||
public string NodeName;
|
||||
public HashSet<string> BoneNodes;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
namespace Stride.Importer.Common
|
||||
{
|
||||
public class NodeInfo
|
||||
{
|
||||
public string Name;
|
||||
public int Depth;
|
||||
public bool Preserve;
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// Stride.Importer.Assimp.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
|
@ -1,9 +0,0 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma warning( disable : 4945 )
|
||||
|
||||
#include <string>
|
|
@ -1,136 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Collections::Generic;
|
||||
using namespace System::IO;
|
||||
using namespace Stride::Core::Assets;
|
||||
using namespace Stride::Core::Diagnostics;
|
||||
using namespace Stride::Core::Mathematics;
|
||||
using namespace Stride::Core::Serialization;
|
||||
using namespace Stride::Animations;
|
||||
using namespace Stride::Rendering;
|
||||
using namespace Stride::Rendering::Materials;
|
||||
using namespace Stride::Rendering::Materials::ComputeColors;
|
||||
using namespace Stride::Assets::Materials;
|
||||
using namespace Stride::Engine;
|
||||
using namespace Stride::Graphics;
|
||||
using namespace Stride::Shaders;
|
||||
|
||||
namespace Stride { namespace Importer { namespace Common {
|
||||
|
||||
public ref class AnimationInfo
|
||||
{
|
||||
public:
|
||||
AnimationInfo()
|
||||
{
|
||||
AnimationClips = gcnew Dictionary<System::String^, AnimationClip^>();
|
||||
}
|
||||
|
||||
TimeSpan Duration;
|
||||
Dictionary<System::String^, AnimationClip^>^ AnimationClips;
|
||||
};
|
||||
|
||||
public ref class MeshParameters
|
||||
{
|
||||
public:
|
||||
MeshParameters()
|
||||
{
|
||||
}
|
||||
|
||||
String^ MaterialName;
|
||||
String^ MeshName;
|
||||
String^ NodeName;
|
||||
HashSet<String^>^ BoneNodes;
|
||||
};
|
||||
|
||||
public ref class NodeInfo
|
||||
{
|
||||
public:
|
||||
String^ Name;
|
||||
int Depth;
|
||||
bool Preserve;
|
||||
};
|
||||
|
||||
public ref class EntityInfo
|
||||
{
|
||||
public:
|
||||
List<String^>^ TextureDependencies;
|
||||
Dictionary<String^, MaterialAsset^>^ Materials;
|
||||
List<String^>^ AnimationNodes;
|
||||
List<MeshParameters^>^ Models;
|
||||
List<NodeInfo^>^ Nodes;
|
||||
};
|
||||
|
||||
public ref class MeshMaterials
|
||||
{
|
||||
public:
|
||||
Dictionary<String^, MaterialAsset^>^ Materials;
|
||||
List<MeshParameters^>^ Models;
|
||||
List<String^>^ BoneNodes;
|
||||
};
|
||||
|
||||
public ref class TextureLayerGenerator
|
||||
{
|
||||
public:
|
||||
|
||||
static ShaderClassSource^ GenerateTextureLayer(String^ vfsOutputPath, String^ sourceTextureFile, int textureUVSetIndex, Vector2 textureUVscaling ,
|
||||
int& textureCount, ParameterKey<Texture^>^ surfaceMaterialKey,
|
||||
Mesh^ meshData, Logger^ logger)
|
||||
{
|
||||
ParameterKey<Texture^>^ parameterKey;
|
||||
|
||||
auto url = vfsOutputPath + "_" + Path::GetFileNameWithoutExtension(sourceTextureFile);
|
||||
|
||||
if (File::Exists(sourceTextureFile))
|
||||
{
|
||||
if (logger != nullptr)
|
||||
{
|
||||
logger->Warning(String::Format("The texture '{0}' referenced in the mesh material can not be found on the system. Loading will probably fail at run time.", sourceTextureFile),
|
||||
nullptr, CallerInfo::Get(__FILEW__, __FUNCTIONW__, __LINE__));
|
||||
}
|
||||
}
|
||||
|
||||
parameterKey = ParameterKeys::IndexedKey(surfaceMaterialKey, textureCount++);
|
||||
String^ uvSetName = "TEXCOORD";
|
||||
if (textureUVSetIndex != 0)
|
||||
uvSetName += textureUVSetIndex;
|
||||
//albedoMaterial->Add(gcnew ShaderClassSource("TextureStream", uvSetName, "TEXTEST" + uvSetIndex));
|
||||
auto uvScaling = textureUVscaling;
|
||||
auto textureName = parameterKey->Name;
|
||||
auto needScaling = uvScaling != Vector2::One;
|
||||
auto currentComposition = needScaling
|
||||
? gcnew ShaderClassSource("ComputeColorTextureRepeat", textureName, uvSetName, "float2(" + uvScaling.X + ", " + uvScaling.Y + ")")
|
||||
: gcnew ShaderClassSource("ComputeColorTexture", textureName, uvSetName);
|
||||
|
||||
return currentComposition;
|
||||
}
|
||||
|
||||
static ComputeTextureColor^ GenerateMaterialTextureNode(String^ vfsOutputPath, String^ sourceTextureFile, size_t textureUVSetIndex, Vector2 textureUVscaling, TextureAddressMode addressModeU, TextureAddressMode addressModeV, Logger^ logger)
|
||||
{
|
||||
auto textureFileName = Path::GetFileNameWithoutExtension(sourceTextureFile);
|
||||
auto url = vfsOutputPath + "_" + textureFileName;
|
||||
|
||||
if (File::Exists(sourceTextureFile))
|
||||
{
|
||||
if (logger != nullptr)
|
||||
{
|
||||
logger->Warning(String::Format("The texture '{0}' referenced in the mesh material can not be found on the system. Loading will probably fail at run time.", sourceTextureFile),
|
||||
nullptr, CallerInfo::Get(__FILEW__, __FUNCTIONW__, __LINE__));
|
||||
}
|
||||
}
|
||||
|
||||
auto uvScaling = textureUVscaling;
|
||||
auto textureName = textureFileName;
|
||||
|
||||
auto texture = AttachedReferenceManager::CreateProxyObject<Texture^>(AssetId::Empty, textureName);
|
||||
|
||||
auto currentTexture = gcnew ComputeTextureColor(texture, (TextureCoordinate)textureUVSetIndex, uvScaling, Vector2::Zero);
|
||||
currentTexture->AddressModeU = addressModeU;
|
||||
currentTexture->AddressModeV = addressModeV;
|
||||
|
||||
return currentTexture;
|
||||
}
|
||||
};
|
||||
}}}
|
|
@ -0,0 +1,23 @@
|
|||
<Project>
|
||||
<Import Project="..\..\targets\Stride.props" />
|
||||
<PropertyGroup>
|
||||
<StrideAssemblyProcessor>true</StrideAssemblyProcessor>
|
||||
<StrideAssemblyProcessorOptions>$(StrideAssemblyProcessorDefaultOptions)</StrideAssemblyProcessorOptions>
|
||||
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
|
||||
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Analysis\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\engine\Stride.Assets\Stride.Assets.csproj" />
|
||||
<ProjectReference Include="..\..\engine\Stride.Engine\Stride.Engine.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(StrideSdkTargets)" />
|
||||
</Project>
|
|
@ -1,161 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\targets\Stride.props" />
|
||||
<PropertyGroup>
|
||||
<StrideProjectType>Cpp</StrideProjectType>
|
||||
<TargetFramework>$(StrideEditorTargetFramework)</TargetFramework>
|
||||
<StrideBuildTags>WindowsTools</StrideBuildTags>
|
||||
<StrideAssemblyProcessorOptions>
|
||||
</StrideAssemblyProcessorOptions>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{43A6E62E-1B1C-4630-ABB8-C3F716004645}</ProjectGuid>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>Stride.Importer.Common</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CLRSupport>NetCore</CLRSupport>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CLRSupport>NetCore</CLRSupport>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>bin\$(TargetFramework)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>obj\$(TargetFramework)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>bin\$(TargetFramework)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>obj\$(TargetFramework)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<AdditionalOptions>/wd 4945 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="Stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AssemblyInfo.cpp" />
|
||||
<ClCompile Include="Stride.Importer.Common.cpp" />
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="app.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="app.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Design\Stride.Core.Design.csproj">
|
||||
<Project>{66581dad-70ad-4475-ae47-c6c0df1ec5e2}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Serialization\Stride.Core.Serialization.csproj">
|
||||
<Project>{5210fb81-b807-49bb-af0d-31fb6a83a572}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core\Stride.Core.csproj">
|
||||
<Project>{0e916ab7-5a6c-4820-8ab1-aa492fe66d68}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Assets\Stride.Assets.csproj">
|
||||
<Project>{39ae9c77-e94b-404f-8768-b6261b3c1e0e}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\core\Stride.Core.Mathematics\Stride.Core.Mathematics.csproj">
|
||||
<Project>{1677b922-ccf0-44de-b57e-1cdd3d2b8e8a}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Engine\Stride.Engine.csproj">
|
||||
<Project>{c121a566-555e-42b9-9b0a-1696529a9088}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Rendering\Stride.Rendering.csproj">
|
||||
<Project>{ad4fdc24-b64d-4ed7-91aa-62c9eda12fa4}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Graphics\Stride.Graphics.csproj">
|
||||
<Project>{fb06c76a-6bb7-40be-9afa-fec13b045fb5}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride.Shaders\Stride.Shaders.csproj">
|
||||
<Project>{273bdd15-7392-4078-91f0-af23594a3d7b}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\engine\Stride\Stride.csproj">
|
||||
<Project>{72390339-b2a1-4f61-a800-31ed0975b515}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(StrideSdkTargets)" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Stride.Importer.Common.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AssemblyInfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="app.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="app.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,86 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
|
||||
using System.IO;
|
||||
using Stride.Core.Assets;
|
||||
using Stride.Core.Diagnostics;
|
||||
using Stride.Core.Mathematics;
|
||||
using Stride.Core.Serialization;
|
||||
using Stride.Graphics;
|
||||
using Stride.Rendering;
|
||||
using Stride.Rendering.Materials;
|
||||
using Stride.Rendering.Materials.ComputeColors;
|
||||
using Stride.Shaders;
|
||||
|
||||
namespace Stride.Importer.Common
|
||||
{
|
||||
public class TextureLayerGenerator
|
||||
{
|
||||
public static ShaderClassSource GenerateTextureLayer(
|
||||
string vfsOutputPath,
|
||||
string sourceTextureFile,
|
||||
int textureUVSetIndex,
|
||||
Vector2 textureUVscaling,
|
||||
ref int textureCount,
|
||||
ParameterKey<Texture> surfaceMaterialKey,
|
||||
Mesh meshData,
|
||||
Logger logger
|
||||
)
|
||||
{
|
||||
ParameterKey<Texture> parameterKey;
|
||||
|
||||
if (File.Exists(sourceTextureFile) && logger != null)
|
||||
{
|
||||
logger.Warning($"The texture '{sourceTextureFile}' referenced in the mesh material can not be found on the system. Loading will probably fail at run time.", CallerInfo.Get());
|
||||
}
|
||||
|
||||
parameterKey = ParameterKeys.IndexedKey(surfaceMaterialKey, textureCount++);
|
||||
var uvSetName = "TEXCOORD";
|
||||
if (textureUVSetIndex != 0)
|
||||
uvSetName += textureUVSetIndex;
|
||||
|
||||
var uvScaling = textureUVscaling;
|
||||
var textureName = parameterKey.Name;
|
||||
var needScaling = uvScaling != Vector2.One;
|
||||
var currentComposition = needScaling
|
||||
? new ShaderClassSource(
|
||||
"ComputeColorTextureRepeat",
|
||||
textureName,
|
||||
uvSetName,
|
||||
"float2(" + uvScaling.X + ", " + uvScaling.Y + ")"
|
||||
)
|
||||
: new ShaderClassSource("ComputeColorTexture", textureName, uvSetName);
|
||||
|
||||
return currentComposition;
|
||||
}
|
||||
|
||||
public static ComputeTextureColor GenerateMaterialTextureNode(
|
||||
string vfsOutputPath,
|
||||
string sourceTextureFile,
|
||||
uint textureUVSetIndex,
|
||||
Vector2 textureUVscaling,
|
||||
TextureAddressMode addressModeU,
|
||||
TextureAddressMode addressModeV,
|
||||
Logger logger
|
||||
)
|
||||
{
|
||||
var textureFileName = Path.GetFileNameWithoutExtension(sourceTextureFile);
|
||||
|
||||
if (File.Exists(sourceTextureFile) && logger != null)
|
||||
{
|
||||
logger.Warning($"The texture '{sourceTextureFile}' referenced in the mesh material can not be found on the system. Loading will probably fail at run time.", CallerInfo.Get());
|
||||
}
|
||||
|
||||
var uvScaling = textureUVscaling;
|
||||
var textureName = textureFileName;
|
||||
|
||||
var texture = AttachedReferenceManager.CreateProxyObject<Texture>(AssetId.Empty, textureName);
|
||||
|
||||
var currentTexture = new ComputeTextureColor(texture, (TextureCoordinate)textureUVSetIndex, uvScaling, Vector2.Zero);
|
||||
currentTexture.AddressModeU = addressModeU;
|
||||
currentTexture.AddressModeV = addressModeV;
|
||||
|
||||
return currentTexture;
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
sources/tools/Stride.Importer.Common/app.ico
Двоичные данные
sources/tools/Stride.Importer.Common/app.ico
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 9.9 KiB |
Двоичные данные
sources/tools/Stride.Importer.Common/app.rc
Двоичные данные
sources/tools/Stride.Importer.Common/app.rc
Двоичный файл не отображается.
|
@ -1,3 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by app.rc
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
||||
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
||||
#include "stdafx.h"
|
||||
#include "../Stride.Importer.Common/ImporterUtils.h"
|
||||
#include "ImporterUtils.h"
|
||||
|
||||
#include "SceneMapping.h"
|
||||
#include "AnimationConverter.h"
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
<ClCompile Include="UtilityFunctions.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Stride.Importer.Common\ImporterUtils.h" />
|
||||
<ClInclude Include="ImporterUtils.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="UtilityFunctions.h" />
|
||||
</ItemGroup>
|
||||
|
@ -243,9 +243,8 @@
|
|||
<Project>{7732cb84-a39a-4adf-b740-fd32a352fa8a}</Project>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Stride.Importer.Common\Stride.Importer.Common.vcxproj">
|
||||
<Project>{43a6e62e-1b1c-4630-abb8-c3f716004645}</Project>
|
||||
<Private>False</Private>
|
||||
<ProjectReference Include="..\Stride.Importer.Common\Stride.Importer.Common.csproj">
|
||||
<Project>{806aa078-6070-4bb6-b05b-6ee6b21b1cde}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="UtilityFunctions.h" />
|
||||
<ClInclude Include="..\Stride.Importer.Common\ImporterUtils.h" />
|
||||
<ClInclude Include="ImporterUtils.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildThisFileDirectory)nuget-icon.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче