示例#1
0
        public void Read(AssetReader reader)
        {
            Vertices.Read(reader);
            UV.Read(reader);
            if (IsReadBindPoses(reader.Version))
            {
                BindPoses.Read(reader);
            }
            Normals.Read(reader);
            Tangents.Read(reader);
            Weight.Read(reader);
            NormalSigns.Read(reader);
            TangentSigns.Read(reader);
            if (IsReadFloatColors(reader.Version))
            {
                FloatColors.Read(reader);
            }

            BoneIndices.Read(reader);
            Triangles.Read(reader);

            if (IsReadColors(reader.Version))
            {
                Colors.Read(reader);
            }
            if (IsReadUVInfo(reader.Version))
            {
                UVInfo = reader.ReadUInt32();
            }
        }
示例#2
0
        public void Read(EndianStream stream)
        {
            if (IsReadMeshData)
            {
                Vertices.Read(stream);
                UV.Read(stream);
                if (IsReadBindPoses)
                {
                    BindPoses.Read(stream);
                }
                Normals.Read(stream);
                Tangents.Read(stream);
                Weight.Read(stream);
                NormalSigns.Read(stream);
                TangentSigns.Read(stream);

                if (IsReadFloatColors)
                {
                    FloatColors.Read(stream);
                }

                BoneIndices.Read(stream);
                Triangles.Read(stream);
            }

            if (IsReadPlainColors)
            {
                LocalAABB.Read(stream);
                m_plainColors = stream.ReadArray <Color>();
#warning TODO: todo what?
                m_collisionTriangles = stream.ReadByteArray();
                CollisionVertexCount = stream.ReadInt32();
            }
            else
            {
                if (IsReadCompressedColors)
                {
                    Colors.Read(stream);
                }
                else
                {
                    UVInfo = stream.ReadUInt32();
                }
            }
        }