Model - Transformation functions
Every function callable as Transformation.* inside an expression — an argument input, a parameter binding, a table cell. Pure: no side effects, no async.
| Function | Returns | Description | Arg | Type | Meaning |
|---|---|---|---|---|---|
Transformation.apply(m, point) | point | Apply the transform to a point (translation included). | m | transform | the matrix |
point | point | the point | |||
Transformation.applyVector(m, vector) | vector | Apply the transform's linear part only to a direction (no translation). | m | transform | the matrix |
vector | vector | the direction | |||
Transformation.compose(a, b) | transform | Compose two transforms: compose(a,b) applies b first, then a (apply(compose(a,b),p) === apply(a,apply(b,p))). | a | transform | applied second |
b | transform | applied first | |||
Transformation.invert(m) | transform | Matrix inverse. Throws for a singular (non-invertible) input — there is no inverse to return. | m | transform | the matrix |
Transformation.rotation(axisOrigin, axisDirection, angleDeg) | transform | Rotation matrix about an axis (origin + direction). | axisOrigin | point | a point on the rotation axis |
axisDirection | vector | the rotation axis direction (any magnitude) | |||
angleDeg | angle | rotation angle, degrees | |||
Transformation.scaling(sx, sy, sz) | transform | Pure scaling matrix about the origin. | sx | number | scale factor, x |
sy | number | scale factor, y | |||
sz | number | scale factor, z | |||
Transformation.translation(vector) | transform | Pure translation matrix. | vector | vector | translation vector |