public bool Equals(TexturedTrailVertex other) { return(Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && Time.Equals(other.Time)); }
public bool Equals(TexturedVertex2D other) { return(Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && TextureRect.Equals(other.TextureRect) && BlendRange.Equals(other.BlendRange)); }
/// <inheritdoc /> public bool Equals(RenderPassColorAttachmentDescriptor other) { return(Texture == other.Texture && Level == other.Level && Slice == other.Slice && LoadAction == other.LoadAction && StoreAction == other.StoreAction && ClearColor.Equals(other.ClearColor)); }
public bool Equals(SDFMaterialKey other) { return (Softness.Equals(other.Softness) && Dilate.Equals(other.Dilate) && Thickness.Equals(other.Thickness) && OutlineColor.Equals(other.OutlineColor) && GradientEnabled.Equals(other.GradientEnabled) && Gradient.GetHashCode().Equals(other.Gradient.GetHashCode()) && GradientAngle.Equals(other.GradientAngle)); }
public bool Equals(MaskingInfo other) { return (ScreenSpaceAABB.Equals(other.ScreenSpaceAABB) && MaskingRect.Equals(other.MaskingRect) && ToMaskingSpace.Equals(other.ToMaskingSpace) && CornerRadius == other.CornerRadius && BorderThickness == other.BorderThickness && BorderColour.Equals(other.BorderColour) && BlendRange == other.BlendRange); }
public bool Equals(StandardMaterialData other) { return(DiffuseColor.Equals(other.DiffuseColor) && Equals(DiffuseMap, other.DiffuseMap) && Equals(NormalMap, other.NormalMap) && Equals(Sampler, other.Sampler) && IgnoreLighting == other.IgnoreLighting && NoSpecular == other.NoSpecular && HasTransparency == other.HasTransparency && HighlightEffect == other.HighlightEffect && RtTransparencyMode == other.RtTransparencyMode); }
public static void Main() { Color4 color = System.Drawing.Color.MidnightBlue; Color4 color2 = new Color4(); using (MemoryStream stream = new MemoryStream()) { XmlSerializer xs = new XmlSerializer(typeof(Color4)); xs.Serialize(stream, color); stream.Seek(0, SeekOrigin.Begin); color2 = (Color4)xs.Deserialize(stream); Trace.WriteLine(color); Trace.WriteLine(color2); Trace.WriteLine(color.Equals(color2)); } }
public static Color4 Multiply(Color4 first, Color4 second) { if (first.Equals(Color4.White)) { return(second); } else if (second.Equals(Color4.White)) { return(first); } return(new Color4( first.R * second.R, first.G * second.G, first.B * second.B, first.A * second.A)); }
public static Color4 MultiplySRGB(Color4 first, Color4 second) { if (first.Equals(Color4.White)) { return(second); } else if (second.Equals(Color4.White)) { return(first); } first = first.ToLinear(); second = second.ToLinear(); return(new Color4( first.R * second.R, first.G * second.G, first.B * second.B, first.A * second.A).ToSRGB()); }
public bool ActivateBG(int hitdelta, int currentFrame, ref Color4 staticCurrentColor, ref Color4 CurrentChangingColor, ref Color4 frameInfoColor) { bool handled = false; if (TriggerType == TriggerType.BGChange) { float fadeframes = End - Start; float frame = (currentFrame - Start); if (!staticCurrentColor.Equals(new Color4((float)this.backgroundRed, (float)this.backgroundGreen, (float)this.backgroundBlue, 255))) { if (frame < fadeframes) { Color staticColor = Color.FromArgb(staticCurrentColor.ToArgb()); float diffR = this.backgroundRed - staticColor.R; float diffG = this.backgroundGreen - staticColor.G; float diffB = this.backgroundBlue - staticColor.B; byte newR = (byte)((staticColor.R) + (diffR * (frame / fadeframes))); byte newG = (byte)((staticColor.G) + (diffG * (frame / fadeframes))); byte newB = (byte)((staticColor.B) + (diffB * (frame / fadeframes))); frameInfoColor = new Color4(newR, newG, newB, (byte)255); Console.WriteLine("R: " + newR); Console.WriteLine("G: " + newG); Console.WriteLine("B: " + newB); handled = true; } else { frameInfoColor = new Color4((byte)this.backgroundRed, (byte)this.backgroundGreen, (byte)this.backgroundBlue, (byte)255); staticCurrentColor = new Color4((byte)this.backgroundRed, (byte)this.backgroundGreen, (byte)this.backgroundBlue, (byte)255); CurrentChangingColor = new Color4((byte)this.backgroundRed, (byte)this.backgroundGreen, (byte)this.backgroundBlue, (byte)255); } } } return(handled); }
public bool Equals(TexturedVertex2d other) { return(Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour)); }
public bool Equals(ParticleVertex2d other) { return(Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && Time.Equals(other.Time) && Direction.Equals(other.Direction)); }
public bool Equals(SamplerStateDescription other) { return(Filter == other.Filter && AddressU == other.AddressU && AddressV == other.AddressV && AddressW == other.AddressW && MipMapLevelOfDetailBias.Equals(other.MipMapLevelOfDetailBias) && MaxAnisotropy == other.MaxAnisotropy && CompareFunction == other.CompareFunction && BorderColor.Equals(other.BorderColor) && MinMipLevel.Equals(other.MinMipLevel) && MaxMipLevel.Equals(other.MaxMipLevel)); }
public readonly bool Equals(TexturedVertex2D other) => Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && TextureRect.Equals(other.TextureRect) && BlendRange.Equals(other.BlendRange);
public bool Equals(Vertex2D other) { return(Position.Equals(other.Position) && Colour.Equals(other.Colour)); }
public readonly bool Equals(SRGBColour other) => Linear.Equals(other.Linear);
public bool Equals(Color other) { return(_color.Equals(other._color)); }
public bool Matches(Primitive.TextureEntryFace TextureEntry) { return(TextureID.Equals(TextureEntry.TextureID) && Color.Equals(TextureEntry.RGBA)); }
public bool Equals(TexturedVertex3D other) => Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour);
public bool Equals(DrawInfo other) { return(Matrix.Equals(other.Matrix) && Colour.Equals(other.Colour)); }
public bool Equals(SRGBColour other) => Linear.Equals(other.Linear);
public bool Equals(VertexPositionNormalTextureColor other) { return(Position.Equals(other.Position) && Normal.Equals(other.Normal) && Color.Equals(other.Color) && TextureCoordinate.Equals(other.TextureCoordinate)); }
public readonly bool Equals(ParticleVertex2D other) => Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && Time.Equals(other.Time) && Direction.Equals(other.Direction);
public bool Equals(TimedTexturedVertex2D other) => Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && Time.Equals(other.Time);
public bool Equals(PositionAndColourVertex other) => Position.Equals(other.Position) && Colour.Equals(other.Colour);
public bool Equals(VertexPositionColorTextureSwizzle other) { return(Position.Equals(other.Position) && Color.Equals(other.Color) && TextureCoordinate.Equals(other.TextureCoordinate)); }
public bool Equals(Vertex2D other) => Position.Equals(other.Position) && Colour.Equals(other.Colour);
public bool Equals(VertexPositionNormalColor other) { return(Position.Equals(other.Position) && Normal.Equals(other.Normal) && Color.Equals(other.Color)); }