Book Image

Microsoft HoloLens Developer???s Guide

By : Dennis Vroegop
Book Image

Microsoft HoloLens Developer???s Guide

By: Dennis Vroegop

Overview of this book

HoloLens, Microsoft’s innovative augmented reality headset, overlaps holograms into a user’s vision of their environment. Your ideas are closer to becoming real when you can create and work with holograms in relation to the world around you. If you are dreaming beyond virtual worlds, beyond screens, beyond pixels, and want to take a big leap in the world of augmented reality, then this is the book you want. Starting off with brainstorming and the design process, you will take your first steps in creating your application for HoloLens. You will learn to add gestures and write an app that responds to verbal commands before gradually moving on creating sounds in the app and placing them in a 3D space. You will then communicate between devices in the boundaries of the UWP model.
Table of Contents (16 chapters)
Title Page
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Events


Looking at things is pretty nice, showing the cursor when the user looks at something they can use even better. However, the system would be quite useless if we could not command the app to do something with objects. We need to use gestures.

The HoloLens currently only supports one gesture. It recognizes the tap gesture. In chapter 6, Take a Look Around You, we will delve into this more and use the different gestures to move our instruments across the stage, but we need to set things up here to delay some groundwork.

Gestures in DirectX

Take a look at our GazeSampleDirectX project and the main class GazeSampleDirectXMain. In here, you will find the spatialInputHandler field of the SpatialInputHandler type. This class is part of the template and thus not a part of the framework. Open this file and take a look at it:

public class SpatialInputHandler 
{ 
    private SpatialInteractionManager interactionManager; 
    private SpatialInteractionSourceState sourceState; 
    public SpatialInputHandler...