private static void TrySimpleMesh(DatReader reader, uint fileId) { EmbeddedFile file = reader.LocateFile(fileId); if (file == null) { throw new Exception("Unable to locate file"); } SimpleMesh mesh = new SimpleMesh(file); mesh.ReadSimpleMesh(); }
/// <summary> /// Loads the simple mesh with the specified ID /// </summary> /// <param name="id">The ID of the simple mesh</param> /// <returns>The simple mesh, or null if it couldn't be found</returns> public SimpleMesh LoadSimpleMesh(uint id) { EmbeddedFile file = m_portalReader.LocateFile(id); if (file == null) { return(null); } SimpleMesh mesh = new SimpleMesh(file); mesh.ReadSimpleMesh(); return(mesh); }