Exemplo n.º 1
0
        public void UpdateCurveFromClock(ModelClock modelClock, GraphDrawer.Curve curve, double timeBegin, double timeEnd, float min, float max)
        {
            var timeList = ListPool <double> .Take();

            modelClock.ClockImpl.GetValues(timeBegin, timeEnd, timeList);
            UpdateCurveFromValues(modelClock.ClockImpl.Color, curve, min, max, timeList);

            ListPool <double> .Release(timeList);
        }
Exemplo n.º 2
0
 private static void UpdateCurveFromValues(Color color, GraphDrawer.Curve curve, float min, float max, List <double> timeList)
 {
     curve.Color = color;
     curve.Positions.Clear();
     foreach (double time in timeList)
     {
         float t = (float)time;
         curve.Positions.Add(new Vector2(t, min));
         curve.Positions.Add(new Vector2(t, max));
         curve.Positions.Add(new Vector2(t, min));
     }
 }
Exemplo n.º 3
0
        public void UpdateCurveFromStream(ModelStream modelStream, GraphDrawer.Curve curve, double timeBegin, double timeEnd, ref float min, ref float max)
        {
            var timeValueList = ListPool <(double, float)> .Take();

            modelStream.StreamImpl.GetValues(timeBegin, timeEnd, timeValueList);

            Color c = modelStream.StreamImpl.Color;

            UpdateCurveFromValues(c, curve, ref min, ref max, timeValueList);

            ListPool <(double, float)> .Release(timeValueList);
        }
Exemplo n.º 4
0
 private static void UpdateCurveFromValues(Color color, GraphDrawer.Curve curve, ref float min, ref float max, List <(double, float)> timeValueList)