Class MeshSmoothing

java.lang.Object
mgui.geometry.mesh.MeshSmoothing

public class MeshSmoothing
extends java.lang.Object
Contains static methods for all mesh smoothing algorithms.
Version:
1.0
Author:
Andrew Reid
  • Constructor Summary

    Constructors
    Constructor Description
    MeshSmoothing()  
  • Method Summary

    Modifier and Type Method Description
    protected static java.util.ArrayList<mgui.geometry.mesh.MeshSmoothing.Particle> getParticles​(Mesh3D mesh, int k)  
    protected static java.util.ArrayList<mgui.geometry.mesh.MeshSmoothing.Particle> getParticles​(Mesh3D mesh, int k, boolean[] boundaries)  
    protected static org.jogamp.vecmath.Vector3f getProjectedVector​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle p)
    Get the projection of this particle's charge vector onto the mesh surface.
    protected static org.jogamp.vecmath.Vector3f getProjectedVector​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle p, boolean holdbounds)
    Get the projection of this particle's charge vector onto the mesh surface.
    protected static void moveParticleByVariance​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle)  
    protected static void moveParticleByVariance​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle, boolean holdbounds)  
    protected static void setCharge​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle, double force, double decay, int m)
    Set the charge repulsion for this particle based upon its neighbour's edge distances.
    protected static void setEdgeVariance​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle)  
    static void setEquilateralFacesEM​(Mesh3DInt meshInt, double max, double decay, double limit, boolean holdbounds, boolean constrain)
    EM = Edge method...
    static void setEquilateralFacesLR​(Mesh3D mesh, double timeStep, double decay, int nodeStep, double limit, boolean holdbounds)
    Uses an energy model to obtain a representation of with triangular faces having maximal equilaterality.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MeshSmoothing

      public MeshSmoothing()
  • Method Details

    • setEquilateralFacesLR

      public static void setEquilateralFacesLR​(Mesh3D mesh, double timeStep, double decay, int nodeStep, double limit, boolean holdbounds)
      Uses an energy model to obtain a representation of with triangular faces having maximal equilaterality. Nodes are treated as charged particles; thus the most uniform distribution within the mesh boundary is the one with the lowest energy. See ...(website?). This method uses a local relaxation algorithm.
      Parameters:
      mesh - Mesh3D to be operated on
      timeStep - determines the magnitude the force vector in this physical model
      nodeStep - number of neighbours to traverse
    • setEquilateralFacesEM

      public static void setEquilateralFacesEM​(Mesh3DInt meshInt, double max, double decay, double limit, boolean holdbounds, boolean constrain)
      EM = Edge method...
      Parameters:
      mesh -
      timeStep -
      decay -
      nodeStep -
      limit -
    • moveParticleByVariance

      protected static void moveParticleByVariance​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle)
    • moveParticleByVariance

      protected static void moveParticleByVariance​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle, boolean holdbounds)
    • setEdgeVariance

      protected static void setEdgeVariance​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle)
    • getProjectedVector

      protected static org.jogamp.vecmath.Vector3f getProjectedVector​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle p)
      Get the projection of this particle's charge vector onto the mesh surface. Currently, projects the charge vector onto the edge vector having the smallest angle from it.
      Parameters:
      mesh -
      p -
      Returns:
    • getProjectedVector

      protected static org.jogamp.vecmath.Vector3f getProjectedVector​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle p, boolean holdbounds)
      Get the projection of this particle's charge vector onto the mesh surface. Currently, projects the charge vector onto the edge vector having the smallest angle from it.
      Parameters:
      mesh -
      p -
      holdbounds - - indicates whether boundary nodes should be moved or not
      Returns:
    • setCharge

      protected static void setCharge​(Mesh3D mesh, mgui.geometry.mesh.MeshSmoothing.Particle particle, double force, double decay, int m)
      Set the charge repulsion for this particle based upon its neighbour's edge distances. Decay is exponential to the factor . The magnitude of a unit force vector is determined by .
      Parameters:
      mesh -
      particles -
      force - value by which to multiply charge vector
      decay - exponent determining exponential decay with distance
      m - number of neighbours to search
    • getParticles

      protected static java.util.ArrayList<mgui.geometry.mesh.MeshSmoothing.Particle> getParticles​(Mesh3D mesh, int k)
    • getParticles

      protected static java.util.ArrayList<mgui.geometry.mesh.MeshSmoothing.Particle> getParticles​(Mesh3D mesh, int k, boolean[] boundaries)