Repository navigation
4 new shapes - #422
Closed
ds5678 wants to merge 14 commits into
Closed
4 new shapes#422ds5678 wants to merge 14 commits into
ds5678 wants to merge 14 commits into
Conversation
Updated collision tester overloads to throw NotSupportedException where variants are intentionally unsupported. Redirected sphere-based tester entry points to the appropriate narrower overloads instead of throwing, and removed an unused System import from SpherePairTester.cs.
Update `CommonSettings.props` to target `net10.0` instead of `net8.0`.
Add `VectorExtensions` for `System.Numerics` vectors: - `!` for `Vector<int>` bitwise-not - `<`, `>`, `<=`, `>=` for `Vector<float>` masks - `NegativeOne` for `Vector<float>` - generic `Min`, `Max`, and `ClampZeroOne` helpers
Add a new BepuPhysicsTests xUnit project with collision and raycast test infrastructure, shape-pair collision coverage, and direct-vs-wide ray test coverage for primitive shapes; update the solution to include the new test project.
Reordered default sweep task registrations in DefaultTypes.cs and grouped Cylinder sweep registrations more logically without changing coverage.
Add new convex collidable shapes for cone, pyramid, rectangle, and wedge with shape-specific ray casting, wide/SIMD support, inertia/bounding data, and ray-cast tests.
Register Cone, Pyramid, Wedge, and Rectangle for pair testing and GJK sweeps; add tester structs for the new combinations; and route sphere interactions through shared GJK/contact overloads. Tester structs currently throw NotImplementedException
Convert them to convex hulls and use testers for convex hulls
Added XML documentation comments to `IBoundsQueryableCompound` methods in `ConvexCompoundOverlapFinder.cs`, clarifying the `FindLocalOverlaps` overloads, their generic parameters, and the meaning of each argument for local-space overlap queries and sweep tests.
…Wide> This enables us to eliminate the need for 10 pairwise collision testers
Contributor
Author
|
Rejected on Discord |
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.
Pull Request Description
This pull request will add support for 4 new primitive shapes to the zoo.
Justification
Cone
Although convex hulls can inefficiently approximate a cone (similar to cylinders), accurate modeling of the smoothness can only come from first-class support. Also, this is the only shape that can accurately model shotgun spray.
Pyramid
This is a common shape used in architecture, and it's the only shape capable of representing a player's field of view accurately.
Wedge
Wedges can model stairs, ramps, and roofs. These objects are ubiquitous in games.
Rectangle
These one-sided shapes are better than boxes for modeling floors, walls, and ceilings. They're infinitely thin and always push in the correct direction.
Current Status
In line with the contributing guidelines, I wanted to give you a heads up about me working on this, so this pull request is still a draft.
Done
To Do
Review Process
When I'm done, I expect the number of lines changed to be around 20 thousand. I want to make this as easy as possible for you to review.