Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to convert the CGAffineTransform to CGTransform3D?

how to convert the CGAffineTransform to CGTransform3D?

I use UIImagePickerController as the Camera Controler. and i add a 3d layer on the upper of the camera view.

then when i want to add a 3d model to the 3d layer . i muset set the 3d scene campera projection matrix . and model view matrix.

but the UIImagePickerController just have a CGAffineTransform .

like image 708
user734380 Avatar asked May 02 '11 11:05

user734380


1 Answers

Try CATransform3DMakeAffineTransform. From Apple's documentation:

Return a transform with the same effect as affine transform 'm'.

CATransform3D CATransform3DMakeAffineTransform (CGAffineTransform m)

Available in iOS 2.0 and later. Declared In:

CATransform3D.h
like image 60
landweber Avatar answered Oct 10 '22 05:10

landweber