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.
Updates the include paths in omath.hpp to be more explicit,
ensuring correct referencing of header files.
Removes unnecessary include of vector3.hpp from vector2.hpp.
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 functions to generate left- and right-handed orthographic projection matrices.
This provides more flexibility when defining a projection for rendering.
Adds formatters for `omath::Angle` and `omath::Color` to allow for easy formatting using `std::format`.
This allows users to easily output Angle and Color values in a human-readable format.
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.
Creates the main omath header file that includes all
omath library components. This provides a single point
of inclusion for the entire library, simplifying usage
and dependency management.
Also, adjusts the return types for projectile prediction
functions within the legacy engine to explicitly use
the `Vector3` type for consistency and clarity.
Corrects namespace naming from unity_engine to unreal_engine.
Adjusts projectile prediction and angle calculations for accuracy
in Unreal Engine environments.
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.
Adds a compiler definition for MSVC to prevent redefinition of min/max macros by the Windows SDK.
Removes unnecessary undef directives in color.hpp as the NOMINMAX definition now handles the issue.
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.
Introduces a concept `PredEngineConcept` to ensure that classes used as projectile prediction engine traits conform to a specific interface.
This enforces the presence and return types of required methods and ensures that these methods are `noexcept`, improving type safety and predictability.
Adds a concept `CameraEngineConcept` to ensure that camera
engine implementations provide the necessary functions
with the correct signatures and `noexcept` specifications.
This enables compile-time checks for valid camera engine
implementations, improving code reliability and preventing
runtime errors.
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.
Removes the virtual destructor from the Camera class as it is not required,
as the class does not act as a base class. This simplifies the class
definition and avoids potential vtable overhead.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.