This commit is contained in:
ikpil 2023-08-20 13:24:57 +09:00
parent c2e954b70a
commit 8328527b2a
1 changed files with 4 additions and 4 deletions

View File

@ -26,18 +26,18 @@ namespace DotRecast.Recast
{ {
public static class ObjImporter public static class ObjImporter
{ {
public static IInputGeomProvider Load(byte[] chunck) public static IInputGeomProvider Load(byte[] chunk)
{ {
var context = LoadContext(chunck); var context = LoadContext(chunk);
return new SimpleInputGeomProvider(context.vertexPositions, context.meshFaces); return new SimpleInputGeomProvider(context.vertexPositions, context.meshFaces);
} }
public static ObjImporterContext LoadContext(byte[] chunck) public static ObjImporterContext LoadContext(byte[] chunk)
{ {
ObjImporterContext context = new ObjImporterContext(); ObjImporterContext context = new ObjImporterContext();
try try
{ {
using StreamReader reader = new StreamReader(new MemoryStream(chunck)); using StreamReader reader = new StreamReader(new MemoryStream(chunk));
string line; string line;
while ((line = reader.ReadLine()) != null) while ((line = reader.ReadLine()) != null)
{ {