ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/OniSplit/Dae/Writer.cs
Revision: 1114
Committed: Wed Jan 22 14:08:57 2020 UTC (5 years, 8 months ago) by iritscen
File size: 658 byte(s)
Log Message:
Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years.

File Contents

# Content
1 using System;
2 using System.IO;
3
4 namespace Oni.Dae
5 {
6 internal class Writer
7 {
8 public static void WriteFile(string filePath, Scene scene)
9 {
10 string type = Path.GetExtension(filePath);
11
12 if (string.Equals(type, ".dae", StringComparison.OrdinalIgnoreCase))
13 IO.DaeWriter.WriteFile(filePath, scene);
14 else if (string.Equals(type, ".obj", StringComparison.OrdinalIgnoreCase))
15 IO.ObjWriter.WriteFile(filePath, scene);
16 else
17 throw new NotSupportedException(string.Format("Unsupported 3D file type {0}", type));
18 }
19 }
20 }