Adds `penetration_vector` to the `epa_result` struct to represent the direction and magnitude of penetration.
This allows for more accurate collision response calculations and simplifies access to penetration information.
Updates both the early-exit and iterative EPA calculations within `epa_algorithm.hpp` to compute and store the penetration vector, factoring in the relative origin of the colliding meshes.
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.
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.
Replaces `push_back` with `emplace_back` when initializing faces in the EPA algorithm. This avoids unnecessary copying and improves performance during face creation.
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.
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.
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.
Simplifies the GJK algorithm by using a type alias for the vertex type, improving code readability and reducing redundancy. Removes unnecessary includes.
Applies the `[[nodiscard]]` attribute to several functions within the `omath::collision` namespace to improve code safety and signal potential misuse when return values are ignored. This encourages developers to handle the results of these functions appropriately.
Simplifies Simplex initialization and accessors.
Ensures correct handling of collinearity within the simplex calculation, preventing issues when colliders share the same origin. This improves stability and reliability of the GJK algorithm.
Reorders the transform application to translation, scale, then rotation.
This ensures the collider’s world matrix is constructed correctly, preventing potential scaling or rotation issues in the GJK algorithm being developed on this branch.
Updates the mesh collider to include a scale parameter, allowing for non-uniform scaling of the collision mesh.
This provides more flexibility in defining collision shapes and supports a wider range of scenarios.