Ejemplo n.º 1
0
        public int CompareTo(object obj)
        {
            TimelineElement other = (TimelineElement)obj;

            return(this.time.CompareTo(other.time));
        }
Ejemplo n.º 2
0
		public void Add(TimelineElement param)
		{
			this.elements.Add(param);
			this.elements.Sort(); // keep the list sorted by time
		}
Ejemplo n.º 3
0
 public void Add(TimelineElement param)
 {
     this.elements.Add(param);
     this.elements.Sort();             // keep the list sorted by time
 }
Ejemplo n.º 4
0
		private const double EPSILON = 0.00001; // smallest distinguishable time delta

		static internal double ComputeAlpha(double time,
			TimelineElement previous, TimelineElement next)
		{
			if (previous == null || next == null)
				return 1;
			
			double delta = next.Time - previous.Time;
			if ((delta - EPSILON) <= 0)
				return 1;

			return time / delta;
		}