Package vhacd

Class VHACD

java.lang.Object
vhacd.VHACD

public final class VHACD extends Object
Utility class to perform Volumetric-Hierarchical Approximate Convex Decomposition on an indexed mesh.
  • Field Details

    • logger

      public static final Logger logger
      message logger for this class
  • Method Details

    • addProgressListener

      public static void addProgressListener(VHACDProgressListener listener)
      Register the specified progress listener.
      Parameters:
      listener - the listener to register (not null, alias created)
    • compute

      public static List<VHACDHull> compute(float[] positions, int[] indices, VHACDParameters params)
      Generate convex hulls to approximate the specified mesh.
      Parameters:
      positions - the positions of all mesh vertices (not null, length a multiple of 3, unaffected)
      indices - the vertex indices of all mesh triangles (not null, length a multiple of 3, unaffected)
      params - the tuning parameters to use (not null, unaffected)
      Returns:
      a new list of hulls, or an empty list if the algorithm failed
    • removeProgressListener

      public static void removeProgressListener(VHACDProgressListener listener)
      De-register the specified progress listener.
      Parameters:
      listener - the listener to de-register (not null, unaffected)