-
Notifications
You must be signed in to change notification settings - Fork 11
Feature/epa algorithm #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Introduces `GjkHitInfo` to encapsulate collision results, including the simplex. Refactors `is_collide` to return the `GjkHitInfo` struct, providing more detailed collision data. This prepares the codebase for integrating the EPA algorithm (as per the feature branch) which requires simplex information.
Updates the `Triangle` class to use a generic `Vector` type instead of `Vector3`, enhancing flexibility and reusability. Changes include updating relevant function return types to use `Vector::ContainedType` and adapting length and distance calculations accordingly. This refactoring supports the ongoing work on the EPA algorithm (feature/epa_algorithm) by providing a more adaptable foundation for geometric calculations.
Replaces the `for(;;)` loop in the EPA algorithm with a `while(true)` loop for improved readability and clarity. This change enhances the maintainability of the code without altering its functionality.
Replaces `push_back` with `emplace_back` when initializing faces in the EPA algorithm. This avoids unnecessary copying and improves performance during face creation.
Improves code organization and readability within the EPA algorithm implementation. Changes include renaming variables for better semantic meaning (e.g., `verts` to `vertexes`), adding `final` specifiers to structs for clarity, and enhancing function signatures with `[[nodiscard]]` where appropriate. These refactorings aim to enhance maintainability and understanding of the code without altering its core functionality.
Updates the `make_face` function to use `vertexes` instead of `verts` for clarity and consistency in naming conventions.
Adds a comprehensive unit test for the EPA algorithm, validating collision detection, depth calculation, and separation axis determination with a cube overlap scenario. Refactors the test for clarity and robustness.
This commit refactors the collision detection pipeline to utilize a more standard GJK algorithm and simplifies the EPA implementation. Removes the custom `GjkAlgorithmWithSimplex` in favor of the standalone `GjkAlgorithm`. This streamlines the collision detection process and enhances code clarity. Updates unit tests to align with the new GJK implementation, ensuring continued functionality and correctness.
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.
No description provided.