// Copyright HTC Corporation All Rights Reserved.
using UnityEngine;
using VIVE.OpenXR.Toolkits.Spectator.Helper;
namespace VIVE.OpenXR.Toolkits.Spectator
{
///
/// Name: ISpectatorCameraSetting.cs
/// Role: Contract
/// Responsibility: Define the setting attribute of the spectator camera.
///
public interface ISpectatorCameraSetting
{
#region Property
///
/// The struct UnityEngine.LayerMask defines which layer the camera can see or not.
///
LayerMask LayerMask { get; set; }
///
/// Whether or not to enable the feature of smoothing the spectator camera movement.
///
bool IsSmoothCameraMovement { get; set; }
///
/// The speed factor to control the smoothing impact.
///
int SmoothCameraMovementSpeed { get; set; }
///
/// True if visualize the spectator camera vertical FOV.
///
bool IsFrustumShowed { get; set; }
///
/// The spectator camera vertical FOV.
///
float VerticalFov { get; set; }
///
/// The panorama image resolution.
///
SpectatorCameraHelper.SpectatorCameraPanoramaResolution PanoramaResolution { get; set; }
///
/// The panorama image output format.
///
TextureProcessHelper.PictureOutputFormat PanoramaOutputFormat { get; set; }
///
/// The panorama types.
///
TextureProcessHelper.PanoramaType PanoramaOutputType { get; set; }
///
/// How many frustum lines will be shown?
///
SpectatorCameraHelper.FrustumLineCount FrustumLineCount { get; set; }
///
/// How many frustum center lines will be shown?
///
SpectatorCameraHelper.FrustumCenterLineCount FrustumCenterLineCount { get; set; }
///
/// Frustum line width.
///
float FrustumLineWidth { get; set; }
///
/// Frustum center line width.
///
float FrustumCenterLineWidth { get; set; }
///
/// Frustum line color.
///
Color FrustumLineColor { get; set; }
///
/// Frustum center line color.
///
Color FrustumCenterLineColor { get; set; }
#endregion
#region Function
///
/// Reset the spectator camera setting to the default value.
///
void ResetSetting();
///
/// Export the current spectator camera setting as a JSON file and then save it to the resource folder or persistent folder.
///
/// The enum SpectatorCameraHelper.AttributeFileLocation.
void ExportSetting2JsonFile(in SpectatorCameraHelper.AttributeFileLocation attributeFileLocation);
///
/// Load the setting (JSON) file via input full file path.
///
/// The setting file’s full path (including file name and JSON extension).
void LoadSettingFromJsonFile(in string jsonFilePath);
///
/// Load the setting (JSON) file via input scene name, GameObject (hmd) name, and the file location (resource folder or persistent folder).
///
/// The scene name.
/// The GameObject name.
/// The enum SpectatorCameraHelper.AttributeFileLocation.
void LoadSettingFromJsonFile(
in string sceneName,
in string gameObjectName,
in SpectatorCameraHelper.AttributeFileLocation attributeFileLocation);
///
/// Apply the spectator camera setting to the current component.
///
/// The data you want to apply.
void ApplyData(in SpectatorCameraHelper.SpectatorCameraAttribute data);
#endregion
}
}