You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

C#实现Amanatides & Woo快速体素遍历算法出现结果不一致问题求助

C#实现Amanatides & Woo快速体素遍历算法出现结果不一致问题求助

大家好,我现在正试着用C#实现Amanatides & Woo的快速体素遍历算法,但目前得到的结果特别不稳定,完全摸不着头绪找不到问题根源。

下面是我目前的实现代码:

public static IEnumerable<Point> FastVoxelTraversal(Point a, Point b)     
{         
    var ret = new List<Point>();          
    Vector direction = ((Vector)b - (Vector)a);          
    int stepX = direction.x >= 0 ? 1

有没有大佬能帮我分析下可能哪里出问题了?或者有没有类似的踩坑经验可以分享下?

备注:内容来源于stack exchange,提问作者LaGrange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.13 16:08:15