Commit Graph

172 Commits

Author SHA1 Message Date
5a3f4cc330 added template arg to Vertex struct 2025-11-29 16:31:24 +03:00
09263b390f improved mesh class 2025-11-29 16:28:06 +03:00
4c62e18042 added std::optional 2025-11-13 21:25:45 +03:00
9c383050cd add another test 2025-11-13 17:22:54 +03:00
c28cb1a748 fixed formating 2025-11-13 16:56:48 +03:00
bb174e1137 Refactors collision detection with GJK and EPA
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.
2025-11-13 16:39:26 +03:00
d784602904 Improves EPA test coverage
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.
2025-11-13 16:34:14 +03:00
14f007047a added epa 2025-11-13 15:57:38 +03:00
8e332f3979 fixed formating 2025-11-09 22:22:02 +03:00
353fb290b7 added mesh class, added mesh trair 2025-11-09 22:10:56 +03:00
14296e45c4 fix 2025-11-09 17:09:46 +03:00
e1ff9efc91 Adds mesh scaling to mesh collider
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.
2025-11-09 17:02:07 +03:00
c20bfe1f8c Adds GJK collision test with equal origins
Implements a new test case for the GJK algorithm
to verify collision detection when colliders share the same origin.
This enhances the robustness of collision detection in scenarios
where objects are positioned at the same location.
2025-11-09 16:57:52 +03:00
8875157c79 Refactor: Simplify GJK simplex handling
Removes the separate `Simplex` class and integrates its functionality directly into the `GjkAlgorithm`. This simplifies the code and reduces unnecessary overhead.

Updates tests to align with refactored implementation.
2025-11-09 16:02:13 +03:00
c0353cd9be updated test 2025-11-09 15:38:38 +03:00
8f054316fc Implements GJK collision detection
Adds GJK algorithm implementation for detecting collisions between mesh colliders.

Includes mesh collider definition and unit tests for basic collision detection.

Provides a foundation for more complex collision handling and physics interactions.
2025-11-09 14:04:01 +03:00
8aa2dca456 Improves screen to world conversion accuracy
Adds support for different screen origin configurations.

This change allows for more accurate conversion from screen coordinates to world coordinates by correctly handling different screen origin positions (top-left and bottom-left). Includes new unit tests to verify the functionality with both configurations.
2025-11-08 13:51:56 +03:00
9f05b36388 Adds const version of rev_bar method
Adds a const overload for the `rev_bar` virtual method.
This allows calling the method on const instances of the reverse engineered class.
2025-11-01 13:28:51 +03:00
bcbe90737f added some comments 2025-10-27 11:25:31 +03:00
c54ec32864 Links tests to gtest when available
Conditionally links the test target to gtest when it is available,
rather than requiring the OMATH_BUILD_VIA_VCPKG flag to be false.
This allows for a more flexible test setup.
2025-10-27 09:05:40 +03:00
62010ae7be Update build system and enable VCPKG
Migrates to CMake presets and enables VCPKG to manage dependencies.
Removes explicit submodule configuration.
Updates benchmark and googletest to be integrated or linked properly.
The goal is to ease the build process and reduce complexity related to linking and dependency management.
2025-10-27 08:34:05 +03:00
55041384c5 added vcpkg manifest file 2025-10-23 06:35:22 +03:00
a22feeb1b9 added frostbite sources 2025-10-23 00:08:17 +03:00
afb8f9cb80 nuked not needed test 2025-10-21 04:38:43 +03:00
10215e6e1c added second method of w2s 2025-10-21 04:38:43 +03:00
9af201069a Fixes incorrect NDC calculation and updates formulas
Corrects the NDC calculation in `world_to_screen` to improve accuracy.
Replaces custom perspective projection matrix calculation with `omath::mat_perspective_right_handed` for correctness and consistency.
Updates test cases and provides debugging information by printing view and projection matrices.
Addresses an issue in the feature/ndc_invalid_calc_fix branch.
2025-10-21 04:38:43 +03:00
8d815389b8 Removes PE definition files
Removes the PE definition files and related functions as they are no longer needed.
2025-10-12 19:41:18 +03:00
9d5984093d Uses source engine camera trait for view angle calculation
Replaces the custom `view_angle_to` function with `omath::source_engine::CameraTrait::calc_look_at_angle` for vector3 view angle calculations.
This change aligns with source engine conventions and improves code consistency.
2025-10-11 15:46:52 +03:00
3d130fd1fb Removes PE scanner test code
Eliminates the PE scanner test code from the unit tests.

