java.lang.Object
com.marginallyclever.ro3.mesh.MeshSmoother

public class MeshSmoother extends Object
MeshSmoother will smooth the normals of a Mesh.
  • Constructor Details

    • MeshSmoother

      public MeshSmoother()
  • Method Details

    • smoothNormals

      public static void smoothNormals(Mesh model, float vertexEpsilon, float normalEpsilon)
      Smooth normals. Find points within vertexEpsilon of each other, sharing normals within normalEpsilon of each other, and then smooths the nromals (makes them the same, an average of the normals considered). Note: Modified the original model.
      Parameters:
      model - the model containing the data to smooth.
      vertexEpsilon - how close should points be to be considered one and the same. typically ~0.001
      normalEpsilon - how close should normals be to be merged. 0...2 larger values more smoothing.