private ModelData.KeyFrame GetKeyFrame(float keyTime, LinkedList <ModelData.KeyFrame> keyFrames) { ModelData.KeyFrame keyFrame; for (var node = keyFrames.First; node != null; node = node.Next) { if (MathUtil.NearEqual((float)keyTime, node.Value.Time)) { return(node.Value); } if (node.Value.Time > keyTime) { keyFrame = new ModelData.KeyFrame { Time = keyTime, Value = CompositeTransform.Identity }; keyFrames.AddAfter(node, keyFrame); return(keyFrame); } } keyFrame = new ModelData.KeyFrame { Time = keyTime, Value = CompositeTransform.Identity }; keyFrames.AddLast(keyFrame); return(keyFrame); }
private ModelData.KeyFrame GetKeyFrame(float keyTime, LinkedList<ModelData.KeyFrame> keyFrames) { ModelData.KeyFrame keyFrame; for (var node = keyFrames.First; node != null; node = node.Next) { if (MathUtil.NearEqual((float)keyTime, node.Value.Time)) return node.Value; if (node.Value.Time > keyTime) { keyFrame = new ModelData.KeyFrame { Time = keyTime, Value = CompositeTransform.Identity }; keyFrames.AddAfter(node, keyFrame); return keyFrame; } } keyFrame = new ModelData.KeyFrame { Time = keyTime, Value = CompositeTransform.Identity }; keyFrames.AddLast(keyFrame); return keyFrame; }