Class MidpointDisplacementSubdivision


public class MidpointDisplacementSubdivision extends DisplacementSubdivision
This subdivision strategy splits an edge in two equal halves at its mid point. The midpoint itself is being displaced, however, in the direction of the vector going from the configured reference point (often the mesh centroid is used) towards the edge midpoint. The displacement amount is configurable as fraction of the original edge length. So given that:
 M = edge midpoint
 R = reference point
 l = edge length
 a = displacement amplification factor
 
 D  = normalized(M-R)
 M' = M + D * a * l
 
  • Field Details

    • centroid

      public Vec3D centroid
  • Constructor Details

    • MidpointDisplacementSubdivision

      public MidpointDisplacementSubdivision(Vec3D centroid, float amount)
  • Method Details