TriLibReaders.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //Auto-generated: Do not modify this file!
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using TriLibCore.Fbx.Reader;
  5. using TriLibCore.Gltf;
  6. using TriLibCore.Obj.Reader;
  7. using TriLibCore.Ply.Reader;
  8. using TriLibCore.Stl.Reader;
  9. using TriLibCore.ThreeMf.Reader;
  10. namespace TriLibCore
  11. {
  12. public class Readers
  13. {
  14. public static IList<string> Extensions
  15. {
  16. get
  17. {
  18. var extensions = new List<string>();
  19. extensions.AddRange(StlReader.GetExtensions());
  20. extensions.AddRange(ObjReader.GetExtensions());
  21. extensions.AddRange(FbxReader.GetExtensions());
  22. extensions.AddRange(GltfReader.GetExtensions());
  23. extensions.AddRange(PlyReader.GetExtensions());
  24. extensions.AddRange(ThreeMfReader.GetExtensions());
  25. return extensions;
  26. }
  27. }
  28. public static ReaderBase FindReaderForExtension(string extension)
  29. {
  30. if (((IList) StlReader.GetExtensions()).Contains(extension))
  31. {
  32. return new StlReader();
  33. }
  34. if (((IList) ObjReader.GetExtensions()).Contains(extension))
  35. {
  36. return new ObjReader();
  37. }
  38. if (((IList) FbxReader.GetExtensions()).Contains(extension))
  39. {
  40. return new FbxReader();
  41. }
  42. if (((IList) GltfReader.GetExtensions()).Contains(extension))
  43. {
  44. return new GltfReader();
  45. }
  46. if (((IList)PlyReader.GetExtensions()).Contains(extension))
  47. {
  48. return new PlyReader();
  49. }
  50. if (((IList)ThreeMfReader.GetExtensions()).Contains(extension))
  51. {
  52. return new ThreeMfReader();
  53. }
  54. return null;
  55. }
  56. }
  57. }