Interface VHACDParameters

Parameters for VHACD convex decomposition algorithm.

All parameters are optional. When not specified, default values from the underlying Rapier/Parry library are used.

interface VHACDParameters {
    alpha?: number;
    beta?: number;
    concavity?: number;
    convexHullApproximation?: boolean;
    convexHullDownsampling?: number;
    maxConvexHulls?: number;
    planeDownsampling?: number;
    resolution?: number;
}

Properties

alpha?: number

Controls the bias toward clipping along symmetry planes. Range: [0.0, 1.0]

beta?: number

Controls the bias toward clipping along revolution planes. Range: [0.0, 1.0] Useful for objects with cylindrical or rotational features.

concavity?: number

Controls maximum allowed deviation from convexity. Range: [0.0, 1.0] Lower values create more convex parts for a tighter fit.

convexHullApproximation?: boolean

Whether to use approximate convex hulls for better performance. Faster method with minimal impact on quality.

convexHullDownsampling?: number

Controls the precision of convex hull generation. Lower values use more voxels for hull computation.

maxConvexHulls?: number

Maximum number of convex parts to generate. Limits part count during decomposition.

planeDownsampling?: number

Controls the granularity of searching optimal clipping planes. Lower values test more planes (slower but more accurate).

resolution?: number

Voxel grid resolution for decomposition. Higher resolution captures more detail but is slower.