VertexFormatTests LerpVertexPosition3DNormalUV Method Delta Engine Documentation

Namespace: DeltaEngine.Graphics.Tests
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void LerpVertexPosition3DNormalUV()
Examples

[Test]
public void LerpVertexPosition3DNormalUV()
{
    var v1 = new VertexPosition3DNormalUV(Vector3D.Zero, Vector3D.UnitZ, Vector2D.Zero);
    var v2 = new VertexPosition3DNormalUV(Vector2D.One, Vector3D.UnitX, Vector2D.One);
    var lerp = v1.Lerp(v2, 0.5f);
    Assert.AreEqual(new Vector3D(0.5f, 0.5f, 0f), lerp.Position);
    Assert.AreEqual(new Vector3D(0.5f, 0f, 0.5f), lerp.Normal);
    Assert.AreEqual(Vector2D.Zero, lerp.UV);
}
See Also