是否可以将卷积矩阵组合在一起应用多个转换?

时间:2011-12-20 07:35:24

标签: actionscript-3 matrix transformation convolution

理论上应该可以通过加法或乘法来组合变换或颜色矩阵(当涉及到这样的数学时我很蹩脚)。有可能吗?

1 个答案:

答案 0 :(得分:2)

是的!在Flash中,卷积矩阵在flash.geom包中定义。变换矩阵是Matrix,颜色矩阵是ColorTransform。两者都实现了concat函数,让您可以乘以另一个矩阵的效果。

var a:Matrix = new Matrix();
a.translate(60, 40);

var b:Matrix = new Matrix();
b.rotate(60);

a.concat(b); // Matrix a now translates and rotates whatever it convolutes.
相关问题