Example #1
0
        private void UpdateHeaderAndParameters(C3DFile file)
        {
            file.Header.FirstDataSectionID = this._newDataStartBlockIndex;
            C3DParameter dataStart = file.Parameters["POINT", "DATA_START"];

            if (dataStart != null)
            {
                dataStart.InternalSetData <UInt16>(this._newDataStartBlockIndex);

                this._writer.Seek(this._dataStartOffset, SeekOrigin.Begin);
                this._writer.Write(dataStart.GetLastDataArrayWithoutDescrption());
            }
        }
Example #2
0
        public void WriteC3DFile(C3DFile file)
        {
            this._dataStartOffset        = 0;
            this._newDataStartBlockIndex = 0;

            this._writer.Write(new Byte[C3DConstants.FILE_SECTION_SIZE]);
            this.WriteParameters(file.Header.FirstParameterSectionID, file.Parameters);

            C3DParameterCache paramCache = C3DParameterCache.CreateCache(file);

            this.WriteFrameCollection(paramCache, file.AllFrames);

            this.UpdateHeaderAndParameters(file);
            this.WriteHeader(file.Header);
        }
Example #3
0
 /// <summary>
 /// 从C3D文件创建参数缓存
 /// </summary>
 /// <param name="file">C3D文件</param>
 public static C3DParameterCache CreateCache(C3DFile file)
 {
     return(new C3DParameterCache(file.Header, file.Parameters));
 }