Add capsule geometry#117
Conversation
📝 WalkthroughWalkthroughThis PR adds a new ChangesCapsule Primitive Implementation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Let me know if docs should be added :) |
What
Add a
Capsulegeometry type tobracket-geometry.The capsule is represented by a center segment (
starttoend) and a radius. It supports point containment, bounding rectangle calculation, point iteration, and point set collection.Why
Issue #37 requests support for capsule geometry. A capsule is useful for rounded area effects, collision regions, and line-shaped ranges with thickness.
Closes #37
Checklist
Required
cargo check --allpassescargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versionspassescargo test --allpassesCloses #123)Workspace clippy currently fails on an existing unrelated lint in
bracket-noise/src/fastnoise.rs:2777(clippy::collapsible_else_if). The changed crate passes:cargo clippy -p bracket-geometry --all-targets -- -D warnings -A clippy::multiple-crate-versionsCapsule point generation was verified with
Capsule::point_set():Functional Validation
Configuration & Docs
README.md,ARCHITECTURE.md, or relevant manual pages, if applicable)If Applicable
cargo auditlocally if needed)Summary by CodeRabbit
Release Notes