Commit Graph

277 Commits

Author SHA1 Message Date
orange 7329410f94 Uses std::ranges::find for pattern scanning
Replaces `std::find` with `std::ranges::find` for improved code consistency and potentially better performance when dealing with ranges.
2025-10-05 15:54:54 +03:00
orange 7bb23d3f7a Uses parsed pattern size in pattern scan
Updates the pattern scan loop to iterate over the size of the parsed pattern, ensuring correct iteration when using parsed patterns.
2025-10-05 14:14:31 +03:00
orange 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
orange 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
orange 6319aa81ab Handles empty pattern strings
Skips processing when encountering an empty string slice during pattern scanning.
This prevents unexpected behavior and potential errors when the pattern string contains sections that result in an empty byte string.
2025-10-04 18:33:57 +03:00
orange 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
orange 36e4cef2f3 fix unity 2025-09-22 02:10:33 +03:00
orange 3c81aea2ca unified look at for source iw_engine 2025-09-20 17:09:13 +03:00
orange 5466638330 fixed unreal 2025-09-20 15:59:43 +03:00
orange 19350b2618 fixed unity 2025-09-20 15:54:48 +03:00
orange 53b495a413 fixed opengl 2025-09-20 15:48:59 +03:00
orange 18a1349693 reverted 2025-09-20 15:46:21 +03:00
orange 3e5fb1bdb5 fixed rotation matrix 2025-09-20 15:44:33 +03:00
orange 3fa85f4c4d added new mat function
more tests
2025-09-20 15:44:33 +03:00
orange eeb4dccb12 fixed iw engine
fixed source

revert
2025-09-20 15:44:33 +03:00
orange a61d3f20b7 Simplifies raycast early exit condition
Combines the infinite length raycast hit check into a single condition.

This clarifies the logic and avoids redundant checks for early exit
in the ray-triangle intersection test, improving performance.
2025-09-08 23:52:35 +03:00
orange 55c5bb92da Removes deprecated Matrix class
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.
2025-09-08 19:56:04 +03:00
orange 92689fbf21 Fixes plane triangle generation
Corrects the order of vertices when constructing triangles
for the plane primitive, addressing a potential winding order
issue that could lead to incorrect surface normals and rendering.
2025-08-29 00:11:31 +03:00
orange fe1ff12f74 Simplifies plane creation logic
Refactors the plane creation function to directly compute the triangle vertices, removing unnecessary intermediate variables. This results in more concise and readable code.
2025-08-28 23:57:22 +03:00
orange b19a4de904 Adds plane primitive generation
Implements a function to generate a plane primitive from two vertices, a direction vector, and a size, returning an array of two triangles.
2025-08-28 23:18:36 +03:00
orange ddafd24ea6 Fixes namespace and angle calculations
Corrects namespace naming from unity_engine to unreal_engine.

Adjusts projectile prediction and angle calculations for accuracy
in Unreal Engine environments.
2025-08-25 21:46:50 +03:00
orange bdbf596647 Fixes Unreal Engine view angle matrix order
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.
2025-08-25 21:42:58 +03:00
orange 28b3aecf9d Adds Unreal Engine math implementations
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.
2025-08-25 21:30:35 +03:00
orange 8e7e1dfc42 Includes missing formula headers
Includes the necessary formula headers in the camera trait files for different rendering engines.
This ensures that the required mathematical functions and definitions are available when using camera traits.
2025-08-12 19:08:30 +03:00
orange 1f4b10f336 Refactors camera and prediction engine traits.
Moves camera and prediction engine implementations into traits for each engine,
decoupling the engine-specific logic from the core classes, promoting code reuse
and maintainability. This change allows for easier addition of new engines and
customization of existing ones.
2025-08-11 00:32:09 +03:00
orange 7556e9134b Removes projectile.cpp
Removes the projectile.cpp file. The removal indicates that the associated projectile prediction functionality is no longer needed or has been moved elsewhere.
2025-08-06 18:37:28 +03:00
orange a6fc92dd3a Updates project version and removes legacy code
Updates the project version to prepare for a new release.

Removes the legacy projectile prediction engine, which is no longer needed.
2025-08-03 18:35:52 +03:00
orange d66ccf2f74 Refactors projectile prediction engine
Migrates projectile prediction logic to leverage engine traits for improved flexibility and testability.

This change decouples core prediction algorithms from specific engine implementations, allowing for easier adaptation to different game engines or simulation environments.
2025-08-03 18:28:47 +03:00
orange 6c5c86b850 Refactors projectile prediction engine
Refactors the projectile prediction engine by introducing an interface
and making the legacy implementation more flexible.

The legacy engine is updated to allow for coordinate system customization
through virtual methods, enabling usage in different game environments.

Also introduces vcpkg support for easier dependency management and adds boost-asio as a dependency.
2025-08-03 17:33:22 +03:00
orange b82106a565 Adds option to enable legacy classes
Introduces a CMake option to enable legacy classes,
allowing for backward compatibility with older code.
This ensures that older codebases can still function
while new development can utilize updated classes.
2025-07-15 11:48:33 +03:00
orange e2322960b7 added noexcept 2025-05-13 09:34:39 +03:00
orange 505fe6f3a8 added more noexcept 2025-05-05 02:24:23 +03:00
orange ba2c60389f added more noexcept 2025-05-05 01:46:50 +03:00
orange 399ded102d removed useless source files 2025-05-04 19:03:18 +03:00
orange 6df9d59fe9 fixed style 2025-05-03 20:38:58 +03:00
orange 4406e1e461 changed code style 2025-05-03 20:31:59 +03:00
orange 01b7256e98 improved cmake, removed useless cmake files 2025-04-30 21:26:25 +03:00
orange 9de444bda0 fixed gimba lock for unity 2025-04-26 00:52:46 +03:00
orange 34621ad171 fixed gimba lock for opengl camera 2025-04-26 00:32:53 +03:00
orange 6d65e1f1c3 improved tests 2025-04-18 16:36:22 +03:00
Vladislav Alpatov 6a7d328a7c improved line tracer 2025-04-18 16:00:23 +03:00
orange 13753cab81 improved line trace and box primitive 2025-04-18 13:56:08 +03:00
orange 88f4db6caf switched to polygons 2025-04-18 12:34:24 +03:00
orange 80e3cadb67 added ratio param 2025-04-18 01:33:47 +03:00
orange 5ff57f9ffa added box 2025-04-18 00:43:46 +03:00
orange c46dc436fc fixed include 2025-04-16 20:35:17 +03:00
orange 06b891c827 improved openg gl rotation matrix, added tests 2025-04-16 19:11:02 +03:00
orange 97f38af2b5 added unit tests 2025-04-16 18:35:50 +03:00
orange 7642936716 removed method from Mat added method for unity 2025-04-16 17:52:19 +03:00
orange f1f2aeb1b9 added func
added rotation matrix for opengl
2025-04-16 17:40:00 +03:00