unsafe public AnchorRelevance[] GetSupportRelevances() { int numSupports = FrozenWorld_GetNumSupports(); checkError(); var res = new AnchorRelevance[numSupports]; if (numSupports > 0) { FrozenWorld_Support *fws = stackalloc FrozenWorld_Support[numSupports]; numSupports = FrozenWorld_GetSupports(numSupports, fws); checkError(); for (int i = 0; i < numSupports; i++) { Debug.Assert(FtoU(fws[i].attachmentPoint.locationFromAnchor).Equals(Vector3.zero), "delocalized support not yet implemented"); var anchorId = (AnchorId)fws[i].attachmentPoint.anchorId; Debug.Assert(!Array.Exists(res, x => x.anchorId == anchorId), "multiple supports per anchor not yet implemented"); res[i] = new AnchorRelevance() { anchorId = anchorId, relevance = fws[i].relevance }; } } return(res); }
unsafe public AnchorRelevance[] GetSupportRelevances() { int numSupports = frozenAnchors.Count; var res = new AnchorRelevance[numSupports]; for (int i = 0; i < res.Length; ++i) { res[i] = new AnchorRelevance() { anchorId = frozenAnchors[i].anchorPose.anchorId, relevance = frozenAnchors[i].relevance }; } return(res); }