virtual reality(虚拟现实)

本文介绍了虚拟现实(VR)的概念,并详细阐述如何搭建VR开发环境,包括创建assets文件夹存放全景图,调整内存权限,修改Gradle文件以及清单文件设置。在项目中导入必要的库文件并验证其成功导入,最后展示了在XML布局和MainActivity中添加代码的步骤,以实现VR功能。
摘要由CSDN通过智能技术生成

概念:虚拟实境(英语:virtual reality,缩写为VR),简称虚拟技术 , 是利用电脑模拟产生一个三维空间的虚拟世界,提供用户关于视觉等感官的模拟,让用户感觉仿佛身历其境,可以及时、没有限制地观察三维空间内的事物。
功能:增加虚拟现实

1.0 搭建VR开发环境,添加资源,修改Gradle,清单文件等
在main 文件下新建一个asstes 文件夹,中存放VR全景图
这里写图片描述
因为使用VR的资源很消耗内存,为了避免OOM(OutOfMemory)的问题,要把警报权限提高,从192提到512
故 要在清单文件下加一段下列代码:

android:largeHeap="true"

这里写图片描述
修改Gradle文件:该项目中做的是全景图,故在全景图的文件中修改相对应的grandle文件
这里写图片描述
在自己的项目中grandle文件中添加:下面一段代码

compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'

导入库文件:目的是使用VR里的方法和控件
选择你需要的库文件,不要都导进去,否则会导致APK的容量过大;
复制其路径,以moudle的形式导进项目中 如下:
这里写图片描述
注意此项目的API版本为19 如不是则修改成19或19以上 如下
这里写图片描述

关联库文件 shift+ctrl+alt+s

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The book is growing out of material for an overwhelmingly popular undergraduate course on VR that I introduced at the University of Illinois in 2015 (with hardware support from Oculus/Facebook). I have never in my life seen students so excited to take a course. We cannot offer enough slots to come even close to meeting the demand. Therefore, the primary target of this book is undergraduate students around the world. This book would be an ideal source for starting similar VR courses at other universities. Although most of the interested students have been computer scientists, the course at Illinois has attracted students from many disciplines, such as psychology, music, kinesiology, engineering, medicine, and economics. Students in these other fields come with the most exciting project ideas because they can see how VR has the potential to radically alter their discipline. To make the course accessible to students with such diverse backgrounds, I have made the material as self-contained as possible. There is no assumed background in software development or advanced mathematics. If prospective readers have at least written some scripts before and can remember how to multiply matrices together, they should be ready to go. In addition to use by students who are studying VR in university courses, it is also targeted at developers in industry, hobbyists on the forums, and researchers in academia. The book appears online so that it may serve as a convenient references for all of these groups. To provide further assistance, there are also accompanying materials online, including lecture slides (prepared by Anna Yershova) and recorded lectures (provided online for free by NPTEL of India).
This is the eBook of the printed book and may not include any media, website access codes, or print supplements that may come packaged with the bound book. “With his YouTube channel, Mitch’s VR Lab, Mitch has helped thousands of people understand the foundations of locomotion and interaction mechanics with clear and concise UE4 videos. I’m thrilled that he has taken the time to bring all his knowledge and experience in working with Unreal Engine and Virtual Reality to the Unreal? Engine VR Cookbook…. Mitch is uniquely qualified to share this book with the world.” —Luis Cataldi, Unreal Engine Education, Epic Games, Inc. For game developers and visualization specialists, VR is the next amazing frontier to conquer—and Unreal Engine 4 is the ideal platform to conquer it with. Unreal ? Engine VR Cookbook is your complete, authoritative guide to building stunning experiences on any Unreal Engine 4-compatible VR hardware. Renowned VR developer and instructor Mitch McCaffrey brings together best practices, common interaction paradigms, specific guidance on implementing these paradigms in Unreal Engine, and practical guidance on choosing the right approaches for your project. McCaffrey’s tested “recipes” contain step-by-step instructions, while empowering you with concise explanations of the underlying theory and math. Whether you’re creating first-person shooters or relaxation simulators, the techniques McCaffrey explains help you get immediate results, as you gain “big picture” knowledge and master nuances that will help you succeed with any genre or project. Understand basic VR concepts and terminology Implement VR logic with Blueprint visual scripting Create basic VR projects with Oculus Rift, HTC Vive, Gear VR, Google VR, PSVR, and other environments Recognize and manage differences between seated and standing VR experiences Set up trace interactions and teleportation Work with UMG and 2D UIs Implement character inverse kinematics (IK) for head and hands Define ef

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值