コード例 #1
0
        /// <summary>
        /// Gets the position and orientation of a face region in world space.
        /// </summary>
        /// <param name="region">The face region to query the pose.</param>
        /// <returns>The position and orientation of a face region in world space.</returns>
        public Pose GetRegionPose(AugmentedFaceRegion region)
        {
            if (_IsSessionDestroyed())
            {
                Debug.LogError("GetRegionPose: Trying to access a session that has already been destroyed.");
                return(new Pose());
            }

            return(m_NativeSession.AugmentedFaceApi.GetRegionPose(m_TrackableNativeHandle, (ApiAugmentedFaceRegionType)region));
        }
コード例 #2
0
        public Vector3 GetFaceRegionPosition(AugmentedFaceRegion region)
        {
            Vector3 pos = new Vector3();

            if (m_AugmentedFace.TrackingState == TrackingState.Tracking)
            {
                Pose pose = m_AugmentedFace.GetRegionPose(region);
                pos = pose.position;
            }

            return(pos);
        }