如何在我的iPhone应用程序中从6张图像制作3-D立方体?

时间:2022-04-09 00:30:18

I'm new to iPhone programming. I have 6 PNGs that represent all sides of my classroom from the inside. I would like to make them into a single 3-D cube that you would view from the inside, with the ability to look around this cube by moving your finger.

我是iPhone编程的新手。我有6个PNG,从内部代表我教室的各个方面。我想把它们变成一个你可以从里面看到的三维立方体,能够通过移动手指环顾这个立方体。

How would I go about implementing something like this? I found Core Animation's CATransform3D and a little about textures in OpenGL, but I'm not sure what to use for my case.

我将如何实现这样的事情?我在OpenGL中找到了Core Animation的CATransform3D以及一些关于纹理的内容,但我不确定在我的情况下使用什么。

2 个解决方案

#1


4  

You're looking for something called a Skybox. The coding for this is well understood and you shouldn't have any difficulty finding example OpenGL code to use. Here is as good a place to start as any, but just Google 'OpenGL Skybox' for lots of examples.

你正在寻找一个叫做Skybox的东西。对此的编码很好理解,您在查找要使用的示例OpenGL代码时应该没有任何困难。这里有一个很好的起点,但只有谷歌的“OpenGL Skybox”有很多例子。

#2


2  

This is a pretty arbitrary question but I think I can help, Pangea software has some tools to help do this and some other information related to it:

这是一个非常武断的问题,但我想我可以提供帮助,Pangea软件有一些工具可以帮助完成这个以及与之相关的其他一些信息:

http://www.pangeasoft.net/pano/index.html

The owner is a pretty nice guy and can probably help you out with some integration or source code.

拥有者是一个非常好的人,可以帮助你解决一些集成或源代码。

#1


4  

You're looking for something called a Skybox. The coding for this is well understood and you shouldn't have any difficulty finding example OpenGL code to use. Here is as good a place to start as any, but just Google 'OpenGL Skybox' for lots of examples.

你正在寻找一个叫做Skybox的东西。对此的编码很好理解,您在查找要使用的示例OpenGL代码时应该没有任何困难。这里有一个很好的起点,但只有谷歌的“OpenGL Skybox”有很多例子。

#2


2  

This is a pretty arbitrary question but I think I can help, Pangea software has some tools to help do this and some other information related to it:

这是一个非常武断的问题,但我想我可以提供帮助,Pangea软件有一些工具可以帮助完成这个以及与之相关的其他一些信息:

http://www.pangeasoft.net/pano/index.html

The owner is a pretty nice guy and can probably help you out with some integration or source code.

拥有者是一个非常好的人,可以帮助你解决一些集成或源代码。