[SDK] Transforming mesh vertices faster?


#1

Hi,
To transform my mesh vertices I scale, rotate and then translate them every time using matrix.TransformPoints like this:

Matrix3 mat_knots;

mat_knots.SetScale(...);
mat_knots.TransformPoints(...);
			
mat_knots.SetRotate(...);
mat_knots.TransformPoints(...);

mat_knots.SetTranslate(...);
mat_knots.TransformPoints(...);

I was wondering is it possible to first create a matrix and use TransformPoints only once?
I been trying to add three matrices (scale, rot, trans) but of course meshes are distorted…
Its been a while since I dealed with matrices, so mayme someone is more up to date? :smiley:
thanks


#2

Multiply your matrices together and use the result to set the transform points


#3

Great, thanks! :slight_smile: of course the multiplying :slight_smile: