CylinderShape
A capped cylinder centered at the origin along the local Y axis.
Usageโ
import {CylinderShape} from '@math.gl/geometry/culling';
const shape = new CylinderShape({height: 2, radiusBottom: 1, radiusTop: 0.5});
Constructorโ
new CylinderShape(options?)โ
| Option | Default | Description |
|---|---|---|
height | 2 | Full height between the caps; finite and positive. |
radiusBottom | 0.5 | Radius at -height / 2; finite and nonnegative. |
radiusTop | 0.5 | Radius at height / 2; finite and nonnegative. |
matrix | identity | Optional invertible affine local-to-world matrix. |
Unequal radii produce a truncated cone. A zero radius produces a cone tip; at least one radius must be positive.
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.