Exemple #1
0
 public void Write(BinaryWriter stream)
 {
     stream.Write(IsCompleteMesh);
     stream.Write(Lod);
     stream.Write(UnknownUint1);
     stream.Write(SecondMaterial.Guid);
     stream.Write((int)1);
     stream.Write(Guid);
     stream.WriteSizedString(Name);
     stream.Write(UnknownUInt2);
     stream.WriteStringList(Flags);
     stream.Write(Material.Guid);
     stream.Write(FactorColor);
     stream.Write(Factor2Color);
     stream.Write(VectorArgument);
     stream.Write(VectorArgument2);
     stream.Write(VertexKeyCount);
     stream.Write(PositionCount);
     stream.Write(FaceCount);
     stream.Write(VertexCount);
     stream.Write(SkinDataSize);
     stream.Write(0);
     BoundingBox.Write(stream);
     stream.Write(UnknownInt2);
     stream.WriteStringList(MaterialFlags);
     stream.Write(UnknownFloat1);
     ClothingMaterial.WritePrimaryData(stream);
     stream.Write(UnknownInt3);
     stream.Write(UnknownBool1);
     stream.Write(UnknownBool2);
     ClothingMaterial.WriteExtraData(stream);
     stream.Write(UnknownBool3);
 }
Exemple #2
0
 public Mesh()
 {
     Name             = String.Empty;
     Lod              = 0;
     IsCompleteMesh   = true;
     UnknownUint1     = 2;
     Material         = new AssetDependence <Material>();
     SecondMaterial   = new AssetDependence <Material>();
     BoundingBox      = new BoundingBox();
     MaterialFlags    = new List <string>();
     ClothingMaterial = new ClothingMaterial();
 }
Exemple #3
0
        public Mesh(BinaryReader stream)
        {
            IsCompleteMesh = stream.ReadBoolean();
            Lod            = stream.ReadInt32();
            UnknownUint1   = stream.ReadUInt32();
            SecondMaterial = new AssetDependence <Material>(stream.ReadGuid());
            var subVersion = stream.ReadUInt32();

            Guid            = stream.ReadGuid();
            Name            = stream.ReadSizedString();
            UnknownUInt2    = stream.ReadUInt32();          // always 0
            Flags           = stream.ReadStringList();
            Material        = new AssetDependence <Material>(stream.ReadGuid());
            FactorColor     = stream.ReadVec4();
            Factor2Color    = stream.ReadVec4();
            VectorArgument  = stream.ReadVec4();
            VectorArgument2 = stream.ReadVec4();
            VertexKeyCount  = stream.ReadInt32();
            PositionCount   = stream.ReadInt32();
            FaceCount       = stream.ReadInt32();
            VertexCount     = stream.ReadInt32();
            SkinDataSize    = stream.ReadInt32();
            int boundingBoxType = stream.ReadInt32();

            Debug.Assert(boundingBoxType == 0);             // should always 0
            BoundingBox      = new BoundingBox(stream);
            UnknownInt2      = stream.ReadInt32();
            MaterialFlags    = stream.ReadStringList();
            UnknownFloat1    = stream.ReadSingle();
            ClothingMaterial = new ClothingMaterial(stream);
            UnknownInt3      = stream.ReadInt32();
            UnknownBool1     = stream.ReadBoolean();
            UnknownBool2     = stream.ReadBoolean();
            if (subVersion >= 1)
            {
                ClothingMaterial.ReadExtraData(stream);
                //UnknownFloat2 = stream.ReadSingle();
                //UnknownFloat3 = stream.ReadSingle();
                UnknownBool3 = stream.ReadBoolean();
            }
        }