/*
matrix3 maketransform(vector zaxis, vector yaxis)
matrix maketransform(vector zaxis, vector yaxis, vector translate)
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)
*/
vector t,r,s,p,pr;
t = chv('translate');
r = chv('rotate');
s = chv('scale');
p = chv('pivot');
pr= chv('pivotRoatation');
matrix transform = maketransform(0,0,t,r,s,p,pr);
@P *= transform;
---------------------------------------------------
0 - Scale, Rotate, Translate
1 - Scale, Translate , Rotate
2 - Rotate, Scale, Translate
3 - Rotate, Translate, Scale
4 - Translate, Scale, Rotate
5 - Translate, Rotate, Scale
0 - Rotate - order X, Y, Z
1 - Rotate - order X, Z, Y
2 - Rotate - order Y, X, Z
3 - Rotate - order Y, Z, X
4 - Rotate - order Z, X, Y
5 - Rotate - order Z, Y, X
---------------------------------------------------
---------------------------------------------------
// Defines for the maketransform() VEX function. The function takes two integer arguments which determine the order that the transform gets made.
#define XFORM_SRT 0 // Scale, Rotate, Translate
#define XFORM_STR 1 // Scale, Translate, Rotate
#define XFORM_RST 2 // Rotate, Scale, Translate
#define XFORM_RTS 3 // Rotate, Translate, Scale
#define XFORM_TSR 4 // Translate, Scale, Rotate
#define XFORM_TRS 5 // Translate, Rotate, Scale
#define XFORM_XYZ 0 // Rotate order X, Y, Z
#define XFORM_XZY 1 // Rotate order X, Z, Y
#define XFORM_YXZ 2 // Rotate order Y, X, Z
#define XFORM_YZX 3 // Rotate order Y, Z, X
#define XFORM_ZXY 4 // Rotate order Z, X, Y
#define XFORM_ZYX 5 // Rotate order Z, Y, X
#include <math.h>
vector t,r,s;
t = chv('translate');
r = chv('rotate');
s = chv('scale');
matrix m = maketransform( XFORM_SRT, XFORM_XYZ, t, r, s);
@P *= m;