public static IFbxConverter GetConverter(Scene scene, FbxVersion version) { IFbxConverter converter = null; switch (version) { case FbxVersion.v2000: case FbxVersion.v2001: case FbxVersion.v3000: case FbxVersion.v3001: case FbxVersion.v4000: case FbxVersion.v4001: case FbxVersion.v4050: case FbxVersion.v5000: case FbxVersion.v5800: case FbxVersion.v6000: case FbxVersion.v6100: throw new NotImplementedException($"Incompatible version {version}"); case FbxVersion.v7000: case FbxVersion.v7100: case FbxVersion.v7200: case FbxVersion.v7300: case FbxVersion.v7400: converter = new FbxConverter7400(scene); break; case FbxVersion.v7500: case FbxVersion.v7600: case FbxVersion.v7700: converter = new FbxConverter7400(scene); break; default: throw new NotSupportedException($"Incompatible version {version}"); } //TODO: check the versions differences to implement the missing converters return(converter); }
/// <summary> /// Create a <see cref="FbxRootNode"/> from an <see cref="Scene"/>. /// </summary> /// <param name="scene">Scene from where the <see cref="FbxRootNode"/> will be created.</param> /// <param name="version"><see cref="FbxVersion"/> format for the <see cref="FbxRootNode"/></param> public static FbxRootNode CreateFromScene(Scene scene, FbxVersion version = FbxVersion.v7400) { IFbxConverter converter = FbxConverterBase.GetConverter(scene, version); return(converter.ToRootNode()); }