SphereShape
A sphere centered at the local origin.
Usageโ
import {SphereShape} from '@math.gl/geometry/culling';
const shape = new SphereShape({radius: 1});
Constructorโ
new SphereShape(options?)โ
| Option | Default | Description |
|---|---|---|
radius | 0.5 | Finite positive radius. |
matrix | identity | Optional invertible affine local-to-world matrix. |
Non-uniform scaling produces an ellipsoid for containment and intersection queries; distance estimates retain the shared transform limitations.
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.