예제 #1
0
        private void ReadAnchorAnimState(Keyframe keyframe)
        {
            var anchorId = _reader.ReadInt32();
            var rotation = _reader.ReadVector();

            var anchor = _model.GetAnchorById(anchorId);

            var malformedData = anchor == null;

            if (malformedData)
            {
                Logger.Write(string.Format("Failed to read anchor anim state: No such anchor with id `{0}` in this model", anchorId), LoggerLevel.Error);
                return;
            }

            var anchorAnimState = new AnchorAnimState(anchor, rotation);

            keyframe.AnchorAnimStates.Add(anchorAnimState);
        }
예제 #2
0
 private static void WriteAnchorAnimState(BinaryWriter writer, AnchorAnimState anchorAnimState)
 {
     writer.Write(anchorAnimState.Anchor.Id);
     writer.Write(anchorAnimState.Rotation);
 }