Package vhacd
Class VHACD
java.lang.Object
vhacd.VHACD
Utility class to perform Volumetric-Hierarchical Approximate Convex
Decomposition on an indexed mesh.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addProgressListener
(VHACDProgressListener listener) Register the specified progress listener.compute
(float[] positions, int[] indices, VHACDParameters params) Generate convex hulls to approximate the specified mesh.static void
removeProgressListener
(VHACDProgressListener listener) De-register the specified progress listener.
-
Field Details
-
logger
message logger for this class
-
-
Method Details
-
addProgressListener
Register the specified progress listener.- Parameters:
listener
- the listener to register (not null, alias created)
-
compute
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
De-register the specified progress listener.- Parameters:
listener
- the listener to de-register (not null, unaffected)
-