VertexFormatTests LerpVertexPosition3DColorSkinned 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 LerpVertexPosition3DColorSkinned()
Examples

[Test]
public void LerpVertexPosition3DColorSkinned()
{
    var vertex = new VertexPosition3DColorSkinned(Vector3D.UnitX, Color.White,
        new SkinningData(0, 1, 1.0f, 1.0f));
    var vertex2 = new VertexPosition3DColorSkinned(Vector2D.UnitY, Color.Black,
        new SkinningData(0, 1, 0.0f, 0.0f));
    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.Skinning, new SkinningData(0, 1, 0.5f, 0.5f));
}
See Also