Summary

In this chapter, we built the LauncherLobby app, which can be used to launch other Cardboard apps on your device. Rather than using 3D graphics and OpenGL, we implemented this using Android GUI and a virtual cylindrical screen.

The first part of the implementation was largely instructional: how to add a TextView overlay, center it in the view group, and then display it stereoscopically with left/right eye parallax views. Then, we determined the size of the virtual screen, an unraveled cylinder, based on the current physical device size and the current Cardboard device field of view parameters. Objects are scrolled on the virtual screen as the user moves his head left and right (yaw rotation). Finally, we queried the Android device for installed Cardboard apps, displayed their icons and titles in a horizontal menu, and allowed you to pick one to launch by gazing at it and clicking on the trigger.

In the next chapter, we go back to 3D graphics and OpenGL. This time, we're building a software abstraction layer that helps encapsulate much of the lower level details and housekeeping. This engine will be reusable for other projects in this book as well.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset