Repository navigation
Conversation
…dered UI Replace the C# WPF app with a Rust workspace: - visibility-core: exact event-driven visibility polygons (full circle or view cone), exact view-cone culling, and occlusion culling from the same sweep. Obstacles live in one flat vertex array with a CSR uniform grid. - visibility-app: egui/wgpu desktop viewer for Windows and macOS. Obstacles are uploaded to the GPU once; panning and zooming only update a uniform. Correctness tests compare the outline against brute-force ray casting on random and heavily overlapping scenes, and cover the cases fixed-ray sampling gets wrong (thin obstacles, arc-only crossings, walls seen between posts).
- Library keeps Rust 1.88; the app needs 1.95 for egui 0.36. - Doctested library examples in the crate docs. - Benchmark warms up with a full pass for stable numbers. - Readable 'Inside an obstacle' label and plain-text key hints. - macOS app icon (icns) for release bundles.
…etup - README for the Rust version: gallery, benchmarks, install, controls, command line, how it works, library usage, and upgrade notes. - CI: rustfmt, clippy, tests on Linux/macOS/Windows, MSRV per crate, docs, cargo-deny, coverage, and one 'CI result' gate check. - Release: Windows, macOS (.app) and Linux archives with SHA-256 sums and build provenance attestations. - CodeQL, OpenSSF Scorecard, dependency review, Dependabot, CODEOWNERS, issue and PR templates, SECURITY, CONTRIBUTING, CODE_OF_CONDUCT, CHANGELOG. - scripts/readme-images.sh rebuilds the README images. - Remove the old C# screenshots.
Library: - Keep obstacle ids equal to the input order; degenerate polygons never block. - Treat a viewer standing exactly on an obstacle edge or corner as blocked. - Check every corner when several lie on one ray from the viewer. - Clamp zero, negative and NaN arc tolerances. - Reuse a thread-local visited set instead of allocating one per query. - Remove unused grid helpers; document Scene::cast_ray as a public line-of-sight query. The library now forbids unsafe code itself. App: - 'Keep density' (on by default): the world grows with the obstacle count, so 200,000 obstacles get a 40,000 x 40,000 world instead of piling up. - Fade obstacle outlines when zoomed far out so colors stay visible. - Windows release builds attach to the parent console, so --help, --version and errors are visible. - Screenshot mode gives up after 60 s if the window never renders. - Status bar shows 'UI x ms' instead of a misleading 'ms/frame'.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the C# WPF app with a Rust workspace that runs on Windows and macOS (and Linux).
visibility-core(library, Rust 1.88+): exact event-driven visibility polygons, exact frustum culling, and exact occlusion culling from the same sweep. Obstacles live in one flat vertex array with a CSR uniform grid.visibility-app(desktop app, Rust 1.95+): egui + wgpu. Obstacles are uploaded to the GPU once, so 100,000 obstacles pan and zoom smoothly. Light and dark themes, live timings, rays, keyboard shortcuts, and a command line with a--screenshotmode.CI resultgate), CodeQL, OpenSSF Scorecard, dependency review, Dependabot, a release workflow (Windows/macOS/Linux archives, SHA-256 sums, build provenance), and community files.Fixed problems of the old version: fixed-ray shadow casting that cut corners, missed thin obstacles and had a data race; frustum culling that missed arc-only crossings; and occlusion culling that only tested corners.
Type of change
How I tested it
cargo test --workspace --locked: 34 tests, including brute-force comparisons of the visible outline on random and heavily overlapping scenes, a frustum sandwich test, and regression tests for the old bugs. Mutation checks confirm the tests fail when key steps are removed.cargo clippy --workspace --all-targets --locked -- -D warnings(pedantic),cargo fmt --check,cargo docwith-D warnings,cargo deny check.visibility-corebuilt and tested on Rust 1.88.cargo checkforx86_64-pc-windows-msvcandx86_64-unknown-linux-gnufrom macOS. Windows and Linux run for real in this PR's CI.Benchmark (
cargo run --release -p visibility-core --example bench, one core): 23 µs for a 360° visibility query and 1.2 µs for frustum culling in the default scene.Checklist
cargo fmt --all --checkpasses.cargo clippy --workspace --all-targets --locked -- -D warningspasses.cargo test --workspace --lockedpasses.RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --lockedpasses.CHANGELOG.md.