public void UpdateGuideInfo() { ulong GuideInfo_cPtr = NativeAPI.TrackerManager_getGuideInfo(); if (GuideInfo_cPtr != 0) { progress = NativeAPI.GuideInfo_getInitializingProgress(GuideInfo_cPtr); keyframeCount = NativeAPI.GuideInfo_getKeyframeCount(GuideInfo_cPtr); featureCount = NativeAPI.GuideInfo_getFeatureCount(GuideInfo_cPtr); int tempTagAnchorsLength = NativeAPI.GuideInfo_getTagAnchorsLength(GuideInfo_cPtr); if (featureBuffer == null) { featureBuffer = new float[MAX_VERTICES * 3]; } if (tempTagAnchorsLength != tagAnchorsLength) { tagAnchorsLength = tempTagAnchorsLength; tagAnchorBuffer = new char[tagAnchorsLength]; NativeAPI.GuideInfo_getTagAnchors(GuideInfo_cPtr, tagAnchorBuffer, tagAnchorsLength); String json = tagAnchorBuffer.ToString(); tagAnchors = JsonHelper.FromJson <TagAnchor>(json); } NativeAPI.GuideInfo_getFeatureBuffer(GuideInfo_cPtr, featureBuffer, featureCount * 3); } }
internal void UpdateGuideInfo() { ulong GuideInfo_cPtr = NativeAPI.TrackerManager_getGuideInfo(); if (GuideInfo_cPtr != 0) { progress = NativeAPI.GuideInfo_getInitializingProgress(GuideInfo_cPtr); keyframeCount = NativeAPI.GuideInfo_getKeyframeCount(GuideInfo_cPtr); featureCount = NativeAPI.GuideInfo_getFeatureCount(GuideInfo_cPtr); if (featureBuffer == null) { featureBuffer = new float[MAX_VERTICES * 3]; } NativeAPI.GuideInfo_getFeatureBuffer(GuideInfo_cPtr, featureBuffer, featureCount * 3); } }