Within Visual Studio, create a new class called Node in the Content folder. This class acts as our breadcrumb, which is essentially a wrapper around SpatialAnchor. To gain access to SpatialAnchor, we must import the following namespace: Windows.Perception.Spatial. Copy the following snippet to the newly created Node class:
internal class Node{ static int NodeID = 0; public string Name { get; private set; } public Vector3 Position { get; set; } public Vector3 Forward { get; set; } public long Timestamp { get; set; } public SpatialAnchor Anchor { get; set; } public Node(SpatialAnchor anchor, Vector3 position, Vector3 forward) { Name = $"Node_{++Node.NodeID}"; Anchor = anchor; Position = position; Forward = forward; Timestamp = Utils.GetCurrentUnixTimestampMillis(); ...