public void UnParse(Stream s) { BinaryWriter bw = new BinaryWriter(s); mModelLodIndex.UnParse(s); bw.Write((UInt32)mFlags); bw.Write((UInt32)mId); bw.Write(mMinZValue); bw.Write(mMaxZValue); }
protected override void UnParse(Stream s) { if (_RCOLTag == "GEOM") { new BinaryWriter(s).Write(index); } else { data.UnParse(s); } WriteZeros(s, 12); }
public override Stream UnParse() { MemoryStream s = new MemoryStream(); BinaryWriter bw = new BinaryWriter(s); bw.Write((UInt32)FOURCC(Tag)); bw.Write(mVersion); bw.Write((UInt32)mFlags); if (mSwizzleInfo == null) { mSwizzleInfo = new GenericRCOLResource.GenericRCOLResource.ChunkReference(handler, 0); } mSwizzleInfo.UnParse(s); if (mBuffer == null) { mBuffer = new byte[0]; } bw.Write(mBuffer); return(s); }
public override Stream UnParse() { MemoryStream ms = new MemoryStream(); BinaryWriter w = new BinaryWriter(ms); w.Write(tag); w.Write(version); w.Write(nameHash); if (index == null) { this.index = new GenericRCOLResource.GenericRCOLResource.ChunkReference(handler, 0); } index.UnParse(ms); if (list == null) { this.list = new EntryList(OnRCOLChanged); } list.UnParse(ms); return(ms); }
public void UnParse(Stream s) { BinaryWriter bw = new BinaryWriter(s); long sizeOffset = s.Position; bw.Write(0); long start = s.Position; bw.Write(mName); mMaterialIndex.UnParse(s); mVertexFormatIndex.UnParse(s); mVertexBufferIndex.UnParse(s); mIndexBufferIndex.UnParse(s); bw.Write((UInt32)mPrimitiveType | ((UInt32)mFlags << 8)); bw.Write(mStreamOffset); bw.Write(mStartVertex); bw.Write(mStartIndex); bw.Write(mMinVertexIndex); bw.Write(mVertexCount); bw.Write(mPrimitiveCount); mBounds.UnParse(s); mSkinControllerIndex.UnParse(s); mJointReferences.UnParse(s); mScaleOffsetIndex.UnParse(s); mGeometryStates.UnParse(s); if (mOwner.Version > 0x00000201) { bw.Write(mParentName); mMirrorPlane.UnParse(s); } long end = s.Position; long size = end - start; s.Seek(sizeOffset, SeekOrigin.Begin); bw.Write((uint)size); s.Seek(end, SeekOrigin.Begin); }
internal void UnParse(Stream s) { index.UnParse(s); new BinaryWriter(s).Write((uint)materialState); }