transform.applyToPoint
The point moved by a transform, translation included.
Usage
Transform.applyToPoint(xf: Transform, p: Point3): Point3Parameters
xfTransformThe transform, 16 entries column-major.
pPoint3The 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
transform.applyToVector: the input is a direction or offset, which translation must not movetransform.applyToFlat: transforming a whole flat position array
Example
Transform.applyToPoint(Transform.translation(Vector3.of(0, 0, 1)), Point3.of(1, 1, 1)) // → { x: 1, y: 1, z: 2 }