Commit Graph

359 Commits

Author SHA1 Message Date
b4fbcba8f2 Marks Camera class as final
Prevents inheritance from the Camera class.
2025-08-11 01:18:39 +03:00
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
5be521ad2c Refactors Vector operations for type safety
Ensures type safety in Vector2, Vector3, and Vector4 operations by using static_cast(0) instead of relying on implicit conversions.
This prevents potential issues with different numeric types.

Adds from_im_vec2 and from_im_vec4 methods for creating vectors from ImVec2/ImVec4 types.
2025-08-06 06:06:42 +03:00
9ad71be0da patch 2025-08-06 05:56:09 +03:00
0abfeba109 Adds engine traits for projectile prediction
Implements engine-specific traits for projectile and target position prediction.
Each trait encapsulates logic tailored to a specific game engine (IW, OpenGL, Unity),
accounting for engine-specific coordinate systems and calculations.
This allows for accurate projectile prediction across different game environments.
2025-08-06 05:45:37 +03:00
5c9b36a03c Refactors target position prediction
Moves target prediction logic into engine traits, improving modularity.

This change consolidates target position prediction within the engine traits,
allowing for a more flexible and maintainable design.

This eliminates redundant code and simplifies the core prediction engine by
delegating target movement calculations to the appropriate trait.
2025-08-04 03:16:04 +03:00
628361aff8 Marks legacy engine class as final
Prevents further inheritance from the legacy projectile prediction engine class.
2025-08-04 01:12:22 +03:00
0e403f916d Adds direct pitch angle calculation
Implements a direct pitch angle calculation for scenarios with zero gravity, ensuring accurate projectile trajectory predictions in such conditions.

Also marks several methods as noexcept for better performance and exception safety.
2025-08-04 01:11:11 +03:00
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
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
da528d2884 Documents projectile launch angle formula
Adds a comment documenting the formula used for calculating the projectile launch pitch angle.

The comment includes a link to the Stack Overflow discussion where the formula was found and the LaTeX representation of the formula for clarity.
2025-07-31 21:52:16 +03:00
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
f489ec7a85 Updates CMake export target and namespace.
Updates the CMake export target and namespace to use the project name,
improving consistency and avoiding naming conflicts.

Adds a simple diagram to the triangle header file.
2025-07-06 11:14:46 +03:00
efca121348 added new method 2025-06-23 06:14:17 +03:00
fb7cb0e800 improved naming 2025-05-13 09:47:08 +03:00
e2322960b7 added noexcept 2025-05-13 09:34:39 +03:00
c8963668f3 removed even float type from vector classes 2025-05-13 09:22:23 +03:00
505fe6f3a8 added more noexcept 2025-05-05 02:24:23 +03:00
ba2c60389f added more noexcept 2025-05-05 01:46:50 +03:00
45c7ff131f added noexcept 2025-05-05 01:16:12 +03:00
27b130345c added noexcept for color and angles 2025-05-04 19:16:49 +03:00
c9796e4145 added noexcept for vector types 2025-05-04 19:13:26 +03:00
ef93e9904c fixed style 2025-05-04 18:54:33 +03:00
1d22901bf5 removed pow 2025-05-04 18:07:35 +03:00
8b8ed495d5 fixed clang format 2025-05-04 17:42:32 +03:00
34f363e8c6 bugfix 2025-05-03 21:36:16 +03:00
cf2243a537 fix 2025-05-03 20:51:50 +03:00
6df9d59fe9 fixed style 2025-05-03 20:38:58 +03:00
4406e1e461 changed code style 2025-05-03 20:31:59 +03:00
ef787fd4e7 added test case 2025-04-29 20:49:59 +03:00
efadf3a918 added inverse method 2025-04-29 20:33:39 +03:00
468261d3f1 added additional methods 2025-04-29 20:10:17 +03:00
733ef19460 fixed infinite recursion in compile time 2025-04-29 20:08:27 +03:00
9de444bda0 fixed gimba lock for unity 2025-04-26 00:52:46 +03:00
a36b54610b resetting state 2025-04-25 23:52:10 +03:00
13753cab81 improved line trace and box primitive 2025-04-18 13:56:08 +03:00
88f4db6caf switched to polygons 2025-04-18 12:34:24 +03:00
d9ccfe83ae fixed code style 2025-04-18 12:11:43 +03:00
80e3cadb67 added ratio param 2025-04-18 01:33:47 +03:00
505a8cce9a added new build option 2025-04-18 00:51:07 +03:00
5ff57f9ffa added box 2025-04-18 00:43:46 +03:00
97f38af2b5 added unit tests 2025-04-16 18:35:50 +03:00
622c2866d9 fixed formating 2025-04-16 17:52:57 +03:00
7642936716 removed method from Mat added method for unity 2025-04-16 17:52:19 +03:00
f1f2aeb1b9 added func
added rotation matrix for opengl
2025-04-16 17:40:00 +03:00
51f85e4e3a removed whitespaces 2025-04-16 12:21:10 +03:00
24f757eb68 Merge pull request #36 from orange-cpp/u/orange-cpp/small-refactoring
U/orange cpp/small refactoring
2025-04-12 13:34:28 +03:00
07c1a6670d added const method to mat 2025-04-11 23:57:56 +03:00
83f14c89f4 added new build option 2025-04-11 23:54:56 +03:00
bda3edd596 improved naming 2025-04-11 23:30:07 +03:00