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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.