Math module

make_translation_matrix4

procedure · 1 overloadSource

A Matrix4 that moves points by v: the identity with v in the last column.

ExampleOpen in playground ↗
m := make_translation_matrix4(xyz(1, 2, 3));
assert(m._14 == 1 && m._24 == 2 && m._34 == 3);
assert(m * xyzw(0, 0, 0, 1) == xyzw(1, 2, 3, 1));
make_translation_matrix4 :: (v: Vector3) -> Matrix4

A matrix that moves points by v.

Parameters

v: Vector3
the offset on x, y and z.

Returns

See also