Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Core Animation and CALayer and CATransformLayer show an object with "thickness"?

It seems that we can show layers and even use a different zPosition for different layers in Core Animation -- however, is it true that there is no easy way to show something with some thickness?

For example, a slice of cheese with a 2mm thickness, or a push button or a coin that is tilted and therefore show a 1mm thickness? Somehow the thickness has to be shown by adding yet another layer to imitate the thickness? So this 2.5D is a more basic 2.5D, where it is a 3D world limited to flat 2D images... while some 2.5D, such as some RPG games, (like Diablo), which are sometimes also called 2.5D but objects in those situation (such as a building) can actually have width, length, and height (thickness). So actually, those are actually quite 3D to me... except most objects are on a 2D map that is tilted sideway.

So back to the question... is it true that in iOS, it is fairly limited to a 3D world of flat 2D images, and going to any width x length x height will require going into OpenGL / CAEAGLLayer?

like image 331
nonopolarity Avatar asked Nov 04 '22 22:11

nonopolarity


1 Answers

Yes it's true. Core Animation does 3D animation of 2D objects (layers). You can simulate thickness by building a complex assembly of objects, where you add layers for the edges of your object, but it's a pain.

OpenGL is a much better platform for doing 3D.

like image 127
Duncan C Avatar answered Nov 12 '22 22:11

Duncan C