예제 #1
0
        public NiKeyframeData(NIFReader file, BinaryReader reader) : base(file, reader)
        {
            var count = reader.ReadUInt32();

            if (count != 0u)
            {
                KeyType = (KeyType)reader.ReadUInt32();
            }

            if (KeyType == KeyType.XYZ_ROTATION_KEY)
            {
                UnknownFloat = reader.ReadSingle();

                Rotations = new KeyGroup <FloatKey>[]
                {
                    new KeyGroup <FloatKey>(reader),
                    new KeyGroup <FloatKey>(reader),
                    new KeyGroup <FloatKey>(reader)
                };
            }
            else
            {
                QuaternionKeys = new QuatKey[count];
                for (var i = 0; i < QuaternionKeys.Length; i++)
                {
                    QuaternionKeys[i] = new QuatKey(reader, KeyType);
                }
            }

            Translations = new KeyGroup <VecKey>(reader);
            Scales       = new KeyGroup <FloatKey>(reader);
        }
예제 #2
0
 public NiUVData(NIFReader file, BinaryReader reader) : base(file, reader)
 {
     UTranslation      = new KeyGroup <FloatKey>(reader);
     VTranslation      = new KeyGroup <FloatKey>(reader);
     UScalingAndTiling = new KeyGroup <FloatKey>(reader);
     VScalingAndTiling = new KeyGroup <FloatKey>(reader);
 }
예제 #3
0
 public Morph(BinaryReader reader, uint numVertices)
 {
     Keys    = new KeyGroup <FloatKey>(reader);
     Vectors = reader.ReadArray <Vector3>(numVertices);
 }
예제 #4
0
 public NiPosData(NIFReader file, BinaryReader reader) : base(file, reader)
 {
     Data = new KeyGroup <VecKey>(reader);
 }
예제 #5
0
 public NiColorData(NIFReader file, BinaryReader reader) : base(file, reader)
 {
     Data = new KeyGroup <Color4Key>(reader);
 }
예제 #6
0
 public NiFloatData(NIFReader file, BinaryReader reader) : base(file, reader)
 {
     Data = new KeyGroup <FloatKey>(reader);
 }