メンバーを使わない MeshImporter を static class に変更

This commit is contained in:
ousttrue
2022-06-07 16:09:11 +09:00
parent 6ee22b1491
commit 9ad556abcc
2 changed files with 3 additions and 4 deletions

View File

@@ -167,7 +167,6 @@ namespace UniGLTF
{
var inverter = InvertAxis.Create();
var meshImporter = new MeshImporter();
if (GLTF.meshes.Count > 0)
{
for (var i = 0; i < GLTF.meshes.Count; ++i)
@@ -175,7 +174,7 @@ namespace UniGLTF
var index = i;
using (MeasureTime("ReadMesh"))
{
var meshContext = await awaitCaller.Run(() => meshImporter.ReadMesh(Data, index, inverter));
var meshContext = await awaitCaller.Run(() => MeshImporter.ReadMesh(Data, index, inverter));
var meshWithMaterials = await BuildMeshAsync(awaitCaller, MeasureTime, meshContext, index);
Meshes.Add(meshWithMaterials);
}

View File

@@ -7,7 +7,7 @@ using VRMShaders;
namespace UniGLTF
{
public class MeshImporter
public static class MeshImporter
{
private const float FrameWeight = 100.0f;
@@ -29,7 +29,7 @@ namespace UniGLTF
return sharedAttributes;
}
internal MeshContext ReadMesh(GltfData data, int meshIndex, IAxisInverter inverter)
internal static MeshContext ReadMesh(GltfData data, int meshIndex, IAxisInverter inverter)
{
Profiler.BeginSample("ReadMesh");
var gltfMesh = data.GLTF.meshes[meshIndex];