Last change
on this file since 1171 was 1114, checked in by iritscen, 5 years ago |
Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years.
|
File size:
626 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.IO;
|
---|
3 |
|
---|
4 | namespace Oni.Dae
|
---|
5 | {
|
---|
6 | internal class Reader
|
---|
7 | {
|
---|
8 | public static Scene ReadFile(string filePath)
|
---|
9 | {
|
---|
10 | string type = Path.GetExtension(filePath);
|
---|
11 |
|
---|
12 | if (string.Equals(type, ".dae", StringComparison.OrdinalIgnoreCase))
|
---|
13 | return IO.DaeReader.ReadFile(filePath);
|
---|
14 | else if (string.Equals(type, ".obj", StringComparison.OrdinalIgnoreCase))
|
---|
15 | return IO.ObjReader.ReadFile(filePath);
|
---|
16 | else
|
---|
17 | throw new NotSupportedException($"Unsupported 3D file type {type}");
|
---|
18 | }
|
---|
19 | }
|
---|
20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.