| | | 1 | | using System.Collections.Generic; |
| | | 2 | | using CounterDrone.Core.Models; |
| | | 3 | | |
| | | 4 | | namespace CounterDrone.Core.Algorithms |
| | | 5 | | { |
| | | 6 | | /// <summary>威胁画像 — 防御推荐算法的输入</summary> |
| | | 7 | | public class ThreatProfile |
| | | 8 | | { |
| | | 9 | | public CombatScene Environment { get; set; } = new(); |
| | | 10 | | public List<TargetConfig> Targets { get; set; } = new(); |
| | | 11 | | public RoutePlan Route { get; set; } = new(); |
| | | 12 | | public List<Waypoint> Waypoints { get; set; } = new(); |
| | | 13 | | public List<ControlZone> ControlZones { get; set; } = new(); |
| | | 14 | | } |
| | | 15 | | |
| | | 16 | | /// <summary>防御推荐方案</summary> |
| | | 17 | | public class DefenseRecommendation |
| | | 18 | | { |
| | | 19 | | public DefenseSolution Best { get; set; } = new(); |
| | | 20 | | public DefenseSolution Critical { get; set; } = new(); |
| | | 21 | | } |
| | | 22 | | |
| | | 23 | | /// <summary>单套防御方案</summary> |
| | | 24 | | public class DefenseSolution |
| | | 25 | | { |
| | | 26 | | public AerosolType RecommendedAerosolType { get; set; } |
| | | 27 | | public string AerosolRationale { get; set; } = string.Empty; |
| | | 28 | | public CloudDispersal RecommendedCloud { get; set; } = new(); |
| | | 29 | | /// <summary>多轮次云团列表(含主云团)</summary> |
| | | 30 | | public List<CloudDispersal> CloudSalvo { get; set; } = new(); |
| | | 31 | | |
| | | 32 | | public List<RecommendedPlatform> Platforms { get; set; } = new(); |
| | | 33 | | public List<RecommendedDetection> Detections { get; set; } = new(); |
| | | 34 | | |
| | | 35 | | public float InterceptProbability { get; set; } |
| | | 36 | | public string SummaryRationale { get; set; } = string.Empty; |
| | | 37 | | } |
| | | 38 | | |
| | | 39 | | public class RecommendedPlatform |
| | | 40 | | { |
| | | 41 | | public PlatformType Type { get; set; } |
| | | 42 | | public Vector3 Position { get; set; } |
| | | 43 | | public int Quantity { get; set; } |
| | | 44 | | public int MunitionCount { get; set; } |
| | | 45 | | public float CoverageVolume { get; set; } |
| | | 46 | | public float Cooldown { get; set; } = 5f; |
| | | 47 | | public float MuzzleVelocity { get; set; } = 800f; |
| | | 48 | | } |
| | | 49 | | |
| | | 50 | | public class RecommendedDetection |
| | | 51 | | { |
| | 18 | 52 | | public Vector3 Position { get; set; } |
| | 14 | 53 | | public float DetectionRadius { get; set; } |
| | 14 | 54 | | public int Quantity { get; set; } |
| | | 55 | | } |
| | | 56 | | |
| | | 57 | | /// <summary>三维向量(纯 C#,不依赖 UnityEngine)</summary> |
| | | 58 | | public struct Vector3 |
| | | 59 | | { |
| | | 60 | | public float X, Y, Z; |
| | | 61 | | public Vector3(float x, float y, float z) { X = x; Y = y; Z = z; } |
| | | 62 | | |
| | | 63 | | public static Vector3 operator +(Vector3 a, Vector3 b) => new(a.X + b.X, a.Y + b.Y, a.Z + b.Z); |
| | | 64 | | public static Vector3 operator -(Vector3 a, Vector3 b) => new(a.X - b.X, a.Y - b.Y, a.Z - b.Z); |
| | | 65 | | public static Vector3 operator *(Vector3 a, float s) => new(a.X * s, a.Y * s, a.Z * s); |
| | | 66 | | public float Length => (float)System.Math.Sqrt(X * X + Y * Y + Z * Z); |
| | | 67 | | public float DistanceTo(Vector3 other) => (this - other).Length; |
| | | 68 | | } |
| | | 69 | | |
| | | 70 | | /// <summary>粒子渲染参数</summary> |
| | | 71 | | public class ParticleParams |
| | | 72 | | { |
| | | 73 | | public float EmitRate { get; set; } = 100; |
| | | 74 | | public float Opacity { get; set; } = 1.0f; |
| | | 75 | | public string ColorHex { get; set; } = "#FFFFFF"; |
| | | 76 | | public float SizeMultiplier { get; set; } = 1.0f; |
| | | 77 | | } |
| | | 78 | | } |