示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="objModel">Parsed ObjModel</param>
 /// <param name="objFolder">where the obj file resides</param>
 /// <param name="options"></param>
 public Converter(ObjModel objModel, string objFolder, GltfOptions options)
 {
     _objModel  = objModel;
     _objFolder = objFolder;
     _options   = options ?? new GltfOptions();
     _buffers   = new BufferState(_options.WithBatchTable);
 }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="objFile">obj file path</param>
        /// <param name="options"></param>
        public Converter(string objFile, GltfOptions options)
        {
            _objParser = new ObjParser(objFile, options.ObjEncoding);
            _objFolder = Path.GetDirectoryName(objFile);
            var name = Path.GetFileNameWithoutExtension(objFile);

            _options = options ?? new GltfOptions();
            if (String.IsNullOrEmpty(_options.Name))
            {
                _options.Name = name;
            }
            _buffers = new BufferState(_options.WithBatchTable);
        }