Could I get a basic explanation of CATransform3DIdentity?

岁酱吖の 提交于 2019-11-30 20:10:02
Russ Clarke

CATransform3DIdentity is an Identity matrix:

http://en.wikipedia.org/wiki/Identity_matrix

Basically, Matrices in animation mathematics are used to transform an object (skew, move, rotate etc).

An Identity matrix is one that when applied to an object, it resets it to its initial geography.

ex.
[1 0 0]
[0 1 0]
[0 0 1]

It's not easy to explain (I really don't understand properly myself in fairness) but these 3x3 matrices use the grid location (m11, m33) to determine how to transform the object, in this case m11 is is making it rotate 180 degrees, set it to +1 and it'd rotate the other direction. Set it to 0.5 and it'd rotate 90 degrees (iirc!).

ex.
[m11, m12, m13]
[m21, m22, m23]
[m31, m32, m33]

It's a bit scary but the pictures here kind of help:

http://en.wikipedia.org/wiki/Matrix_(mathematics)#Linear_transformations

and here

http://en.wikipedia.org/wiki/Transformation_matrix

Finally, the table at the bottom this this list show how the different fields of a matrix are used:

Provided via 'internet wayback machine': http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Layers.html

Finally, I recall reading this a while ago, it might be of some help as I think my explanations above aren't that handy - I'm telling you what, not why - and believe me, you need to know why to get into this kind of programming properly:

http://chortle.ccsu.edu/vectorlessons/vectorIndex.html

Best of luck!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!