Catransform3d matrix m11-m44 each meaning

Source: Internet
Author: User
  1. Struct catransform3d
  2. {
  3. Cgfloat M11 (x scaling), M12 (Y shear), M13 (), m14 ();
  4. Cgfloat m21 (x shear), m22 (Y scaling), M23 (), M24 ();
  5. Cgfloat m31 (), M32 (), M33 (), m34 (perspective effect, the object to be operated must have a rotation angle, otherwise there is no effect. Of course, only the perspective effect can be obtained if there is a change in the z direction );
  6. Cgfloat M41 (X translation), M42 (Y translation), m43 (Z translation), m44 ();
  7. };

PS:

  • When the overall ratio is changed, that is, when M11 = m22, if M33> 1, the overall image is reduced. If 0 <M33 <1, the overall image is enlarged. If M33 <0, A symmetric proportional transformation is performed on the origin.
  • If you set M12 or m21, the shear effect is displayed. When you set [M12 = angle] and [m21 =-angle], the rotation effect is displayed. The two angles are the same.
  • () Fill in the blank space.
  • Also, to use catransform3d, you must import quartzcore. Framework in the project. Then in the file

# Import <quartzcore/catransform3d. h>.

 

IPhone perspective effect (Perspective)

  1. Catransform3d transform = catransform3didentity;
  2. Transform. m34= 0.0005 ;//
    Pivoting Effect
  3. Transform = catransform3drotate (transform, (m_pi/180*40), 0, 1, 0 );
  4. [Piece. layer settransform: Transform];

The second line must be written before the third line.

From: http://www.buerguo.com/archives/162

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.