using System;
namespace UnityEngine.XR.MagicLeap
{
public partial class MLMarkerTracker
{
[Serializable]
public struct TrackerSettings
{
public bool EnableMarkerScanning;
public MarkerType MarkerTypes;
public ArucoDictionaryName ArucoDicitonary;
public float ArucoMarkerSize;
public float QRCodeSize;
public Profile TrackerProfile;
public CustomProfile CustomTrackerProfile;
internal TrackerSettings(bool enableMarkerScanning, MarkerType markerTypes, float qRCodeSize, ArucoDictionaryName arucoDicitonary, float arucoMarkerSize, Profile profile, CustomProfile customProfile)
{
EnableMarkerScanning = enableMarkerScanning;
ArucoDicitonary = arucoDicitonary;
ArucoMarkerSize = arucoMarkerSize;
QRCodeSize = qRCodeSize;
MarkerTypes = markerTypes;
TrackerProfile = profile;
CustomTrackerProfile = customProfile;
}
public static TrackerSettings Create(bool enableMarkerScanning = false, MarkerType markerTypes = MarkerType.None, float qRCodeSize = 0.1f, ArucoDictionaryName arucoDicitonary = ArucoDictionaryName.DICT_5X5_100, float arucoMarkerSize = 0.1f, Profile profile = Profile.Default, CustomProfile customProfile = default) =>
new TrackerSettings(enableMarkerScanning, markerTypes, qRCodeSize, arucoDicitonary, arucoMarkerSize, profile, customProfile);
public override string ToString() => $" {this.EnableMarkerScanning}, {this.MarkerTypes}, {this.ArucoDicitonary}, {this.QRCodeSize}, {this.ArucoMarkerSize}, {this.TrackerProfile}, {this.CustomTrackerProfile}";
[Serializable]
public struct CustomProfile
{
public FPSHint FPSHint;
public ResolutionHint ResolutionHint;
public CameraHint CameraHint;
public FullAnalysisIntervalHint FullAnalysisIntervalHint;
public CornerRefineMethod CornerRefineMethod;
public bool UseEdgeRefinement;
internal CustomProfile(FPSHint fpsHint, ResolutionHint resolutionHint, CameraHint cameraHint, FullAnalysisIntervalHint fullAnalysisIntervalHint, CornerRefineMethod cornerRefineMethod, bool useEdgeRefinement)
{
FPSHint = fpsHint;
ResolutionHint = resolutionHint;
CameraHint = cameraHint;
FullAnalysisIntervalHint = fullAnalysisIntervalHint;
CornerRefineMethod = cornerRefineMethod;
UseEdgeRefinement = useEdgeRefinement;
}
public static CustomProfile Create(FPSHint fpsHint = FPSHint.Medium, ResolutionHint resolutionHint = ResolutionHint.Low, CameraHint cameraHint = CameraHint.RGB, FullAnalysisIntervalHint fullAnalysisIntervalHint = FullAnalysisIntervalHint.Medium, CornerRefineMethod cornerRefineMethod = CornerRefineMethod.None, bool useEdgeRefinement = false) =>
new CustomProfile(fpsHint, resolutionHint, cameraHint, fullAnalysisIntervalHint, cornerRefineMethod, useEdgeRefinement);
public override string ToString() => $"{this.FPSHint}, {this.ResolutionHint}, {this.CameraHint}, {this.FullAnalysisIntervalHint}, {this.CornerRefineMethod}, {this.UseEdgeRefinement}";
}
}
}
}