开发者

Cubic panorama projection with Core Animation. Is it possible?

I'm trying to build a native viewer for cubic panoramas. Here is a web version of what I would like to achieve: http://www.apple.com/html5/showcase/vr/

This type of projection works as follows: The panorama consists of 6 square images which are projected on the inner surface of a cube. The camera is positioned in the center of the cube.

Currently, I'm using 6 CALayers and arrange them in 3D space so that they form a cube. Rotating them works fine using CATransform3DMakeTranslation etc.

The problem is that CALayers are not transparent when seen from behind (they show the same image as the front side). This sucks, because the user can't see the projecti开发者_如何转开发ons inside the cube because the view is blocked by other layers of the cube.

Is there a solution for this problem? I could think of the following: a.) Maybe there's a setting in Core Animation to make layers transparent when viewed from behind? b.) Continuously track the current view direction and manually set the CALayers hidden which would block the view.

What would be the best solution to solve this?


You can simply try setting the doubleSided property to NO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