matrix3 maketransform(vector zaxis, vector yaxis)
matrix3 maketransform(int xyz, vector angles)
matrix maketransform(vector zaxis, vector yaxis, vector translate)
matrix maketransform(int trs, int xyz, vector t, vector r)
matrix maketransform(int trs, int xyz, vector t, vector r, vector s)
matrix maketransform(int trs, int xyz, vector t, vector r, vector s, vector p)
matrix maketransform(int trs, int xyz, vector t, vector r, vector s, vector p, vector pr)
matrix maketransform(int trs, int xyz, vector t, vector r, vector s, vector p, vector pr, vector shears)
Builds a 3×3 or 4×4 transform matrix.
maketransform(int trs, ...)
builds a general 4×4 transform matrix
given an order of transformations (trs), an order for rotations
(xyz), a vector representing the translation (t), rotation
(r), scale (s) (and optionally a pivot (p), pivot rotatation
(pr), and shears (shears)). The specifications for the trs and
xyz parameters can be found in $HFS/houdini/vex/include/math.h
maketransform(vector zaxis, yaxis, ...)
builds either a 3×3 transform
matrix or a 4×4 transform matrix. The matrix will be constructed so that the
z-axis will be transformed to the z-axis specified with the given up vector
(yaxis). Thus, maketransform({0,0,1}, {0,1,0}) will result in an identity
matrix. The version which returns a 4×4 transform will apply the translation
to the 4×4 matrix. This function is very similar to the lookat
function. The vectors passed in are not normalized meaning that scales
should be preserved in construction of the transform.
Note
Unlike most VEX function, this function expects rotations in degrees, not radians.
matrix |