1.一个无任何变换的默认矩阵常量,可用于使变换后的Layer恢复初始状态 (默认矩阵)
//The identity transform: [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]
CA_EXTERN const CATransform3D CATransform3DIdentity
2.判断是不是默认矩阵
CA_EXTERN bool CATransform3DIsIdentity (CATransform3D t)
3.比较两个矩阵是不是相同的
CA_EXTERN bool CATransform3DEqualToTransform (CATransform3D a,CATransform3D b)
4.矩阵做 x y z 轴动画 平移 转换后的矩阵
// Returns a transform that translates by '(tx, ty, tz)': t' = [1 0 0 0; 0 1 0 0; 0 0 1 0; tx ty tz 1]
CA_EXTERN CATransform3D CATransform3DMakeTranslation (CGFloat tx,CGFloat ty, CGFloat tz)
5.根据 x y z 做缩放 转换后的矩阵
//Returns a transform that scales by '(sx, sy, sz)': t' = [sx 0 0 0; 0 sy 0 0; 0 0 sz 0; 0 0 0 1]
CA_EXTERN CATransform3D CATransform3DMakeScale (CGFloat sx, CGFloat sy,CGFloat sz)
6.生成一个依照参数旋转后的矩阵 (angle 角度)
//Returns a transform that rotates by 'angle' radians about the vector '(x, y, z)'. If the vector has length zero the identity transform is returned.
CA_EXTERN CATransform3D CATransform3DMakeRotation (CGFloat angle, CGFloat x,CGFloat y, CGFloat z)
7.变换矩阵t -> 新的矩阵(平移)
//Translate 't' by '(tx, ty, tz)' and return the result: t' = translate(tx, ty, tz) * t.
CA_EXTERN CATransform3D CATransform3DTranslate (CATransform3D t, CGFloat tx,CGFloat ty, CGFloat tz)
8.变换矩阵t -> 新的矩阵(缩放)
//Scale 't' by '(sx, sy, sz)' and return the result: t' = scale(sx, sy, sz) * t
CA_EXTERN CATransform3D CATransform3DScale (CATransform3D t, CGFloat sx,CGFloat sy, CGFloat sz)
9.变换矩阵t -> 新的矩阵(旋转)
//Rotate 't' by 'angle' radians about the vector '(x, y, z)' and return the result. If the vector has zero length the behavior is undefined: t' = rotation(angle, x, y, z) * t.
CA_EXTERN CATransform3D CATransform3DRotate (CATransform3D t, CGFloat angle,CGFloat x, CGFloat y, CGFloat z)
10.计算两个矩阵的乘积
//Concatenate 'b' to 'a' and return the result: t' = a * b.
CA_EXTERN CATransform3D CATransform3DConcat (CATransform3D a, CATransform3D b)
11.反转矩阵
//Invert 't' and return the result. Returns the original matrix if 't'has no inverse.
CA_EXTERN CATransform3D CATransform3DInvert (CATransform3D t)
12.通过2D得到一个3D矩阵
//Return a transform with the same effect as affine transform 'm'.
CA_EXTERN CATransform3D CATransform3DMakeAffineTransform (CGAffineTransform m)
13.判断3D矩阵是否可以用2D矩阵表示
//Returns true if 't' can be represented exactly by an affine transform
CA_EXTERN bool CATransform3DIsAffine (CATransform3D t)
14从3D矩阵中获取2D矩阵
//Returns the affine transform represented by 't'. If 't' can not be represented exactly by an affine transform the returned value isundefined
CA_EXTERN CGAffineTransform CATransform3DGetAffineTransform (CATransform3D t)