public void PatternIsConstantInZ() { var texture = new StripeTexture(Colors.White, Colors.Black); texture.LocalColorAt(new Point(0, 0, 0)).Should().Be(Colors.White); texture.LocalColorAt(new Point(0, 0, 1)).Should().Be(Colors.White); texture.LocalColorAt(new Point(0, 0, 2)).Should().Be(Colors.White); }
public void DistortsBasePattern() { var stripe = new StripeTexture(Colors.White, Colors.Black); var pattern = new PerlinRippleCompositeTexture(stripe, 2f); stripe.LocalColorAt(new Point(-1.1f, 0, 0)).Should().Be(Colors.White); pattern.LocalColorAt(new Point(-1.1f, 0, 0)).Should().NotBe(Colors.White); }
public void PatternAlternatesInX() { var texture = new StripeTexture(Colors.White, Colors.Black); texture.LocalColorAt(new Point(0, 0, 0)).Should().Be(Colors.White); texture.LocalColorAt(new Point(0.9f, 0, 0)).Should().Be(Colors.White); texture.LocalColorAt(new Point(1f, 0, 0)).Should().Be(Colors.Black); texture.LocalColorAt(new Point(-0.1f, 0, 0)).Should().Be(Colors.Black); texture.LocalColorAt(new Point(-1f, 0, 0)).Should().Be(Colors.Black); texture.LocalColorAt(new Point(-1.1f, 0, 0)).Should().Be(Colors.White); }