ios - Buggy CATransform3D? -


edited

(the example contained mistake replaced one)

the following code example how work:

catransform3d temp = catransform3didentity; temp.m34 = -0.002; temp = catransform3dtranslate(temp, 0, -230, 0); temp = catransform3drotate(temp, -m_pi / 5, 1, 0, 0); temp = catransform3dtranslate(temp, 0, 230, 0); 

the output before last line of code:

(lldb) po temp  (m11 = 1, m12 = 0, m13 = 0, m14 = 0, m21 = 0, m22 = 0.809017002, m23 = -0.587785244, m24 = 0.00117557053, m31 = 0, m32 = 0.587785244, m33 = 0.809017002, m34 = -0.00161803409, m41 = 0, m42 = -230, m43 = 0, m44 = 1) 

the output after last line of code:

(lldb) po temp  (m11 = 1, m12 = 0, m13 = 0, m14 = 0, m21 = 0, m22 = 0.809017002, m23 = -0.587785244, m24 = 0.00117557053, m31 = 0, m32 = 0.587785244, m33 = 0.809017002, m34 = -0.00161803409, m41 = 0, m42 = -43.9260902, m43 = -135.190613, m44 = 1.27038121) 

whats ...? last line of code nothing because e (it indentation matrix , multiplication should return same result) have changed m44 element must equal 1.

and if matrix performs same calculations correct 1 then, example, can't take transform value stored in it.

could suggest solution how generate correct matrices (m44 == 1) except of multiplicating them manually?

it unclear you're trying do. create catransform3d called temp, on third line of code using variable called transform not mentioned elsewhere in 3 lines of code. maybe meant use temp instead.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -