Menu - Top - Home - Donate to Me

module:extras/convex

Back to documentation index.

module:extras/convex()

The extras/convex.js module. To import all symbols in this module, either of the following can be used:

import * from "extras/convex.js";
// -- or --
import * as CustomModuleName from "extras/convex.js";

Methods

(static) module:extras/convex.createConvexHull(points, [flat], [inside])

Generates the convex hull of a set of 3-dimensional points, that is, the smallest convex set that contains all the points given.

Parameters

Return Value

The generated convex hull. (Type: MeshBuffer)

(static) module:extras/convex.planePointsToConvexHull(planepoints)

Generates a convex hull of the half-space representation of several planes. Each plane is defined by the triangle it lies on.

Parameters

Return Value

The generated convex hull. (Type: MeshBuffer)

(static) module:extras/convex.randomConvexPolyhedron(avgsize, maxfaces)

Generates a mesh buffer of a convex polyhedron at random.

Parameters

Return Value

The resulting polyhedron. (Type: MeshBuffer)

Back to documentation index.