fix(viewport): use a vertex-relative signed area in polygon_overlaps_rect
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start in src/viewport/rect_pick.rs at polygon_overlaps_rect: the signed-area loop near line 192, the separating-axis normals near line 208, and the normal.dot(a) terms near lines 213 to 214. Recompute the area relative to the first vertex, keeping exact zero for collinear points. Add tests for a thin triangle near (1e4, 1e4) and an exactly collinear one. Note that open pull request #426 already targets this issue, so coordinate with it before starting.
索引モデルが issue の本文から書いたものです。
説明
Problem
Raised by a CodeRabbit review of #404 and checked against the code. polygon_overlaps_rect (src/viewport/rect_pick.rs, the signed-area loop near line 192) sums p.x * next.y - next.x * p.y in absolute NDC coordinates. For a sliver polygon whose clipped vertices lie far from the NDC origin (a triangle crossing the near plane gives very large NDC values), the terms cancel badly, so the sign of the area and the zero-area test can be wrong. A wrong sign flips the outward normals used by the separating-axis test near line 208. The normal.dot(a) terms at lines 213 to 214 have the same issue.
It needs near-degenerate triangles with coordinates around 1e3 or more, so it is rare, and it has no known user report.
Change
- Compute the signed area relative to the first polygon vertex (
(p - p0).perp_dot(next - p0)), keeping an exact zero for collinear points and the existing zero-area rejection and bounding-box rejection. - Use the same vertex-relative form for the
normal.dot(a)terms. - Tests: a thin triangle near (1e4, 1e4) keeps its correct overlap result and sign, and an exactly collinear one still returns false.
Related: #404, #30.
- 主要言語
- Rust
- スター
- 4
- フォーク
- 2
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 225
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cristim/AztecCraft のほかの issue
-
fix(operations): the NoSelection message says 'before framing' for Delete and pivot reset対応中かも @calmasacow が今日担当しました。 オープンarea/ui-parity effort/xs impact/few priority/p3 severity/low triaged type/bug urgency/eventually
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cristim/AztecCraft#431 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/ui-parity effort/s impact/few priority/p3 severity/low triaged type/bug urgency/eventually
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
cristim/AztecCraft#430 ·
メンテナーはふだん 1 日以内に返信
-
refactor(mcp): make the Keys error-code match exhaustive instead of a scene_error wildcard対応中かも @cristim が 1 日前に担当しました。 オープンarea/mcp effort/xs impact/few priority/p3 severity/low triaged type/chore urgency/eventually
難易度 3/5 半日 初心者へのやさしさ 25/100
cristim/AztecCraft#420 ·
メンテナーはふだん 1 日以内に返信
-
fix(mcp): range-check NDC arguments on the wire value before narrowing to f32対応中かも @cristim が 1 日前に担当しました。 オープンarea/mcp effort/s impact/few priority/p3 severity/low triaged type/bug urgency/eventually
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
cristim/AztecCraft#419 ·
メンテナーはふだん 1 日以内に返信
-
fix(viewport): report a native resource limit during view build as resource_limit対応中かも @cristim が 1 日前に担当しました。 オープンarea/viewport effort/xs impact/few priority/p3 severity/low triaged type/bug urgency/eventually
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
cristim/AztecCraft#415 ·
メンテナーはふだん 1 日以内に返信
cristim/AztecCraft の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
ci javascript tests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jonathanong/no-mistakes#3258 ·
メンテナーはふだん 1 日以内に返信
-
Add to bmi docsオープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
eWaterCycle/bmi-rust#2 ·
-
area: cpu-engines area: fuzzer good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
hffgzktbcc-blip/ounce-core#402 ·
メンテナーはふだん 1 日以内に返信
-
compiler
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
HerringtonDarkholme/hd-lang#1699 ·
メンテナーはふだん 1 日以内に返信