Skip to content

add: compat.recastnavigation 1.6.0 —— Recast/Detour 导航网格,五模块一库三 feature - #280

Merged
Sunrisepeak merged 1 commit into
mcpplibs:mainfrom
wellwei:feat/add-recastnavigation
Aug 29, 2026
Merged

add: compat.recastnavigation 1.6.0 —— Recast/Detour 导航网格,五模块一库三 feature#280
Sunrisepeak merged 1 commit into
mcpplibs:mainfrom
wellwei:feat/add-recastnavigation

Conversation

@wellwei

@wellwei wellwei commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

模式:Add — compat.recastnavigation 1.6.0

新增 Recast Navigation v1.6.0(Zlib 许可)——游戏行业导航网格事实标准:Recast 把关卡几何烘成导航网格,Detour 在网格上跑运行时寻路。Godot、Unreal、O3DE 等大量项目直接或间接依赖它。三平台(linux / macosx / windows)同一上游 tag tarball,sha256 d48ca0121962fa0639502c0f56c4e3ae72f98e55d88727225444f500775c0074

形态与消费者语法

Form A(源码 compat,C++23):上游五个 CMake target → 一个 lib target + 三个 source-gated feature。无 configure 产物、无外部依赖(30 个 .cpp 只依赖标准库,已核实全部 #include 并集):

  • 核心:Recast + Detour(几乎不会有消费者只用其一,不做成 feature)
  • feature crowd(DetourCrowd)、tilecache(DetourTileCache)、debug-utils(DebugUtils,implies tilecache——上游 DebugUtils 无条件链接 DetourTileCache,不 imply 会让只开调试绘制的消费者在链接期报缺 dtTileCache* 符号)
  • 上游两个 ABI 开关(DT_POLYREF64 / DT_VIRTUAL_QUERYFILTER)刻意做成 feature:feature 的 defines 只作用于本包 TU,会造成库/消费者 ODR/ABI 分裂

include 两种拼写都支持(对齐上游安装契约):#include <Recast.h>(五个模块的 Include/ 目录)与 #include <recastnavigation/Recast.h>(26 个生成头:25 个转发头 + version.h)。

消费者语法:

[dependencies.compat]
recastnavigation = "1.6.0"
# 或带 feature:
recastnavigation = { version = "1.6.0", features = ["crowd", "debug-utils"] }

测试成员(可失败断言,return ok ? 0 : 1)

  • tests/examples/recastnavigation:20×20 地面中间挖 4×4 洞,断言路径必须绕行(多边形数 > 0、8 三角形全部 walkable、直线路径 ≥ 3 点、终点距目标 < 2.0、路径长 > 直线距离 + 0.5);混用两种 include 拼写
  • tests/examples/recastnavigation-features:只声明 crowd + debug-utils(验证 implies 链,链断则本成员链接期失败);crowd agent 400 步后接近目标 > 5m、tilecache 物化的 tile 能答 findNearestPolyduDebugDraw 收到顶点与三角形批次

镜像

无 CN 镜像(编写环境无 gtc / mcpp-res 写权限),url 为纯字符串,CN 用户回落 GitHub 上游。后续有权限的维护者可改为 { GLOBAL = ..., CN = ... } 表;需上传的 tarball 与 GLOBAL 逐字节一致,sha256 不变。

验证

  • 本地(macOS arm64,mcpp 2026.8.21.3):描述符 lint 全套、mcpp xpkg parse、两个成员冷构建+运行,全部通过
  • fork CI(feat(recastnavigation): add compat.recastnavigation 1.6.0 wellwei/mcpp-index#7):lint(pin 2026.8.27.2 解析全部描述符)、linux default + llvm、macos、windows 四条 workspace 腿全绿——本 PR 与 fork PR 同一 commit(9b92c37)
  • 平台局限:本地仅 macOS arm64;linux/windows 由 CI 覆盖

floor/pin 影响

无:index.tomlmin_mcpp 保持 2026.8.3.3,描述符未使用新语法。

@wellwei
wellwei requested a review from Sunrisepeak August 29, 2026 14:47
@wellwei

wellwei commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator Author

@Sunrisepeak

@Sunrisepeak
Sunrisepeak merged commit eda6672 into mcpplibs:main Aug 29, 2026
11 checks passed
@wellwei
wellwei deleted the feat/add-recastnavigation branch August 29, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants