mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-20 08:29:50 +08:00
* 抽象基础类 * 修改定义 * 抽象出Feature2D相关能力 * 新增地图基类实现 * 临时提交 * 迁移坐标计算 * 加载分层特征数据 * 新增独立地图 层岩巨渊,渊下宫,旧日之海 * 支持不切分特征点匹配 * 添加远古圣山,修改地图参数 * 提瓦特大陆的大地图匹配 * 提瓦特大陆地图大地图位置获取使用256级别的地图 * 替换大地图匹配类 BigMap.cs * 替换小地图匹配类 EntireMap * 修改tp的入参方式,删除无用类 * 兼容新提交的内容 * 修复类方法覆盖不生效的问题 * 修复定位问题,迁移部分 MapCoordinate 的代码。MapCoordinate 标记为废弃 * 更多坐标方法的迁移 * 修复不正确的坐标转换 * 是用正确的特征匹配 * 体积较小的地图动态生成特征 * 路径追踪窗体支持多地图 * 传送时切换独立地图地区 * 更新传送点信息 * 修改独立地图相关命名,使用 Scene(场景) 命名,和原神内部命名保持一致 * 录制支持多独立地图 * 修复地区切换失败的问题
57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using BetterGenshinImpact.GameTask.Common.Map;
|
|
using OpenCvSharp;
|
|
using System;
|
|
using BetterGenshinImpact.GameTask.Common.Map.Maps;
|
|
using BetterGenshinImpact.GameTask.Common.Map.Maps.Base;
|
|
|
|
namespace BetterGenshinImpact.GameTask.AutoTrackPath.Model;
|
|
|
|
/// <summary>
|
|
/// 路线点
|
|
/// 坐标必须游戏内坐标系
|
|
/// </summary>
|
|
[Serializable]
|
|
public class GiPathPoint
|
|
{
|
|
public Point2f Pt { get; set; }
|
|
|
|
public Point2f MatchPt { get; set; }
|
|
|
|
public int Index { get; set; }
|
|
|
|
public DateTime Time { get; set; }
|
|
|
|
public string Type { get; set; } = GiPathPointType.Normal.ToString();
|
|
|
|
public static GiPathPoint BuildFrom(Point2f point, int index)
|
|
{
|
|
var pt = MapManager.GetMap(MapTypes.Teyvat).ConvertImageCoordinatesToGenshinMapCoordinates(point);
|
|
return new GiPathPoint
|
|
{
|
|
Pt = pt,
|
|
MatchPt = point,
|
|
Index = index,
|
|
Time = DateTime.Now
|
|
};
|
|
}
|
|
|
|
public static bool IsKeyPoint(GiPathPoint giPathPoint)
|
|
{
|
|
if (giPathPoint.Type == GiPathPointType.KeyPoint.ToString()
|
|
|| giPathPoint.Type == GiPathPointType.Fighting.ToString()
|
|
|| giPathPoint.Type == GiPathPointType.Collection.ToString())
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public enum GiPathPointType
|
|
{
|
|
Normal, // 普通点
|
|
KeyPoint, // 关键点
|
|
Fighting, // 战斗点
|
|
Collection, // 采集点
|
|
}
|