Fix multiply matrix order for skew.

This commit is contained in:
Hiroyuki Ikezoe 2017-07-29 08:45:48 +09:00
parent 81e51b31d6
commit b0a91ecd3a

View file

@ -2397,19 +2397,19 @@ impl From<MatrixDecomposed3D> for ComputedMatrix {
let mut temp = ComputedMatrix::identity();
if decomposed.skew.2 != 0.0 {
temp.m32 = decomposed.skew.2;
matrix = multiply(matrix, temp);
matrix = multiply(temp, matrix);
}
if decomposed.skew.1 != 0.0 {
temp.m32 = 0.0;
temp.m31 = decomposed.skew.1;
matrix = multiply(matrix, temp);
matrix = multiply(temp, matrix);
}
if decomposed.skew.0 != 0.0 {
temp.m31 = 0.0;
temp.m21 = decomposed.skew.0;
matrix = multiply(matrix, temp);
matrix = multiply(temp, matrix);
}
// Apply scale