ConvexDecomposition

data class ConvexDecomposition(val vertices: List<DVec3>, val indices: List<IVec3>, val vhacd: VhacdSettings = VhacdSettings(), val margin: Double = DEFAULT_MARGIN) : Geometry

A shape of unknown convexity which, when turned into a Shape, will be decomposed into a Compound of convex shapes using the implementation's convex decomposition algorithm (VHACD). Note that decomposition is very slow (relatively), so this step should be precomputed or cached in some form.

Parameters

vertices

The vertex buffer of the mesh.

indices

The indices buffer, determining which faces are made up of which vertices.

vhacd

The settings for the VHACD algorithm.

margin

The convex margin of the shape. See ConvexGeometry.

Constructors

Link copied to clipboard
constructor(vertices: List<DVec3>, indices: List<IVec3>, vhacd: VhacdSettings = VhacdSettings(), margin: Double = DEFAULT_MARGIN)

Properties

Link copied to clipboard
val indices: List<IVec3>
Link copied to clipboard
Link copied to clipboard
val vertices: List<DVec3>
Link copied to clipboard