using System;
using UnityEngine;

namespace FishROV.AvoidanceBenchmark
{
    public enum AvoidanceFrameworkKind
    {
        NoAvoidance = 0,
        Rvo2 = 1,
        SamplingLocal = 2
    }

    public enum AvoidanceScenarioKind
    {
        FreeSwim = 0,
        CrossFlow = 1,
        NarrowPassage = 2,
        DenseCircleStress = 3
    }

    public enum AvoidanceDimensionMode
    {
        XZ2D = 0,
        XZ25D = 1,
        XYZ3D = 2
    }

    public enum BenchmarkViewMode
    {
        Overview = 0,
        TopDown = 1,
        Side = 2,
        FollowSchool = 3
    }

    public enum BenchmarkAgentRole
    {
        Fish = 0,
        SchoolProxy = 1,
        Obstacle = 2
    }

    [Serializable]
    public struct BenchmarkAgentSpawnInfo
    {
        public Vector3 Position;
        public float Radius;
        public float Height;
        public float MaxSpeed;
        public int Layer;
        public int CollidesWith;
        public float Priority;
        public bool IsKinematicObstacle;
        public BenchmarkAgentRole Role;
        public int GroupId;
    }

    [Serializable]
    public sealed class AvoidanceBenchmarkConfig
    {
        public AvoidanceFrameworkKind Framework = AvoidanceFrameworkKind.NoAvoidance;
        public AvoidanceScenarioKind Scenario = AvoidanceScenarioKind.FreeSwim;
        public AvoidanceDimensionMode DimensionMode = AvoidanceDimensionMode.XZ25D;
        public int FishCount = 300;
        public int SchoolCount = 1;
        public float ArenaRadius = 28f;
        public float FishRadius = 0.35f;
        public float FishSpeed = 2.4f;
        public int MaxNeighbours = 8;
        public int RandomSeed = 13999;
        public bool UseSchoolProxy = false;

        public AvoidanceBenchmarkConfig Clone()
        {
            return (AvoidanceBenchmarkConfig)MemberwiseClone();
        }
    }
}
