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

Mapping our environment


In the previous chapter, we took two routes; the first using low-level APIs and the second simplifying the process by using the SpatialMappingCollider and SpatialMappingRender components. HoloToolkit simplifies this further. To add spatial mapping, we simply drag the SpatialMapping prefab onto the scene. Let's add this now; from the Project panel, enter SpatialMapping into the search bar. One of the results will be the prefab. Drag this one onto the Hierarchy panel to have it added to your scene, as shown:

The properties should look familiar to you as they, are intentionally, similar to what we implemented in the previous chapter. Spatial Mapping Observer and Spatial Mapping Manager are responsible for both scanning and, optionally, making surfaces visible but unlike our implementation, it uses an axis aligned box for its bounding volume, and as opposed to sphere, this uses the property Extends to determine the volume. There is an additional component attached to the...