private void GetParams() { pfontSize = fontSize; palignment = alignment; pstyle = style; pspacing = spacing; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "FontSize")) { pfontSize = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "FontSize")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Spacing")) { pspacing = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Spacing")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Style")) { pstyle = (FontStyle)Convert.ToInt32(ParentGraph.GetParameterValue(Id, "Style")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Alignment")) { palignment = (TextAlignment)Convert.ToInt32(ParentGraph.GetParameterValue(Id, "Alignment")); } if (string.IsNullOrEmpty(text)) { lines = new string[0]; } else { lines = text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); } }
private void GetParams() { predChannel = redChannel; pgreenChannel = greenChannel; pblueChannel = blueChannel; palphaChannel = alphaChannel; if (ParentGraph != null) { if (ParentGraph.HasParameterValue(Id, "RedChannel")) { predChannel = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "RedChannel")); } if (ParentGraph.HasParameterValue(Id, "GreenChannel")) { pgreenChannel = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "GreenChannel")); } if (ParentGraph.HasParameterValue(Id, "BlueChannel")) { pblueChannel = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "BlueChannel")); } if (ParentGraph.HasParameterValue(Id, "AlphaChannel")) { palphaChannel = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "AlphaChannel")); } } }
private void GetParams() { if (!input.HasInput || !input1.HasInput) { return; } pintensity = intensity; bintensity = blurIntensity; pangle = angle; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Intensity")) { pintensity = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Intensity")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "BlurIntensity")) { bintensity = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "BlurIntensity")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Angle")) { pangle = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Angle")); } }
private void GetParams() { if (!input.HasInput) { return; } pintensity = intensity; pnoiseReduction = noiseReduction; pdirectx = directx; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Intensity")) { pintensity = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Intensity")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "DirectX")) { pdirectx = Utils.ConvertToBool(ParentGraph.GetParameterValue(Id, "DirectX")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "NoiseReduction")) { pnoiseReduction = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "NoiseReduction")); } }
private void GetParams() { prange = range; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Range")) { MVector v = ParentGraph.GetParameterValue <MVector>(Id, "Range"); if (v.W <= 0) { prange.min[0] = prange.min[1] = prange.min[2] = v.X; prange.mid[0] = prange.mid[1] = prange.mid[2] = v.Y; prange.max[0] = prange.max[1] = prange.max[2] = v.Z; } else if (v.W <= 1) { prange.min[0] = v.X; prange.mid[0] = v.Y; prange.max[0] = v.Z; } else if (v.W <= 2) { prange.min[1] = v.X; prange.mid[1] = v.Y; prange.max[1] = v.Z; } else if (v.W <= 3) { prange.min[2] = v.X; prange.mid[2] = v.Y; prange.max[2] = v.Z; } } }
private void GetParams() { pred = red; pgreen = green; pblue = blue; palpha = alpha; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Red")) { pred = Convert.ToBoolean(ParentGraph.GetParameterValue(Id, "Red")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Green")) { pgreen = Convert.ToBoolean(ParentGraph.GetParameterValue(Id, "Green")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Blue")) { pblue = Convert.ToBoolean(ParentGraph.GetParameterValue(Id, "Blue")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Alpha")) { palpha = Convert.ToBoolean(ParentGraph.GetParameterValue(Id, "Alpha")); } }
void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; if (i1 == null) { return; } if (i1.Id == 0) { return; } CreateBufferIfNeeded(); float pintensity = intensity; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Intensity")) { pintensity = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Intensity")); } processor.TileX = tileX; processor.TileY = tileY; processor.DirectX = directx; processor.Intensity = pintensity; processor.Process(width, height, i1, buffer); processor.Complete(); Updated(); Output.Data = buffer; Output.Changed(); }
private void GetParams() { if (!input.HasInput || !input2.HasInput) { return; } predChannel = redChannel; pgreenChannel = greenChannel; pblueChannel = blueChannel; palphaChannel = alphaChannel; if (ParentGraph != null) { if (ParentGraph.HasParameterValue(Id, "RedChannel")) { predChannel = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "RedChannel")); } if (ParentGraph.HasParameterValue(Id, "GreenChannel")) { pgreenChannel = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "GreenChannel")); } if (ParentGraph.HasParameterValue(Id, "BlueChannel")) { pblueChannel = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "BlueChannel")); } if (ParentGraph.HasParameterValue(Id, "AlphaChannel")) { palphaChannel = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "AlphaChannel")); } } }
void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; if (i1 == null) { return; } if (i1.Id == 0) { return; } CreateBufferIfNeeded(); float pgamma = gamma; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Gamma")) { pgamma = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Gamma")); } processor.TileX = tileX; processor.TileY = tileY; processor.Gamma = pgamma; processor.Process(width, height, i1, buffer); processor.Complete(); Updated(); output.Data = buffer; output.Changed(); }
private void GetParams() { if (!input.HasInput) { return; } pred = red; pgreen = green; pblue = blue; palpha = alpha; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Red")) { pred = Utils.ConvertToBool(ParentGraph.GetParameterValue(Id, "Red")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Green")) { pgreen = Utils.ConvertToBool(ParentGraph.GetParameterValue(Id, "Green")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Blue")) { pblue = Utils.ConvertToBool(ParentGraph.GetParameterValue(Id, "Blue")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Alpha")) { palpha = Utils.ConvertToBool(ParentGraph.GetParameterValue(Id, "Alpha")); } }
void Process() { CreateBufferIfNeeded(); Vector4 pcolor = new Vector4(color.X, color.Y, color.Z, color.W); if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Color")) { object obj = ParentGraph.GetParameterValue(Id, "Color"); if (obj is MVector) { MVector m = (MVector)obj; pcolor.X = m.X; pcolor.Y = m.Y; pcolor.Z = m.Z; pcolor.W = m.W; } else if (obj is Vector4) { pcolor = (Vector4)obj; } } processor.Color = pcolor; processor.Process(width, height, null, buffer); processor.Complete(); Updated(); output.Data = buffer; output.Changed(); }
void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; GLTextuer2D i2 = (GLTextuer2D)input2.Input.Data; if (i1 == null || i1.Id == 0) { return; } if (i2 == null || i2.Id == 0) { return; } CreateBufferIfNeeded(); processor.TileX = tileX; processor.TileY = TileY; int predChannel = redChannel; int pgreenChannel = greenChannel; int pblueChannel = blueChannel; int palphaChannel = alphaChannel; if (ParentGraph != null) { if (ParentGraph.HasParameterValue(Id, "RedChannel")) { predChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "RedChannel")); } if (ParentGraph.HasParameterValue(Id, "GreenChannel")) { pgreenChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "GreenChannel")); } if (ParentGraph.HasParameterValue(Id, "BlueChannel")) { pblueChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "BlueChannel")); } if (ParentGraph.HasParameterValue(Id, "AlphaChannel")) { palphaChannel = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "AlphaChannel")); } } processor.RedChannel = predChannel; processor.GreenChannel = pgreenChannel; processor.BlueChannel = pblueChannel; processor.AlphaChannel = palphaChannel; processor.Process(width, height, i1, i2, buffer); processor.Complete(); output.Data = buffer; output.Changed(); Updated(); }
private void GetParams() { pgamma = gamma; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Gamma")) { pgamma = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Gamma")); } }
private void GetParams() { pinput = selected; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Selected")) { pinput = (SwitchInput)Convert.ToInt32(ParentGraph.GetParameterValue(Id, "Selected")); } }
private void GetParams() { prays = rays; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Rays")) { prays = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Rays")); } }
private void GetParams() { pintensity = intensity; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Intensity")) { pintensity = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Intensity")); } }
private void GetParams() { horiz = horizontal; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Horizontal")) { horiz = Convert.ToBoolean(ParentGraph.GetParameterValue(Id, "Horizontal")); } }
private void GetParams() { if (!input.HasInput) { return; } pangle = angle; pscaleX = this.scale.X; pscaleY = this.scale.Y; pxoffset = offset.X; pyoffset = offset.Y; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "XOffset")) { pxoffset = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "XOffset")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "YOffset")) { pyoffset = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "YOffset")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Offset")) { MVector v = ParentGraph.GetParameterValue <MVector>(Id, "Offset"); pxoffset = v.X; pyoffset = v.Y; } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "ScaleX")) { pscaleX = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "ScaleX")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "ScaleY")) { pscaleY = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "ScaleY")); } if (parentGraph != null && ParentGraph.HasParameterValue(Id, "Scale")) { MVector v = ParentGraph.GetParameterValue <MVector>(Id, "Scale"); pscaleX = v.X; pscaleY = v.Y; } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Angle")) { pangle = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Angle")); } }
private void GetParams() { if (!input.HasInput) { return; } pinput = selected; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Selected")) { pinput = (SwitchInput)Utils.ConvertToInt(ParentGraph.GetParameterValue(Id, "Selected")); } }
private void GetParams() { if (!input.HasInput) { return; } pintensity = intensity; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Intensity")) { pintensity = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Intensity")); } }
private void GetParams() { if (!input.HasInput) { return; } pgamma = gamma; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Gamma")) { pgamma = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Gamma")); } }
private void GetParams() { if (!input.HasInput) { return; } prays = rays; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Rays")) { prays = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Rays")); } }
private void GetParams() { if (!input.HasInput) { return; } horiz = horizontal; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Horizontal")) { horiz = Utils.ConvertToBool(ParentGraph.GetParameterValue(Id, "Horizontal")); } }
private void GetParams() { pradius = radius; poutline = outline; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Radius")) { pradius = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Radius")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Outline")) { poutline = Utils.ConvertToFloat(ParentGraph.GetParameterValue(Id, "Outline")); } }
private void GetParams() { pradius = radius; poutline = outline; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Radius")) { pradius = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Radius")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Outline")) { poutline = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Outline")); } }
void Process() { GLTextuer2D i1 = (GLTextuer2D)first.Input.Data; GLTextuer2D i2 = (GLTextuer2D)second.Input.Data; GLTextuer2D i3 = null; if (mask.HasInput) { i3 = (GLTextuer2D)mask.Input.Data; } if (i1 == null || i2 == null) { return; } if (i1.Id == 0) { return; } if (i2.Id == 0) { return; } CreateBufferIfNeeded(); int pmode = (int)mode; float palpha = alpha; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Mode")) { pmode = Convert.ToInt32(ParentGraph.GetParameterValue(Id, "Mode")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Alpha")) { palpha = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Alpha")); } processor.TileX = tileX; processor.TileY = tileY; processor.Alpha = palpha; processor.BlendMode = pmode; processor.Process(width, height, i1, i2, i3, buffer); processor.Complete(); Updated(); Output.Data = buffer; Output.Changed(); }
private void GetParams() { pangle = angle; pscaleX = this.scale.X; pscaleY = this.scale.Y; pxoffset = offset.X; pyoffset = offset.Y; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "XOffset")) { pxoffset = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "XOffset")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "YOffset")) { pyoffset = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "YOffset")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Offset")) { MVector v = ParentGraph.GetParameterValue <MVector>(Id, "Offset"); pxoffset = v.X; pyoffset = v.Y; } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "ScaleX")) { pscaleX = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "ScaleX")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "ScaleY")) { pscaleY = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "ScaleY")); } if (parentGraph != null && ParentGraph.HasParameterValue(Id, "Scale")) { MVector v = ParentGraph.GetParameterValue <MVector>(Id, "Scale"); pscaleX = v.X; pscaleY = v.Y; } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Angle")) { pangle = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Angle")); } }
private void GetParams() { pangle = angle; pelevation = elevation; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Angle")) { pangle = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Angle")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Elevation")) { pelevation = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Elevation")); } }
void GetParams() { pmaxDistance = distance; psourceonly = sourceOnly; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "MaxDistance")) { pmaxDistance = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "MaxDistance")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "SourceOnly")) { psourceonly = Convert.ToBoolean(ParentGraph.GetParameterValue(Id, "SourceOnly")); } }
private void GetParams() { pintensity = magnitude; pdirection = direction; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Intensity")) { pintensity = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Intensity")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Direction")) { pdirection = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Direction")); } }