Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.32 KB | None | 0 0
  1. #region usings
  2. using System;
  3. using System.ComponentModel.Composition;
  4.  
  5. using VVVV.PluginInterfaces.V1;
  6. using VVVV.PluginInterfaces.V2;
  7. using VVVV.Utils.VColor;
  8. using VVVV.Utils.VMath;
  9.  
  10. using VVVV.Core.Logging;
  11.  
  12. #endregion
  13.  
  14. namespace HoloFit
  15. {
  16.     #region PluginInfo
  17.     [PluginInfo(Name = "SetTarget", Category = "Target", Tags = "c#")]
  18.     #endregion PluginInfo
  19.  
  20.     public class SetTarget : IPluginEvaluate
  21.     {
  22.         [Input("Input")]
  23.         public ISpread<TargetObject> FInput;
  24.  
  25.         [Input("Touched")]
  26.         public ISpread<bool> FTouched;
  27.  
  28.         [Input("Test")]
  29.         public ISpread<ISpread<int>> FTest;
  30.  
  31.         [Output("Output")]
  32.         public ISpread<TargetObject> FOutput;
  33.  
  34.         [Output("Bin")]
  35.         public ISpread<int> FBin;
  36.  
  37.         public void Evaluate(int SpreadMax)
  38.         {
  39.             FOutput.SliceCount = FInput.SliceCount;
  40.             FBin.SliceCount = FInput.SliceCount;
  41.  
  42.             for (int i = 0; i < SpreadMax; i++)
  43.             {
  44.                 FInput[i].Touched = FTouched[i];
  45.  
  46.                 for(int j = 0; j < FTest[i].SliceCount; j++)
  47.                 {
  48.                     FInput[i].IntList.Add(FTest[i][j]);
  49.                 }
  50.  
  51.                 FOutput[i] = FInput[i];
  52.                 FBin[i] = FTest[i].SliceCount;
  53.             }
  54.  
  55.         }
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement