BoxShape
A box centered at the origin, with faces aligned to the local axes.
Usageโ
import {BoxShape} from '@math.gl/geometry/culling';
const shape = new BoxShape({size: [2, 1, 3]});
Constructorโ
new BoxShape(options?)โ
| Option | Default | Description |
|---|---|---|
size | [1, 1, 1] | Full X, Y, and Z lengths; each must be finite and positive. |
matrix | identity | Optional invertible affine local-to-world matrix. |
Queriesโ
Implements the Shape interface, including containment, distance, ray and plane intersection, transforms, cloning, and enclosing bounds.
Dimensions and defaults align with the glTF 2.1 draft shape specification.