public static ApiPose GetAnchorPose( IntPtr sessionHandle, IntPtr anchorHandle) { IntPtr poseHandle = PoseApi.Create(sessionHandle); ExternApi.ArAnchor_getPose(sessionHandle, anchorHandle, poseHandle); ApiPose apiPose = PoseApi.ExtractPoseValue(sessionHandle, poseHandle); PoseApi.Destroy(poseHandle); return(apiPose); }
public static FeatureMapQuality EstimateFeatureMapQualityForHosting( IntPtr sessionHandle, Pose pose) { IntPtr poseHandle = PoseApi.Create(sessionHandle, pose); int featureMapQuality = (int)FeatureMapQuality.Insufficient; var status = ExternApi.ArSession_estimateFeatureMapQualityForHosting( sessionHandle, poseHandle, ref featureMapQuality); PoseApi.Destroy(poseHandle); if (status != ApiArStatus.Success) { Debug.LogErrorFormat("Failed to estimate feature map quality with status '{0}'.", status); } return((FeatureMapQuality)featureMapQuality); }
public static FeatureMapQuality EstimateFeatureMapQualityForHosting( IntPtr sessionHandle, Pose pose) { #if UNITY_EDITOR if (Application.isEditor) { return(ARCoreCloudAnchorsEditorDelegate.Instance.EstimateFeatureMapQualityForHosting(sessionHandle, pose)); } #endif int featureMapQuality = (int)FeatureMapQuality.Insufficient; #if !UNITY_IOS || CLOUDANCHOR_IOS_SUPPORT IntPtr poseHandle = PoseApi.Create(sessionHandle, pose); var status = ExternApi.ArSession_estimateFeatureMapQualityForHosting( sessionHandle, poseHandle, ref featureMapQuality); PoseApi.Destroy(poseHandle); if (status != ApiArStatus.Success) { Debug.LogErrorFormat("Failed to estimate feature map quality with status '{0}'.", status); } #endif return((FeatureMapQuality)featureMapQuality); }