How to avoid Z-fighting

Was this article helpful?
3 out of 3 found this helpful

Comments

2 comments
Date Votes
  • If a "Surface" is only single-sided, and the drawing it done on the underside (i.e. derived class from `LinearPath`) facing outwards, Then this method will force the appearance to be flipped to the inside.

    0
  • This is the solution I am currently using:

    private void BringCloserToEye()
    {
    var viewNormal = ActiveViewport.Camera.ViewNormal;
    viewNormal *= 70; // Move the points 70 mm closer to the observer so that they appear in front of the object drawn upon
    Transformation transform = new Translation(viewNormal);
    // Check to see if the overhead of parallel is going to be worth it.
    if (points.Count > 16)
    {
    Parallel.ForEach(points, pt => { pt.TransformBy(transform); });
    }
    else
    {
    foreach (Point3D pt in points)
    {
    pt.TransformBy(transform);
    }
    }
    }

     

    0

Please sign in to leave a comment.

Articles in this section

See more