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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Adds new test cases to cover additional scenarios for pattern scanning, including tests for leading/trailing whitespace and spacing variations to ensure robustness.
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.
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.
Adds a test to verify the consistency of world-to-screen and
screen-to-world projections. This ensures that projecting a point
from world to screen and back results in the same point, thereby
validating the correctness of the camera projection transformations.
Adds functionality to convert screen coordinates to world space, including handling for cases where the inverse view projection matrix is singular or when the world position is out of screen bounds.
Also exposes Camera class to unit tests.
Adds an angle class with support for different normalization
and clamping strategies. Includes trigonometric functions and
arithmetic operators. Introduces unit tests to verify correct
functionality.
Disables unity builds to address a compilation issue.
Removes the deprecated `Matrix` class and its associated source files and unit tests.
This change is to ensure code cleanliness and prevent accidental usage of the slow and outdated `Matrix` class.
The `Mat` class should be used instead.
Moves linear algebra headers to a new subdirectory to improve project structure.
Updates includes to reflect the directory change.
Adds vcpkg to the tracked repositories.
Adds `std::formatter` specializations for `Mat`, `Vector2`, `Vector3`, and `Vector4` types, enabling the use of `std::format` for these types.
This simplifies formatting and printing of these mathematical objects, improving code readability and consistency.
Also adds a hash function specialization for Vector3.
The view angle rotation matrix order in Unreal Engine was incorrect, leading to incorrect camera orientation.
This commit fixes the order of rotation matrices to roll, pitch, yaw
to correctly implement Unreal Engine camera rotations.
Adds comprehensive unit tests for Unreal Engine formulas, camera and constants.
Marks Unreal Engine as supported in README.md.
Adds Unreal Engine-specific implementations for camera and projectile prediction calculations.
This includes:
- Defining constants and data types tailored for Unreal Engine's coordinate system and conventions.
- Implementing functions for calculating forward, right, and up vectors, view matrices, and perspective projection matrices.
- Providing camera trait for look-at angle calculations and projection matrix generation.
- Implements projectile prediction traits and utilities.
Updates unit tests to include more accurate assertions for camera projections.
Adds .idea/workspace.xml to .gitignore to prevent tracking local IDE settings.
Refactors some test fixture class names for consistency.
Adds project-specific IDE settings to improve code style consistency and development environment.
Removes the .idea directory from the .gitignore file, as these files are now intended to be part of the project for consistent IDE configuration across contributors.
Adds less than, greater than, less than or equal, and greater than or equal operators to the Vector2, Vector3 and Vector4 classes.
The comparison is based on the lengths of the vectors.
Adds corresponding unit tests.
The changes encapsulate the matrix tests within an `#ifdef` block, allowing conditional compilation based on whether `OMATH_ENABLE_LEGACY` is defined. This enables the legacy code to be compiled only when needed.