Transforms a 3D vector by a 4x4 matrix.
The 4x4 transformation matrix.
The 3D vector to transform (x, y, z).
An optional array to store the result. If not provided, a new vector is created.
The transformed vector.
Transforms a 3D vector by a 4x4 matrix.