Exemplo n.º 1
0
        public void Write(MaterialCollection collection, Stream stream)
        {
            if (stream == default)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            using (var writer = new StreamWriter(stream))
            {
                new ObjMaterialWriter().Write(collection, writer);
            }
        }
Exemplo n.º 2
0
        public void Write(MaterialCollection collection, string path)
        {
            if (path == default)
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentException(string.Format("{0} cannot be empty.", nameof(path)), nameof(path));
            }

            using (var writer = new StreamWriter(path))
            {
                new ObjMaterialWriter().Write(collection, writer);
            }
        }