// MIT License - Copyright (c) 2026 wallstop
// Full license text: https://github.com/wallstop/unity-helpers/blob/main/LICENSE
namespace WallstopStudios.UnityHelpers.Editor.Sprites
{
#if UNITY_EDITOR
using System;
///
/// Specifies the algorithm used for automatic sprite grid detection.
///
public enum AutoDetectionAlgorithm
{
///
/// Obsolete value. Use for intelligent algorithm selection.
///
[Obsolete("Use AutoBest for intelligent algorithm selection.")]
None = 0,
///
/// Automatically selects the best algorithm based on confidence scoring.
/// Uses lazy evaluation: runs algorithms in order of speed until one exceeds 70% confidence.
///
AutoBest = 1,
///
/// Simple uniform grid division based on expected sprite count.
/// Divides texture evenly into rows and columns. Requires expectedSpriteCount to be set.
///
UniformGrid = 2,
///
/// Analyzes transparent pixel boundaries to detect grid lines.
/// Scores candidate cell sizes by transparency percentage along grid boundaries.
///
BoundaryScoring = 3,
///
/// Detects individual sprites via flood-fill, computes centroids,
/// and infers grid dimensions from spacing patterns.
///
ClusterCentroid = 4,
///
/// Computes a distance transform from alpha boundaries and finds local maxima
/// to identify sprite centers. Infers grid from peak spacing.
///
DistanceTransform = 5,
///
/// Seeds from local intensity maxima and grows regions via 4-connected flood-fill
/// to alpha boundaries. Infers grid from region size uniformity.
///
RegionGrowing = 6,
}
#endif
}