Example #1
0
        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();
        }
Example #2
0
        /// <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);
        }