a-b-street / a-b-street/geom

Should geom::Polygon.points be closed or not?

未关闭
#2 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
2
派生
1
PR 合并指标
30 天内没有已合并 PR

描述

I wanted to test out some new georust/geo features in the context of abstreet, and consequently I've been spelunking in abstreet::geom.

I ran into some inconsistencies while trying to roundtrip some abstreet::geom::Polygyon to/from geo::Polygon - it resulted in some corrupt rendering like this:

Screen Shot 2022-06-29 at 5 35 10 PM

My unverified hunch is that this some problem with one or more of:
- a mismatch in the `points` array and the precomputed triangulation `indices`
- an issue with the vertex uploading assuming closed vs open
- an issue with earcutr assuming closed vs open

While digging into that, I noticed that some (but not all) of the abstreet:geom::Polygon.points are closed. Do you have any strong feelings on whether abstreet::geom::Polygon.points should be closed?

Full disclosure is that more broadly I'm interested in making abstreet/geom more semantically consistent with georust/geo, in hopes of make future inter-op easier, but I'm also aware that these are the kinds of changes with no immediate benefit that could have a long tail of bugs in a system which is more or less currently working.

贡献指南

这个仓库没有索引到贡献指南

调研方向

查看 geom crate 中的 geom::Polygon 结构,重点关注 points 字段和三角剖分索引。将其与 geo::Polygon 的环表示进行比较,以了解关于闭环与开环的假设。在这两种类型之间测试往返转换,并检查 earcutr 的三角剖分输出。该 issue 提到了渲染损坏,因此检查 graphics pipeline 中上传顶点的代码。

由索引模型根据 Issue 内容生成。

评估

领域
computer-graphics
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。