简体   繁体   English

Android OpenGL和Meters的翻译

[英]Android OpenGL and Translation from Meters

I've been working with Android and OpenGL 2. I've been able to render objects in 3D space, and now I'm looking to work more towards AR. 我一直在使用Android和OpenGL2。我已经能够在3D空间中渲染对象,现在我希望在AR方面做更多的工作。 I want to be able to try to place objects relative to my current position, as if seeing it through my phone's display. 我希望能够尝试相对于当前位置放置对象,就像通过手机显示屏看到它一样。 I've been looking for resources on trying to map distances (in meters) so that it maps to what I'm rendering. 我一直在寻找尝试绘制距离(以米为单位)的资源,以便将其映射到我正在渲染的内容。 (ex. I want to render something that looks to be 10m away from me directly facing forward, or 6m above me) I'm sure there isn't a simple solution and I haven't been able to find solid resources. (例如,我要渲染的东西看起来像是与我直接面对面相距10m或比我高6m的位置),我确定没有一个简单的解决方案,而且我还没有找到可靠的资源。 Any recommendations on what I need to accomplish what I'm setting out to do? 关于我要完成的工作有什么建议吗? (At least to get started. I can elaborate if needed.) (至少开始使用。如果需要,我可以详细说明。)

You have to choose the scale of your virtual world yourself. 您必须自己选择虚拟世界的规模。 You are absolutely free to choose whatever value you want. 您绝对可以自由选择想要的任何值。 Ie 1.0 OpenGL unit is equal to 1.0 meter. 即1.0 OpenGL单位等于1.0米。 But keep in mind that you will have to design and texture your 3D models accordingly, so they look realistic in this scale. 但是请记住,您将必须相应地设计和构造3D模型,因此它们在此比例下看起来很逼真。

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

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