Skip to content

Conversation

@orange-cpp
Copy link
Owner

No description provided.

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.
@orange-cpp orange-cpp merged commit 1553139 into main Nov 13, 2025
4 checks passed
@orange-cpp orange-cpp deleted the feature/epa_algorithm branch November 14, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants