Positioning our label

Before jumping into the code, let's review what we will be doing over the next few blocks of code. As we saw earlier in the FrameGrabbers SetFrame method; the MediaFrameReference contains reference to a SpatialCoordinateSystem. As we discussed previously, the SpatialCoordinateSystem is a representation of a coordinate system that can be used to reason about the user's surroundings. Each SpatialCoordinateSystem has a relationship with other coordinate systems, which means that given the user's current coordinate system, we can work out where the frame is relative to the user's current position. We make use of this to determine where to place the label, which is the work of this section.

Jump back into the ProcessFrame ...

Get Microsoft HoloLens By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.