Пример #1
0
        private void ReadProfile()
        {
            if (SettingsProfile == null)
            {
                Debug.LogWarning("A profile was not specified for the Unity AR Camera Settings provider.\nUsing Microsoft Mixed Reality Toolkit default options.");
                return;
            }

            poseSource   = SettingsProfile.PoseSource;
            trackingType = SettingsProfile.TrackingType;
            updateType   = SettingsProfile.UpdateType;
        }
Пример #2
0
        /// <summary>
        /// Converts from an <see cref="ArTrackingType"/> to a Unity tracking type value.
        /// </summary>
        /// <param name="trackingType">Value to convert.</param>
        /// <returns>
        /// Unity tracking type equivalent of the <see cref="ArTrackingType"/>.
        /// </returns>
        public static TrackedPoseDriver.TrackingType ToUnityTrackingType(ArTrackingType trackingType)
        {
            switch (trackingType)
            {
            case ArTrackingType.Position:
                return(TrackedPoseDriver.TrackingType.PositionOnly);

            case ArTrackingType.Rotation:
                return(TrackedPoseDriver.TrackingType.RotationOnly);

            case ArTrackingType.RotationAndPosition:
                return(TrackedPoseDriver.TrackingType.RotationAndPosition);

            default:
                // Unknown type, pass the value through.
                return((TrackedPoseDriver.TrackingType)((int)trackingType));
            }
        }