hi,
how could I generate an output pin for an IOBOX with Columns in a plugin?
hi,
how could I generate an output pin for an IOBOX with Columns in a plugin?
please try to be more clear about what you’re trying to achieve. the pins of a plugin don’t have anything to do with IOBoxes.
it seems to me you want to:
would that be it?
almost, my intention is to fill a IOBOX with 5 rows and 5 columns (5x5). in c# a simlple multidimensional array.
got something in the making. still waiting for a feature already requested at joregs
not sure what @woei is talking about
the iobox has no notion of multiple dimensions and to/from plugins multiple dimensions are expressed with binsizes. @mindthegap you are aware of those?
@joreg IPin2 SliceCount setter
Pin Attributes have the power to kind of layout an iobox, so there is definitely a connection between the two.
This is assuming @mindthegap means something akin to what GetMatrix (Transform) is doing, when middleclicking a new iobox from the output pin.
hi,
I tried this one.
with ^code:
FOutputi = i * FInputi.SliceCount +j;
^ I can count through the 2 dimensial IOBox
thanxs
- region usings
using System;
using System.ComponentModel.Composition;
using VVVV.PluginInterfaces.V1;
using VVVV.PluginInterfaces.V2;
using VVVV.Utils.VColor;
using VVVV.Utils.VMath;
using VVVV.Core.Logging;
- endregion usings
namespace VVVV.Nodes
{
#region PluginInfo
[PluginInfo(Name = "SpectralMatrix", Category = "Spectral", Help = "Basic template with 2 dimensional spread with bin size input", Tags = "")](PluginInfo(Name = "SpectralMatrix", Category = "Spectral", Help = "Basic template with 2 dimensional spread with bin size input", Tags = ""))
#endregion PluginInfo
public class SpectralSpectralMatrixNode : IPluginEvaluate
{
#region fields & pins
[Input("Input", DefaultValue = 1.0)](Input("Input", DefaultValue = 1.0))
public ISpread<ISpread<double>> FInput;
[Output("Output")](Output("Output"))
public ISpread<double> FOutput;
[Import()](Import())
public ILogger Flogger;
#endregion fields & pins
//called when data for any output pin is requested
public void Evaluate(int SpreadMax)
{
FOutput.SliceCount = FInput.SliceCount;
for (int i = 0; i < FInput.SliceCount; i++) {
FOutput[i](i) = 0;
for (int j = 0; j < FInput[i](i).SliceCount; j++){
FOutput[i](i) = i * FInput[i](i).SliceCount +j;
}
}
}
}
}