示例#1
0
        public override void Update(KeyPoint kp)
        {
            int i = m_Value.IndexOf(kp);

            if (i != -1)
            {
                ColorKeyPoint vkp = kp as ColorKeyPoint;
                m_DataSource.SetValue(i, kp.Time, vkp.m_Value);
            }
        }
示例#2
0
 public void Bind(NDistributionColorCurve curve)
 {
     m_DataSource = curve;
     GetStream().Clear();
     for (int j = 0; j < m_DataSource.KeyCount; ++j)
     {
         ColorKeyPoint kp = new ColorKeyPoint();
         kp.Time    = m_DataSource.GetTime(j);
         kp.m_Value = m_DataSource.GetValue(j);
         m_Value.Add(kp);
     }
 }
示例#3
0
        public override void AddKeyPoint(float time)
        {
            Color4f v = m_DataSource.GetValueByTime(time);

            m_DataSource.AddKey(v, time);
            ColorKeyPoint kp = new ColorKeyPoint();

            kp.m_Value = v;
            kp.Time    = time;
            m_Value.Add(kp);
            KeyPointComparer kpc = new KeyPointComparer();

            m_Value.Sort(kpc);
        }