Beispiel #1
0
 public static bool FromSpatialNode(Guid spatialNodeGuid, out Pose pose, SpatialNodeType spatialNodeType = SpatialNodeType.Static, long qpcTime = 0)
 => NativeAPI.world_try_from_spatial_graph(spatialNodeGuid.ToByteArray(), spatialNodeType == SpatialNodeType.Dynamic ? 1 : 0, qpcTime, out pose) > 0;
Beispiel #2
0
 /// <summary>Converts a Windows Mirage spatial node GUID into a Pose
 /// based on its current position and rotation! Check
 /// SK.System.spatialBridgePresent to see if this is available to
 /// use. Currently only on HoloLens, good for use with the Windows
 /// QR code package.</summary>
 /// <param name="spatialNodeGuid">A Windows Mirage spatial node GUID
 /// aquired from a windows MR API call.</param>
 /// <param name="spatialNodeType">Type of spatial node to locate.</param>
 /// <param name="qpcTime">A windows performance counter timestamp at
 /// which the node should be located, obtained from another API or
 /// with System.Diagnostics.Stopwatch.GetTimestamp().</param>
 /// <returns>A Pose representing the current orientation of the
 /// spatial node.</returns>
 public static Pose FromSpatialNode(Guid spatialNodeGuid, SpatialNodeType spatialNodeType = SpatialNodeType.Static, long qpcTime = 0)
 => NativeAPI.world_from_spatial_graph(spatialNodeGuid.ToByteArray(), spatialNodeType == SpatialNodeType.Dynamic ? 1 : 0, qpcTime);