コード例 #1
0
ファイル: AnchorApi.cs プロジェクト: Oskiii/Junction19
        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);
        }
コード例 #2
0
ファイル: SessionApi.cs プロジェクト: Jam3/arlabs-doodads
        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);
        }
コード例 #3
0
        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);
        }