transform.applyToVector
The direction transformed by a transform’s linear part, without translation.
Usage
Transform.applyToVector(xf: Transform, v: Vector3): Vector3Parameters
xfTransformThe transform, 16 entries column-major.
vVector3The direction or offset to transform. Required. In model.
Returns
The transformed vector (upper-left 3×3 times v); NaN components for non-finite input. No projective divide.
Use instead
transform.applyToPoint: the input is a position, which translation must move
Example
Transform.applyToVector(Transform.translation(Vector3.of(5, 5, 5)), Vector3.xAxis) // → { x: 1, y: 0, z: 0 }