public void AddPathRotationToTransport(uint transportEntry, uint timeSeg, TransportRotationRecord node) { if (!_transportAnimations.ContainsKey(transportEntry)) { _transportAnimations[transportEntry] = new TransportAnimation(); } _transportAnimations[transportEntry].Rotations[timeSeg] = node; }
Quaternion GetAnimRotation(uint time) { if (Rotations.Empty()) { return(new Quaternion(0.0f, 0.0f, 0.0f, 1.0f)); } TransportRotationRecord rot = Rotations.First().Value; foreach (var pair in Rotations) { if (time >= pair.Key) { rot = pair.Value; break; } } return(new Quaternion(rot.X, rot.Y, rot.Z, rot.W)); }