This removes a test that appears to be broken or no longer relevant, since the test directly references a file path.
2025-10-09 19:58:58 +03:00
f1ee6e9e35 Supports broader architectures in PE scanner
Updates the PE scanner implementation to support both 32-bit and 64-bit architectures.
Leverages `std::variant` and a generic `ImageNtHeaders` to abstract architecture-specific details.
Simplifies the logic for retrieving section data, generalizing the process for improved maintainability.
2025-10-09 19:58:19 +03:00
63debc635e fixed for mac improved readability 2025-10-08 19:22:20 +03:00
007340edaa Adds PE file header definitions
Defines `DosHeader` and `FileHeader` structures to represent PE file header information.
Includes definitions for `MachineId` enum and `FileCharacteristics` union.
These definitions are prerequisite for PE file parsing and analysis.
2025-10-08 19:22:20 +03:00
932b0d8deb Adds pattern scanning functionality and corner case tests
Implements a pattern scanning feature that allows searching for byte patterns within a byte range.

Adds `scan_for_pattern` method to `PatternScanner` to locate a pattern within a byte span.

Adds corner case tests to verify functionality and handle invalid inputs.
2025-10-05 06:37:20 +03:00
64e6ba3632 Adds corner case tests for pattern scanning
Adds new test cases to cover additional scenarios for pattern scanning, including tests for leading/trailing whitespace and spacing variations to ensure robustness.
2025-10-04 18:43:05 +03:00
544fa313c1 Adds pattern scanning functionality
Implements a pattern scanner for byte sequence parsing.

Introduces `omath::PatternScanner` to parse pattern strings, which represent byte sequences.
Adds support for wildcard characters ('?' and '?') to represent optional bytes in the pattern.
Includes unit tests for basic read operations to ensure proper functionality.
2025-10-04 18:30:43 +03:00
d0684c388e finished test 2025-10-04 10:04:34 +03:00
70f2f90100 reordored omath headers 2025-10-03 13:51:53 +03:00
7318644027 ooops 2025-09-22 02:39:50 +03:00
0515018605 added targets specification to ci cd build 2025-09-22 02:38:25 +03:00
32d88f0881 improved tests 2025-09-20 17:00:49 +03:00
15898e9b3d improved opengl tests stability 2025-09-20 16:36:05 +03:00
e37fefae23 improved test stability 2025-09-20 16:34:44 +03:00
f8f3f2c45d fixed test 2025-09-20 16:22:24 +03:00
aee78d7671 added more iterations 2025-09-20 16:08:04 +03:00
eb443d533c style fix 2025-09-20 16:00:30 +03:00
584a66b20c fix 2025-09-20 15:44:33 +03:00
3fa85f4c4d added new mat function
more tests
2025-09-20 15:44:33 +03:00
d3c90253f7 fixed test 2025-09-20 15:44:33 +03:00
eeb4dccb12 fixed iw engine
fixed source

revert
2025-09-20 15:44:33 +03:00
1d8dba6487 Fixes float type conversion in world_to_screen
Fixes a potential type conversion issue by explicitly casting the x-coordinate to float in the world_to_screen test. This prevents possible compiler warnings and ensures the intended behavior.
2025-09-09 02:13:45 +03:00