瀏覽代碼

Renamed Schema2Toolkit to just Toolkit to remove a naming redundancy; this is a small breaking change.

Vicente Penades 5 年之前
父節點
當前提交
5588f7e4f5

+ 2 - 2
src/SharpGLTF.Toolkit/IO/WavefrontWriter.cs

@@ -212,7 +212,7 @@ namespace SharpGLTF.IO
 
 
         public void AddModel(ModelRoot model)
         public void AddModel(ModelRoot model)
         {
         {
-            foreach (var triangle in Schema2Toolkit.EvaluateTriangles<VGEOMETRY, VMATERIAL>(model.DefaultScene))
+            foreach (var triangle in Toolkit.EvaluateTriangles<VGEOMETRY, VMATERIAL>(model.DefaultScene))
             {
             {
                 var dstMaterial = GetMaterialFromTriangle(triangle.Material);
                 var dstMaterial = GetMaterialFromTriangle(triangle.Material);
                 this.AddTriangle(dstMaterial, triangle.A, triangle.B, triangle.C);
                 this.AddTriangle(dstMaterial, triangle.A, triangle.B, triangle.C);
@@ -221,7 +221,7 @@ namespace SharpGLTF.IO
 
 
         public void AddModel(ModelRoot model, Animation animation, float time)
         public void AddModel(ModelRoot model, Animation animation, float time)
         {
         {
-            foreach (var triangle in Schema2Toolkit.EvaluateTriangles<VGEOMETRY, VMATERIAL>(model.DefaultScene, animation, time))
+            foreach (var triangle in Toolkit.EvaluateTriangles<VGEOMETRY, VMATERIAL>(model.DefaultScene, animation, time))
             {
             {
                 var dstMaterial = GetMaterialFromTriangle(triangle.Material);
                 var dstMaterial = GetMaterialFromTriangle(triangle.Material);
                 this.AddTriangle(dstMaterial, triangle.A, triangle.B, triangle.C);
                 this.AddTriangle(dstMaterial, triangle.A, triangle.B, triangle.C);

+ 1 - 1
src/SharpGLTF.Toolkit/Schema2/AccessorExtensions.cs

@@ -5,7 +5,7 @@ using System.Numerics;
 
 
 namespace SharpGLTF.Schema2
 namespace SharpGLTF.Schema2
 {
 {
-    public static partial class Schema2Toolkit
+    public static partial class Toolkit
     {
     {
         public static Accessor CreateVertexAccessor(this ModelRoot root, Memory.MemoryAccessor memAccessor)
         public static Accessor CreateVertexAccessor(this ModelRoot root, Memory.MemoryAccessor memAccessor)
         {
         {

+ 1 - 1
src/SharpGLTF.Toolkit/Schema2/AnimationExtensions.cs

@@ -6,7 +6,7 @@ using System.Text;
 
 
 namespace SharpGLTF.Schema2
 namespace SharpGLTF.Schema2
 {
 {
-    public static partial class Schema2Toolkit
+    public static partial class Toolkit
     {
     {
         public static Animation UseAnimation(this ModelRoot root, string name)
         public static Animation UseAnimation(this ModelRoot root, string name)
         {
         {

+ 1 - 1
src/SharpGLTF.Toolkit/Schema2/LightExtensions.cs

@@ -5,7 +5,7 @@ using System.Text;
 
 
 namespace SharpGLTF.Schema2
 namespace SharpGLTF.Schema2
 {
 {
-    public static partial class Schema2Toolkit
+    public static partial class Toolkit
     {
     {
         /// <summary>
         /// <summary>
         /// Sets the cone angles for the <see cref="PunctualLightType.Spot"/> light.
         /// Sets the cone angles for the <see cref="PunctualLightType.Spot"/> light.

+ 1 - 1
src/SharpGLTF.Toolkit/Schema2/MaterialExtensions.cs

@@ -8,7 +8,7 @@ using SharpGLTF.Materials;
 
 
 namespace SharpGLTF.Schema2
 namespace SharpGLTF.Schema2
 {
 {
-    public static partial class Schema2Toolkit
+    public static partial class Toolkit
     {
     {
         #region Fluent API
         #region Fluent API
 
 

+ 1 - 1
src/SharpGLTF.Toolkit/Schema2/MeshExtensions.cs

@@ -12,7 +12,7 @@ using MESHXFORM = SharpGLTF.Transforms.IGeometryTransform;
 
 
 namespace SharpGLTF.Schema2
 namespace SharpGLTF.Schema2
 {
 {
-    public static partial class Schema2Toolkit
+    public static partial class Toolkit
     {
     {
         #region meshes
         #region meshes
 
 

+ 1 - 1
src/SharpGLTF.Toolkit/Schema2/SceneExtensions.cs

@@ -9,7 +9,7 @@ using SharpGLTF.Geometry.VertexTypes;
 
 
 namespace SharpGLTF.Schema2
 namespace SharpGLTF.Schema2
 {
 {
-    public static partial class Schema2Toolkit
+    public static partial class Toolkit
     {
     {
         #region fluent creation
         #region fluent creation
 
 

+ 6 - 6
tests/SharpGLTF.NUnit/NUnitGltfUtils.cs

@@ -27,14 +27,14 @@ namespace SharpGLTF
             model.AttachToCurrentTest(fileName);
             model.AttachToCurrentTest(fileName);
         }
         }
 
 
-        public static void AttachToCurrentTest(this Schema2.ModelRoot model, string fileName, Schema2.Animation animation, float time)
+        public static void AttachToCurrentTest(this ModelRoot model, string fileName, Animation animation, float time)
         {
         {
             fileName = fileName.Replace(" ", "_");
             fileName = fileName.Replace(" ", "_");
 
 
             // find the output path for the current test
             // find the output path for the current test
             fileName = TestContext.CurrentContext.GetAttachmentPath(fileName, true);
             fileName = TestContext.CurrentContext.GetAttachmentPath(fileName, true);
 
 
-            Schema2.Schema2Toolkit.SaveAsWavefront(model, fileName, animation, time);
+            model.SaveAsWavefront(fileName, animation, time);
 
 
             // Attach the saved file to the current test
             // Attach the saved file to the current test
             TestContext.AddTestAttachment(fileName);
             TestContext.AddTestAttachment(fileName);
@@ -45,9 +45,9 @@ namespace SharpGLTF
             where TvM : struct, Geometry.VertexTypes.IVertexMaterial
             where TvM : struct, Geometry.VertexTypes.IVertexMaterial
             where TvS : struct, Geometry.VertexTypes.IVertexSkinning
             where TvS : struct, Geometry.VertexTypes.IVertexSkinning
         {
         {
-            var gl2model = Schema2.ModelRoot.CreateModel();
+            var gl2model = ModelRoot.CreateModel();
 
 
-            var gl2mesh = Schema2.Schema2Toolkit.CreateMeshes(gl2model, mesh).First();
+            var gl2mesh = gl2model.CreateMeshes(mesh).First();
 
 
             var node = gl2model.UseScene(0).CreateNode();
             var node = gl2model.UseScene(0).CreateNode();
             node.Mesh = gl2mesh;
             node.Mesh = gl2mesh;
@@ -55,7 +55,7 @@ namespace SharpGLTF
             gl2model.AttachToCurrentTest(fileName);
             gl2model.AttachToCurrentTest(fileName);
         }
         }
 
 
-        public static string AttachToCurrentTest(this Schema2.ModelRoot model, string fileName, WriteSettings settings = null)
+        public static string AttachToCurrentTest(this ModelRoot model, string fileName, WriteSettings settings = null)
         {
         {
             // find the output path for the current test
             // find the output path for the current test
             fileName = TestContext.CurrentContext.GetAttachmentPath(fileName, true);
             fileName = TestContext.CurrentContext.GetAttachmentPath(fileName, true);
@@ -73,7 +73,7 @@ namespace SharpGLTF
             else if (fileName.ToLower().EndsWith(".obj"))
             else if (fileName.ToLower().EndsWith(".obj"))
             {
             {
                 fileName = fileName.Replace(" ", "_");
                 fileName = fileName.Replace(" ", "_");
-                Schema2.Schema2Toolkit.SaveAsWavefront(model, fileName);
+                model.SaveAsWavefront(fileName);
             }
             }
             else if (fileName.ToLower().EndsWith(".plotly"))
             else if (fileName.ToLower().EndsWith(".plotly"))
             {
             {

+ 1 - 1
tests/SharpGLTF.Tests/AssemblyAPITests.cs

@@ -84,7 +84,7 @@ namespace SharpGLTF
         {
         {
             TestContext.CurrentContext.AttachShowDirLink();
             TestContext.CurrentContext.AttachShowDirLink();
 
 
-            var assembly = typeof(Schema2.Schema2Toolkit).Assembly;
+            var assembly = typeof(Schema2.Toolkit).Assembly;
 
 
             var API = DumpAssemblyAPI.GetAssemblySignature(assembly).OrderBy(item => item).ToArray();
             var API = DumpAssemblyAPI.GetAssemblySignature(assembly).OrderBy(item => item).ToArray();
 
 

+ 1 - 1
tests/SharpGLTF.Tests/SharpGLTF.Core.Tests.csproj

@@ -26,7 +26,7 @@
       <PrivateAssets>all</PrivateAssets>
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
     </PackageReference>
-    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
   </ItemGroup>  
   </ItemGroup>  
 
 
 </Project>
 </Project>

+ 3 - 3
tests/SharpGLTF.Toolkit.Tests/Scenes/SceneBuilderTests.cs

@@ -483,7 +483,7 @@ namespace SharpGLTF.Scenes
 
 
             // perform roundtrip
             // perform roundtrip
 
 
-            var srcScene = Schema2Toolkit.ToSceneBuilder(srcModel.DefaultScene);            
+            var srcScene = Toolkit.ToSceneBuilder(srcModel.DefaultScene);            
 
 
             var rowModel = srcScene.ToGltf2();
             var rowModel = srcScene.ToGltf2();
 
 
@@ -491,8 +491,8 @@ namespace SharpGLTF.Scenes
             settings.UseStridedBuffers = false;
             settings.UseStridedBuffers = false;
             var colModel = srcScene.ToGltf2(settings);
             var colModel = srcScene.ToGltf2(settings);
 
 
-            var rowScene = Schema2Toolkit.ToSceneBuilder(rowModel.DefaultScene);
-            var colScene = Schema2Toolkit.ToSceneBuilder(colModel.DefaultScene);
+            var rowScene = Toolkit.ToSceneBuilder(rowModel.DefaultScene);
+            var colScene = Toolkit.ToSceneBuilder(colModel.DefaultScene);
 
 
             // compare files
             // compare files
 
 

+ 1 - 1
tests/SharpGLTF.Toolkit.Tests/SharpGLTF.Toolkit.Tests.csproj

@@ -26,7 +26,7 @@
       <PrivateAssets>all</PrivateAssets>
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
     </PackageReference>
-    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
   </ItemGroup>  
   </ItemGroup>  
 
 
 </Project>
 </Project>