bbox.corners

The eight corners of a box, for transforming it.

Value helperSince 0.3.0

Usage

TypeScript
BBox.corners(b: BBox): Point3[]

Parameters

  • bBBox

    The box. Required. In model.

Returns

Eight points, corner k taking max on x when bit 0 of k is set, on y for bit 1 and z for bit 2; [] for an empty box.

Example

TypeScript
BBox.corners(BBox.ofPoints([Point3.origin, Point3.of(1, 1, 1)])).length // → 8

See also