Example #1
0
 public PineBlender(PineDevice device, PineObject value, double factor, PineBlendTechnique factorType)
     : base(device)
 {
     _valueCalculated = value;
     _valueActual = value;
     _factor = factor;
     _type = factorType;
 }
Example #2
0
 /// <summary>
 /// Removes a specific PINE objects from the device queue.
 /// </summary>
 /// <param name="obj">The object to remove.</param>
 /// <returns></returns>
 public bool Remove(PineObject obj)
 {
     for(int i = 0; i < listSize; i++)
     {
         if (list[i] == obj)
         {
             list[i] = null;
             if (i + 1 == listSize)
             {
                 do
                 {
                     listSize--;
                     if (listSize == 0) break;
                 }
                 while (list[listSize - 1] == null);
             }
             return true;
         }
     }
     return false;
 }
Example #3
0
 internal bool Add(PineObject obj)
 {
     int slot = NearestSlot();
     if (slot + 1 >= listSize)
     {
         listSize = slot + 1;
     }
     else if (slot < 0)
     {
         return false;
     }
     list[slot] = obj;
     return true;
 }
Example #4
0
 /// <summary>
 /// Finds the index of a PINE object.
 /// </summary>
 /// <param name="obj">The PINE object to locate.</param>
 /// <returns>Object index if found, -1 if not found.</returns>
 public int IndexOf(PineObject obj)
 {
     for(int i = 0; i < listSize; i++)
     {
         if (list[i] == obj)
         {
             return i;
         }
     }
     return -1;
 }