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
相关产品推荐
相关产品推荐

