예제 #1
0
        public CompressedMesh(ObjectReader reader)
        {
            var version = reader.version;

            m_Vertices = new PackedFloatVector(reader);
            m_UV       = new PackedFloatVector(reader);
            if (version[0] < 5)
            {
                m_BindPoses = new PackedFloatVector(reader);
            }
            m_Normals      = new PackedFloatVector(reader);
            m_Tangents     = new PackedFloatVector(reader);
            m_Weights      = new PackedIntVector(reader);
            m_NormalSigns  = new PackedIntVector(reader);
            m_TangentSigns = new PackedIntVector(reader);
            if (version[0] >= 5)
            {
                m_FloatColors = new PackedFloatVector(reader);
            }
            m_BoneIndices = new PackedIntVector(reader);
            m_Triangles   = new PackedIntVector(reader);
            if (version[0] > 3 || (version[0] == 3 && version[1] >= 5)) //3.5 and up
            {
                if (version[0] < 5)
                {
                    m_Colors = new PackedIntVector(reader);
                }
                else
                {
                    m_UVInfo = reader.ReadUInt32();
                }
            }
        }
예제 #2
0
 public CompressedAnimationCurve(EndianBinaryReader reader)
 {
     m_Path         = reader.ReadAlignedString();
     m_Times        = new PackedIntVector(reader);
     m_Values       = new PackedQuatVector(reader);
     m_Slopes       = new PackedFloatVector(reader);
     m_PreInfinity  = reader.ReadInt32();
     m_PostInfinity = reader.ReadInt32();
 }