Skip to content

Documentation / @ripl/core / transformBox

Function: transformBox()

transformBox(box, matrix): Box

Defined in: packages/core/src/math/geometry.ts:122

Transforms a box by an affine matrix and returns the axis-aligned bounding box of the result. Returns the box unchanged when matrix is null (the identity case). Because it re-fits an AABB around the transformed corners, a rotated box yields a conservative (enlarged) bounding box.

Parameters

ParameterType
boxBox
matrixMatrix | null

Returns

Box