/// <summary> /// This method is called when a VertexMap save is requested, it illiterates through all /// the registered VertexMapFactory instances to see if there is one capable to saving the /// given format. /// </summary> /// <param name="path">File path to save vertex map to.</param> /// <param name="flags">Bitmask of flags to define how the vertex map should be saved.</param> /// <returns>True if save was successfull else false.</returns> public static bool SaveVertexMap(object path, VertexMap vertexMap, VertexMapSaveFlags flags) { foreach (VertexMapFactory factory in _loaderList) { if (factory.RequestSave(path, vertexMap, flags) == true) { return(true); } } return(false); }
/// <summary> /// This method is called when VertexMap save is requested, if it returns true /// the calling method will stop illiterating through the VertexMapFactorys and /// return success to the user. /// </summary> /// <param name="path">File path or object of the image to load.</param> /// <param name="pixelMap">VertexMap to save.</param> /// <param name="flags">Bitmask of flags defining how the vertex map should be saved.</param> /// <returns>True if the save was successfull else false.</returns> protected abstract bool RequestSave(object path, VertexMap vertexMap, VertexMapSaveFlags flags);
/// <summary> /// This method is called when a VertexMap save is requested, it illiterates through all /// the registered VertexMapFactory instances to see if there is one capable to saving the /// given format. /// </summary> /// <param name="path">File path to save vertex map to.</param> /// <param name="flags">Bitmask of flags to define how the vertex map should be saved.</param> /// <returns>True if save was successfull else false.</returns> public static bool SaveVertexMap(object path, VertexMap vertexMap, VertexMapSaveFlags flags) { foreach (VertexMapFactory factory in _loaderList) { if (factory.RequestSave(path, vertexMap, flags) == true) return true; } return false; }
/// <summary> /// Saves the given mesh to an mesh file. /// </summary> /// <param name="url">Location to save the mesh to.</param> /// <param name="mesh">Mesh to save to file.</param> /// <param name="flags">Bitmask of flags describing how to save the mesh.</param> public static bool SaveMesh(object url, Mesh mesh, VertexMapSaveFlags flags) { return(VertexMapFactory.SaveVertexMap(url, mesh.VertexMap, flags)); }
/// <summary> /// Saves the given mesh to an mesh file. /// </summary> /// <param name="url">Location to save the mesh to.</param> /// <param name="mesh">Mesh to save to file.</param> /// <param name="flags">Bitmask of flags describing how to save the mesh.</param> public static bool SaveMesh(object url, Mesh mesh, VertexMapSaveFlags flags) { return VertexMapFactory.SaveVertexMap(url, mesh.VertexMap, flags); }