transform.applyToPoint

The point moved by a transform, translation included.

Value helperSince 0.3.0

Usage

TypeScript
Transform.applyToPoint(xf: Transform, p: Point3): Point3

Parameters

  • xfTransform

    The transform, 16 entries column-major.

    Required

  • pPoint3

    The point to transform. Required. In model.

Returns

The transformed point, divided by w when the last row is not 0 0 0 1; Infinity or NaN coordinates when w is 0 (a point at infinity) or input is not finite.

Use instead

Example

TypeScript
Transform.applyToPoint(Transform.translation(Vector3.of(0, 0, 1)), Point3.of(1, 1, 1)) // → { x: 1, y: 1, z: 2 }

See also