CCAffineTransform - AffineTransform - 仿射变换 - 矩阵

CCAffineTransform - AffineTransform - 仿射变换


 [ x']   [  m00  m01  m02  ] [ x ]   [ m00x + m01y + m02 ]
	[ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
	[ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]

CCAffineTransform

struct CCAffineTransform {

  float a, b, c, d;

  float tx, ty;

};



AffineTransform

this.m00 = m00;

this.m10 = m10;

this.m01 = m01;

this.m11 = m11;

this.m02 = m02;

this.m12 = m12;



仿射变换

http://baike.baidu.com/view/954621.htm


矩阵

矩阵乘法顺序
后面的先执行变换,比如先平移再 旋转之类的。
concatenate 
Cx'(p) = Cx(Tx(p))
[this] = [this] x [Tx]

preConcatenate
Cx'(p) = Tx(Cx(p))
[this] = [Tx] x [this]

from  link

矩阵转置
Tx'(Tx(p)) = p = Tx(Tx'(p))

你可能感兴趣的:(CCAffineTransform - AffineTransform - 仿射变换 - 矩阵)