简体   繁体   English

Pygame 3D:如何以及是否可能?

[英]Pygame 3D: How to and is it possible?

So I want to program a 3d-mesh viewer in pygame, no other 3rd-party modules wanted (panda3d is perfect, but it's very complicated).所以我想在 pygame 中编写一个 3d 网格查看器,不需要其他 3rd 方模块(panda3d 是完美的,但它非常复杂)。 My idea is:我的想法是:

list_of_surfs = {'85 50':'70deg'} #the 85 50 and the dimensions of the 
#side/surf, and 70 deg of rotation to be able to see it, then i would like
#stretch it and scale it for it to seem 3-dimensional.

Any ideas?有任何想法吗? This also doesn't seem to work;这似乎也不起作用; it's too complicated and too time consuming.这太复杂了,太耗时了。 So how can I make a pure-Pygame 3d-mesh viewer?那么如何制作纯 Pygame 3d 网格查看器呢? Any help would be appreciated.任何帮助,将不胜感激。

Pygame doesn't have the ability to do this natively. Pygame 本身没有能力做到这一点。 If you really want this, you'll need to brush up on your trigonometry to map lines from the 3D space to the 2D screen.如果你真的想要这个,你需要复习你的三角函数来将线从 3D 空间映射到 2D 屏幕。 At that point, you'll essentially be re-implementing a 3D engine.那时,您实际上将重新实现 3D 引擎。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM