Пример #1
0
        public override void Read(AssetStream stream)
        {
            if (IsReadRenderer(stream.Version))
            {
                base.Read(stream);
            }
            else
            {
                ReadBase(stream);
            }

            if (IsReadQuality(stream.Version))
            {
                if (IsReadQualityFirst(stream.Version))
                {
                    Quality = stream.ReadInt32();
                }
            }
            if (IsReadUpdateWhenOffscreen(stream.Version))
            {
                UpdateWhenOffscreen = stream.ReadBoolean();
            }
            if (IsReadQuality(stream.Version))
            {
                if (!IsReadQualityFirst(stream.Version))
                {
                    Quality = stream.ReadInt32();
                }
            }

            if (IsReadSkinNormals(stream.Version))
            {
                SkinNormals = stream.ReadBoolean();
            }
            if (IsReadSkinMotionVector(stream.Version))
            {
                SkinnedMotionVectors = stream.ReadBoolean();
            }
            if (IsAlignBools(stream.Version))
            {
                stream.AlignStream(AlignType.Align4);
            }

            if (IsReadOffscreen(stream.Version))
            {
                DisableAnimationWhenOffscreen.Read(stream);
            }

            if (IsReadMeshFirst(stream.Version))
            {
                Mesh.Read(stream);
            }

            if (IsReadAnimation(stream.Version))
            {
                Animation.Read(stream);
            }

            m_bones = stream.ReadArray <PPtr <Transform> >();
            if (IsAlignBones(stream.Version))
            {
                stream.AlignStream(AlignType.Align4);
            }

            if (!IsReadMeshFirst(stream.Version))
            {
                Mesh.Read(stream);
            }

            if (IsReadBindPose(stream.Version))
            {
                m_bindPose = stream.ReadArray <Matrix4x4f>();
            }
            if (IsReadCurrentPose(stream.Version))
            {
                CurrentPose.Read(stream);
            }

            if (IsReadWeights(stream.Version))
            {
                m_blendShapeWeights = stream.ReadSingleArray();
            }
            if (IsReadRootBone(stream.Version))
            {
                RootBone.Read(stream);
            }
            if (IsReadAABB(stream.Version))
            {
                AABB.Read(stream);
                DirtyAABB = stream.ReadBoolean();
                if (IsAlignDirty(stream.Version))
                {
                    stream.AlignStream(AlignType.Align4);
                }
            }
        }
Пример #2
0
 public AABB(AABB copy)
 {
     Center = copy.Center;
     Extent = copy.Extent;
 }