Permalink
Browse files

Merge branch 'dev-RGBVector' of https://github.com/woeishi/vvvv-sdk i…

…nto woeishi-dev-RGBVector

Conflicts:
	vvvv45/addonpack/src/Addonpack.sln
  • Loading branch information...
2 parents d48f21d + a84e1f6 commit 86eabd4e18b1e3e23bbe7c522c2be0b5ec226ca4 @tebjan tebjan committed Feb 7, 2014
@@ -0,0 +1,131 @@
+<!DOCTYPE PATCH SYSTEM "http://vvvv.org/versions/vvvv45alpha31.6.dtd" >
+ <PATCH nodename="E:\develop\vvvv-sdk\vvvv45\addonpack\lib\nodes\plugins\RGB (Color Join Vector) help.v4p" systemname="RGB (Color Join Vector) help" filename="E:\develop\vvvv-sdk\vvvv45\addonpack\lib\nodes\plugins\RGB (Color Join Vector) help.v4p">
+ <BOUNDS type="Window" left="9900" top="5100" width="9000" height="6000">
+ </BOUNDS>
+ <NODE systemname="RGB (Color Join Vector)" filename="%VVVV%\addonpack\lib\nodes\plugins\RGBVector.dll" nodename="RGB (Color Join Vector)" componentmode="Hidden" id="1">
+ <BOUNDS type="Node" left="1005" top="3180" width="100" height="100">
+ </BOUNDS>
+ <PIN pinname="XYZW" visible="1">
+ </PIN>
+ <BOUNDS type="Box" left="1005" top="3180">
+ </BOUNDS>
+ <PIN pinname=" RGBA" visible="1">
+ </PIN>
+ </NODE>
+ <NODE nodename="IOBox (Color)" componentmode="InABox" id="2" systemname="IOBox (Color)">
+ <BOUNDS type="Box" left="1005" top="3960" width="2775" height="480">
+ </BOUNDS>
+ <BOUNDS type="Node" left="1005" top="3960" width="0" height="0">
+ </BOUNDS>
+ <PIN pinname="Color Output" visible="1">
+ </PIN>
+ </NODE>
+ <LINK srcnodeid="1" srcpinname="Output" dstnodeid="2" dstpinname="Color Input">
+ </LINK>
+ <NODE componentmode="InABox" id="5" nodename="IOBox (String)" systemname="IOBox (String)">
+ <BOUNDS height="255" left="150" top="525" type="Node" width="570">
+ </BOUNDS>
+ <BOUNDS height="705" left="150" top="525" type="Box" width="4515">
+ </BOUNDS>
+ <BOUNDS height="160" left="2100" top="35640" type="Window" width="215">
+ </BOUNDS>
+ <PIN pinname="Input String" slicecount="1" visible="0" values="|convenience and performance saving nodes to create a color by specifying red, green, blue and alpha directly as spread, and vice versa|">
+ </PIN>
+ <PIN pinname="Output String" visible="0">
+ </PIN>
+ <PIN pinname="Show Grid" slicecount="1" values="0">
+ </PIN>
+ </NODE>
+ <NODE componentmode="InABox" id="4" nodename="IOBox (String)" systemname="IOBox (String)">
+ <BOUNDS height="270" left="150" top="150" type="Node" width="915">
+ </BOUNDS>
+ <BOUNDS height="375" left="150" top="150" type="Box" width="3765">
+ </BOUNDS>
+ <BOUNDS height="160" left="2100" top="35640" type="Window" width="215">
+ </BOUNDS>
+ <PIN pinname="Input String" slicecount="1" visible="0" values="|RGB - Color Join/Split Vector|">
+ </PIN>
+ <PIN pinname="Output String" visible="0">
+ </PIN>
+ <PIN pinname="Show Grid" slicecount="1" values="0">
+ </PIN>
+ <PIN pinname="Size" slicecount="1" values="12">
+ </PIN>
+ </NODE>
+ <NODE systemname="RGB (Color Split Vector)" filename="%VVVV%\addonpack\lib\nodes\plugins\RGBVector.dll" nodename="RGB (Color Split Vector)" componentmode="Hidden" id="6">
+ <BOUNDS type="Node" left="4770" top="3180" width="100" height="100">
+ </BOUNDS>
+ <PIN pinname="Input" visible="1">
+ </PIN>
+ <BOUNDS type="Box" left="4770" top="3180">
+ </BOUNDS>
+ <PIN pinname=" RGBA" visible="1">
+ </PIN>
+ </NODE>
+ <NODE nodename="IOBox (Value Advanced)" componentmode="InABox" id="7" systemname="IOBox (Value Advanced)">
+ <BOUNDS type="Box" left="4770" top="3960" width="2760" height="405">
+ </BOUNDS>
+ <BOUNDS type="Node" left="4770" top="3960" width="0" height="0">
+ </BOUNDS>
+ <PIN pinname="Units" slicecount="1" values="||">
+ </PIN>
+ <PIN pinname="Precision" slicecount="1" values="4">
+ </PIN>
+ <PIN pinname="Vector Size" slicecount="1" values="4">
+ </PIN>
+ <PIN pinname="Rows" slicecount="1" values="1">
+ </PIN>
+ <PIN pinname="Y Input Value" slicecount="1" visible="1" values="0">
+ </PIN>
+ <PIN pinname="Columns" slicecount="1" values="4">
+ </PIN>
+ <PIN pinname="Descriptive Name" slicecount="1" values="|R || G || B || A|">
+ </PIN>
+ <PIN pinname="Show Grid" slicecount="1" values="1">
+ </PIN>
+ </NODE>
+ <NODE nodename="IOBox (Value Advanced)" componentmode="InABox" id="8" systemname="IOBox (Value Advanced)">
+ <BOUNDS type="Box" left="1005" top="2145" width="2760" height="405">
+ </BOUNDS>
+ <BOUNDS type="Node" left="1005" top="2145" width="0" height="0">
+ </BOUNDS>
+ <PIN pinname="Units" slicecount="1" values="||">
+ </PIN>
+ <PIN pinname="Precision" slicecount="1" values="4">
+ </PIN>
+ <PIN pinname="Vector Size" slicecount="1" values="4">
+ </PIN>
+ <PIN pinname="Rows" slicecount="1" values="1">
+ </PIN>
+ <PIN pinname="Y Input Value" slicecount="4" values="1,1,0,0">
+ </PIN>
+ <PIN pinname="Columns" slicecount="1" values="4">
+ </PIN>
+ <PIN pinname="Descriptive Name" slicecount="1" values="|R || G || B || A|">
+ </PIN>
+ <PIN pinname="Show Grid" slicecount="1" values="1">
+ </PIN>
+ <PIN pinname="Y Output Value" visible="1">
+ </PIN>
+ <PIN pinname="SliceCount Mode" slicecount="1" values="ColsRowsPages">
+ </PIN>
+ </NODE>
+ <LINK srcnodeid="8" srcpinname="Y Output Value" dstnodeid="1" dstpinname="XYZW">
+ </LINK>
+ <NODE nodename="IOBox (Color)" componentmode="InABox" id="9" systemname="IOBox (Color)">
+ <BOUNDS type="Box" left="4770" top="2145" width="2775" height="495">
+ </BOUNDS>
+ <BOUNDS type="Node" left="4770" top="2145" width="0" height="0">
+ </BOUNDS>
+ <PIN pinname="Color Input" visible="1" slicecount="1" values="|0.00000,1.00000,1.00000,0.00000|">
+ </PIN>
+ <PIN pinname="Color Output" visible="1">
+ </PIN>
+ </NODE>
+ <LINK srcnodeid="9" srcpinname="Color Output" dstnodeid="6" dstpinname="Input">
+ </LINK>
+ <LINK srcnodeid="8" srcpinname="Y Output Value" dstnodeid="1" dstpinname=" RGBA">
+ </LINK>
+ <LINK srcnodeid="6" srcpinname=" RGBA" dstnodeid="7" dstpinname="Y Input Value">
+ </LINK>
+ </PATCH>
@@ -191,6 +191,10 @@
<Project>{BF1386DD-6FDA-4C6F-B271-F2B8C3895829}</Project>
<Name>DropDownColor</Name>
</ProjectReference>
+ <ProjectReference Include="nodes\plugins\Color\RGBVector\RGBVector.csproj">
+ <Project>342BABBA-4FFA-4881-9821-BDBD020D5A1B</Project>
+ <Name>RGBVector</Name>
+ </ProjectReference>
<ProjectReference Include="nodes\plugins\Devices\ArduinoFirmata\ArduinoFirmata.csproj">
<Project>{AFEE382B-F971-4CF4-9F35-0112207097EB}</Project>
<Name>ArduinoFirmata</Name>
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
-# SharpDevelop 4.4
+# SharpDevelop 4.3
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{704B6D46-8445-4315-8128-F331143A113E}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
@@ -116,6 +116,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Color", "Color", "{5818C6F9
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropDownColor", "nodes\plugins\Color\DropDown\DropDownColor.csproj", "{BF1386DD-6FDA-4C6F-B271-F2B8C3895829}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGBVector", "nodes\plugins\Color\RGBVector\RGBVector.csproj", "3861C72B-27BE-4F6A-9F31-E334B6381005"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "File", "File", "{415CFADF-FDD2-4157-9622-C0CF7EA1B212}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
@@ -206,6 +208,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySQLNodes", "nodes\plugins
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetworkWOL", "nodes\plugins\Network\WOL\NetworkWOL.csproj", "{6D3FF79B-FD8F-4F7E-B9A4-57DAB4980722}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syslog", "nodes\plugins\Network\Syslog\Syslog.csproj", "{66841413-5FB8-4E5E-ABF7-DBA3F09A9BF7}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Skeleton", "Skeleton", "{DB100FE4-5787-4AB6-AE3F-DB8932BA79BB}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
@@ -398,15 +402,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Devices", "Devices", "{41E5
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Leap", "..\..\src\nodes\plugins\Devices\Leap\Leap.csproj", "{E0C5B55A-37EA-48D6-95B9-5EEF07C4AD8E}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "editors", "editors", "{79F358A1-1BB1-46AF-B9A0-C75B333CF873}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "File", "File", "{208A7E0A-6CDC-44F9-B482-1104FDE1354B}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeEditor", "..\..\src\nodes\editors\CodeEditor\CodeEditor.csproj", "{A63D2EA4-D87C-459B-B57F-19A76A7ADAF0}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileNodes", "..\..\src\nodes\plugins\File\FileNodes\FileNodes.csproj", "{E051BB88-5211-4EF7-962B-59657D171297}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "File", "File", "{208A7E0A-6CDC-44F9-B482-1104FDE1354B}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "editors", "editors", "{79F358A1-1BB1-46AF-B9A0-C75B333CF873}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileNodes", "..\..\src\nodes\plugins\File\FileNodes\FileNodes.csproj", "{E051BB88-5211-4EF7-962B-59657D171297}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeEditor", "..\..\src\nodes\editors\CodeEditor\CodeEditor.csproj", "{A63D2EA4-D87C-459B-B57F-19A76A7ADAF0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{A1F7F26F-D9CC-4D36-B27D-8059C2C51B0D}"
ProjectSection(SolutionItems) = preProject
@@ -417,8 +423,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{A1F7F2
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Addonpack", "Addonpack.csproj", "{AA8072CA-3343-4199-AC22-62B9E352BAE9}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syslog", "nodes\plugins\Network\Syslog\Syslog.csproj", "{66841413-5FB8-4E5E-ABF7-DBA3F09A9BF7}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -1511,6 +1515,14 @@ Global
{66841413-5FB8-4E5E-ABF7-DBA3F09A9BF7}.Release|x64.Build.0 = Release|x64
{66841413-5FB8-4E5E-ABF7-DBA3F09A9BF7}.Release|x86.ActiveCfg = Release|x86
{66841413-5FB8-4E5E-ABF7-DBA3F09A9BF7}.Release|x86.Build.0 = Release|x86
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Debug|x64.Build.0 = Debug|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Debug|x64.ActiveCfg = Debug|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Debug|x86.Build.0 = Debug|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Debug|x86.ActiveCfg = Debug|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Release|x64.Build.0 = Release|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Release|x64.ActiveCfg = Release|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Release|x86.Build.0 = Release|Any CPU
+ 3861C72B-27BE-4F6A-9F31-E334B6381005.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1576,6 +1588,7 @@ Global
{36F9391E-8E54-47A1-9879-2B206CFFA94C} = {9261D16D-86D9-4B37-A8AF-BD1CAF0C95E9}
{A2F41E1C-BBFE-492F-AC51-430996F599A5} = {A81FD918-972E-4A64-B30F-81CF14784755}
{BF1386DD-6FDA-4C6F-B271-F2B8C3895829} = {5818C6F9-0924-427D-92DF-5D6FD5082782}
+ 3861C72B-27BE-4F6A-9F31-E334B6381005 = {5818C6F9-0924-427D-92DF-5D6FD5082782}
{1A2E3C6E-21BE-466C-944F-2E5838B396AB} = {415CFADF-FDD2-4157-9622-C0CF7EA1B212}
{B1626220-F670-4A02-AB02-61AF35DC44F4} = {415CFADF-FDD2-4157-9622-C0CF7EA1B212}
{0ACEEC46-0CB3-476F-83DD-968BE2EF4A37} = {415CFADF-FDD2-4157-9622-C0CF7EA1B212}
@@ -1681,7 +1694,7 @@ Global
{639A1C44-DA07-4F08-8A90-8B8845515BF4} = {047C490B-5AA5-4111-B9F0-E9A6C0AC0E9C}
{8B9D2C28-4394-4C86-A14C-B0021EC29089} = {5D5B0EDE-459F-49DF-891A-D1F36C2260BC}
{E0C5B55A-37EA-48D6-95B9-5EEF07C4AD8E} = {41E5E959-4E31-4BD3-BA33-CB01F71A2780}
- {A63D2EA4-D87C-459B-B57F-19A76A7ADAF0} = {79F358A1-1BB1-46AF-B9A0-C75B333CF873}
{E051BB88-5211-4EF7-962B-59657D171297} = {208A7E0A-6CDC-44F9-B482-1104FDE1354B}
+ {A63D2EA4-D87C-459B-B57F-19A76A7ADAF0} = {79F358A1-1BB1-46AF-B9A0-C75B333CF873}
EndGlobalSection
EndGlobal
@@ -0,0 +1,31 @@
+#region Using directives
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("RGBVectorPlugin")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("woei")]
+[assembly: AssemblyProduct("RGBVectorPlugin")]
+[assembly: AssemblyCopyright("Copyright 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// This sets the default COM visibility of types in the assembly to invisible.
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.
+[assembly: ComVisible(false)]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all the values or you can use the default the Revision and
+// Build Numbers by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
+ <Import Project="..\..\Default.Plugin.Project.settings" />
+ <PropertyGroup>
+ <OutputType>Library</OutputType>
+ <RootNamespace>VVVV.Nodes</RootNamespace>
+ <AssemblyName>RGBVector</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition.Codeplex">
+ <HintPath>..\..\..\..\..\..\lib\core\System.ComponentModel.Composition.Codeplex.dll</HintPath>
+ </Reference>
+ <Reference Include="VVVV.PluginInterfaces">
+ <HintPath>..\..\..\..\..\..\lib\core\VVVV.PluginInterfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="VVVV.Utils">
+ <HintPath>..\..\..\..\..\..\lib\core\VVVV.Utils.dll</HintPath>
+ </Reference>
+ <Reference Include="VVVV.UtilsIL">
+ <HintPath>..\..\..\..\..\..\lib\core\VVVV.UtilsIL.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="RGBVectorNode.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
+</Project>
@@ -0,0 +1,78 @@
+#region usings
+using System;
+using System.ComponentModel.Composition;
+
+using VVVV.PluginInterfaces.V1;
+using VVVV.PluginInterfaces.V2;
+using VVVV.Utils;
+using VVVV.Utils.VMath;
+#endregion usings
+
+namespace VVVV.Nodes
+{
+ #region PluginInfo
+ [PluginInfo(Name = "RGB", Category = "Color", Version = "Split Vector", Help = "splits a color in a vector with red, green, blue and alpha components", Author = "woei")]
+ #endregion PluginInfo
+ public unsafe class RGBVectorSplitNode : IPluginEvaluate
+ {
+ #region fields & pins
+ [Input("Input")]
+ IColorIn FInPin;
+
+ [Output("", Dimension = 4, DimensionNames = new string[]{"R","G","B","A"})]
+ IValueOut FOutPin;
+ #endregion fields & pins
+
+ //called when data for any output pin is requested
+ public void Evaluate(int SpreadMax)
+ {
+ int inCount;
+ double* inData, outData;
+
+ FInPin.GetColorPointer(out inCount, out inData);
+
+ FOutPin.SliceCount = inCount;
+ FOutPin.GetValuePointer(out outData);
+
+ for (int i=0; i<inCount*4; i++)
+ outData[i] = inData[i];
+// Memory.Copy(outData, inData, (uint)(inCount*4*sizeof(double)));
+ }
+
+ #region PluginInfo
+ [PluginInfo(Name = "RGB", Category = "Color", Version = "Join Vector", Help = "creates a colour out of the red, green, blue and alpha components of a vector", Author = "woei")]
+ #endregion PluginInfo
+ public unsafe class RGBVectorJoinNode : IPluginEvaluate
+ {
+ #region fields & pins
+ [Input("", Dimension = 4, DimensionNames = new string[]{"R","G","B","A"}, DefaultValues = new double[]{0,1,0,1})]
+ IValueFastIn FInPin;
+
+ [Output("Output")]
+ IColorOut FOutPin;
+ #endregion fields & pins
+
+ //called when data for any output pin is requested
+ public void Evaluate(int spreadMax)
+ {
+ int inCount;
+ double* inData, outData;
+
+ FInPin.GetValuePointer(out inCount, out inData);
+ spreadMax =(int)Math.Ceiling((double)inCount/4.0);
+
+ FOutPin.SliceCount = spreadMax;
+ FOutPin.GetColorPointer(out outData);
+
+ int incr = 0;
+ for (int i=0; i<spreadMax*4; i++)
+ {
+ outData[i] = inData[incr];
+ incr++;
+ if (incr >= inCount)
+ incr=0;
+ }
+ }
+ }
+ }
+}

0 comments on commit 86eabd4

Please sign in to comment.