Changing edge color for a single entity

The following derived Mesh class demonstrate how to change edge color for a single entity.

class MyMesh : Mesh
{
    public Color EdgeColor = Color.Empty;

    public MyMesh(Mesh another, Color edgeColor) : base(another)
    {
        EdgeColor = edgeColor;
    }

    protected override void DrawEdges(DrawParams data)
    {
        data.RenderContext.SetColorWireframe(EdgeColor);
        base.DrawEdges(data);
    }
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.