Book Image

Microsoft HoloLens By Example

By : Joshua Newnham
Book Image

Microsoft HoloLens By Example

By: Joshua Newnham

Overview of this book

Are you a developer who is fascinated with Microsoft HoloLens and its capabilities? Do you want to learn the intricacies of working with the HoloLens SDK and create your own apps? If so, this is the book for you. This book introduces and demystifies the HoloLens platform and introduces new ways you can interact with computers (Mixed Reality). It will teach you the important concepts, get you excited about the possibilities, and give you the tools to continue exploring and experimenting. You will go through the journey of creating four independent examples throughout the book, two using DirectX and two using Unity. You will learn to implement spatial mapping and gesture control, incorporate spatial sound, and work with different types of input and gaze. You will also learn to use the Unity 5 SDK for HoloLens and create apps with it. Collectively, the apps explore the major concepts of HoloLens, but each app is independent, giving you the flexibility to choose where to start (and end).
Table of Contents (16 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
6
Interacting with Holograms Using Unity

Procedurally placing our bin


In the previous chapter, we had the user explicitly place the bin. This was achieved by having the bin follow the user's gaze, positioning itself on valid surfaces, and setting its position after detecting an air tap from the user. In this chapter, we will bypass the user completely and place the bin automatically.

To be able to place the bin, at a reasonable location, we first need to better understand the environment. Similar to how we interpret the world through objects rather than pixels, essentially we need a way to express the environment in a more meaningful way than the mesh data we receive from the SurfaceObserver to be able to effectively place the bin procedurally, for example, recognizing a surface as being the floor, where bins normally reside. Luckily, HoloToolkit provides us with the necessary tools to achieve this and we will spend the rest of this section, and a significant amount of this chapter, exploring two different approaches. The first...