Takes a 12 coordinates vector and returns a 4x4 matrix

vect2mat(affine_vect)

Arguments

affine_vect

affine transform vector with 12 indices. The vector store the “top” three rows for the 4x4 affine matrix, in a "row major" fashion.

Value

a 4x4 affine transform matrix, with the top three rows and a last row containing 0,0,0,1

Examples

vect2mat(1:12)
#> [,1] [,2] [,3] [,4] #> [1,] 1 2 3 4 #> [2,] 5 6 7 8 #> [3,] 9 10 11 12 #> [4,] 0 0 0 1