示例#1
0
 public bool Equals(TexturedTrailVertex other)
 {
     return(Position.Equals(other.Position) &&
            TexturePosition.Equals(other.TexturePosition) &&
            Colour.Equals(other.Colour) &&
            Time.Equals(other.Time));
 }
示例#2
0
 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));
 }
示例#3
0
 /// <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));
 }
示例#5
0
 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);
 }
示例#6
0
 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);
 }
示例#7
0
        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());
        }
示例#10
0
        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);
        }
示例#11
0
 public bool Equals(TexturedVertex2d other)
 {
     return(Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour));
 }
示例#12
0
 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));
 }
示例#13
0
 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);
示例#15
0
 public bool Equals(Vertex2D other)
 {
     return(Position.Equals(other.Position) && Colour.Equals(other.Colour));
 }
示例#16
0
 public readonly bool Equals(SRGBColour other) => Linear.Equals(other.Linear);
示例#17
0
 public bool Equals(Color other)
 {
     return(_color.Equals(other._color));
 }
示例#18
0
 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);
示例#20
0
 public bool Equals(DrawInfo other)
 {
     return(Matrix.Equals(other.Matrix) && Colour.Equals(other.Colour));
 }
示例#21
0
 public bool Equals(SRGBColour other) => Linear.Equals(other.Linear);
示例#22
0
 public bool Equals(VertexPositionNormalTextureColor other)
 {
     return(Position.Equals(other.Position) && Normal.Equals(other.Normal) && Color.Equals(other.Color) && TextureCoordinate.Equals(other.TextureCoordinate));
 }
示例#23
0
 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);
示例#26
0
 public bool Equals(VertexPositionColorTextureSwizzle other)
 {
     return(Position.Equals(other.Position) && Color.Equals(other.Color) && TextureCoordinate.Equals(other.TextureCoordinate));
 }
示例#27
0
 public bool Equals(Vertex2D other) => Position.Equals(other.Position) && Colour.Equals(other.Colour);
示例#28
0
 public bool Equals(VertexPositionNormalColor other)
 {
     return(Position.Equals(other.Position) && Normal.Equals(other.Normal) && Color.Equals(other.Color));
 }