Exemplo n.º 1
0
        void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);

            this.contexData           = new ContexData(recommendedApiVersion, OnResourceChanged, s);
            this.version              = r.ReadUInt32();
            this.gender               = r.ReadUInt32();
            this.region               = r.ReadUInt32();
            this.linkTag              = r.ReadUInt32();
            this.bonePoseKey          = new TGIBlock(recommendedApiVersion, OnResourceChanged, "ITG", s);
            this.deformerMapShapeKey  = new TGIBlock(recommendedApiVersion, OnResourceChanged, "ITG", s);
            this.deformerMapNormalKey = new TGIBlock(recommendedApiVersion, OnResourceChanged, "ITG", s);
            this.boneEntryList        = new BoneEntryLIst(OnResourceChanged, s);
        }
Exemplo n.º 2
0
        protected override Stream UnParse()
        {
            MemoryStream ms = new MemoryStream();
            BinaryWriter w  = new BinaryWriter(ms);

            if (this.contexData == null)
            {
                this.contexData = new ContexData(recommendedApiVersion, OnResourceChanged);
            }
            this.contexData.UnParse(ms);
            w.Write(this.version);
            w.Write(this.gender);
            w.Write(this.region);
            w.Write(this.linkTag);
            if (this.bonePoseKey == null)
            {
                this.bonePoseKey = new TGIBlock(recommendedApiVersion, OnResourceChanged);
            }
            this.bonePoseKey.UnParse(ms);
            if (this.deformerMapShapeKey == null)
            {
                this.deformerMapShapeKey = new TGIBlock(recommendedApiVersion, OnResourceChanged);
            }
            this.deformerMapShapeKey.UnParse(ms);
            if (this.deformerMapNormalKey == null)
            {
                this.deformerMapNormalKey = new TGIBlock(recommendedApiVersion, OnResourceChanged);
            }
            this.deformerMapNormalKey.UnParse(ms);
            if (this.boneEntryList == null)
            {
                this.boneEntryList = new BoneEntryLIst(OnResourceChanged);
            }
            this.boneEntryList.UnParse(ms);
            return(ms);
        }