48 lines
1.9 KiB
C#
48 lines
1.9 KiB
C#
// Copyright (c) Microsoft Corporation.
|
||
// Licensed under the MIT License.
|
||
|
||
using Microsoft.MixedReality.Toolkit.CameraSystem;
|
||
using UnityEngine;
|
||
|
||
namespace Microsoft.MixedReality.Toolkit.Experimental.UnityAR
|
||
{
|
||
/// <summary>
|
||
/// Configuration profile for the XR camera settings provider.
|
||
/// </summary>
|
||
[CreateAssetMenu(menuName = "Mixed Reality/Toolkit/Providers/Unity AR/Unity AR Foundation Camera Settings Profile", fileName = "DefaultUnityARCameraSettingsProfile", order = 100)]
|
||
[MixedRealityServiceProfile(typeof(UnityARCameraSettings))]
|
||
public class UnityARCameraSettingsProfile : BaseCameraSettingsProfile
|
||
{
|
||
#region Tracked Pose Driver settings
|
||
|
||
[SerializeField]
|
||
[Tooltip("The portion of the device (ex: color camera) from which to read the pose.")]
|
||
private ArTrackedPose poseSource = ArTrackedPose.ColorCamera;
|
||
|
||
/// <summary>
|
||
/// The portion of the device (ex: color camera) from which to read the pose.
|
||
/// </summary>
|
||
public ArTrackedPose PoseSource => poseSource;
|
||
|
||
[SerializeField]
|
||
[Tooltip("The type of tracking (position and/or rotation) to apply.")]
|
||
private ArTrackingType trackingType = ArTrackingType.RotationAndPosition;
|
||
|
||
/// <summary>
|
||
/// The type of tracking (position and/or rotation) to apply.
|
||
/// </summary>
|
||
public ArTrackingType TrackingType => trackingType;
|
||
|
||
[SerializeField]
|
||
[Tooltip("Specifies when (during Update and/or just before rendering) to update the tracking of the pose.")]
|
||
private ArUpdateType updateType = ArUpdateType.UpdateAndBeforeRender;
|
||
|
||
/// <summary>
|
||
/// Specifies when (during Update and/or just before rendering) to update the tracking of the pose.
|
||
/// </summary>
|
||
public ArUpdateType UpdateType => updateType;
|
||
|
||
#endregion Tracked Pose Driver settings
|
||
}
|
||
}
|