forked from izrik/FbxSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFbxImporter.cs
40 lines (32 loc) · 978 Bytes
/
FbxImporter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.IO;
namespace FbxSharp
{
public class FbxImporter
{
public FbxImporter(string name = null)
{
Name = name;
}
public string Name;
//public bool Initialize(string pFileName /*, int pFileFormat = -1, FbxIOSettings*pIOSettings = null*/)
//{
// throw new NotImplementedException();
//}
//public bool Import(Document pDocument /*, bool pNonBlocking=false*/)
//{
// throw new NotImplementedException();
//}
public FbxScene Import(string filename)
{
using (var reader = new StreamReader(filename))
{
var parser = new Parser(new Tokenizer(reader));
var converter = new Converter();
var pobjects = parser.ReadFile();
var scene = converter.ConvertScene(pobjects);
return scene;
}
}
}
}