更新时间:2021-07-16 10:54:32
coverpage
Cardboard VR Projects for Android
Credits
About the Authors
About the Reviewers
www.PacktPub.com
eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Virtual Reality for Everyone
Why is it called Cardboard?
The spectrum of VR devices
A gateway to VR
The value of low-end VR
Cardware!
Configuring your Cardboard viewer
Developing apps for Cardboard
An overview to VR best practices
Summary
Chapter 2. The Skeleton Cardboard Project
What's in an Android app?
The Android project structure
Getting started with Android Studio
Creating a new Cardboard project
Adding the Cardboard Java SDK
The AndroidManifest.xml file
The activity_main.xml file
The MainActivity class
Chapter 3. Cardboard Box
Creating a new project
Hello triangle!
3D camera perspective and head rotation
Repositioning the triangle
Hello cube!
Lighting and shading
Spinning the cube
Hello floor!
Hey look at this!
Chapter 4. Launcher Lobby
Adding Hello Virtual World text overlay
Using a virtual screen
Responding to head look
Adding an icon to the view
Listing installed Cardboard apps
Highlighting the current shortcut
Using the trigger to pick and launch the app
Further enhancements
Chapter 5. RenderBox Engine
Introducing RenderBox – a graphics engine
Materials textures and shaders
The Math package
The Transform class
The Component class
The RenderObject component
The Cube RenderObject component
Vertex color material and shaders
The Camera component
RenderBox methods
A simple box scene
Cube with face normals
The Light component
Vertex color lighting material and shaders
Time for animation
Detect looking at objects
Exporting the RenderBox package
Chapter 6. Solar System
Setting up a new project
Creating a Sphere component
A solid color lighted sphere
Adding the Earth texture material
Day and night material
Creating the Sun
Creating a Planet class
Formation of the Solar System
A starry sky dome
Fine tuning the Earth
Changing the camera location
Possible enhancements
Updating the RenderBox library
Chapter 7. 360-Degree Gallery
Setting up the new project
Viewing a 360-degree photo
Viewing a regular photo
Putting a border frame on the image
Loading and displaying a photo image
Loading and displaying a photosphere image
The image gallery user interface
Displaying thumbnails in a grid