Example #1
0
		public void LerpPositionColorTextured3D()
		{
			var vertex = new VertexPosition3DColorUV(Vector3D.UnitX, Color.White, Vector2D.One);
			var vertex2 = new VertexPosition3DColorUV(Vector2D.UnitY, Color.Black, Vector2D.Zero);
			var lerpedVertex = vertex.Lerp(vertex2, 0.5f);
			Assert.AreEqual(lerpedVertex.Position, new Vector3D(0.5f, 0.5f, 0f));
			Assert.AreEqual(lerpedVertex.Color, new Color(127, 127, 127));
			Assert.AreEqual(lerpedVertex.UV, Vector2D.One);
		}
Example #2
0
        public void LerpPositionColorTextured3D()
        {
            var vertex       = new VertexPosition3DColorUV(Vector3D.UnitX, Color.White, Vector2D.One);
            var vertex2      = new VertexPosition3DColorUV(Vector2D.UnitY, Color.Black, Vector2D.Zero);
            var lerpedVertex = vertex.Lerp(vertex2, 0.5f);

            Assert.AreEqual(lerpedVertex.Position, new Vector3D(0.5f, 0.5f, 0f));
            Assert.AreEqual(lerpedVertex.Color, new Color(127, 127, 127));
            Assert.AreEqual(lerpedVertex.UV, Vector2D.One);
        }