BoxMesh Color Property Delta Engine Documentation

Namespace: DeltaEngine.Rendering3D.Shapes
Assembly: DeltaEngine.Rendering3D.Shapes (in DeltaEngine.Rendering3D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public Color Color { get; set; }

Property Value

Type: Color
Remarks

Tests: DeltaEngine.Rendering3D.Shapes.Tests.BoxMeshTests
Examples

2 unit tests call DeltaEngine.Rendering3D.Shapes.BoxMesh.Color
[Test, CloseAfterFirstFrame]
public void CreateBox()
{
    var box = new BoxMesh(Vector3D.UnitY, Color.Red);
    Assert.AreEqual(Vector3D.UnitY, box.Size);
    Assert.AreEqual(Color.Red, box.Color);
    Assert.AreEqual(8, box.Geometry.NumberOfVertices);
    Assert.AreEqual(36, box.Geometry.NumberOfIndices);
    Assert.AreEqual(VertexFormat.Position3DColor,
        (box.Material.Shader as ShaderWithFormat).Format);
}
[Test, CloseAfterFirstFrame]
public void ChangeColor()
{
    var box = new BoxMesh(Vector3D.UnitY, Color.Red) { Color = Color.Blue };
    Assert.AreEqual(Color.Blue, box.Color);
}
See Also