mesh.transformed

A copy of the mesh with a transform applied to every point.

GeometricSince 0.3.0

Usage

TypeScript
mesh.transformed(xf: Transform): Mesh

Parameters

  • xfTransform

    The transform (column-major).

    Required

Returns

A new mesh; the original is unchanged.

Guarantees

  • volume() keeps its sign under a mirror
  • face count and topology are unchanged
  • The same result on every machine.

Example

TypeScript
const m = Mesh.box().value.transformed(Transform.scale(2))
m.volume().value // → 8