Compare commits

..

90 Commits

Author SHA1 Message Date
d83a8121db Merge pull request #55 from orange-cpp/feature/unreal-support
Adds Unreal Engine math library
2025-08-25 21:49:11 +03:00
2584cda5c3 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
c90497f77b 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
0de6b4589f Adds .idea/ to .gitignore
Adds the standard .idea/ folder contents to the .gitignore file.

This prevents project-specific IDE settings and workspace files from being tracked by Git, keeping the repository cleaner and avoiding potential conflicts between developers using different IDE configurations.
2025-08-25 21:31:07 +03:00
8004c8c181 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
1246c4ed07 Update README.md 2025-08-25 17:26:56 +03:00
ab463e1caa Update README.md 2025-08-25 16:00:36 +03:00
4f13010e7d Removes workspace configuration file
Deletes the `.idea/workspace.xml` file.
This file tracks workspace-specific settings,
and is not meant to be shared across different
development environments.
2025-08-21 00:33:02 +03:00
83d3cc099f Improves test accuracy and adds .gitignore entry
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.
2025-08-21 00:30:05 +03:00
625c676010 Fixes MSVC redefinition of min/max
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.
2025-08-21 00:17:59 +03:00
2d9ed4cfc8 Configures project IDE settings and improves gitignore
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.
2025-08-21 00:11:37 +03:00
29795e9906 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
0328fef4f7 Fixes Vector3 conversion from ImVec2
Corrects the static function signature for creating a Vector3 from an ImVec2.

It was mistakenly returning a Vector3 instead of Vector3.

patch
2025-08-12 09:38:43 +03:00
687772f073 feat(omath): Add NDC to screen position coordinate diagram 2025-08-12 09:29:14 +03:00
c66df11754 Updates project version to 3.2.1
Increments the project version number in CMakeLists.txt
from 3.0.4.1 to 3.2.1, indicating a release or significant
changes in the project.
2025-08-12 09:25:40 +03:00
0450dc3547 Adds concept for prediction engine 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.
2025-08-12 09:21:34 +03:00
0bd9eda48f Introduces CameraEngine concept
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.
2025-08-12 09:13:02 +03:00
858314fa0a Merge pull request #54 from orange-cpp/feature/vec_fix_improvement
Adds comparison operators to Vector types
2025-08-12 08:57:31 +03:00
f277b1038c Adds comparison operators to Vector types
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.
2025-08-12 08:54:33 +03:00
15c055beb7 Removes virtual destructor from Camera
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.
2025-08-11 01:43:22 +03:00
4d24815f3e Update issue templates 2025-08-11 01:30:26 +03:00
d96b0cd2f7 Marks Camera class as final
Prevents inheritance from the Camera class.
2025-08-11 01:18:39 +03:00
d238bd137f Merge pull request #53 from orange-cpp/u/camera_type_traits
Refactors camera and prediction using traits
2025-08-11 00:47:25 +03:00
17b150499d 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
c7228c9674 Updates googletest submodule
Updates the googletest submodule to the latest commit.

This brings in the latest fixes and improvements from the
googletest project.
2025-08-07 23:33:30 +03:00
7a9f5d4966 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
a16050242a Adds community badges to README
Enhances the README by adding Discord and Telegram badges, providing users with direct access to community channels for support and discussions.
2025-08-06 06:39:57 +03:00
ea8f3d8d51 Adds contributing guidelines
Introduces a CONTRIBUTING.MD file to provide guidelines for
contributing to the project, including prerequisites, setup
instructions, pull request workflow, code style, and building
instructions.

xd

returned back

patch
2025-08-06 06:23:06 +03:00
08d2ccc03a 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
21ec23d77b patch 2025-08-06 05:56:09 +03:00
2c4ff37062 Merge pull request #52 from orange-cpp/feature/more_traits
Adds engine traits for projectile prediction
2025-08-06 05:49:25 +03:00
695a8035b5 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
d12b236e56 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
7a5090d9f6 Marks legacy engine class as final
Prevents further inheritance from the legacy projectile prediction engine class.
2025-08-04 01:12:22 +03:00
ec76a7239c 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
2758f549a3 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
493931ef0f Ignores vcpkg directory
Excludes the vcpkg directory from being tracked by Git.

This prevents accidental commits of external library files
managed by vcpkg, keeping the repository cleaner.
2025-08-03 18:31:02 +03:00
9e1990942b 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
f1984fbe46 Merge pull request #51 from orange-cpp/feature/projectile_pred_custom
Refactors projectile prediction engine
2025-08-03 17:38:08 +03:00
f1fbea21a7 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
4b44ce0667 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
231ef35a0a Merge pull request #49 from orange-cpp/feature/legacy_option
Adds option to enable legacy classes
2025-07-15 11:52:36 +03:00
1aa62cb396 Enables legacy code compilation
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.
2025-07-15 11:51:14 +03:00
8e411771c2 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
d65852d1a4 Update README.md 2025-07-14 23:11:46 +03:00
21f5e82a20 Merge pull request #48 from luadebug/patch-1
Update INSTALL.md
2025-07-14 23:10:39 +03:00
Saikari
851ec37350 Update INSTALL.md 2025-07-14 18:53:41 +03:00
f1cd9dbeb3 Update README.md
fixed ordering
2025-07-14 17:39:16 +03:00
7a1c7d6cc4 Update README.md
made badge in read me smaller
2025-07-14 17:38:50 +03:00
cb704b3621 Merge pull request #47 from luadebug/patch-1
Update README.md

Thx for vcpkg port update <3 u r already in CREDITS.md
2025-07-14 17:37:12 +03:00
Saikari
646d295876 Update README.md 2025-07-14 16:25:16 +03:00
8e09556c25 Update README.md 2025-07-08 17:14:52 +03:00
7dbebc996d Update README.md 2025-07-08 17:13:24 +03:00
278ffba0ff Update README.md 2025-07-08 17:01:56 +03:00
647cf02a38 Renames test fixture for clarity.
Updates the name of the test fixture from "lline_tracer_fixture" to "line_tracer_fixture" for improved readability and consistency in the test code.
2025-07-07 08:28:29 +03:00
4be2986681 Fixes potential compile error
Corrects the usage of `At` method within the unit tests to `at` to resolve a potential compile error due to incorrect case sensitivity.
2025-07-07 08:18:00 +03:00
06d9b4c910 fixed naming in tests 2025-07-07 08:02:35 +03:00
a074fdcb92 Merge pull request #45 from luadebug/patch-1
Check for ImGUI dependency in omathConfig.cmake.in
2025-07-07 05:30:19 +03:00
Saikari
8241d9c355 Update omathConfig.cmake.in 2025-07-07 04:53:56 +03:00
66258f0f6d 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
65541fa2c7 Renames library target to project name
Updates the CMakeLists.txt to use the project name as the library target name instead of hardcoding "omath".

This change ensures consistency and avoids potential conflicts when integrating the library into other projects.
It also aligns the target naming with CMake best practices.
2025-07-06 11:07:15 +03:00
7e4a6134bf added new method 2025-06-23 06:14:17 +03:00
a54a537239 fix 2025-06-17 21:34:25 +03:00
f01bbde537 added banner to repo 2025-06-17 21:33:39 +03:00
2c710555d6 fixed example 2025-06-16 01:40:14 +03:00
9c2be6306c Merge pull request #39 from orange-cpp/u/orange-cpp/writerside
U/orange cpp/writerside
2025-05-21 16:58:19 +03:00
d37840d4ef fixed stuff 2025-05-21 16:57:17 +03:00
b4a3b5d529 added text 2025-05-21 16:47:15 +03:00
c2a772142c fix 2025-05-21 16:47:15 +03:00
76fca7f527 fix 2025-05-21 16:47:15 +03:00
73ccd24e3e improved intro 2025-05-21 16:47:15 +03:00
a642feafb5 added new topic 2025-05-21 16:47:15 +03:00
faf9f34af8 stipped away text 2025-05-21 16:47:15 +03:00
b56801ac91 added files 2025-05-21 16:47:15 +03:00
a81d12d480 fixed version 2025-05-13 09:48:46 +03:00
17eb0cd0dc improved naming 2025-05-13 09:47:08 +03:00
52024285d2 added noexcept 2025-05-13 09:34:39 +03:00
f179aea4d7 removed even float type from vector classes 2025-05-13 09:22:23 +03:00
1196bb86b4 Merge pull request #44 from orange-cpp/feature/noexcept
Feature/noexcept
2025-05-05 02:34:43 +03:00
5489c296e9 added more noexcept 2025-05-05 02:24:23 +03:00
50ddf2d31e added more noexcept 2025-05-05 01:46:50 +03:00
a6e4c0461d added noexcept 2025-05-05 01:16:12 +03:00
6749f9f759 added noexcept for color and angles 2025-05-04 19:16:49 +03:00
9a38d47b0d added noexcept for vector types 2025-05-04 19:13:26 +03:00
f6f8bba032 changed license to zlib 2025-05-04 19:05:10 +03:00
ce08fcdd29 removed useless source files 2025-05-04 19:03:18 +03:00
49ea113348 fixed style 2025-05-04 18:54:33 +03:00
af21f9a946 removed pow 2025-05-04 18:07:35 +03:00
f096f7179f fixed clang format 2025-05-04 17:42:32 +03:00
e025e99d18 Update README.md 2025-05-04 00:55:35 +03:00
122 changed files with 2785 additions and 767 deletions

View File

@@ -33,7 +33,7 @@ BraceWrapping:
BeforeWhile: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeConceptDeclarations: false
ColumnLimit: 120
IncludeBlocks: Merge

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

10
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

BIN
.github/images/banner.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

5
.gitignore vendored
View File

@@ -1,4 +1,5 @@
/cmake-build/
/.idea
/out
*.DS_Store
*.DS_Store
/extlibs/vcpkg
.idea/workspace.xml

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

209
.idea/codeStyles/Project.xml generated Normal file
View File

@@ -0,0 +1,209 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<RiderCodeStyleSettings>
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Classes_0020and_0020structs/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Classes_0020and_0020structs/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Concepts/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Concepts/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enums/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enums/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Unions/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Unions/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Template_0020parameters/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Template_0020parameters/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Parameters/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Local_0020variables/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Local_0020variables/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020variables/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020variables/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020functions/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020functions/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020methods/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020methods/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020fields/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020fields/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020public_0020fields/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020public_0020fields/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Union_0020members/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Union_0020members/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enumerators/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enumerators/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Other_0020constants/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Other_0020constants/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020constants/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020constants/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Namespaces/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;1&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;namespace&quot; /&gt;&lt;type Name=&quot;namespace alias&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Typedefs/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Typedefs/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Macros/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;7&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;macro&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AA_BB&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Properties/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Properties/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Events/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Events/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Types/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;2&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;__interface&quot; /&gt;&lt;type Name=&quot;class&quot; /&gt;&lt;type Name=&quot;concept&quot; /&gt;&lt;type Name=&quot;enum&quot; /&gt;&lt;type Name=&quot;struct&quot; /&gt;&lt;type Name=&quot;type alias&quot; /&gt;&lt;type Name=&quot;type template parameter&quot; /&gt;&lt;type Name=&quot;typedef&quot; /&gt;&lt;type Name=&quot;union&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AaBb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Functions/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;3&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global function&quot; /&gt;&lt;type Name=&quot;member function&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Fields/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;4&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;class field&quot; /&gt;&lt;type Name=&quot;struct field&quot; /&gt;&lt;type Name=&quot;union member&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Variables/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;5&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global variable&quot; /&gt;&lt;type Name=&quot;local variable&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINKAGE_SPECIFICATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0B82708A1BA7774EB13D27F245698A56/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0B82708A1BA7774EB13D27F245698A56/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A42D627FA43B054F91D1E1C4281D8896/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A42D627FA43B054F91D1E1C4281D8896/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A7EBF16DA3BDCB42A0B710704BC8A053/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A7EBF16DA3BDCB42A0B710704BC8A053/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2229A2BE1AA9214483A51F028530E042/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2229A2BE1AA9214483A51F028530E042/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=18392FF80FA40749AA8CC53981A32AE0/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=18392FF80FA40749AA8CC53981A32AE0/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1350D079A82E0740947E85445B5AF47C/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1350D079A82E0740947E85445B5AF47C/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0AFB7787612DF743B09AD9412E48D4CC/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0AFB7787612DF743B09AD9412E48D4CC/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=72514D5DF422D442B71A277F97B72887/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=72514D5DF422D442B71A277F97B72887/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=821F3C5CF47D5640AD3511BCBADE17C4/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=821F3C5CF47D5640AD3511BCBADE17C4/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=8F69F48E2532F54CBAA0039D4557825E/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=8F69F48E2532F54CBAA0039D4557825E/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B6E900853D6D05429D8C57765B2E546A/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B6E900853D6D05429D8C57765B2E546A/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B82A063F0DDD98498A70D8D7EBB97F8D/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B82A063F0DDD98498A70D8D7EBB97F8D/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BBE8AA08E662BF409B2CB08EC597C493/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BBE8AA08E662BF409B2CB08EC597C493/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=5653BA7B6222F349B94149A2A53C35B8/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=5653BA7B6222F349B94149A2A53C35B8/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=4203BE6F332C5149B409B4D5F7197E54/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=4203BE6F332C5149B409B4D5F7197E54/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2B232F1067F0324F8FF4B9D63ACECDB2/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2B232F1067F0324F8FF4B9D63ACECDB2/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BF0D1AE66D64FE4FAF613448A12051A0/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BF0D1AE66D64FE4FAF613448A12051A0/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1CBDD658AEE8EA4382EE1F914B5B3314/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1CBDD658AEE8EA4382EE1F914B5B3314/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A4FAA2257682A94F8C2C93E123FAFC7A/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A4FAA2257682A94F8C2C93E123FAFC7A/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=05D45346A5B5B54F93A9F94C46B14079/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=05D45346A5B5B54F93A9F94C46B14079/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9E4D28CA929F6B4AB5F6F3FEB9E69A47/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9E4D28CA929F6B4AB5F6F3FEB9E69A47/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2AD8EC23F81C6F4AB06852FBF796A3D1/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2AD8EC23F81C6F4AB06852FBF796A3D1/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=299C42B75F5A8C4DB381AE89010A7CC8/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;1&quot; Title=&quot;Namespaces&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;namespace&quot; /&gt;&lt;type Name=&quot;namespace alias&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A279BB9D47B8754E9482D81B5D3B3489/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;2&quot; Title=&quot;Types&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;__interface&quot; /&gt;&lt;type Name=&quot;class&quot; /&gt;&lt;type Name=&quot;concept&quot; /&gt;&lt;type Name=&quot;enum&quot; /&gt;&lt;type Name=&quot;struct&quot; /&gt;&lt;type Name=&quot;type alias&quot; /&gt;&lt;type Name=&quot;type template parameter&quot; /&gt;&lt;type Name=&quot;typedef&quot; /&gt;&lt;type Name=&quot;union&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AaBb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=82D01E1970D2F6419CE2737C415D3A01/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;3&quot; Title=&quot;Functions&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global function&quot; /&gt;&lt;type Name=&quot;member function&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2A0CD4590563D04B89402AC0279B5E10/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;4&quot; Title=&quot;Fields&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;class field&quot; /&gt;&lt;type Name=&quot;struct field&quot; /&gt;&lt;type Name=&quot;union member&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DC1F6BB6E0EFFC49A38E940DB8A84CF6/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;5&quot; Title=&quot;Variables&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global variable&quot; /&gt;&lt;type Name=&quot;lambda&quot; /&gt;&lt;type Name=&quot;local variable&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=AA17EF9DE2E5364DAEBE52F9EBBEA658/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;6&quot; Title=&quot;Parameters&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;function parameter&quot; /&gt;&lt;type Name=&quot;lambda parameter&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9BA140847B0718418342A07C8F0CE1ED/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;7&quot; Title=&quot;Macros&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;macro&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AA_BB&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
</RiderCodeStyleSettings>
<clangFormatSettings>
<option name="ENABLED" value="true" />
</clangFormatSettings>
<files>
<extensions>
<pair source="cpp" header="hpp" fileNamingConvention="SNAKE_CASE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
<pair source="cu" header="cuh" fileNamingConvention="NONE" />
<pair source="ixx" header="" fileNamingConvention="NONE" />
<pair source="mxx" header="" fileNamingConvention="NONE" />
<pair source="cppm" header="" fileNamingConvention="NONE" />
<pair source="ccm" header="" fileNamingConvention="NONE" />
<pair source="cxxm" header="" fileNamingConvention="NONE" />
<pair source="c++m" header="" fileNamingConvention="NONE" />
</extensions>
</files>
</code_scheme>
</component>

6
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

6
.idea/developer-tools.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DeveloperToolsToolWindowSettingsV1" lastSelectedContentNodeId="code-style-formatting" pluginVersion="7.0.0">
<developerToolsConfigurations />
</component>
</project>

435
.idea/editor.xml generated Normal file
View File

@@ -0,0 +1,435 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BackendCodeEditorSettings">
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedOverridenMethod/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppModulePartitionWithSeveralPartitionUnits/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantFwdClassOrEnumSpecifier/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifierADL/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINKAGE_SPECIFICATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020fields/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020fields/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020methods/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020methods/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020public_0020fields/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Class_0020and_0020struct_0020public_0020fields/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Classes_0020and_0020structs/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Classes_0020and_0020structs/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Concepts/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Concepts/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enumerators/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enumerators/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enums/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Enums/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Events/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Events/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Fields/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;4&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;class field&quot; /&gt;&lt;type Name=&quot;struct field&quot; /&gt;&lt;type Name=&quot;union member&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Functions/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;3&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global function&quot; /&gt;&lt;type Name=&quot;member function&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020constants/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020constants/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020functions/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020functions/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020variables/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Global_0020variables/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Local_0020variables/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Local_0020variables/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Macros/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;7&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;macro&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AA_BB&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Namespaces/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;1&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;namespace&quot; /&gt;&lt;type Name=&quot;namespace alias&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Other_0020constants/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Other_0020constants/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Parameters/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Properties/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Properties/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Template_0020parameters/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Template_0020parameters/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Typedefs/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Typedefs/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Types/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;2&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;__interface&quot; /&gt;&lt;type Name=&quot;class&quot; /&gt;&lt;type Name=&quot;concept&quot; /&gt;&lt;type Name=&quot;enum&quot; /&gt;&lt;type Name=&quot;struct&quot; /&gt;&lt;type Name=&quot;type alias&quot; /&gt;&lt;type Name=&quot;type template parameter&quot; /&gt;&lt;type Name=&quot;typedef&quot; /&gt;&lt;type Name=&quot;union&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AaBb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Union_0020members/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Union_0020members/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Unions/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Unions/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Variables/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;5&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global variable&quot; /&gt;&lt;type Name=&quot;local variable&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=05D45346A5B5B54F93A9F94C46B14079/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=05D45346A5B5B54F93A9F94C46B14079/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0AFB7787612DF743B09AD9412E48D4CC/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0AFB7787612DF743B09AD9412E48D4CC/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0B82708A1BA7774EB13D27F245698A56/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=0B82708A1BA7774EB13D27F245698A56/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1350D079A82E0740947E85445B5AF47C/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1350D079A82E0740947E85445B5AF47C/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=18392FF80FA40749AA8CC53981A32AE0/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=18392FF80FA40749AA8CC53981A32AE0/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1CBDD658AEE8EA4382EE1F914B5B3314/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=1CBDD658AEE8EA4382EE1F914B5B3314/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2229A2BE1AA9214483A51F028530E042/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2229A2BE1AA9214483A51F028530E042/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=299C42B75F5A8C4DB381AE89010A7CC8/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;1&quot; Title=&quot;Namespaces&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;namespace&quot; /&gt;&lt;type Name=&quot;namespace alias&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2A0CD4590563D04B89402AC0279B5E10/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;4&quot; Title=&quot;Fields&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;class field&quot; /&gt;&lt;type Name=&quot;struct field&quot; /&gt;&lt;type Name=&quot;union member&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2AD8EC23F81C6F4AB06852FBF796A3D1/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2AD8EC23F81C6F4AB06852FBF796A3D1/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2B232F1067F0324F8FF4B9D63ACECDB2/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2B232F1067F0324F8FF4B9D63ACECDB2/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=4203BE6F332C5149B409B4D5F7197E54/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=4203BE6F332C5149B409B4D5F7197E54/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=5653BA7B6222F349B94149A2A53C35B8/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=5653BA7B6222F349B94149A2A53C35B8/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=72514D5DF422D442B71A277F97B72887/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=72514D5DF422D442B71A277F97B72887/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=821F3C5CF47D5640AD3511BCBADE17C4/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=821F3C5CF47D5640AD3511BCBADE17C4/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=82D01E1970D2F6419CE2737C415D3A01/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;3&quot; Title=&quot;Functions&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global function&quot; /&gt;&lt;type Name=&quot;member function&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=8F69F48E2532F54CBAA0039D4557825E/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=8F69F48E2532F54CBAA0039D4557825E/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9BA140847B0718418342A07C8F0CE1ED/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;7&quot; Title=&quot;Macros&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;macro&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AA_BB&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9E4D28CA929F6B4AB5F6F3FEB9E69A47/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9E4D28CA929F6B4AB5F6F3FEB9E69A47/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A279BB9D47B8754E9482D81B5D3B3489/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;2&quot; Title=&quot;Types&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;__interface&quot; /&gt;&lt;type Name=&quot;class&quot; /&gt;&lt;type Name=&quot;concept&quot; /&gt;&lt;type Name=&quot;enum&quot; /&gt;&lt;type Name=&quot;struct&quot; /&gt;&lt;type Name=&quot;type alias&quot; /&gt;&lt;type Name=&quot;type template parameter&quot; /&gt;&lt;type Name=&quot;typedef&quot; /&gt;&lt;type Name=&quot;union&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;AaBb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A42D627FA43B054F91D1E1C4281D8896/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A42D627FA43B054F91D1E1C4281D8896/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A4FAA2257682A94F8C2C93E123FAFC7A/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A4FAA2257682A94F8C2C93E123FAFC7A/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A7EBF16DA3BDCB42A0B710704BC8A053/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A7EBF16DA3BDCB42A0B710704BC8A053/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=AA17EF9DE2E5364DAEBE52F9EBBEA658/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;6&quot; Title=&quot;Parameters&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;function parameter&quot; /&gt;&lt;type Name=&quot;lambda parameter&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B6E900853D6D05429D8C57765B2E546A/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B6E900853D6D05429D8C57765B2E546A/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B82A063F0DDD98498A70D8D7EBB97F8D/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=B82A063F0DDD98498A70D8D7EBB97F8D/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BBE8AA08E662BF409B2CB08EC597C493/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BBE8AA08E662BF409B2CB08EC597C493/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BF0D1AE66D64FE4FAF613448A12051A0/@EntryIndexRemoved" value="true" type="bool" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=BF0D1AE66D64FE4FAF613448A12051A0/@EntryIndexedValue" value="" type="string" />
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DC1F6BB6E0EFFC49A38E940DB8A84CF6/@EntryIndexedValue" value="&lt;NamingElement Priority=&quot;5&quot; Title=&quot;Variables&quot;&gt;&lt;Descriptor Static=&quot;Indeterminate&quot; Constexpr=&quot;Indeterminate&quot; Const=&quot;Indeterminate&quot; Volatile=&quot;Indeterminate&quot; Accessibility=&quot;NOT_APPLICABLE&quot;&gt;&lt;type Name=&quot;global variable&quot; /&gt;&lt;type Name=&quot;lambda&quot; /&gt;&lt;type Name=&quot;local variable&quot; /&gt;&lt;/Descriptor&gt;&lt;Policy Inspect=&quot;True&quot; WarnAboutPrefixesAndSuffixes=&quot;False&quot; Prefix=&quot;&quot; Suffix=&quot;&quot; Style=&quot;aa_bb&quot; /&gt;&lt;/NamingElement&gt;" type="string" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="CppInconsistentNaming" enabled="true" level="HINT" enabled_by_default="true" />
<inspection_tool class="CppTabsAreDisallowed" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="CppUnnecessaryWhitespace" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

View File

@@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Default" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

12
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakePythonSetting">
<option name="pythonIntegrationState" value="YES" />
</component>
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="CidrRootsConfiguration">
<excludeRoots>
<file path="$PROJECT_DIR$/cmake-build" />
</excludeRoots>
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/omath.iml" filepath="$PROJECT_DIR$/.idea/omath.iml" />
</modules>
</component>
</project>

2
.idea/omath.iml generated Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

7
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/extlibs/googletest" vcs="Git" />
</component>
</project>

View File

@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.26)
project(omath VERSION 1.0.1 LANGUAGES CXX)
project(omath VERSION 3.2.1 LANGUAGES CXX)
include(CMakePackageConfigHelpers)
option(OMATH_BUILD_TESTS "Build unit tests" OFF)
option(OMATH_BUILD_TESTS "Build unit tests" ${PROJECT_IS_TOP_LEVEL})
option(OMATH_THREAT_WARNING_AS_ERROR "Set highest level of warnings and force compiler to treat them as errors" ON)
option(OMATH_BUILD_AS_SHARED_LIBRARY "Build Omath as .so or .dll" OFF)
option(OMATH_USE_AVX2 "Omath will use AVX2 to boost performance" ON)
@@ -14,26 +14,29 @@ option(OMATH_BUILD_EXAMPLES "Build example projects with you can learn & play" O
option(OMATH_STATIC_MSVC_RUNTIME_LIBRARY "Force Omath to link static runtime" OFF)
option(OMATH_SUPRESS_SAFETY_CHECKS "Supress some safety checks in release build to improve general performance" ON)
option(OMATH_USE_UNITY_BUILD "Will enable unity build to speed up compilation" ON)
option(OMATH_ENABLE_LEGACY "Will enable legacy classes that MUST be used ONLY for backward compatibility" OFF)
file(GLOB_RECURSE OMATH_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp")
file(GLOB_RECURSE OMATH_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp")
if (OMATH_BUILD_AS_SHARED_LIBRARY)
add_library(omath SHARED ${OMATH_SOURCES} ${OMATH_HEADERS})
add_library(${PROJECT_NAME} SHARED ${OMATH_SOURCES} ${OMATH_HEADERS})
else ()
add_library(omath STATIC ${OMATH_SOURCES} ${OMATH_HEADERS})
add_library(${PROJECT_NAME} STATIC ${OMATH_SOURCES} ${OMATH_HEADERS})
endif ()
message(STATUS "Building on ${CMAKE_HOST_SYSTEM_NAME}")
add_library(omath::omath ALIAS omath)
message(STATUS "[OMATH]: Building on ${CMAKE_HOST_SYSTEM_NAME}")
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
if (OMATH_IMGUI_INTEGRATION)
target_compile_definitions(omath PUBLIC OMATH_IMGUI_INTEGRATION)
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_IMGUI_INTEGRATION)
# IMGUI is being linked as submodule
if (TARGET imgui)
target_link_libraries(omath PUBLIC imgui)
target_link_libraries(${PROJECT_NAME} PUBLIC imgui)
install(TARGETS imgui
EXPORT omathTargets
ARCHIVE DESTINATION lib
@@ -42,42 +45,46 @@ if (OMATH_IMGUI_INTEGRATION)
else ()
# Assume that IMGUI linked via VCPKG.
find_package(imgui CONFIG REQUIRED)
target_link_libraries(omath PUBLIC imgui::imgui)
target_link_libraries(${PROJECT_NAME} PUBLIC imgui::imgui)
endif ()
endif ()
if (OMATH_USE_AVX2)
target_compile_definitions(omath PUBLIC OMATH_USE_AVX2)
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_USE_AVX2)
endif ()
if (OMATH_SUPRESS_SAFETY_CHECKS)
target_compile_definitions(omath PUBLIC OMATH_SUPRESS_SAFETY_CHECKS)
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_SUPRESS_SAFETY_CHECKS)
endif ()
set_target_properties(omath PROPERTIES
if (OMATH_ENABLE_LEGACY)
target_compile_options(${PROJECT_NAME} PUBLIC OMATH_ENABLE_LEGACY)
endif ()
set_target_properties(${PROJECT_NAME} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
CXX_STANDARD 23
CXX_STANDARD_REQUIRED ON)
if (OMATH_USE_UNITY_BUILD)
set_target_properties(omath PROPERTIES
set_target_properties(${PROJECT_NAME} PROPERTIES
UNITY_BUILD ON
UNITY_BUILD_BATCH_SIZE 20)
endif ()
if (OMATH_STATIC_MSVC_RUNTIME_LIBRARY)
set_target_properties(omath PROPERTIES
set_target_properties(${PROJECT_NAME} PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
)
endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(omath PRIVATE -mavx2 -mfma)
target_compile_options(${PROJECT_NAME} PRIVATE -mavx2 -mfma)
endif ()
target_compile_features(omath PUBLIC cxx_std_23)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_23)
if (OMATH_BUILD_TESTS)
@@ -90,12 +97,17 @@ if (OMATH_BUILD_EXAMPLES)
endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND OMATH_THREAT_WARNING_AS_ERROR)
target_compile_options(omath PRIVATE /W4 /WX)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
elseif (OMATH_THREAT_WARNING_AS_ERROR)
target_compile_options(omath PRIVATE -Wall -Wextra -Wpedantic -Werror)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror)
endif ()
target_include_directories(omath
# Windows SDK redefine min/max via preprocessor and break std::min and std::max
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_definitions(${PROJECT_NAME} INTERFACE NOMINMAX)
endif ()
target_include_directories(${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> # Use this path when building the project
$<INSTALL_INTERFACE:include> # Use this path when the project is installed
@@ -105,21 +117,21 @@ target_include_directories(omath
# Installation rules
# Install the library
install(TARGETS omath
EXPORT omathTargets
ARCHIVE DESTINATION lib COMPONENT omath # For static libraries
LIBRARY DESTINATION lib COMPONENT omath # For shared libraries
RUNTIME DESTINATION bin COMPONENT omath # For executables (on Windows)
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
ARCHIVE DESTINATION lib COMPONENT ${PROJECT_NAME} # For static libraries
LIBRARY DESTINATION lib COMPONENT ${PROJECT_NAME} # For shared libraries
RUNTIME DESTINATION bin COMPONENT ${PROJECT_NAME} # For executables (on Windows)
)
# Install headers as part of omath_component
install(DIRECTORY include/ DESTINATION include COMPONENT omath)
install(DIRECTORY include/ DESTINATION include COMPONENT ${PROJECT_NAME})
# Export omath target for CMake find_package support, also under omath_component
install(EXPORT omathTargets
FILE omathTargets.cmake
NAMESPACE omath::
DESTINATION lib/cmake/omath COMPONENT omath
install(EXPORT ${PROJECT_NAME}Targets
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION lib/cmake/${PROJECT_NAME} COMPONENT ${PROJECT_NAME}
)
@@ -134,12 +146,12 @@ write_basic_package_version_file(
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/omathConfig.cmake.in" # Path to the .in file
"${CMAKE_CURRENT_BINARY_DIR}/omathConfig.cmake" # Output path for the generated file
INSTALL_DESTINATION lib/cmake/omath
INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}
)
# Install the generated config files
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/omathConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/omathConfigVersion.cmake"
DESTINATION lib/cmake/omath
DESTINATION lib/cmake/${PROJECT_NAME}
)

32
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,32 @@
## 🤝 Contributing to OMath or other Orange's Projects
### ❕ Prerequisites
- A working up-to-date OMath installation
- C++ knowledge
- Git knowledge
- Ability to ask for help (Feel free to create empty pull-request or PM a maintainer
in [Telegram](https://t.me/orange_cpp))
### ⏬ Setting up OMath
Please read INSTALL.md file in repository
### 🔀 Pull requests and Branches
In order to send code back to the official OMath repository, you must first create a copy of OMath on your github
account ([fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)) and
then [create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) back to OMath.
OMath developement is performed on multiple branches. Changes are then pull requested into master. By default, changes
merged into master will not roll out to stable build users unless the `stable` tag is updated.
### 📜 Code-Style
The orange code-style can be found in `.clang-format`.
### 📦 Building
OMath has already created the `cmake-build` and `out` directories where cmake/bin files are located. By default, you
can build OMath by running `cmake --build cmake-build/build/windows-release --target omath -j 6` in the source
directory.

View File

@@ -14,6 +14,20 @@ target_link_libraries(main PRIVATE omath::omath)
```
For detailed commands on installing different versions and more information, please refer to Microsoft's [official instructions](https://learn.microsoft.com/en-us/vcpkg/get_started/overview).
## <img width="28px" src="https://xmake.io/assets/img/logo.svg" /> Using xrepo
**Note**: Support xrepo for package management
1. Install [xmake](https://xmake.io/)
2. Run the following command to install the omath package:
```
xrepo install omath
```
xmake.lua
```xmake
add_requires("omath")
target("...")
add_packages("omath")
```
## <img width="28px" src="https://upload.wikimedia.org/wikipedia/commons/e/ef/CMake_logo.svg?" /> Build from source using CMake
1. **Preparation**

20
LICENSE
View File

@@ -1,9 +1,17 @@
The MIT License (MIT)
Copyright (C) 2024-2025 Orange++ <orange-cpp@yandex.ru>
Copyright (c) 2024 Orange++
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

View File

@@ -1,16 +1,31 @@
<div align = center>
![banner](https://i.imgur.com/SM9ccP6.png)
![banner](https://github.com/orange-cpp/omath/blob/main/.github/images/banner.png?raw=true)
![GitHub License](https://img.shields.io/github/license/orange-cpp/omath)
![GitHub contributors](https://img.shields.io/github/contributors/orange-cpp/omath)
![GitHub top language](https://img.shields.io/github/languages/top/orange-cpp/omath)
[![CodeFactor](https://www.codefactor.io/repository/github/orange-cpp/omath/badge)](https://www.codefactor.io/repository/github/orange-cpp/omath)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/orange-cpp/omath/cmake-multi-platform.yml)
[![Vcpkg package](https://repology.org/badge/version-for-repo/vcpkg/orange-math.svg)](https://repology.org/project/orange-math/versions)
![GitHub forks](https://img.shields.io/github/forks/orange-cpp/omath)
[![discord badge](https://dcbadge.limes.pink/api/server/https://discord.gg/eDgdaWbqwZ?style=flat)](https://discord.gg/eDgdaWbqwZ)
[![telegram badge](https://img.shields.io/badge/Telegram-2CA5E0?style=flat-squeare&logo=telegram&logoColor=white)](https://t.me/orangennotes)
</div>
Oranges's Math Library (omath) is a comprehensive, open-source library aimed at providing efficient, reliable, and versatile mathematical functions and algorithms. Developed primarily in C++, this library is designed to cater to a wide range of mathematical operations essential in scientific computing, engineering, and academic research.
<div align = center>
<a href="https://www.star-history.com/#orange-cpp/omath&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=orange-cpp/omath&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=orange-cpp/omath&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=orange-cpp/omath&type=Date" />
</picture>
</a>
</div>
## 👁‍🗨 Features
- **Efficiency**: Optimized for performance, ensuring quick computations using AVX2.
- **Versatility**: Includes a wide array of mathematical functions and algorithms.
@@ -27,7 +42,8 @@ Oranges's Math Library (omath) is a comprehensive, open-source library aimed at
| Source | ✅YES |
| Unity | ✅YES |
| IWEngine | ✅YES |
| Unreal | ❌NO |
| OpenGL | ✅YES |
| Unreal | ✅YES |
## Supported Operating Systems
@@ -41,14 +57,24 @@ Oranges's Math Library (omath) is a comprehensive, open-source library aimed at
Please read our [installation guide](https://github.com/orange-cpp/omath/blob/main/INSTALL.md). If this link doesn't work check out INSTALL.md file.
## ❔ Usage
Simple world to screen function
ESP example
```c++
TEST(UnitTestProjection, IsPointOnScreen)
{
const omath::projection::Camera camera({0.f, 0.f, 0.f}, {0, 0.f, 0.f} , {1920.f, 1080.f}, 110.f, 0.1f, 500.f);
omath::source_engine::Camera cam{localPlayer.GetCameraOrigin(),
localPlayer.GetAimPunch(),
{1920.f, 1080.f},
localPlayer.GetFieldOfView(),
0.01.f, 30000.f};
const auto proj = camera.WorldToScreen({100, 0, 15});
EXPECT_TRUE(proj.has_value());
for (auto ent: apex_sdk::EntityList::GetAllEntities())
{
const auto bottom = cam.world_to_screen(ent.GetOrigin());
const auto top = cam.world_to_screen(ent.GetBonePosition(8) + omath::Vector3<float>{0, 0, 10});
const auto ent_health = ent.GetHealth();
if (!top || !bottom || ent_health <= 0)
continue;
// esp rendering...
}
```
## Showcase
@@ -70,7 +96,7 @@ Or even advanced projectile aimbot
Contributions to `omath` are welcome! Please read `CONTRIBUTING.md` for details on our code of conduct and the process for submitting pull requests.
## 📜 License
This project is licensed under the MIT - see the `LICENSE` file for details.
This project is licensed under the ZLIB - see the `LICENSE` file for details.
## 💘 Acknowledgments
- [All contributors](https://github.com/orange-cpp/omath/graphs/contributors)

View File

@@ -2,6 +2,10 @@
include(CMakeFindDependencyMacro)
if (@OMATH_IMGUI_INTEGRATION@)
find_dependency(imgui CONFIG)
endif()
# Load the targets for the omath library
include("${CMAKE_CURRENT_LIST_DIR}/omathTargets.cmake")
check_required_components(omath)

View File

@@ -15,8 +15,8 @@ int main()
float fov = 0;
float near = 0;
float far = 0;
float viewPortWidth = 0;
float viewPortHeight = 0;
float view_port_width = 0;
float view_port_height = 0;
std::print("Enter camera fov: ");
std::cin >> fov;
@@ -28,13 +28,13 @@ int main()
std::cin >> far;
std::print("Enter camera screen width: ");
std::cin >> viewPortWidth;
std::cin >> view_port_width;
std::print("Enter camera screen height: ");
std::cin >> viewPortHeight;
std::cin >> view_port_height;
const auto mat =
omath::opengl_engine::CalcPerspectiveProjectionMatrix(fov, viewPortWidth / viewPortHeight, near, far);
omath::opengl_engine::calc_perspective_projection_matrix(fov, view_port_width / view_port_height, near, far);
std::print("{}", mat.ToString());
std::print("{}", mat.to_string());
};

View File

@@ -13,5 +13,5 @@ namespace omath::primitives
[[nodiscard]]
std::array<Triangle<Vector3<float>>, 12> create_box(const Vector3<float>& top, const Vector3<float>& bottom,
const Vector3<float>& dir_forward, const Vector3<float>& dir_right,
float ratio = 4.f);
float ratio = 4.f) noexcept;
}

View File

@@ -20,7 +20,7 @@ namespace omath
class Angle
{
Type m_angle;
constexpr explicit Angle(const Type& degrees)
constexpr explicit Angle(const Type& degrees) noexcept
{
if constexpr (flags == AngleFlags::Normalized)
m_angle = angles::wrap_angle(degrees, min, max);
@@ -36,68 +36,68 @@ namespace omath
public:
[[nodiscard]]
constexpr static Angle from_degrees(const Type& degrees)
constexpr static Angle from_degrees(const Type& degrees) noexcept
{
return Angle{degrees};
}
constexpr Angle(): m_angle(0)
constexpr Angle() noexcept: m_angle(0)
{
}
[[nodiscard]]
constexpr static Angle from_radians(const Type& degrees)
constexpr static Angle from_radians(const Type& degrees) noexcept
{
return Angle{angles::radians_to_degrees<Type>(degrees)};
}
[[nodiscard]]
constexpr const Type& operator*() const
constexpr const Type& operator*() const noexcept
{
return m_angle;
}
[[nodiscard]]
constexpr Type as_degrees() const
constexpr Type as_degrees() const noexcept
{
return m_angle;
}
[[nodiscard]]
constexpr Type as_radians() const
constexpr Type as_radians() const noexcept
{
return angles::degrees_to_radians(m_angle);
}
[[nodiscard]]
Type sin() const
Type sin() const noexcept
{
return std::sin(as_radians());
}
[[nodiscard]]
Type cos() const
Type cos() const noexcept
{
return std::cos(as_radians());
}
[[nodiscard]]
Type tan() const
Type tan() const noexcept
{
return std::tan(as_radians());
}
[[nodiscard]]
Type atan() const
Type atan() const noexcept
{
return std::atan(as_radians());
}
[[nodiscard]]
Type cot() const
Type cot() const noexcept
{
return cos() / sin();
}
constexpr Angle& operator+=(const Angle& other)
constexpr Angle& operator+=(const Angle& other) noexcept
{
if constexpr (flags == AngleFlags::Normalized)
m_angle = angles::wrap_angle(m_angle + other.m_angle, min, max);
@@ -114,16 +114,15 @@ namespace omath
}
[[nodiscard]]
constexpr std::partial_ordering operator<=>(const Angle& other) const
= default;
constexpr std::partial_ordering operator<=>(const Angle& other) const noexcept = default;
constexpr Angle& operator-=(const Angle& other)
constexpr Angle& operator-=(const Angle& other) noexcept
{
return operator+=(-other);
}
[[nodiscard]]
constexpr Angle& operator+(const Angle& other)
constexpr Angle& operator+(const Angle& other) noexcept
{
if constexpr (flags == AngleFlags::Normalized)
return {angles::wrap_angle(m_angle + other.m_angle, min, max)};
@@ -138,13 +137,13 @@ namespace omath
}
[[nodiscard]]
constexpr Angle& operator-(const Angle& other)
constexpr Angle& operator-(const Angle& other) noexcept
{
return operator+(-other);
}
[[nodiscard]]
constexpr Angle operator-() const
constexpr Angle operator-() const noexcept
{
return Angle{-m_angle};
}

View File

@@ -10,21 +10,21 @@ namespace omath::angles
{
template<class Type>
requires std::is_floating_point_v<Type>
[[nodiscard]] constexpr Type radians_to_degrees(const Type& radians)
[[nodiscard]] constexpr Type radians_to_degrees(const Type& radians) noexcept
{
return radians * (static_cast<Type>(180) / std::numbers::pi_v<Type>);
}
template<class Type>
requires std::is_floating_point_v<Type>
[[nodiscard]] constexpr Type degrees_to_radians(const Type& degrees)
[[nodiscard]] constexpr Type degrees_to_radians(const Type& degrees) noexcept
{
return degrees * (std::numbers::pi_v<Type> / static_cast<Type>(180));
}
template<class Type>
requires std::is_floating_point_v<Type>
[[nodiscard]] Type horizontal_fov_to_vertical(const Type& horizontal_fov, const Type& aspect)
[[nodiscard]] Type horizontal_fov_to_vertical(const Type& horizontal_fov, const Type& aspect) noexcept
{
const auto fov_rad = degrees_to_radians(horizontal_fov);
@@ -35,19 +35,19 @@ namespace omath::angles
template<class Type>
requires std::is_floating_point_v<Type>
[[nodiscard]] Type vertical_fov_to_horizontal(const Type& vertical_fov, const Type& aspect)
[[nodiscard]] Type vertical_fov_to_horizontal(const Type& vertical_fov, const Type& aspect) noexcept
{
const auto fov_as_radians = degrees_to_radians(vertical_fov);
const auto horizontal_fov
= static_cast<Type>(2) * std::atan(std::tan(fov_as_radians / static_cast<Type>(2)) * aspect);
const auto horizontal_fov =
static_cast<Type>(2) * std::atan(std::tan(fov_as_radians / static_cast<Type>(2)) * aspect);
return radians_to_degrees(horizontal_fov);
}
template<class Type>
requires std::is_arithmetic_v<Type>
[[nodiscard]] Type wrap_angle(const Type& angle, const Type& min, const Type& max)
[[nodiscard]] Type wrap_angle(const Type& angle, const Type& min, const Type& max) noexcept
{
if (angle <= max && angle >= min)
return angle;

View File

@@ -16,10 +16,10 @@ namespace omath::collision
bool infinite_length = false;
[[nodiscard]]
Vector3<float> direction_vector() const;
Vector3<float> direction_vector() const noexcept;
[[nodiscard]]
Vector3<float> direction_vector_normalized() const;
Vector3<float> direction_vector_normalized() const noexcept;
};
class LineTracer
{
@@ -27,11 +27,11 @@ namespace omath::collision
LineTracer() = delete;
[[nodiscard]]
static bool can_trace_line(const Ray& ray, const Triangle<Vector3<float>>& triangle);
static bool can_trace_line(const Ray& ray, const Triangle<Vector3<float>>& triangle) noexcept;
// Realization of MöllerTrumbore intersection algorithm
// https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm
[[nodiscard]]
static Vector3<float> get_ray_hit_point(const Ray& ray, const Triangle<Vector3<float>>& triangle);
static Vector3<float> get_ray_hit_point(const Ray& ray, const Triangle<Vector3<float>>& triangle) noexcept;
};
} // namespace omath::collision

View File

@@ -8,14 +8,6 @@
#include "omath/vector4.hpp"
#include <cstdint>
#ifdef max
#undef max
#endif
#ifdef min
#undef min
#endif
namespace omath
{
struct Hsv
@@ -28,20 +20,20 @@ namespace omath
class Color final : public Vector4<float>
{
public:
constexpr Color(const float r, const float g, const float b, const float a): Vector4(r, g, b, a)
constexpr Color(const float r, const float g, const float b, const float a) noexcept: Vector4(r, g, b, a)
{
clamp(0.f, 1.f);
}
constexpr explicit Color() = default;
constexpr explicit Color() noexcept = default;
[[nodiscard]]
constexpr static Color from_rgba(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a)
constexpr static Color from_rgba(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a) noexcept
{
return Color{Vector4(r, g, b, a) / 255.f};
}
[[nodiscard]]
constexpr static Color from_hsv(float hue, const float saturation, const float value)
constexpr static Color from_hsv(float hue, const float saturation, const float value) noexcept
{
float r{}, g{}, b{};
@@ -82,13 +74,13 @@ namespace omath
}
[[nodiscard]]
constexpr static Color from_hsv(const Hsv& hsv)
constexpr static Color from_hsv(const Hsv& hsv) noexcept
{
return from_hsv(hsv.hue, hsv.saturation, hsv.value);
}
[[nodiscard]]
constexpr Hsv to_hsv() const
constexpr Hsv to_hsv() const noexcept
{
Hsv hsv_data;
@@ -120,11 +112,11 @@ namespace omath
return hsv_data;
}
constexpr explicit Color(const Vector4& vec): Vector4(vec)
constexpr explicit Color(const Vector4& vec) noexcept: Vector4(vec)
{
clamp(0.f, 1.f);
}
constexpr void set_hue(const float hue)
constexpr void set_hue(const float hue) noexcept
{
auto hsv = to_hsv();
hsv.hue = hue;
@@ -132,7 +124,7 @@ namespace omath
*this = from_hsv(hsv);
}
constexpr void set_saturation(const float saturation)
constexpr void set_saturation(const float saturation) noexcept
{
auto hsv = to_hsv();
hsv.saturation = saturation;
@@ -140,7 +132,7 @@ namespace omath
*this = from_hsv(hsv);
}
constexpr void set_value(const float value)
constexpr void set_value(const float value) noexcept
{
auto hsv = to_hsv();
hsv.value = value;
@@ -148,7 +140,7 @@ namespace omath
*this = from_hsv(hsv);
}
[[nodiscard]]
constexpr Color blend(const Color& other, float ratio) const
constexpr Color blend(const Color& other, float ratio) const noexcept
{
ratio = std::clamp(ratio, 0.f, 1.f);
return Color(*this * (1.f - ratio) + other * ratio);
@@ -166,5 +158,12 @@ namespace omath
{
return {0.f, 0.f, 1.f, 1.f};
}
#ifdef OMATH_IMGUI_INTEGRATION
[[nodiscard]]
ImColor to_im_color() const noexcept
{
return {to_im_vec4()};
}
#endif
};
} // namespace omath

View File

@@ -5,18 +5,9 @@
#pragma once
#include "omath/engines/iw_engine/constants.hpp"
#include "omath/projection/camera.hpp"
#include "traits/camera_trait.hpp"
namespace omath::iw_engine
{
class Camera final : public projection::Camera<Mat4X4, ViewAngles>
{
public:
Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, float near, float far);
void look_at(const Vector3<float>& target) override;
protected:
[[nodiscard]] Mat4X4 calc_view_matrix() const override;
[[nodiscard]] Mat4X4 calc_projection_matrix() const override;
};
using Camera = projection::Camera<Mat4X4, ViewAngles, CameraTrait>;
} // namespace omath::iw_engine

View File

@@ -8,19 +8,19 @@
namespace omath::iw_engine
{
[[nodiscard]]
Vector3<float> forward_vector(const ViewAngles& angles);
Vector3<float> forward_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> right_vector(const ViewAngles& angles);
Vector3<float> right_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> up_vector(const ViewAngles& angles);
Vector3<float> up_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Mat4X4 rotation_matrix(const ViewAngles& angles);
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept;
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin);
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far);
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far) noexcept;
} // namespace omath::iw_engine

View File

@@ -0,0 +1,24 @@
//
// Created by Vlad on 8/10/2025.
//
#pragma once
#include "omath/engines/iw_engine/constants.hpp"
#include "omath/projection/camera.hpp"
namespace omath::iw_engine
{
class CameraTrait final
{
public:
[[nodiscard]]
static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept;
[[nodiscard]]
static Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
static Mat4X4 calc_projection_matrix(const projection::FieldOfView& fov, const projection::ViewPort& view_port,
float near, float far) noexcept;
};
} // namespace omath::iw_engine

View File

@@ -0,0 +1,79 @@
//
// Created by Vlad on 8/6/2025.
//
#pragma once
#include "omath/engines/iw_engine/formulas.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include <optional>
namespace omath::iw_engine
{
class PredEngineTrait final
{
public:
constexpr static Vector3<float> predict_projectile_position(const projectile_prediction::Projectile& projectile,
const float pitch, const float yaw,
const float time, const float gravity) noexcept
{
auto current_pos = projectile.m_origin
+ forward_vector({PitchAngle::from_degrees(-pitch), YawAngle::from_degrees(yaw),
RollAngle::from_degrees(0)})
* projectile.m_launch_speed * time;
current_pos.z -= (gravity * projectile.m_gravity_scale) * (time * time) * 0.5f;
return current_pos;
}
[[nodiscard]]
static constexpr Vector3<float> predict_target_position(const projectile_prediction::Target& target,
const float time, const float gravity) noexcept
{
auto predicted = target.m_origin + target.m_velocity * time;
if (target.m_is_airborne)
predicted.z -= gravity * (time * time) * 0.5f;
return predicted;
}
[[nodiscard]]
static float calc_vector_2d_distance(const Vector3<float>& delta) noexcept
{
return std::sqrt(delta.x * delta.x + delta.y * delta.y);
}
[[nodiscard]]
constexpr static float get_vector_height_coordinate(const Vector3<float>& vec) noexcept
{
return vec.z;
}
[[nodiscard]]
static Vector3<float> calc_viewpoint_from_angles(const projectile_prediction::Projectile& projectile,
Vector3<float> predicted_target_position,
const std::optional<float> projectile_pitch) noexcept
{
const auto delta2d = calc_vector_2d_distance(predicted_target_position - projectile.m_origin);
const auto height = delta2d * std::tan(angles::degrees_to_radians(projectile_pitch.value()));
return {predicted_target_position.x, predicted_target_position.y, projectile.m_origin.z + height};
}
// Due to specification of maybe_calculate_projectile_launch_pitch_angle, pitch angle must be:
// 89 look up, -89 look down
[[nodiscard]]
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto distance = origin.distance_to(view_to);
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::asin(delta.z / distance));
}
[[nodiscard]]
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::atan2(delta.y, delta.x));
};
};
} // namespace omath::iw_engine

View File

@@ -4,16 +4,9 @@
#pragma once
#include "omath/engines/opengl_engine/constants.hpp"
#include "omath/projection/camera.hpp"
#include "traits/camera_trait.hpp"
namespace omath::opengl_engine
{
class Camera final : public projection::Camera<Mat4X4, ViewAngles>
{
public:
Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, float near, float far);
void look_at(const Vector3<float>& target) override;
[[nodiscard]] Mat4X4 calc_view_matrix() const override;
[[nodiscard]] Mat4X4 calc_projection_matrix() const override;
};
using Camera = projection::Camera<Mat4X4, ViewAngles, CameraTrait>;
} // namespace omath::opengl_engine

View File

@@ -8,19 +8,19 @@
namespace omath::opengl_engine
{
[[nodiscard]]
Vector3<float> forward_vector(const ViewAngles& angles);
Vector3<float> forward_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> right_vector(const ViewAngles& angles);
Vector3<float> right_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> up_vector(const ViewAngles& angles);
Vector3<float> up_vector(const ViewAngles& angles) noexcept;
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin);
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
Mat4X4 rotation_matrix(const ViewAngles& angles);
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept;
[[nodiscard]]
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far);
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far) noexcept;
} // namespace omath::opengl_engine

View File

@@ -0,0 +1,24 @@
//
// Created by Vlad on 8/10/2025.
//
#pragma once
#include "omath/engines/opengl_engine/constants.hpp"
#include "omath/projection/camera.hpp"
namespace omath::opengl_engine
{
class CameraTrait final
{
public:
[[nodiscard]]
static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept;
[[nodiscard]]
static Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
static Mat4X4 calc_projection_matrix(const projection::FieldOfView& fov, const projection::ViewPort& view_port,
float near, float far) noexcept;
};
} // namespace omath::opengl_engine

View File

@@ -0,0 +1,78 @@
//
// Created by Vlad on 8/6/2025.
//
#pragma once
#include "omath/engines/opengl_engine/formulas.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include <optional>
namespace omath::opengl_engine
{
class PredEngineTrait final
{
public:
constexpr static Vector3<float> predict_projectile_position(const projectile_prediction::Projectile& projectile,
const float pitch, const float yaw,
const float time, const float gravity) noexcept
{
auto current_pos = projectile.m_origin
+ forward_vector({PitchAngle::from_degrees(-pitch), YawAngle::from_degrees(yaw),
RollAngle::from_degrees(0)})
* projectile.m_launch_speed * time;
current_pos.y -= (gravity * projectile.m_gravity_scale) * (time * time) * 0.5f;
return current_pos;
}
[[nodiscard]]
static constexpr Vector3<float> predict_target_position(const projectile_prediction::Target& target,
const float time, const float gravity) noexcept
{
auto predicted = target.m_origin + target.m_velocity * time;
if (target.m_is_airborne)
predicted.y -= gravity * (time * time) * 0.5f;
return predicted;
}
[[nodiscard]]
static float calc_vector_2d_distance(const Vector3<float>& delta) noexcept
{
return std::sqrt(delta.x * delta.x + delta.z * delta.z);
}
[[nodiscard]]
constexpr static float get_vector_height_coordinate(const Vector3<float>& vec) noexcept
{
return vec.y;
}
[[nodiscard]]
static Vector3<float> calc_viewpoint_from_angles(const projectile_prediction::Projectile& projectile,
Vector3<float> predicted_target_position,
const std::optional<float> projectile_pitch) noexcept
{
const auto delta2d = calc_vector_2d_distance(predicted_target_position - projectile.m_origin);
const auto height = delta2d * std::tan(angles::degrees_to_radians(projectile_pitch.value()));
return {predicted_target_position.x, predicted_target_position.y + height, projectile.m_origin.z};
}
// Due to specification of maybe_calculate_projectile_launch_pitch_angle, pitch angle must be:
// 89 look up, -89 look down
[[nodiscard]]
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto distance = origin.distance_to(view_to);
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::asin(delta.y / distance));
}
[[nodiscard]]
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::atan2(delta.z, delta.x));
};
};
} // namespace omath::opengl_engine

View File

@@ -4,18 +4,8 @@
#pragma once
#include "omath/engines/source_engine/constants.hpp"
#include "omath/projection/camera.hpp"
#include "traits/camera_trait.hpp"
namespace omath::source_engine
{
class Camera final : public projection::Camera<Mat4X4, ViewAngles>
{
public:
Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, float near, float far);
void look_at(const Vector3<float>& target) override;
protected:
[[nodiscard]] Mat4X4 calc_view_matrix() const override;
[[nodiscard]] Mat4X4 calc_projection_matrix() const override;
};
using Camera = projection::Camera<Mat4X4, ViewAngles, CameraTrait>;
} // namespace omath::source_engine

View File

@@ -7,19 +7,19 @@
namespace omath::source_engine
{
[[nodiscard]]
Vector3<float> forward_vector(const ViewAngles& angles);
Vector3<float> forward_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Mat4X4 rotation_matrix(const ViewAngles& angles);
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> right_vector(const ViewAngles& angles);
Vector3<float> right_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> up_vector(const ViewAngles& angles);
Vector3<float> up_vector(const ViewAngles& angles) noexcept;
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin);
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far);
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far) noexcept;
} // namespace omath::source_engine

View File

@@ -0,0 +1,24 @@
//
// Created by Vlad on 8/10/2025.
//
#pragma once
#include "omath/engines/source_engine/constants.hpp"
#include "omath/projection/camera.hpp"
namespace omath::source_engine
{
class CameraTrait final
{
public:
[[nodiscard]]
static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept;
[[nodiscard]]
static Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
static Mat4X4 calc_projection_matrix(const projection::FieldOfView& fov, const projection::ViewPort& view_port,
float near, float far) noexcept;
};
} // namespace omath::source_engine

View File

@@ -0,0 +1,79 @@
//
// Created by Vlad on 8/3/2025.
//
#pragma once
#include "omath/engines/source_engine/formulas.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include <optional>
namespace omath::source_engine
{
class PredEngineTrait final
{
public:
constexpr static Vector3<float> predict_projectile_position(const projectile_prediction::Projectile& projectile,
const float pitch, const float yaw,
const float time, const float gravity) noexcept
{
auto current_pos = projectile.m_origin
+ forward_vector({PitchAngle::from_degrees(-pitch), YawAngle::from_degrees(yaw),
RollAngle::from_degrees(0)})
* projectile.m_launch_speed * time;
current_pos.z -= (gravity * projectile.m_gravity_scale) * (time * time) * 0.5f;
return current_pos;
}
[[nodiscard]]
static constexpr Vector3<float> predict_target_position(const projectile_prediction::Target& target,
const float time, const float gravity) noexcept
{
auto predicted = target.m_origin + target.m_velocity * time;
if (target.m_is_airborne)
predicted.z -= gravity * (time * time) * 0.5f;
return predicted;
}
[[nodiscard]]
static float calc_vector_2d_distance(const Vector3<float>& delta) noexcept
{
return std::sqrt(delta.x * delta.x + delta.y * delta.y);
}
[[nodiscard]]
constexpr static float get_vector_height_coordinate(const Vector3<float>& vec) noexcept
{
return vec.z;
}
[[nodiscard]]
static Vector3<float> calc_viewpoint_from_angles(const projectile_prediction::Projectile& projectile,
Vector3<float> predicted_target_position,
const std::optional<float> projectile_pitch) noexcept
{
const auto delta2d = calc_vector_2d_distance(predicted_target_position - projectile.m_origin);
const auto height = delta2d * std::tan(angles::degrees_to_radians(projectile_pitch.value()));
return {predicted_target_position.x, predicted_target_position.y, projectile.m_origin.z + height};
}
// Due to specification of maybe_calculate_projectile_launch_pitch_angle, pitch angle must be:
// 89 look up, -89 look down
[[nodiscard]]
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto distance = origin.distance_to(view_to);
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::asin(delta.z / distance));
}
[[nodiscard]]
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::atan2(delta.y, delta.x));
};
};
} // namespace omath::source_engine

View File

@@ -5,18 +5,9 @@
#pragma once
#include "omath/engines/unity_engine/constants.hpp"
#include "omath/projection/camera.hpp"
#include "traits/camera_trait.hpp"
namespace omath::unity_engine
{
class Camera final : public projection::Camera<Mat4X4, ViewAngles>
{
public:
Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, float near, float far);
void look_at(const Vector3<float>& target) override;
protected:
[[nodiscard]] Mat4X4 calc_view_matrix() const override;
[[nodiscard]] Mat4X4 calc_projection_matrix() const override;
};
using Camera = projection::Camera<Mat4X4, ViewAngles, CameraTrait>;
} // namespace omath::unity_engine

View File

@@ -8,19 +8,19 @@
namespace omath::unity_engine
{
[[nodiscard]]
Vector3<float> forward_vector(const ViewAngles& angles);
Vector3<float> forward_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> right_vector(const ViewAngles& angles);
Vector3<float> right_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> up_vector(const ViewAngles& angles);
Vector3<float> up_vector(const ViewAngles& angles) noexcept;
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin);
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
Mat4X4 rotation_matrix(const ViewAngles& angles);
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept;
[[nodiscard]]
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far);
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far) noexcept;
} // namespace omath::unity_engine

View File

@@ -0,0 +1,24 @@
//
// Created by Vlad on 8/10/2025.
//
#pragma once
#include "omath/engines/unity_engine/formulas.hpp"
#include "omath/projection/camera.hpp"
namespace omath::unity_engine
{
class CameraTrait final
{
public:
[[nodiscard]]
static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept;
[[nodiscard]]
static Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
static Mat4X4 calc_projection_matrix(const projection::FieldOfView& fov, const projection::ViewPort& view_port,
float near, float far) noexcept;
};
} // namespace omath::unity_engine

View File

@@ -0,0 +1,78 @@
//
// Created by Vlad on 8/6/2025.
//
#pragma once
#include "omath/engines/unity_engine/formulas.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include <optional>
namespace omath::unity_engine
{
class PredEngineTrait final
{
public:
constexpr static Vector3<float> predict_projectile_position(const projectile_prediction::Projectile& projectile,
const float pitch, const float yaw,
const float time, const float gravity) noexcept
{
auto current_pos = projectile.m_origin
+ forward_vector({PitchAngle::from_degrees(-pitch), YawAngle::from_degrees(yaw),
RollAngle::from_degrees(0)})
* projectile.m_launch_speed * time;
current_pos.y -= (gravity * projectile.m_gravity_scale) * (time * time) * 0.5f;
return current_pos;
}
[[nodiscard]]
static constexpr Vector3<float> predict_target_position(const projectile_prediction::Target& target,
const float time, const float gravity) noexcept
{
auto predicted = target.m_origin + target.m_velocity * time;
if (target.m_is_airborne)
predicted.y -= gravity * (time * time) * 0.5f;
return predicted;
}
[[nodiscard]]
static float calc_vector_2d_distance(const Vector3<float>& delta) noexcept
{
return std::sqrt(delta.x * delta.x + delta.z * delta.z);
}
[[nodiscard]]
constexpr static float get_vector_height_coordinate(const Vector3<float>& vec) noexcept
{
return vec.y;
}
[[nodiscard]]
static Vector3<float> calc_viewpoint_from_angles(const projectile_prediction::Projectile& projectile,
Vector3<float> predicted_target_position,
const std::optional<float> projectile_pitch) noexcept
{
const auto delta2d = calc_vector_2d_distance(predicted_target_position - projectile.m_origin);
const auto height = delta2d * std::tan(angles::degrees_to_radians(projectile_pitch.value()));
return {predicted_target_position.x, predicted_target_position.y + height, projectile.m_origin.z};
}
// Due to specification of maybe_calculate_projectile_launch_pitch_angle, pitch angle must be:
// 89 look up, -89 look down
[[nodiscard]]
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto distance = origin.distance_to(view_to);
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::asin(delta.y / distance));
}
[[nodiscard]]
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::atan2(delta.z, delta.x));
};
};
} // namespace omath::unity_engine

View File

@@ -0,0 +1,13 @@
//
// Created by Vlad on 3/22/2025.
//
#pragma once
#include "omath/engines/unreal_engine/constants.hpp"
#include "omath/projection/camera.hpp"
#include "traits/camera_trait.hpp"
namespace omath::unreal_engine
{
using Camera = projection::Camera<Mat4X4, ViewAngles, CameraTrait>;
} // namespace omath::unreal_engine

View File

@@ -0,0 +1,26 @@
//
// Created by Vlad on 3/22/2025.
//
#pragma once
#include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp>
namespace omath::unreal_engine
{
constexpr Vector3<float> k_abs_up = {0, 0, 1};
constexpr Vector3<float> k_abs_right = {0, 1, 0};
constexpr Vector3<float> k_abs_forward = {1, 0, 0};
using Mat4X4 = Mat<4, 4, float, MatStoreType::ROW_MAJOR>;
using Mat3X3 = Mat<4, 4, float, MatStoreType::ROW_MAJOR>;
using Mat1X3 = Mat<1, 3, float, MatStoreType::ROW_MAJOR>;
using PitchAngle = Angle<float, -90.f, 90.f, AngleFlags::Clamped>;
using YawAngle = Angle<float, -180.f, 180.f, AngleFlags::Normalized>;
using RollAngle = Angle<float, -180.f, 180.f, AngleFlags::Normalized>;
using ViewAngles = omath::ViewAngles<PitchAngle, YawAngle, RollAngle>;
} // namespace omath::unreal_engine

View File

@@ -0,0 +1,26 @@
//
// Created by Vlad on 3/22/2025.
//
#pragma once
#include "omath/engines/unreal_engine/constants.hpp"
namespace omath::unreal_engine
{
[[nodiscard]]
Vector3<float> forward_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> right_vector(const ViewAngles& angles) noexcept;
[[nodiscard]]
Vector3<float> up_vector(const ViewAngles& angles) noexcept;
[[nodiscard]] Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept;
[[nodiscard]]
Mat4X4 calc_perspective_projection_matrix(float field_of_view, float aspect_ratio, float near, float far) noexcept;
} // namespace omath::unreal_engine

View File

@@ -0,0 +1,24 @@
//
// Created by Vlad on 8/10/2025.
//
#pragma once
#include "omath/engines/unreal_engine/formulas.hpp"
#include "omath/projection/camera.hpp"
namespace omath::unreal_engine
{
class CameraTrait final
{
public:
[[nodiscard]]
static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept;
[[nodiscard]]
static Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept;
[[nodiscard]]
static Mat4X4 calc_projection_matrix(const projection::FieldOfView& fov, const projection::ViewPort& view_port,
float near, float far) noexcept;
};
} // namespace omath::unreal_engine

View File

@@ -0,0 +1,78 @@
//
// Created by Vlad on 8/6/2025.
//
#pragma once
#include "omath/engines/unreal_engine/formulas.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include <optional>
namespace omath::unreal_engine
{
class PredEngineTrait final
{
public:
constexpr static Vector3<float> predict_projectile_position(const projectile_prediction::Projectile& projectile,
const float pitch, const float yaw,
const float time, const float gravity) noexcept
{
auto current_pos = projectile.m_origin
+ forward_vector({PitchAngle::from_degrees(-pitch), YawAngle::from_degrees(yaw),
RollAngle::from_degrees(0)})
* projectile.m_launch_speed * time;
current_pos.y -= (gravity * projectile.m_gravity_scale) * (time * time) * 0.5f;
return current_pos;
}
[[nodiscard]]
static constexpr Vector3<float> predict_target_position(const projectile_prediction::Target& target,
const float time, const float gravity) noexcept
{
auto predicted = target.m_origin + target.m_velocity * time;
if (target.m_is_airborne)
predicted.y -= gravity * (time * time) * 0.5f;
return predicted;
}
[[nodiscard]]
static float calc_vector_2d_distance(const Vector3<float>& delta) noexcept
{
return std::sqrt(delta.x * delta.x + delta.z * delta.z);
}
[[nodiscard]]
constexpr static float get_vector_height_coordinate(const Vector3<float>& vec) noexcept
{
return vec.y;
}
[[nodiscard]]
static Vector3<float> calc_viewpoint_from_angles(const projectile_prediction::Projectile& projectile,
Vector3<float> predicted_target_position,
const std::optional<float> projectile_pitch) noexcept
{
const auto delta2d = calc_vector_2d_distance(predicted_target_position - projectile.m_origin);
const auto height = delta2d * std::tan(angles::degrees_to_radians(projectile_pitch.value()));
return {predicted_target_position.x, predicted_target_position.y, projectile.m_origin.z + height};
}
// Due to specification of maybe_calculate_projectile_launch_pitch_angle, pitch angle must be:
// 89 look up, -89 look down
[[nodiscard]]
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto distance = origin.distance_to(view_to);
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::asin(delta.z / distance));
}
[[nodiscard]]
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
{
const auto delta = view_to - origin;
return angles::radians_to_degrees(std::atan2(delta.y, delta.x));
};
};
} // namespace omath::unreal_engine

View File

@@ -451,7 +451,6 @@ namespace omath
{up.x, up.y, up.z, 0},
{forward.x, forward.y, forward.z, 0},
{0, 0, 0, 1},
} * mat_translation<Type, St>(-camera_origin);
}

View File

@@ -1,4 +1,7 @@
#pragma once
#ifdef OMATH_ENABLE_LEGACY
#include "omath/vector3.hpp"
#include <initializer_list>
#include <memory>
@@ -106,3 +109,4 @@ namespace omath
std::unique_ptr<float[]> m_data;
};
} // namespace omath
#endif

View File

@@ -15,16 +15,16 @@ namespace omath::pathfinding
public:
[[nodiscard]]
static std::vector<Vector3<float>> find_path(const Vector3<float>& start, const Vector3<float>& end,
const NavigationMesh& nav_mesh);
const NavigationMesh& nav_mesh) noexcept;
private:
[[nodiscard]]
static std::vector<Vector3<float>>
reconstruct_final_path(const std::unordered_map<Vector3<float>, PathNode>& closed_list,
const Vector3<float>& current);
const Vector3<float>& current) noexcept;
[[nodiscard]]
static auto get_perfect_node(const std::unordered_map<Vector3<float>, PathNode>& open_list,
const Vector3<float>& end_vertex);
const Vector3<float>& end_vertex) noexcept;
};
} // namespace omath::pathfinding

View File

@@ -14,24 +14,23 @@ namespace omath::pathfinding
enum Error
{
};
class NavigationMesh final
{
public:
[[nodiscard]]
std::expected<Vector3<float>, std::string> get_closest_vertex(const Vector3<float>& point) const;
std::expected<Vector3<float>, std::string> get_closest_vertex(const Vector3<float>& point) const noexcept;
[[nodiscard]]
const std::vector<Vector3<float>>& get_neighbors(const Vector3<float>& vertex) const;
const std::vector<Vector3<float>>& get_neighbors(const Vector3<float>& vertex) const noexcept;
[[nodiscard]]
bool empty() const;
[[nodiscard]] std::vector<uint8_t> serialize() const;
[[nodiscard]] std::vector<uint8_t> serialize() const noexcept;
void deserialize(const std::vector<uint8_t>& raw);
void deserialize(const std::vector<uint8_t>& raw) noexcept;
std::unordered_map<Vector3<float>, std::vector<Vector3<float>>> m_vertex_map;
};

View File

@@ -8,12 +8,12 @@
namespace omath::projectile_prediction
{
class ProjPredEngine
class ProjPredEngineInterface
{
public:
[[nodiscard]]
virtual std::optional<Vector3<float>> maybe_calculate_aim_point(const Projectile& projectile,
const Target& target) const = 0;
virtual ~ProjPredEngine() = default;
virtual ~ProjPredEngineInterface() = default;
};
} // namespace omath::projectile_prediction

View File

@@ -6,11 +6,11 @@
namespace omath::projectile_prediction
{
class ProjPredEngineAvx2 final : public ProjPredEngine
class ProjPredEngineAvx2 final : public ProjPredEngineInterface
{
public:
[[nodiscard]] std::optional<Vector3<float>> maybe_calculate_aim_point(const Projectile& projectile,
const Target& target) const override;
[[nodiscard]] std::optional<Vector3<float>>
maybe_calculate_aim_point(const Projectile& projectile, const Target& target) const override;
ProjPredEngineAvx2(float gravity_constant, float simulation_time_step, float maximum_simulation_time);
~ProjPredEngineAvx2() override = default;
@@ -18,7 +18,7 @@ namespace omath::projectile_prediction
private:
[[nodiscard]] static std::optional<float> calculate_pitch(const Vector3<float>& proj_origin,
const Vector3<float>& target_pos,
float bullet_gravity, float v0, float time);
float bullet_gravity, float v0, float time) ;
// We use [[maybe_unused]] here since AVX2 is not available for ARM and ARM64 CPU
[[maybe_unused]] const float m_gravity_constant;

View File

@@ -4,6 +4,7 @@
#pragma once
#include "omath/engines/source_engine/traits/pred_engine_trait.hpp"
#include "omath/projectile_prediction/proj_pred_engine.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
@@ -12,15 +13,65 @@
namespace omath::projectile_prediction
{
class ProjPredEngineLegacy final : public ProjPredEngine
template<class T>
concept PredEngineConcept =
requires(const Projectile& projectile, const Target& target, const Vector3<float>& vec_a,
const Vector3<float>& vec_b,
Vector3<float> v3, // by-value for calc_viewpoint_from_angles
float pitch, float yaw, float time, float gravity, std::optional<float> maybe_pitch) {
// Presence + return types
{ T::predict_projectile_position(projectile, pitch, yaw, time, gravity) } -> std::same_as<Vec3>;
{ T::predict_target_position(target, time, gravity) } -> std::same_as<Vec3>;
{ T::calc_vector_2d_distance(vec_a) } -> std::same_as<float>;
{ T::get_vector_height_coordinate(vec_b) } -> std::same_as<float>;
{ T::calc_viewpoint_from_angles(projectile, v3, maybe_pitch) } -> std::same_as<Vec3>;
{ T::calc_direct_pitch_angle(vec_a, vec_b) } -> std::same_as<float>;
{ T::calc_direct_yaw_angle(vec_a, vec_b) } -> std::same_as<float>;
// Enforce noexcept as in PredEngineTrait
requires noexcept(T::predict_projectile_position(projectile, pitch, yaw, time, gravity));
requires noexcept(T::predict_target_position(target, time, gravity));
requires noexcept(T::calc_vector_2d_distance(vec_a));
requires noexcept(T::get_vector_height_coordinate(vec_b));
requires noexcept(T::calc_viewpoint_from_angles(projectile, v3, maybe_pitch));
requires noexcept(T::calc_direct_pitch_angle(vec_a, vec_b));
requires noexcept(T::calc_direct_yaw_angle(vec_a, vec_b));
};
template<class EngineTrait = source_engine::PredEngineTrait>
requires PredEngineConcept<EngineTrait>
class ProjPredEngineLegacy final : public ProjPredEngineInterface
{
public:
explicit ProjPredEngineLegacy(float gravity_constant, float simulation_time_step, float maximum_simulation_time,
float distance_tolerance);
explicit ProjPredEngineLegacy(const float gravity_constant, const float simulation_time_step,
const float maximum_simulation_time, const float distance_tolerance)
: m_gravity_constant(gravity_constant), m_simulation_time_step(simulation_time_step),
m_maximum_simulation_time(maximum_simulation_time), m_distance_tolerance(distance_tolerance)
{
}
[[nodiscard]]
std::optional<Vector3<float>> maybe_calculate_aim_point(const Projectile& projectile,
const Target& target) const override;
const Target& target) const override
{
for (float time = 0.f; time < m_maximum_simulation_time; time += m_simulation_time_step)
{
const auto predicted_target_position =
EngineTrait::predict_target_position(target, time, m_gravity_constant);
const auto projectile_pitch =
maybe_calculate_projectile_launch_pitch_angle(projectile, predicted_target_position);
if (!projectile_pitch.has_value()) [[unlikely]]
continue;
if (!is_projectile_reached_target(predicted_target_position, projectile, projectile_pitch.value(),
time))
continue;
return EngineTrait::calc_viewpoint_from_angles(projectile, predicted_target_position, projectile_pitch);
}
return std::nullopt;
}
private:
const float m_gravity_constant;
@@ -28,12 +79,56 @@ namespace omath::projectile_prediction
const float m_maximum_simulation_time;
const float m_distance_tolerance;
// Realization of this formula:
// https://stackoverflow.com/questions/54917375/how-to-calculate-the-angle-to-shoot-a-bullet-in-order-to-hit-a-moving-target
/*
\[
\theta \;=\; \arctan\!\Biggl(
\frac{%
v^{2}\;\pm\;\sqrt{\,v^{4}-g\!\left(gx^{2}+2yv^{2}\right)\,}
}{%
gx
}\Biggr)
\]
*/
[[nodiscard]]
std::optional<float> maybe_calculate_projectile_launch_pitch_angle(const Projectile& projectile,
const Vector3<float>& target_position) const;
std::optional<float>
maybe_calculate_projectile_launch_pitch_angle(const Projectile& projectile,
const Vector3<float>& target_position) const noexcept
{
const auto bullet_gravity = m_gravity_constant * projectile.m_gravity_scale;
if (bullet_gravity == 0.f)
return EngineTrait::calc_direct_pitch_angle(projectile.m_origin, target_position);
const auto delta = target_position - projectile.m_origin;
const auto distance2d = EngineTrait::calc_vector_2d_distance(delta);
const auto distance2d_sqr = distance2d * distance2d;
const auto launch_speed_sqr = projectile.m_launch_speed * projectile.m_launch_speed;
float root = launch_speed_sqr * launch_speed_sqr
- bullet_gravity
* (bullet_gravity * distance2d_sqr
+ 2.0f * EngineTrait::get_vector_height_coordinate(delta) * launch_speed_sqr);
if (root < 0.0f) [[unlikely]]
return std::nullopt;
root = std::sqrt(root);
const float angle = std::atan((launch_speed_sqr - root) / (bullet_gravity * distance2d));
return angles::radians_to_degrees(angle);
}
[[nodiscard]]
bool is_projectile_reached_target(const Vector3<float>& target_position, const Projectile& projectile,
float pitch, float time) const;
const float pitch, const float time) const noexcept
{
const auto yaw = EngineTrait::calc_direct_yaw_angle(projectile.m_origin, target_position);
const auto projectile_position =
EngineTrait::predict_projectile_position(projectile, pitch, yaw, time, m_gravity_constant);
return projectile_position.distance_to(target_position) <= m_distance_tolerance;
}
};
} // namespace omath::projectile_prediction

View File

@@ -10,9 +10,6 @@ namespace omath::projectile_prediction
class Projectile final
{
public:
[[nodiscard]]
Vector3<float> predict_position(float pitch, float yaw, float time, float gravity) const;
Vector3<float> m_origin;
float m_launch_speed{};
float m_gravity_scale{};

View File

@@ -10,17 +10,6 @@ namespace omath::projectile_prediction
class Target final
{
public:
[[nodiscard]]
constexpr Vector3<float> predict_position(const float time, const float gravity) const
{
auto predicted = m_origin + m_velocity * time;
if (m_is_airborne)
predicted.z -= gravity * std::pow(time, 2.f) * 0.5f;
return predicted;
}
Vector3<float> m_origin;
Vector3<float> m_velocity;
bool m_is_airborne{};

View File

@@ -26,32 +26,49 @@ namespace omath::projection
};
using FieldOfView = Angle<float, 0.f, 180.f, AngleFlags::Clamped>;
template<class Mat4X4Type, class ViewAnglesType>
class Camera
template<class T, class MatType, class ViewAnglesType>
concept CameraEngineConcept =
requires(const Vector3<float>& cam_origin, const Vector3<float>& look_at, const ViewAnglesType& angles,
const FieldOfView& fov, const ViewPort& viewport, float znear, float zfar) {
// Presence + return types
{ T::calc_look_at_angle(cam_origin, look_at) } -> std::same_as<ViewAnglesType>;
{ T::calc_view_matrix(angles, cam_origin) } -> std::same_as<MatType>;
{ T::calc_projection_matrix(fov, viewport, znear, zfar) } -> std::same_as<MatType>;
// Enforce noexcept as in the trait declaration
requires noexcept(T::calc_look_at_angle(cam_origin, look_at));
requires noexcept(T::calc_view_matrix(angles, cam_origin));
requires noexcept(T::calc_projection_matrix(fov, viewport, znear, zfar));
};
template<class Mat4X4Type, class ViewAnglesType, class TraitClass>
requires CameraEngineConcept<TraitClass, Mat4X4Type, ViewAnglesType>
class Camera final
{
public:
virtual ~Camera() = default;
~Camera() = default;
Camera(const Vector3<float>& position, const ViewAnglesType& view_angles, const ViewPort& view_port,
const FieldOfView& fov, const float near, const float far)
const FieldOfView& fov, const float near, const float far) noexcept
: m_view_port(view_port), m_field_of_view(fov), m_far_plane_distance(far), m_near_plane_distance(near),
m_view_angles(view_angles), m_origin(position)
{
}
protected:
virtual void look_at(const Vector3<float>& target) = 0;
[[nodiscard]] virtual Mat4X4Type calc_view_matrix() const = 0;
[[nodiscard]] virtual Mat4X4Type calc_projection_matrix() const = 0;
[[nodiscard]] Mat4X4Type calc_view_projection_matrix() const
void look_at(const Vector3<float>& target)
{
return calc_projection_matrix() * calc_view_matrix();
m_view_angles = TraitClass::calc_look_at_angle(m_origin, target);
}
[[nodiscard]] Mat4X4Type calc_view_projection_matrix() const noexcept
{
return TraitClass::calc_projection_matrix(m_field_of_view, m_view_port, m_near_plane_distance,
m_far_plane_distance)
* TraitClass::calc_view_matrix(m_view_angles, m_origin);
}
public:
[[nodiscard]] const Mat4X4Type& get_view_projection_matrix() const
[[nodiscard]] const Mat4X4Type& get_view_projection_matrix() const noexcept
{
if (!m_view_projection_matrix.has_value())
m_view_projection_matrix = calc_view_projection_matrix();
@@ -59,68 +76,69 @@ namespace omath::projection
return m_view_projection_matrix.value();
}
void set_field_of_view(const FieldOfView& fov)
void set_field_of_view(const FieldOfView& fov) noexcept
{
m_field_of_view = fov;
m_view_projection_matrix = std::nullopt;
}
void set_near_plane(const float near)
void set_near_plane(const float near) noexcept
{
m_near_plane_distance = near;
m_view_projection_matrix = std::nullopt;
}
void set_far_plane(const float far)
void set_far_plane(const float far) noexcept
{
m_far_plane_distance = far;
m_view_projection_matrix = std::nullopt;
}
void set_view_angles(const ViewAnglesType& view_angles)
void set_view_angles(const ViewAnglesType& view_angles) noexcept
{
m_view_angles = view_angles;
m_view_projection_matrix = std::nullopt;
}
void set_origin(const Vector3<float>& origin)
void set_origin(const Vector3<float>& origin) noexcept
{
m_origin = origin;
m_view_projection_matrix = std::nullopt;
}
void set_view_port(const ViewPort& view_port)
void set_view_port(const ViewPort& view_port) noexcept
{
m_view_port = view_port;
m_view_projection_matrix = std::nullopt;
}
[[nodiscard]] const FieldOfView& get_field_of_view() const
[[nodiscard]] const FieldOfView& get_field_of_view() const noexcept
{
return m_field_of_view;
}
[[nodiscard]] const float& get_near_plane() const
[[nodiscard]] const float& get_near_plane() const noexcept
{
return m_near_plane_distance;
}
[[nodiscard]] const float& get_far_plane() const
[[nodiscard]] const float& get_far_plane() const noexcept
{
return m_far_plane_distance;
}
[[nodiscard]] const ViewAnglesType& get_view_angles() const
[[nodiscard]] const ViewAnglesType& get_view_angles() const noexcept
{
return m_view_angles;
}
[[nodiscard]] const Vector3<float>& get_origin() const
[[nodiscard]] const Vector3<float>& get_origin() const noexcept
{
return m_origin;
}
[[nodiscard]] std::expected<Vector3<float>, Error> world_to_screen(const Vector3<float>& world_position) const
[[nodiscard]] std::expected<Vector3<float>, Error>
world_to_screen(const Vector3<float>& world_position) const noexcept
{
auto normalized_cords = world_to_view_port(world_position);
@@ -131,7 +149,7 @@ namespace omath::projection
}
[[nodiscard]] std::expected<Vector3<float>, Error>
world_to_view_port(const Vector3<float>& world_position) const
world_to_view_port(const Vector3<float>& world_position) const noexcept
{
auto projected = get_view_projection_matrix()
* mat_column_from_vector<float, Mat4X4Type::get_store_ordering()>(world_position);
@@ -160,14 +178,26 @@ namespace omath::projection
Vector3<float> m_origin;
private:
template<class Type> [[nodiscard]]
constexpr static bool is_ndc_out_of_bounds(const Type& ndc)
template<class Type>
[[nodiscard]] constexpr static bool is_ndc_out_of_bounds(const Type& ndc) noexcept
{
return std::ranges::any_of(ndc.raw_array(), [](const auto& val) { return val < -1 || val > 1; });
}
[[nodiscard]] Vector3<float> ndc_to_screen_position(const Vector3<float>& ndc) const
[[nodiscard]] Vector3<float> ndc_to_screen_position(const Vector3<float>& ndc) const noexcept
{
/*
^
| y
1 |
|
|
-1 ---------0--------- 1 --> x
|
|
-1 |
v
*/
return {(ndc.x + 1.f) / 2.f * m_view_port.m_width, (1.f - ndc.y) / 2.f * m_view_port.m_height, ndc.z};
}
};

View File

@@ -7,11 +7,12 @@
namespace omath
{
/*
v1
|\
| \
a | \ hypot
| \
-----
v2 ----- v3
b
*/

View File

@@ -24,184 +24,212 @@ namespace omath
// Constructors
constexpr Vector2() = default;
constexpr Vector2(const Type& x, const Type& y): x(x), y(y)
constexpr Vector2(const Type& x, const Type& y) noexcept: x(x), y(y)
{
}
// Equality operators
[[nodiscard]]
constexpr bool operator==(const Vector2& src) const
constexpr bool operator==(const Vector2& other) const noexcept
{
return x == src.x && y == src.y;
return x == other.x && y == other.y;
}
[[nodiscard]]
constexpr bool operator!=(const Vector2& src) const
constexpr bool operator!=(const Vector2& other) const noexcept
{
return !(*this == src);
return !(*this == other);
}
// Compound assignment operators
constexpr Vector2& operator+=(const Vector2& v)
constexpr Vector2& operator+=(const Vector2& other) noexcept
{
x += v.x;
y += v.y;
x += other.x;
y += other.y;
return *this;
}
constexpr Vector2& operator-=(const Vector2& v)
constexpr Vector2& operator-=(const Vector2& other) noexcept
{
x -= v.x;
y -= v.y;
x -= other.x;
y -= other.y;
return *this;
}
constexpr Vector2& operator*=(const Vector2& v)
constexpr Vector2& operator*=(const Vector2& other) noexcept
{
x *= v.x;
y *= v.y;
x *= other.x;
y *= other.y;
return *this;
}
constexpr Vector2& operator/=(const Vector2& v)
constexpr Vector2& operator/=(const Vector2& other) noexcept
{
x /= v.x;
y /= v.y;
x /= other.x;
y /= other.y;
return *this;
}
constexpr Vector2& operator*=(const Type& fl)
constexpr Vector2& operator*=(const Type& value) noexcept
{
x *= fl;
y *= fl;
x *= value;
y *= value;
return *this;
}
constexpr Vector2& operator/=(const Type& fl)
constexpr Vector2& operator/=(const Type& value) noexcept
{
x /= fl;
y /= fl;
x /= value;
y /= value;
return *this;
}
constexpr Vector2& operator+=(const Type& fl)
constexpr Vector2& operator+=(const Type& value) noexcept
{
x += fl;
y += fl;
x += value;
y += value;
return *this;
}
constexpr Vector2& operator-=(const Type& fl)
constexpr Vector2& operator-=(const Type& value) noexcept
{
x -= fl;
y -= fl;
x -= value;
y -= value;
return *this;
}
// Basic vector operations
[[nodiscard]] Type distance_to(const Vector2& other) const
[[nodiscard]] Type distance_to(const Vector2& other) const noexcept
{
return std::sqrt(distance_to_sqr(other));
}
[[nodiscard]] constexpr Type distance_to_sqr(const Vector2& other) const
[[nodiscard]] constexpr Type distance_to_sqr(const Vector2& other) const noexcept
{
return (x - other.x) * (x - other.x) + (y - other.y) * (y - other.y);
}
[[nodiscard]] constexpr Type dot(const Vector2& other) const
[[nodiscard]] constexpr Type dot(const Vector2& other) const noexcept
{
return x * other.x + y * other.y;
}
#ifndef _MSC_VER
[[nodiscard]] constexpr Type length() const
[[nodiscard]] constexpr Type length() const noexcept
{
return std::hypot(this->x, this->y);
}
[[nodiscard]] constexpr Vector2 normalized() const
[[nodiscard]] constexpr Vector2 normalized() const noexcept
{
const Type len = length();
return len > 0.f ? *this / len : *this;
}
#else
[[nodiscard]] Type length() const
[[nodiscard]] Type length() const noexcept
{
return std::hypot(x, y);
}
[[nodiscard]] Vector2 normalized() const
[[nodiscard]] Vector2 normalized() const noexcept
{
const Type len = length();
return len > 0.f ? *this / len : *this;
return len > static_cast<Type>(0) ? *this / len : *this;
}
#endif
[[nodiscard]] constexpr Type length_sqr() const
[[nodiscard]] constexpr Type length_sqr() const noexcept
{
return x * x + y * y;
}
constexpr Vector2& abs()
constexpr Vector2& abs() noexcept
{
// FIXME: Replace with std::abs, if it will become constexprable
x = x < 0 ? -x : x;
y = y < 0 ? -y : y;
x = x < static_cast<Type>(0) ? -x : x;
y = y < static_cast<Type>(0) ? -y : y;
return *this;
}
[[nodiscard]] constexpr Vector2 operator-() const
[[nodiscard]] constexpr Vector2 operator-() const noexcept
{
return {-x, -y};
}
// Binary arithmetic operators
[[nodiscard]] constexpr Vector2 operator+(const Vector2& v) const
[[nodiscard]] constexpr Vector2 operator+(const Vector2& other) const noexcept
{
return {x + v.x, y + v.y};
return {x + other.x, y + other.y};
}
[[nodiscard]] constexpr Vector2 operator-(const Vector2& v) const
[[nodiscard]] constexpr Vector2 operator-(const Vector2& other) const noexcept
{
return {x - v.x, y - v.y};
return {x - other.x, y - other.y};
}
[[nodiscard]] constexpr Vector2 operator*(const float fl) const
[[nodiscard]] constexpr Vector2 operator*(const Type& value) const noexcept
{
return {x * fl, y * fl};
return {x * value, y * value};
}
[[nodiscard]] constexpr Vector2 operator/(const float fl) const
[[nodiscard]] constexpr Vector2 operator/(const Type& value) const noexcept
{
return {x / fl, y / fl};
return {x / value, y / value};
}
// Sum of elements
[[nodiscard]] constexpr Type sum() const
[[nodiscard]] constexpr Type sum() const noexcept
{
return x + y;
}
[[nodiscard]]
constexpr std::tuple<Type, Type> as_tuple() const
bool operator<(const Vector2& other) const noexcept
{
return length() < other.length();
}
[[nodiscard]]
bool operator>(const Vector2& other) const noexcept
{
return length() > other.length();
}
[[nodiscard]]
bool operator<=(const Vector2& other) const noexcept
{
return length() <= other.length();
}
[[nodiscard]]
bool operator>=(const Vector2& other) const noexcept
{
return length() >= other.length();
}
[[nodiscard]]
constexpr std::tuple<Type, Type> as_tuple() const noexcept
{
return std::make_tuple(x, y);
}
#ifdef OMATH_IMGUI_INTEGRATION
[[nodiscard]]
ImVec2 to_im_vec2() const
ImVec2 to_im_vec2() const noexcept
{
return {static_cast<float>(this->x), static_cast<float>(this->y)};
}
[[nodiscard]]
static Vector2 from_im_vec2(const ImVec2& other) noexcept
{
return {static_cast<Type>(other.x), static_cast<Type>(other.y)};
}
#endif
};
} // namespace omath

View File

@@ -24,86 +24,86 @@ namespace omath
{
public:
Type z = static_cast<Type>(0);
constexpr Vector3(const Type& x, const Type& y, const Type& z): Vector2<Type>(x, y), z(z)
constexpr Vector3(const Type& x, const Type& y, const Type& z) noexcept: Vector2<Type>(x, y), z(z)
{
}
constexpr Vector3(): Vector2<Type>() {};
constexpr Vector3() noexcept: Vector2<Type>() {};
[[nodiscard]] constexpr bool operator==(const Vector3& src) const
[[nodiscard]] constexpr bool operator==(const Vector3& other) const noexcept
{
return Vector2<Type>::operator==(src) && (src.z == z);
return Vector2<Type>::operator==(other) && (other.z == z);
}
[[nodiscard]] constexpr bool operator!=(const Vector3& src) const
[[nodiscard]] constexpr bool operator!=(const Vector3& other) const noexcept
{
return !(*this == src);
return !(*this == other);
}
constexpr Vector3& operator+=(const Vector3& v)
constexpr Vector3& operator+=(const Vector3& other) noexcept
{
Vector2<Type>::operator+=(v);
z += v.z;
Vector2<Type>::operator+=(other);
z += other.z;
return *this;
}
constexpr Vector3& operator-=(const Vector3& v)
constexpr Vector3& operator-=(const Vector3& other) noexcept
{
Vector2<Type>::operator-=(v);
z -= v.z;
Vector2<Type>::operator-=(other);
z -= other.z;
return *this;
}
constexpr Vector3& operator*=(const float fl)
constexpr Vector3& operator*=(const Type& value) noexcept
{
Vector2<Type>::operator*=(fl);
z *= fl;
Vector2<Type>::operator*=(value);
z *= value;
return *this;
}
constexpr Vector3& operator*=(const Vector3& v)
constexpr Vector3& operator*=(const Vector3& other) noexcept
{
Vector2<Type>::operator*=(v);
z *= v.z;
Vector2<Type>::operator*=(other);
z *= other.z;
return *this;
}
constexpr Vector3& operator/=(const Vector3& v)
constexpr Vector3& operator/=(const Vector3& other) noexcept
{
Vector2<Type>::operator/=(v);
z /= v.z;
Vector2<Type>::operator/=(other);
z /= other.z;
return *this;
}
constexpr Vector3& operator+=(const float fl)
constexpr Vector3& operator+=(const Type& value) noexcept
{
Vector2<Type>::operator+=(fl);
z += fl;
Vector2<Type>::operator+=(value);
z += value;
return *this;
}
constexpr Vector3& operator/=(const float fl)
constexpr Vector3& operator/=(const Type& value) noexcept
{
Vector2<Type>::operator/=(fl);
z /= fl;
Vector2<Type>::operator/=(value);
z /= value;
return *this;
}
constexpr Vector3& operator-=(const float fl)
constexpr Vector3& operator-=(const Type& value) noexcept
{
Vector2<Type>::operator-=(fl);
z -= fl;
Vector2<Type>::operator-=(value);
z -= value;
return *this;
}
constexpr Vector3& abs()
constexpr Vector3& abs() noexcept
{
Vector2<Type>::abs();
z = z < 0.f ? -z : z;
@@ -111,12 +111,12 @@ namespace omath
return *this;
}
[[nodiscard]] constexpr Type distance_to_sqr(const Vector3& other) const
[[nodiscard]] constexpr Type distance_to_sqr(const Vector3& other) const noexcept
{
return (*this - other).length_sqr();
}
[[nodiscard]] constexpr Type dot(const Vector3& other) const
[[nodiscard]] constexpr Type dot(const Vector3& other) const noexcept
{
return Vector2<Type>::dot(other) + z * other.z;
}
@@ -142,115 +142,141 @@ namespace omath
return length_value != 0 ? *this / length_value : *this;
}
#else
[[nodiscard]] Type length() const
[[nodiscard]] Type length() const noexcept
{
return std::hypot(this->x, this->y, z);
}
[[nodiscard]] Vector3 normalized() const
[[nodiscard]] Vector3 normalized() const noexcept
{
const Type len = this->length();
return len != 0 ? *this / len : *this;
return len != static_cast<Type>(0) ? *this / len : *this;
}
[[nodiscard]] Type length_2d() const
[[nodiscard]] Type length_2d() const noexcept
{
return Vector2<Type>::length();
}
[[nodiscard]] Type distance_to(const Vector3& vOther) const
[[nodiscard]] Type distance_to(const Vector3& vOther) const noexcept
{
return (*this - vOther).length();
}
#endif
[[nodiscard]] constexpr Type length_sqr() const
[[nodiscard]] constexpr Type length_sqr() const noexcept
{
return Vector2<Type>::length_sqr() + z * z;
}
[[nodiscard]] constexpr Vector3 operator-() const
[[nodiscard]] constexpr Vector3 operator-() const noexcept
{
return {-this->x, -this->y, -z};
}
[[nodiscard]] constexpr Vector3 operator+(const Vector3& v) const
[[nodiscard]] constexpr Vector3 operator+(const Vector3& other) const noexcept
{
return {this->x + v.x, this->y + v.y, z + v.z};
return {this->x + other.x, this->y + other.y, z + other.z};
}
[[nodiscard]] constexpr Vector3 operator-(const Vector3& v) const
[[nodiscard]] constexpr Vector3 operator-(const Vector3& other) const noexcept
{
return {this->x - v.x, this->y - v.y, z - v.z};
return {this->x - other.x, this->y - other.y, z - other.z};
}
[[nodiscard]] constexpr Vector3 operator*(const float fl) const
[[nodiscard]] constexpr Vector3 operator*(const Type& value) const noexcept
{
return {this->x * fl, this->y * fl, z * fl};
return {this->x * value, this->y * value, z * value};
}
[[nodiscard]] constexpr Vector3 operator*(const Vector3& v) const
[[nodiscard]] constexpr Vector3 operator*(const Vector3& other) const noexcept
{
return {this->x * v.x, this->y * v.y, z * v.z};
return {this->x * other.x, this->y * other.y, z * other.z};
}
[[nodiscard]] constexpr Vector3 operator/(const float fl) const
[[nodiscard]] constexpr Vector3 operator/(const Type& value) const noexcept
{
return {this->x / fl, this->y / fl, z / fl};
return {this->x / value, this->y / value, z / value};
}
[[nodiscard]] constexpr Vector3 operator/(const Vector3& v) const
[[nodiscard]] constexpr Vector3 operator/(const Vector3& other) const noexcept
{
return {this->x / v.x, this->y / v.y, z / v.z};
return {this->x / other.x, this->y / other.y, z / other.z};
}
[[nodiscard]] constexpr Vector3 cross(const Vector3& v) const
[[nodiscard]] constexpr Vector3 cross(const Vector3& other) const noexcept
{
return {this->y * v.z - z * v.y, z * v.x - this->x * v.z, this->x * v.y - this->y * v.x};
return {this->y * other.z - z * other.y, z * other.x - this->x * other.z,
this->x * other.y - this->y * other.x};
}
[[nodiscard]] constexpr Type sum() const
[[nodiscard]] constexpr Type sum() const noexcept
{
return sum_2d() + z;
}
[[nodiscard]] std::expected<Angle<float, 0.f, 180.f, AngleFlags::Clamped>, Vector3Error>
angle_between(const Vector3& other) const
angle_between(const Vector3& other) const noexcept
{
const auto bottom = length() * other.length();
if (bottom == 0.f)
if (bottom == static_cast<Type>(0))
return std::unexpected(Vector3Error::IMPOSSIBLE_BETWEEN_ANGLE);
return Angle<float, 0.f, 180.f, AngleFlags::Clamped>::from_radians(std::acos(dot(other) / bottom));
}
[[nodiscard]] bool is_perpendicular(const Vector3& other) const
[[nodiscard]] bool is_perpendicular(const Vector3& other) const noexcept
{
if (const auto angle = angle_between(other))
return angle->as_degrees() == 90.f;
return angle->as_degrees() == static_cast<Type>(90);
return false;
}
[[nodiscard]] constexpr Type sum_2d() const
[[nodiscard]] constexpr Type sum_2d() const noexcept
{
return Vector2<Type>::sum();
}
[[nodiscard]] constexpr std::tuple<Type, Type, Type> as_tuple() const
[[nodiscard]] constexpr std::tuple<Type, Type, Type> as_tuple() const noexcept
{
return std::make_tuple(this->x, this->y, z);
}
[[nodiscard]] Vector3 view_angle_to(const Vector3& other) const
[[nodiscard]] Vector3 view_angle_to(const Vector3& other) const noexcept
{
const float distance = distance_to(other);
const auto distance = distance_to(other);
const auto delta = other - *this;
return {angles::radians_to_degrees(std::asin(delta.z / distance)),
angles::radians_to_degrees(std::atan2(delta.y, delta.x)), 0};
}
[[nodiscard]]
bool operator<(const Vector3& other) const noexcept
{
return length() < other.length();
}
[[nodiscard]]
bool operator>(const Vector3& other) const noexcept
{
return length() > other.length();
}
[[nodiscard]]
bool operator<=(const Vector3& other) const noexcept
{
return length() <= other.length();
}
[[nodiscard]]
bool operator>=(const Vector3& other) const noexcept
{
return length() >= other.length();
}
};
} // namespace omath
// ReSharper disable once CppRedundantNamespaceDefinition

View File

@@ -9,6 +9,7 @@
namespace omath
{
template<class Type>
requires std::is_arithmetic_v<Type>
class Vector4 : public Vector3<Type>
{
public:
@@ -17,90 +18,90 @@ namespace omath
constexpr Vector4(const Type& x, const Type& y, const Type& z, const Type& w): Vector3<Type>(x, y, z), w(w)
{
}
constexpr Vector4(): Vector3<Type>(), w(0) {};
constexpr Vector4() noexcept: Vector3<Type>(), w(static_cast<Type>(0)) {};
[[nodiscard]]
constexpr bool operator==(const Vector4& src) const
constexpr bool operator==(const Vector4& other) const noexcept
{
return Vector3<Type>::operator==(src) && w == src.w;
return Vector3<Type>::operator==(other) && w == other.w;
}
[[nodiscard]]
constexpr bool operator!=(const Vector4& src) const
constexpr bool operator!=(const Vector4& other) const noexcept
{
return !(*this == src);
return !(*this == other);
}
constexpr Vector4& operator+=(const Vector4& v)
constexpr Vector4& operator+=(const Vector4& other) noexcept
{
Vector3<Type>::operator+=(v);
w += v.w;
Vector3<Type>::operator+=(other);
w += other.w;
return *this;
}
constexpr Vector4& operator-=(const Vector4& v)
constexpr Vector4& operator-=(const Vector4& other) noexcept
{
Vector3<Type>::operator-=(v);
w -= v.w;
Vector3<Type>::operator-=(other);
w -= other.w;
return *this;
}
constexpr Vector4& operator*=(const float scalar)
constexpr Vector4& operator*=(const Type& value) noexcept
{
Vector3<Type>::operator*=(scalar);
w *= scalar;
Vector3<Type>::operator*=(value);
w *= value;
return *this;
}
constexpr Vector4& operator*=(const Vector4& v)
constexpr Vector4& operator*=(const Vector4& other) noexcept
{
Vector3<Type>::operator*=(v);
w *= v.w;
Vector3<Type>::operator*=(other);
w *= other.w;
return *this;
}
constexpr Vector4& operator/=(const float scalar)
constexpr Vector4& operator/=(const Type& value) noexcept
{
Vector3<Type>::operator/=(scalar);
w /= scalar;
Vector3<Type>::operator/=(value);
w /= value;
return *this;
}
constexpr Vector4& operator/=(const Vector4& v)
constexpr Vector4& operator/=(const Vector4& other) noexcept
{
Vector3<Type>::operator/=(v);
w /= v.w;
Vector3<Type>::operator/=(other);
w /= other.w;
return *this;
}
[[nodiscard]] constexpr Type length_sqr() const
[[nodiscard]] constexpr Type length_sqr() const noexcept
{
return Vector3<Type>::length_sqr() + w * w;
}
[[nodiscard]] constexpr Type dot(const Vector4& other) const
[[nodiscard]] constexpr Type dot(const Vector4& other) const noexcept
{
return Vector3<Type>::dot(other) + w * other.w;
}
[[nodiscard]] Vector3<Type> length() const
[[nodiscard]] Type length() const noexcept
{
return std::sqrt(length_sqr());
}
constexpr Vector4& abs()
constexpr Vector4& abs() noexcept
{
Vector3<Type>::abs();
w = w < 0.f ? -w : w;
return *this;
}
constexpr Vector4& clamp(const Type& min, const Type& max)
constexpr Vector4& clamp(const Type& min, const Type& max) noexcept
{
this->x = std::clamp(this->x, min, max);
this->y = std::clamp(this->y, min, max);
@@ -110,56 +111,80 @@ namespace omath
}
[[nodiscard]]
constexpr Vector4 operator-() const
constexpr Vector4 operator-() const noexcept
{
return {-this->x, -this->y, -this->z, -w};
}
[[nodiscard]]
constexpr Vector4 operator+(const Vector4& v) const
constexpr Vector4 operator+(const Vector4& other) const noexcept
{
return {this->x + v.x, this->y + v.y, this->z + v.z, w + v.w};
return {this->x + other.x, this->y + other.y, this->z + other.z, w + other.w};
}
[[nodiscard]]
constexpr Vector4 operator-(const Vector4& v) const
constexpr Vector4 operator-(const Vector4& other) const noexcept
{
return {this->x - v.x, this->y - v.y, this->z - v.z, w - v.w};
return {this->x - other.x, this->y - other.y, this->z - other.z, w - other.w};
}
[[nodiscard]]
constexpr Vector4 operator*(const Type& scalar) const
constexpr Vector4 operator*(const Type& value) const noexcept
{
return {this->x * scalar, this->y * scalar, this->z * scalar, w * scalar};
return {this->x * value, this->y * value, this->z * value, w * value};
}
[[nodiscard]]
constexpr Vector4 operator*(const Vector4& v) const
constexpr Vector4 operator*(const Vector4& other) const noexcept
{
return {this->x * v.x, this->y * v.y, this->z * v.z, w * v.w};
return {this->x * other.x, this->y * other.y, this->z * other.z, w * other.w};
}
[[nodiscard]]
constexpr Vector4 operator/(const Type& scalar) const
constexpr Vector4 operator/(const Type& value) const noexcept
{
return {this->x / scalar, this->y / scalar, this->z / scalar, w / scalar};
return {this->x / value, this->y / value, this->z / value, w / value};
}
[[nodiscard]]
constexpr Vector4 operator/(const Vector4& v) const
constexpr Vector4 operator/(const Vector4& other) const noexcept
{
return {this->x / v.x, this->y / v.y, this->z / v.z, w / v.w};
return {this->x / other.x, this->y / other.y, this->z / other.z, w / other.w};
}
[[nodiscard]]
constexpr Type sum() const
constexpr Type sum() const noexcept
{
return Vector3<Type>::sum() + w;
}
[[nodiscard]]
bool operator<(const Vector4& other) const noexcept
{
return length() < other.length();
}
[[nodiscard]]
bool operator>(const Vector4& other) const noexcept
{
return length() > other.length();
}
[[nodiscard]]
bool operator<=(const Vector4& other) const noexcept
{
return length() <= other.length();
}
[[nodiscard]]
bool operator>=(const Vector4& other) const noexcept
{
return length() >= other.length();
}
#ifdef OMATH_IMGUI_INTEGRATION
[[nodiscard]]
ImVec4 to_im_vec4() const
ImVec4 to_im_vec4() const noexcept
{
return {
static_cast<float>(this->x),
@@ -168,6 +193,11 @@ namespace omath
static_cast<float>(w),
};
}
[[nodiscard]]
static Vector4<float> from_im_vec4(const ImVec4& other) noexcept
{
return {static_cast<Type>(other.x), static_cast<Type>(other.y), static_cast<Type>(other.z)};
}
#endif
};
};
} // namespace omath

View File

@@ -7,7 +7,7 @@ namespace omath::primitives
{
std::array<Triangle<Vector3<float>>, 12> create_box(const Vector3<float>& top, const Vector3<float>& bottom,
const Vector3<float>& dir_forward,
const Vector3<float>& dir_right, const float ratio)
const Vector3<float>& dir_right, const float ratio) noexcept
{
const auto height = top.distance_to(bottom);
const auto side_size = height / ratio;

View File

@@ -5,21 +5,21 @@
namespace omath::collision
{
bool LineTracer::can_trace_line(const Ray& ray, const Triangle<Vector3<float>>& triangle)
bool LineTracer::can_trace_line(const Ray& ray, const Triangle<Vector3<float>>& triangle) noexcept
{
return get_ray_hit_point(ray, triangle) == ray.end;
}
Vector3<float> Ray::direction_vector() const
Vector3<float> Ray::direction_vector() const noexcept
{
return end - start;
}
Vector3<float> Ray::direction_vector_normalized() const
Vector3<float> Ray::direction_vector_normalized() const noexcept
{
return direction_vector().normalized();
}
Vector3<float> LineTracer::get_ray_hit_point(const Ray& ray, const Triangle<Vector3<float>>& triangle)
Vector3<float> LineTracer::get_ray_hit_point(const Ray& ray, const Triangle<Vector3<float>>& triangle) noexcept
{
constexpr float k_epsilon = std::numeric_limits<float>::epsilon();

View File

@@ -1,12 +0,0 @@
//
// Created by vlad on 2/4/24.
//
#include "omath/color.hpp"
#include <algorithm>
#include <cmath>
namespace omath
{
}

View File

@@ -1,33 +0,0 @@
//
// Created by Vlad on 3/17/2025.
//
#include "omath/engines/iw_engine/camera.hpp"
#include "omath/engines/iw_engine/formulas.hpp"
namespace omath::iw_engine
{
Camera::Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, const float near, const float far)
: projection::Camera<Mat4X4, ViewAngles>(position, view_angles, view_port, fov, near, far)
{
}
void Camera::look_at([[maybe_unused]] const Vector3<float>& target)
{
const float distance = m_origin.distance_to(target);
const auto delta = target - m_origin;
m_view_angles.pitch = PitchAngle::from_radians(std::asin(delta.z / distance));
m_view_angles.yaw = -YawAngle::from_radians(std::atan2(delta.y, delta.x));
m_view_angles.roll = RollAngle::from_radians(0.f);
}
Mat4X4 Camera::calc_view_matrix() const
{
return iw_engine::calc_view_matrix(m_view_angles, m_origin);
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::iw_engine

View File

@@ -6,37 +6,37 @@
namespace omath::iw_engine
{
Vector3<float> forward_vector(const ViewAngles& angles)
Vector3<float> forward_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_forward);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> right_vector(const ViewAngles& angles)
Vector3<float> right_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_right);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> up_vector(const ViewAngles& angles)
Vector3<float> up_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_up);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Mat4X4 rotation_matrix(const ViewAngles& angles)
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
{
return mat_rotation_axis_z(angles.yaw) * mat_rotation_axis_y(angles.pitch) * mat_rotation_axis_x(angles.roll);
}
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin)
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return mat_camera_view(forward_vector(angles), right_vector(angles), up_vector(angles), cam_origin);
}
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
const float far)
const float far) noexcept
{
// NOTE: Need magic number to fix fov calculation, since IW engine inherit Quake proj matrix calculation
constexpr auto k_multiply_factor = 0.75f;

View File

@@ -0,0 +1,27 @@
//
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/iw_engine/traits/camera_trait.hpp"
#include "omath/engines/iw_engine/formulas.hpp"
namespace omath::iw_engine
{
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
{
const auto distance = cam_origin.distance_to(look_at);
const auto delta = cam_origin - look_at;
return {PitchAngle::from_radians(-std::asin(delta.z / distance)),
YawAngle::from_radians(std::atan2(delta.y, delta.x)), RollAngle::from_radians(0.f)};
}
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return iw_engine::calc_view_matrix(angles, cam_origin);
}
Mat4X4 CameraTrait::calc_projection_matrix(const projection::FieldOfView& fov,
const projection::ViewPort& view_port, const float near,
const float far) noexcept
{
return calc_perspective_projection_matrix(fov.as_degrees(), view_port.aspect_ratio(), near, far);
}
} // namespace omath::iw_engine

View File

@@ -1,33 +0,0 @@
//
// Created by Orange on 12/23/2024.
//
#include "omath/engines/opengl_engine/camera.hpp"
#include "omath/engines/opengl_engine/formulas.hpp"
namespace omath::opengl_engine
{
Camera::Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, const float near, const float far)
: projection::Camera<Mat4X4, ViewAngles>(position, view_angles, view_port, fov, near, far)
{
}
void Camera::look_at([[maybe_unused]] const Vector3<float>& target)
{
const float distance = m_origin.distance_to(target);
const auto delta = target - m_origin;
m_view_angles.pitch = PitchAngle::from_radians(std::asin(delta.z / distance));
m_view_angles.yaw = -YawAngle::from_radians(std::atan2(delta.y, delta.x));
m_view_angles.roll = RollAngle::from_radians(0.f);
}
Mat4X4 Camera::calc_view_matrix() const
{
return opengl_engine::calc_view_matrix(m_view_angles, m_origin);
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::opengl_engine

View File

@@ -6,39 +6,39 @@
namespace omath::opengl_engine
{
Vector3<float> forward_vector(const ViewAngles& angles)
Vector3<float> forward_vector(const ViewAngles& angles) noexcept
{
const auto vec
= rotation_matrix(angles) * mat_column_from_vector<float, MatStoreType::COLUMN_MAJOR>(k_abs_forward);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> right_vector(const ViewAngles& angles)
Vector3<float> right_vector(const ViewAngles& angles) noexcept
{
const auto vec
= rotation_matrix(angles) * mat_column_from_vector<float, MatStoreType::COLUMN_MAJOR>(k_abs_right);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> up_vector(const ViewAngles& angles)
Vector3<float> up_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector<float, MatStoreType::COLUMN_MAJOR>(k_abs_up);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin)
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return mat_camera_view<float, MatStoreType::COLUMN_MAJOR>(-forward_vector(angles), right_vector(angles),
up_vector(angles), cam_origin);
}
Mat4X4 rotation_matrix(const ViewAngles& angles)
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
{
return mat_rotation_axis_x<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch)
* mat_rotation_axis_y<float, MatStoreType::COLUMN_MAJOR>(-angles.yaw)
* mat_rotation_axis_z<float, MatStoreType::COLUMN_MAJOR>(angles.roll);
}
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
const float far)
const float far) noexcept
{
const float fov_half_tan = std::tan(angles::degrees_to_radians(field_of_view) / 2.f);

View File

@@ -0,0 +1,28 @@
//
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/opengl_engine/traits/camera_trait.hpp"
#include "omath/engines/opengl_engine/formulas.hpp"
namespace omath::opengl_engine
{
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
{
const auto distance = cam_origin.distance_to(look_at);
const auto delta = cam_origin - look_at;
return {PitchAngle::from_radians(-std::asin(delta.y / distance)),
YawAngle::from_radians(std::atan2(delta.z, delta.x)), RollAngle::from_radians(0.f)};
}
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return opengl_engine::calc_view_matrix(angles, cam_origin);
}
Mat4X4 CameraTrait::calc_projection_matrix(const projection::FieldOfView& fov,
const projection::ViewPort& view_port, const float near,
const float far) noexcept
{
return calc_perspective_projection_matrix(fov.as_degrees(), view_port.aspect_ratio(), near, far);
}
} // namespace omath::opengl_engine

View File

@@ -1,35 +0,0 @@
//
// Created by Orange on 12/4/2024.
//
#include "omath/engines/source_engine/camera.hpp"
#include "omath/engines/source_engine/formulas.hpp"
namespace omath::source_engine
{
Camera::Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const projection::FieldOfView& fov, const float near, const float far)
: projection::Camera<Mat4X4, ViewAngles>(position, view_angles, view_port, fov, near, far)
{
}
void Camera::look_at(const Vector3<float>& target)
{
const float distance = m_origin.distance_to(target);
const auto delta = target - m_origin;
m_view_angles.pitch = PitchAngle::from_radians(std::asin(delta.z / distance));
m_view_angles.yaw = -YawAngle::from_radians(std::atan2(delta.y, delta.x));
m_view_angles.roll = RollAngle::from_radians(0.f);
}
Mat4X4 Camera::calc_view_matrix() const
{
return source_engine::calc_view_matrix(m_view_angles, m_origin);
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::source_engine

View File

@@ -5,38 +5,38 @@
namespace omath::source_engine
{
Vector3<float> forward_vector(const ViewAngles& angles)
Vector3<float> forward_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_forward);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Mat4X4 rotation_matrix(const ViewAngles& angles)
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
{
return mat_rotation_axis_z(angles.yaw) * mat_rotation_axis_y(angles.pitch) * mat_rotation_axis_x(angles.roll);
}
Vector3<float> right_vector(const ViewAngles& angles)
Vector3<float> right_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_right);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> up_vector(const ViewAngles& angles)
Vector3<float> up_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_up);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin)
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return mat_camera_view(forward_vector(angles), right_vector(angles), up_vector(angles), cam_origin);
}
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
const float far)
const float far) noexcept
{
// NOTE: Need magic number to fix fov calculation, since source inherit Quake proj matrix calculation
constexpr auto k_multiply_factor = 0.75f;

View File

@@ -0,0 +1,27 @@
//
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/source_engine/traits/camera_trait.hpp"
#include "omath/engines/source_engine/formulas.hpp"
namespace omath::source_engine
{
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
{
const auto distance = cam_origin.distance_to(look_at);
const auto delta = cam_origin - look_at;
return {PitchAngle::from_radians(-std::asin(delta.z / distance)),
YawAngle::from_radians(std::atan2(delta.y, delta.x)), RollAngle::from_radians(0.f)};
}
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return source_engine::calc_view_matrix(angles, cam_origin);
}
Mat4X4 CameraTrait::calc_projection_matrix(const projection::FieldOfView& fov,
const projection::ViewPort& view_port, const float near,
const float far) noexcept
{
return calc_perspective_projection_matrix(fov.as_degrees(), view_port.aspect_ratio(), near, far);
}
} // namespace omath::source_engine

View File

@@ -1,27 +0,0 @@
//
// Created by Vlad on 3/22/2025.
//
#include <omath/engines/unity_engine/camera.hpp>
#include <omath/engines/unity_engine/formulas.hpp>
namespace omath::unity_engine
{
Camera::Camera(const Vector3<float>& position, const ViewAngles& view_angles, const projection::ViewPort& view_port,
const projection::FieldOfView& fov, const float near, const float far)
: projection::Camera<Mat4X4, ViewAngles>(position, view_angles, view_port, fov, near, far)
{
}
void Camera::look_at([[maybe_unused]] const Vector3<float>& target)
{
throw std::runtime_error("Not implemented");
}
Mat4X4 Camera::calc_view_matrix() const
{
return unity_engine::calc_view_matrix(m_view_angles, m_origin);
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::unity_engine

View File

@@ -5,37 +5,37 @@
namespace omath::unity_engine
{
Vector3<float> forward_vector(const ViewAngles& angles)
Vector3<float> forward_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_forward);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> right_vector(const ViewAngles& angles)
Vector3<float> right_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_right);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> up_vector(const ViewAngles& angles)
Vector3<float> up_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_up);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin)
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return mat_camera_view<float, MatStoreType::ROW_MAJOR>(forward_vector(angles), -right_vector(angles),
up_vector(angles), cam_origin);
}
Mat4X4 rotation_matrix(const ViewAngles& angles)
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
{
return mat_rotation_axis_x<float, MatStoreType::ROW_MAJOR>(angles.pitch)
* mat_rotation_axis_y<float, MatStoreType::ROW_MAJOR>(angles.yaw)
* mat_rotation_axis_z<float, MatStoreType::ROW_MAJOR>(angles.roll);
}
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
const float far)
const float far) noexcept
{
const float fov_half_tan = std::tan(angles::degrees_to_radians(field_of_view) / 2.f);

View File

@@ -0,0 +1,27 @@
//
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/unity_engine/traits/camera_trait.hpp"
namespace omath::unity_engine
{
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
{
const auto distance = cam_origin.distance_to(look_at);
const auto delta = cam_origin - look_at;
return {PitchAngle::from_radians(-std::asin(delta.y / distance)),
YawAngle::from_radians(std::atan2(delta.z, delta.x)), RollAngle::from_radians(0.f)};
}
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return unity_engine::calc_view_matrix(angles, cam_origin);
}
Mat4X4 CameraTrait::calc_projection_matrix(const projection::FieldOfView& fov,
const projection::ViewPort& view_port, const float near,
const float far) noexcept
{
return calc_perspective_projection_matrix(fov.as_degrees(), view_port.aspect_ratio(), near, far);
}
} // namespace omath::unity_engine

View File

@@ -0,0 +1,49 @@
//
// Created by Vlad on 3/22/2025.
//
#include "omath/engines/unreal_engine/formulas.hpp"
namespace omath::unreal_engine
{
Vector3<float> forward_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_forward);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> right_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_right);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Vector3<float> up_vector(const ViewAngles& angles) noexcept
{
const auto vec = rotation_matrix(angles) * mat_column_from_vector(k_abs_up);
return {vec.at(0, 0), vec.at(1, 0), vec.at(2, 0)};
}
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return mat_camera_view<float, MatStoreType::ROW_MAJOR>(forward_vector(angles), -right_vector(angles),
up_vector(angles), cam_origin);
}
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
{
return mat_rotation_axis_x<float, MatStoreType::ROW_MAJOR>(angles.roll)
* mat_rotation_axis_y<float, MatStoreType::ROW_MAJOR>(angles.pitch)
* mat_rotation_axis_z<float, MatStoreType::ROW_MAJOR>(angles.yaw);
}
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
const float far) noexcept
{
const float fov_half_tan = std::tan(angles::degrees_to_radians(field_of_view) / 2.f);
return {
{1.f / (aspect_ratio * fov_half_tan), 0, 0, 0},
{0, 1.f / (fov_half_tan), 0, 0},
{0, 0, (far + near) / (far - near), -(2.f * far * near) / (far - near)},
{0, 0, -1.f, 0},
};
}
} // namespace omath::unreal_engine

View File

@@ -0,0 +1,27 @@
//
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/unreal_engine/traits/camera_trait.hpp"
namespace omath::unreal_engine
{
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
{
const auto distance = cam_origin.distance_to(look_at);
const auto delta = cam_origin - look_at;
return {PitchAngle::from_radians(-std::asin(delta.z / distance)),
YawAngle::from_radians(std::atan2(delta.x, delta.y)), RollAngle::from_radians(0.f)};
}
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return unreal_engine::calc_view_matrix(angles, cam_origin);
}
Mat4X4 CameraTrait::calc_projection_matrix(const projection::FieldOfView& fov,
const projection::ViewPort& view_port, const float near,
const float far) noexcept
{
return calc_perspective_projection_matrix(fov.as_degrees(), view_port.aspect_ratio(), near, far);
}
} // namespace omath::unreal_engine

View File

@@ -1,3 +1,5 @@
#ifdef OMATH_ENABLE_LEGACY
#include "omath/matrix.hpp"
#include "omath/angles.hpp"
#include "omath/vector3.hpp"
@@ -359,3 +361,4 @@ namespace omath
m_data = nullptr;
}
} // namespace omath
#endif

View File

@@ -17,7 +17,7 @@ namespace omath::pathfinding
std::vector<Vector3<float>>
Astar::reconstruct_final_path(const std::unordered_map<Vector3<float>, PathNode>& closed_list,
const Vector3<float>& current)
const Vector3<float>& current) noexcept
{
std::vector<Vector3<float>> path;
std::optional current_opt = current;
@@ -38,7 +38,7 @@ namespace omath::pathfinding
return path;
}
auto Astar::get_perfect_node(const std::unordered_map<Vector3<float>, PathNode>& open_list,
const Vector3<float>& end_vertex)
const Vector3<float>& end_vertex) noexcept
{
return std::ranges::min_element(open_list,
[&end_vertex](const auto& a, const auto& b)
@@ -50,7 +50,7 @@ namespace omath::pathfinding
}
std::vector<Vector3<float>> Astar::find_path(const Vector3<float>& start, const Vector3<float>& end,
const NavigationMesh& nav_mesh)
const NavigationMesh& nav_mesh) noexcept
{
std::unordered_map<Vector3<float>, PathNode> closed_list;
std::unordered_map<Vector3<float>, PathNode> open_list;

View File

@@ -6,7 +6,8 @@
#include <stdexcept>
namespace omath::pathfinding
{
std::expected<Vector3<float>, std::string> NavigationMesh::get_closest_vertex(const Vector3<float>& point) const
std::expected<Vector3<float>, std::string>
NavigationMesh::get_closest_vertex(const Vector3<float>& point) const noexcept
{
const auto res = std::ranges::min_element(m_vertex_map, [&point](const auto& a, const auto& b)
{ return a.first.distance_to(point) < b.first.distance_to(point); });
@@ -17,7 +18,7 @@ namespace omath::pathfinding
return res->first;
}
const std::vector<Vector3<float>>& NavigationMesh::get_neighbors(const Vector3<float>& vertex) const
const std::vector<Vector3<float>>& NavigationMesh::get_neighbors(const Vector3<float>& vertex) const noexcept
{
return m_vertex_map.at(vertex);
}
@@ -27,7 +28,7 @@ namespace omath::pathfinding
return m_vertex_map.empty();
}
std::vector<uint8_t> NavigationMesh::serialize() const
std::vector<uint8_t> NavigationMesh::serialize() const noexcept
{
auto dump_to_vector = []<typename T>(const T& t, std::vector<uint8_t>& vec)
{
@@ -50,7 +51,7 @@ namespace omath::pathfinding
return raw;
}
void NavigationMesh::deserialize(const std::vector<uint8_t>& raw)
void NavigationMesh::deserialize(const std::vector<uint8_t>& raw) noexcept
{
auto load_from_vector = [](const std::vector<uint8_t>& vec, size_t& offset, auto& value)
{

View File

@@ -1,9 +0,0 @@
//
// Created by Vlad on 2/23/2025.
//
#include "omath/projectile_prediction/proj_pred_engine.hpp"
namespace omath::projectile_prediction
{
} // namespace omath::projectile_prediction

View File

@@ -1,70 +0,0 @@
#include "omath/projectile_prediction/proj_pred_engine_legacy.hpp"
#include <cmath>
#include <omath/angles.hpp>
namespace omath::projectile_prediction
{
ProjPredEngineLegacy::ProjPredEngineLegacy(const float gravity_constant, const float simulation_time_step,
const float maximum_simulation_time, const float distance_tolerance)
: m_gravity_constant(gravity_constant), m_simulation_time_step(simulation_time_step),
m_maximum_simulation_time(maximum_simulation_time), m_distance_tolerance(distance_tolerance)
{
}
std::optional<Vector3<float>> ProjPredEngineLegacy::maybe_calculate_aim_point(const Projectile& projectile,
const Target& target) const
{
for (float time = 0.f; time < m_maximum_simulation_time; time += m_simulation_time_step)
{
const auto predicted_target_position = target.predict_position(time, m_gravity_constant);
const auto projectile_pitch
= maybe_calculate_projectile_launch_pitch_angle(projectile, predicted_target_position);
if (!projectile_pitch.has_value()) [[unlikely]]
continue;
if (!is_projectile_reached_target(predicted_target_position, projectile, projectile_pitch.value(), time))
continue;
const auto delta2d = (predicted_target_position - projectile.m_origin).length_2d();
const auto height = delta2d * std::tan(angles::degrees_to_radians(projectile_pitch.value()));
return Vector3(predicted_target_position.x, predicted_target_position.y, projectile.m_origin.z + height);
}
return std::nullopt;
}
std::optional<float>
ProjPredEngineLegacy::maybe_calculate_projectile_launch_pitch_angle(const Projectile& projectile,
const Vector3<float>& target_position) const
{
const auto bullet_gravity = m_gravity_constant * projectile.m_gravity_scale;
const auto delta = target_position - projectile.m_origin;
const auto distance2d = delta.length_2d();
const auto distance2d_sqr = distance2d * distance2d;
const auto launch_speed_sqr = projectile.m_launch_speed * projectile.m_launch_speed;
float root = launch_speed_sqr * launch_speed_sqr
- bullet_gravity * (bullet_gravity * distance2d_sqr + 2.0f * delta.z * launch_speed_sqr);
if (root < 0.0f) [[unlikely]]
return std::nullopt;
root = std::sqrt(root);
const float angle = std::atan((launch_speed_sqr - root) / (bullet_gravity * distance2d));
return angles::radians_to_degrees(angle);
}
bool ProjPredEngineLegacy::is_projectile_reached_target(const Vector3<float>& target_position,
const Projectile& projectile, const float pitch,
const float time) const
{
const auto yaw = projectile.m_origin.view_angle_to(target_position).y;
const auto projectile_position = projectile.predict_position(pitch, yaw, time, m_gravity_constant);
return projectile_position.distance_to(target_position) <= m_distance_tolerance;
}
} // namespace omath::projectile_prediction

View File

@@ -1,22 +0,0 @@
//
// Created by Vlad on 6/9/2024.
//
#include "omath/projectile_prediction/projectile.hpp"
#include <omath/engines/source_engine/formulas.hpp>
namespace omath::projectile_prediction
{
Vector3<float> Projectile::predict_position(const float pitch, const float yaw, const float time,
const float gravity) const
{
auto current_pos = m_origin
+ source_engine::forward_vector({source_engine::PitchAngle::from_degrees(-pitch),
source_engine::YawAngle::from_degrees(yaw),
source_engine::RollAngle::from_degrees(0)})
* m_launch_speed * time;
current_pos.z -= (gravity * m_gravity_scale) * (time * time) * 0.5f;
return current_pos;
}
} // namespace omath::projectile_prediction

View File

@@ -1,10 +0,0 @@
//
// Created by Vlad on 6/9/2024.
//
#include "omath/projectile_prediction/projectile.hpp"
namespace omath::prediction
{
}

View File

@@ -1,8 +0,0 @@
//
// Created by Vlad on 27.08.2024.
//
#include "omath/projection/camera.hpp"
namespace omath::projection
{
}

View File

@@ -5,7 +5,7 @@ project(unit_tests)
include(GoogleTest)
file(GLOB_RECURSE UNIT_TESTS_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
add_executable(unit_tests ${UNIT_TESTS_SOURCES})
add_executable(${PROJECT_NAME} ${UNIT_TESTS_SOURCES})
set_target_properties(unit_tests PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
@@ -17,6 +17,6 @@ set_target_properties(unit_tests PROPERTIES
CXX_STANDARD_REQUIRED ON)
target_link_libraries(unit_tests PRIVATE gtest gtest_main omath::omath)
target_link_libraries(${PROJECT_NAME} PRIVATE gtest gtest_main omath::omath)
gtest_discover_tests(unit_tests)
gtest_discover_tests(${PROJECT_NAME})

View File

@@ -7,27 +7,27 @@
#include <omath/engines/iw_engine/formulas.hpp>
TEST(UnitTestIwEngine, ForwardVector)
TEST(unit_test_iw_engine, ForwardVector)
{
const auto forward = omath::iw_engine::forward_vector({});
EXPECT_EQ(forward, omath::iw_engine::k_abs_forward);
}
TEST(UnitTestIwEngine, RightVector)
TEST(unit_test_iw_engine, RightVector)
{
const auto right = omath::iw_engine::right_vector({});
EXPECT_EQ(right, omath::iw_engine::k_abs_right);
}
TEST(UnitTestIwEngine, UpVector)
TEST(unit_test_iw_engine, UpVector)
{
const auto up = omath::iw_engine::up_vector({});
EXPECT_EQ(up, omath::iw_engine::k_abs_up);
}
TEST(UnitTestIwEngine, ForwardVectorRotationYaw)
TEST(unit_test_iw_engine, ForwardVectorRotationYaw)
{
omath::iw_engine::ViewAngles angles;
@@ -39,7 +39,7 @@ TEST(UnitTestIwEngine, ForwardVectorRotationYaw)
EXPECT_NEAR(forward.z, omath::iw_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestIwEngine, ForwardVectorRotationPitch)
TEST(unit_test_iw_engine, ForwardVectorRotationPitch)
{
omath::iw_engine::ViewAngles angles;
@@ -51,7 +51,7 @@ TEST(UnitTestIwEngine, ForwardVectorRotationPitch)
EXPECT_NEAR(forward.z, omath::iw_engine::k_abs_up.z, 0.01f);
}
TEST(UnitTestIwEngine, ForwardVectorRotationRoll)
TEST(unit_test_iw_engine, ForwardVectorRotationRoll)
{
omath::iw_engine::ViewAngles angles;
@@ -63,7 +63,7 @@ TEST(UnitTestIwEngine, ForwardVectorRotationRoll)
EXPECT_NEAR(forward.z, omath::iw_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestIwEngine, ProjectTargetMovedFromCamera)
TEST(unit_test_iw_engine, ProjectTargetMovedFromCamera)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
const auto cam = omath::iw_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -83,7 +83,7 @@ TEST(UnitTestIwEngine, ProjectTargetMovedFromCamera)
}
}
TEST(UnitTestIwEngine, CameraSetAndGetFov)
TEST(unit_test_iw_engine, CameraSetAndGetFov)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
auto cam = omath::iw_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -94,7 +94,7 @@ TEST(UnitTestIwEngine, CameraSetAndGetFov)
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 50.f);
}
TEST(UnitTestIwEngine, CameraSetAndGetOrigin)
TEST(unit_test_iw_engine, CameraSetAndGetOrigin)
{
auto cam = omath::iw_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, {}, 0.01f, 1000.f);

View File

@@ -7,25 +7,25 @@
#include <omath/engines/opengl_engine/formulas.hpp>
TEST(UnitTestOpenGL, ForwardVector)
TEST(unit_test_opengl, ForwardVector)
{
const auto forward = omath::opengl_engine::forward_vector({});
EXPECT_EQ(forward, omath::opengl_engine::k_abs_forward);
}
TEST(UnitTestOpenGL, RightVector)
TEST(unit_test_opengl, RightVector)
{
const auto right = omath::opengl_engine::right_vector({});
EXPECT_EQ(right, omath::opengl_engine::k_abs_right);
}
TEST(UnitTestOpenGL, UpVector)
TEST(unit_test_opengl, UpVector)
{
const auto up = omath::opengl_engine::up_vector({});
EXPECT_EQ(up, omath::opengl_engine::k_abs_up);
}
TEST(UnitTestOpenGL, ForwardVectorRotationYaw)
TEST(unit_test_opengl, ForwardVectorRotationYaw)
{
omath::opengl_engine::ViewAngles angles;
@@ -39,7 +39,7 @@ TEST(UnitTestOpenGL, ForwardVectorRotationYaw)
TEST(UnitTestOpenGL, ForwardVectorRotationPitch)
TEST(unit_test_opengl, ForwardVectorRotationPitch)
{
omath::opengl_engine::ViewAngles angles;
@@ -51,7 +51,7 @@ TEST(UnitTestOpenGL, ForwardVectorRotationPitch)
EXPECT_NEAR(forward.z, omath::opengl_engine::k_abs_up.z, 0.00001f);
}
TEST(UnitTestOpenGL, ForwardVectorRotationRoll)
TEST(unit_test_opengl, ForwardVectorRotationRoll)
{
omath::opengl_engine::ViewAngles angles;
@@ -63,7 +63,7 @@ TEST(UnitTestOpenGL, ForwardVectorRotationRoll)
EXPECT_NEAR(forward.z, omath::opengl_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestOpenGL, ProjectTargetMovedFromCamera)
TEST(unit_test_opengl, ProjectTargetMovedFromCamera)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
const auto cam = omath::opengl_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -83,7 +83,7 @@ TEST(UnitTestOpenGL, ProjectTargetMovedFromCamera)
}
}
TEST(UnitTestOpenGL, CameraSetAndGetFov)
TEST(unit_test_opengl, CameraSetAndGetFov)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
auto cam = omath::opengl_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -94,7 +94,7 @@ TEST(UnitTestOpenGL, CameraSetAndGetFov)
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 50.f);
}
TEST(UnitTestOpenGL, CameraSetAndGetOrigin)
TEST(unit_test_opengl, CameraSetAndGetOrigin)
{
auto cam = omath::opengl_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, {}, 0.01f, 1000.f);

View File

@@ -7,27 +7,27 @@
#include <omath/engines/source_engine/formulas.hpp>
TEST(UnitTestSourceEngine, ForwardVector)
TEST(unit_test_source_engine, ForwardVector)
{
const auto forward = omath::source_engine::forward_vector({});
EXPECT_EQ(forward, omath::source_engine::k_abs_forward);
}
TEST(UnitTestSourceEngine, RightVector)
TEST(unit_test_source_engine, RightVector)
{
const auto right = omath::source_engine::right_vector({});
EXPECT_EQ(right, omath::source_engine::k_abs_right);
}
TEST(UnitTestSourceEngine, UpVector)
TEST(unit_test_source_engine, UpVector)
{
const auto up = omath::source_engine::up_vector({});
EXPECT_EQ(up, omath::source_engine::k_abs_up);
}
TEST(UnitTestSourceEngine, ForwardVectorRotationYaw)
TEST(unit_test_source_engine, ForwardVectorRotationYaw)
{
omath::source_engine::ViewAngles angles;
@@ -39,7 +39,7 @@ TEST(UnitTestSourceEngine, ForwardVectorRotationYaw)
EXPECT_NEAR(forward.z, omath::source_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestSourceEngine, ForwardVectorRotationPitch)
TEST(unit_test_source_engine, ForwardVectorRotationPitch)
{
omath::source_engine::ViewAngles angles;
@@ -51,7 +51,7 @@ TEST(UnitTestSourceEngine, ForwardVectorRotationPitch)
EXPECT_NEAR(forward.z, omath::source_engine::k_abs_up.z, 0.01f);
}
TEST(UnitTestSourceEngine, ForwardVectorRotationRoll)
TEST(unit_test_source_engine, ForwardVectorRotationRoll)
{
omath::source_engine::ViewAngles angles;
@@ -63,7 +63,7 @@ TEST(UnitTestSourceEngine, ForwardVectorRotationRoll)
EXPECT_NEAR(forward.z, omath::source_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestSourceEngine, ProjectTargetMovedFromCamera)
TEST(unit_test_source_engine, ProjectTargetMovedFromCamera)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
const auto cam = omath::source_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -83,7 +83,7 @@ TEST(UnitTestSourceEngine, ProjectTargetMovedFromCamera)
}
}
TEST(UnitTestSourceEngine, ProjectTargetMovedUp)
TEST(unit_test_source_engine, ProjectTargetMovedUp)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
const auto cam = omath::source_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -103,7 +103,7 @@ TEST(UnitTestSourceEngine, ProjectTargetMovedUp)
}
}
TEST(UnitTestSourceEngine, CameraSetAndGetFov)
TEST(unit_test_source_engine, CameraSetAndGetFov)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
auto cam = omath::source_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -114,7 +114,7 @@ TEST(UnitTestSourceEngine, CameraSetAndGetFov)
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 50.f);
}
TEST(UnitTestSourceEngine, CameraSetAndGetOrigin)
TEST(unit_test_source_engine, CameraSetAndGetOrigin)
{
auto cam = omath::source_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, {}, 0.01f, 1000.f);

View File

@@ -7,14 +7,14 @@
#include <omath/engines/unity_engine/formulas.hpp>
#include <print>
TEST(UnitTestUnityEngine, ForwardVector)
TEST(unit_test_unity_engine, ForwardVector)
{
const auto forward = omath::unity_engine::forward_vector({});
EXPECT_EQ(forward, omath::unity_engine::k_abs_forward);
}
TEST(UnitTestUnityEngine, ForwardVectorRotationYaw)
TEST(unit_test_unity_engine, ForwardVectorRotationYaw)
{
omath::unity_engine::ViewAngles angles;
@@ -26,7 +26,7 @@ TEST(UnitTestUnityEngine, ForwardVectorRotationYaw)
EXPECT_NEAR(forward.z, omath::unity_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestUnityEngine, ForwardVectorRotationPitch)
TEST(unit_test_unity_engine, ForwardVectorRotationPitch)
{
omath::unity_engine::ViewAngles angles;
@@ -38,7 +38,7 @@ TEST(UnitTestUnityEngine, ForwardVectorRotationPitch)
EXPECT_NEAR(forward.z, omath::unity_engine::k_abs_up.z, 0.00001f);
}
TEST(UnitTestUnityEngine, ForwardVectorRotationRoll)
TEST(unit_test_unity_engine, ForwardVectorRotationRoll)
{
omath::unity_engine::ViewAngles angles;
@@ -50,20 +50,20 @@ TEST(UnitTestUnityEngine, ForwardVectorRotationRoll)
EXPECT_NEAR(forward.z, omath::unity_engine::k_abs_right.z, 0.00001f);
}
TEST(UnitTestUnityEngine, RightVector)
TEST(unit_test_unity_engine, RightVector)
{
const auto right = omath::unity_engine::right_vector({});
EXPECT_EQ(right, omath::unity_engine::k_abs_right);
}
TEST(UnitTestUnityEngine, UpVector)
TEST(unit_test_unity_engine, UpVector)
{
const auto up = omath::unity_engine::up_vector({});
EXPECT_EQ(up, omath::unity_engine::k_abs_up);
}
TEST(UnitTestUnityEngine, ProjectTargetMovedFromCamera)
TEST(unit_test_unity_engine, ProjectTargetMovedFromCamera)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(60.f);
const auto cam = omath::unity_engine::Camera({0, 0, 0}, {}, {1280.f, 720.f}, fov, 0.01f, 1000.f);
@@ -82,16 +82,18 @@ TEST(UnitTestUnityEngine, ProjectTargetMovedFromCamera)
EXPECT_NEAR(projected->y, 360, 0.00001f);
}
}
TEST(UnitTestUnityEngine, Project)
TEST(unit_test_unity_engine, Project)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(60.f);
const auto cam = omath::unity_engine::Camera({0, 0, 0}, {}, {1280.f, 720.f}, fov, 0.03f, 1000.f);
const auto proj = cam.world_to_screen({5.f, 3, 10.f});
std::println("{} {}", proj->x, proj->y);
EXPECT_NEAR(proj->x, 951.769f, 0.001f);
EXPECT_NEAR(proj->y, 547.061f, 0.001f);
}
TEST(UnitTestUnityEngine, CameraSetAndGetFov)
TEST(unit_test_unity_engine, CameraSetAndGetFov)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
auto cam = omath::unity_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
@@ -102,7 +104,7 @@ TEST(UnitTestUnityEngine, CameraSetAndGetFov)
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 50.f);
}
TEST(UnitTestUnityEngine, CameraSetAndGetOrigin)
TEST(unit_test_unity_engine, CameraSetAndGetOrigin)
{
auto cam = omath::unity_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, {}, 0.01f, 1000.f);

View File

@@ -0,0 +1,108 @@
//
// Created by Vlad on 8/25/2025.
//
//
// Created by Orange on 11/27/2024.
//
#include <gtest/gtest.h>
#include <omath/engines/unreal_engine/camera.hpp>
#include <omath/engines/unreal_engine/constants.hpp>
#include <omath/engines/unreal_engine/formulas.hpp>
#include <print>
TEST(unit_test_unreal_engine, ForwardVector)
{
const auto forward = omath::unreal_engine::forward_vector({});
EXPECT_EQ(forward, omath::unreal_engine::k_abs_forward);
}
TEST(unit_test_unreal_engine, ForwardVectorRotationYaw)
{
omath::unreal_engine::ViewAngles angles;
angles.yaw = omath::unreal_engine::YawAngle::from_degrees(90.f);
const auto forward = omath::unreal_engine::forward_vector(angles);
EXPECT_NEAR(forward.x, omath::unreal_engine::k_abs_right.x, 0.00001f);
EXPECT_NEAR(forward.y, omath::unreal_engine::k_abs_right.y, 0.00001f);
EXPECT_NEAR(forward.z, omath::unreal_engine::k_abs_right.z, 0.00001f);
}
TEST(unit_test_unreal_engine, ForwardVectorRotationPitch)
{
omath::unreal_engine::ViewAngles angles;
angles.pitch = omath::unreal_engine::PitchAngle::from_degrees(-90.f);
const auto forward = omath::unreal_engine::forward_vector(angles);
EXPECT_NEAR(forward.x, omath::unreal_engine::k_abs_up.x, 0.00001f);
EXPECT_NEAR(forward.y, omath::unreal_engine::k_abs_up.y, 0.00001f);
EXPECT_NEAR(forward.z, omath::unreal_engine::k_abs_up.z, 0.00001f);
}
TEST(unit_test_unreal_engine, ForwardVectorRotationRoll)
{
omath::unreal_engine::ViewAngles angles;
angles.roll = omath::unreal_engine::RollAngle::from_degrees(-90.f);
const auto forward = omath::unreal_engine::up_vector(angles);
EXPECT_NEAR(forward.x, omath::unreal_engine::k_abs_right.x, 0.00001f);
EXPECT_NEAR(forward.y, omath::unreal_engine::k_abs_right.y, 0.00001f);
EXPECT_NEAR(forward.z, omath::unreal_engine::k_abs_right.z, 0.00001f);
}
TEST(unit_test_unreal_engine, RightVector)
{
const auto right = omath::unreal_engine::right_vector({});
EXPECT_EQ(right, omath::unreal_engine::k_abs_right);
}
TEST(unit_test_unreal_engine, UpVector)
{
const auto up = omath::unreal_engine::up_vector({});
EXPECT_EQ(up, omath::unreal_engine::k_abs_up);
}
TEST(unit_test_unreal_engine, ProjectTargetMovedFromCamera)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(60.f);
const auto cam = omath::unreal_engine::Camera({0, 0, 0}, {}, {1280.f, 720.f}, fov, 0.01f, 1000.f);
for (float distance = 0.02f; distance < 100.f; distance += 0.01f)
{
const auto projected = cam.world_to_screen({distance, 0, 0});
EXPECT_TRUE(projected.has_value());
if (!projected.has_value())
continue;
EXPECT_NEAR(projected->x, 640, 0.00001f);
EXPECT_NEAR(projected->y, 360, 0.00001f);
}
}
TEST(unit_test_unreal_engine, CameraSetAndGetFov)
{
constexpr auto fov = omath::projection::FieldOfView::from_degrees(90.f);
auto cam = omath::unreal_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, fov, 0.01f, 1000.f);
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 90.f);
cam.set_field_of_view(omath::projection::FieldOfView::from_degrees(50.f));
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 50.f);
}
TEST(unit_test_unreal_engine, CameraSetAndGetOrigin)
{
auto cam = omath::unreal_engine::Camera({0, 0, 0}, {}, {1920.f, 1080.f}, {}, 0.01f, 1000.f);
EXPECT_EQ(cam.get_origin(), omath::Vector3<float>{});
cam.set_field_of_view(omath::projection::FieldOfView::from_degrees(50.f));
EXPECT_EQ(cam.get_field_of_view().as_degrees(), 50.f);
}

View File

@@ -20,20 +20,20 @@ TEST(unit_test_angles, degrees_to_radians)
TEST(unit_test_angles, horizontal_fov_to_verical)
{
constexpr float hFov = 90;
constexpr float aspectRation = 16.0f / 9.0f;
const auto verticalFov = omath::angles::horizontal_fov_to_vertical(hFov, aspectRation);
constexpr float h_fov = 90;
constexpr float aspect_ration = 16.0f / 9.0f;
const auto vertical_fov = omath::angles::horizontal_fov_to_vertical(h_fov, aspect_ration);
EXPECT_NEAR(verticalFov, 58.71f, 0.01f);
EXPECT_NEAR(vertical_fov, 58.71f, 0.01f);
}
TEST(unit_test_angles, vertical_to_horizontal)
{
constexpr float vFov = 58.71;
constexpr float aspectRation = 16.0f / 9.0f;
const auto horizontalFov = omath::angles::vertical_fov_to_horizontal(vFov, aspectRation);
constexpr float v_fov = 58.71;
constexpr float aspect_ration = 16.0f / 9.0f;
const auto horizontal_fov = omath::angles::vertical_fov_to_horizontal(v_fov, aspect_ration);
EXPECT_NEAR(horizontalFov, 89.99f, 0.01f);
EXPECT_NEAR(horizontal_fov, 89.99f, 0.01f);
}
TEST(unit_test_angles, wrap_angle)
{

View File

@@ -7,7 +7,7 @@
using namespace omath;
class UnitTestColor : public ::testing::Test
class unit_test_color : public ::testing::Test
{
protected:
Color color1;
@@ -21,7 +21,7 @@ protected:
};
// Test constructors
TEST_F(UnitTestColor, Constructor_Float)
TEST_F(unit_test_color, Constructor_Float)
{
constexpr Color color(0.5f, 0.5f, 0.5f, 1.0f);
EXPECT_FLOAT_EQ(color.x, 0.5f);
@@ -30,10 +30,10 @@ TEST_F(UnitTestColor, Constructor_Float)
EXPECT_FLOAT_EQ(color.w, 1.0f);
}
TEST_F(UnitTestColor, Constructor_Vector4)
TEST_F(unit_test_color, Constructor_Vector4)
{
constexpr omath::Vector4 vec(0.2f, 0.4f, 0.6f, 0.8f);
Color color(vec);
constexpr Color color(vec);
EXPECT_FLOAT_EQ(color.x, 0.2f);
EXPECT_FLOAT_EQ(color.y, 0.4f);
EXPECT_FLOAT_EQ(color.z, 0.6f);
@@ -41,7 +41,7 @@ TEST_F(UnitTestColor, Constructor_Vector4)
}
// Test static methods for color creation
TEST_F(UnitTestColor, FromRGBA)
TEST_F(unit_test_color, FromRGBA)
{
constexpr Color color = Color::from_rgba(128, 64, 32, 255);
EXPECT_FLOAT_EQ(color.x, 128.0f / 255.0f);
@@ -50,7 +50,7 @@ TEST_F(UnitTestColor, FromRGBA)
EXPECT_FLOAT_EQ(color.w, 1.0f);
}
TEST_F(UnitTestColor, FromHSV)
TEST_F(unit_test_color, FromHSV)
{
constexpr Color color = Color::from_hsv(0.0f, 1.0f, 1.0f); // Red in HSV
EXPECT_FLOAT_EQ(color.x, 1.0f);
@@ -60,18 +60,18 @@ TEST_F(UnitTestColor, FromHSV)
}
// Test HSV conversion
TEST_F(UnitTestColor, ToHSV)
TEST_F(unit_test_color, ToHSV)
{
Hsv hsv = color1.to_hsv(); // Red color
EXPECT_FLOAT_EQ(hsv.hue, 0.0f);
EXPECT_FLOAT_EQ(hsv.saturation, 1.0f);
EXPECT_FLOAT_EQ(hsv.value, 1.0f);
const auto [hue, saturation, value] = color1.to_hsv(); // Red color
EXPECT_FLOAT_EQ(hue, 0.0f);
EXPECT_FLOAT_EQ(saturation, 1.0f);
EXPECT_FLOAT_EQ(value, 1.0f);
}
// Test color blending
TEST_F(UnitTestColor, Blend)
TEST_F(unit_test_color, Blend)
{
Color blended = color1.blend(color2, 0.5f);
const Color blended = color1.blend(color2, 0.5f);
EXPECT_FLOAT_EQ(blended.x, 0.5f);
EXPECT_FLOAT_EQ(blended.y, 0.5f);
EXPECT_FLOAT_EQ(blended.z, 0.0f);
@@ -79,7 +79,7 @@ TEST_F(UnitTestColor, Blend)
}
// Test predefined colors
TEST_F(UnitTestColor, PredefinedColors)
TEST_F(unit_test_color, PredefinedColors)
{
constexpr Color red = Color::red();
constexpr Color green = Color::green();
@@ -102,7 +102,7 @@ TEST_F(UnitTestColor, PredefinedColors)
}
// Test non-member function: Blend for Vector3
TEST_F(UnitTestColor, BlendVector3)
TEST_F(unit_test_color, BlendVector3)
{
constexpr Color v1(1.0f, 0.0f, 0.0f, 1.f); // Red
constexpr Color v2(0.0f, 1.0f, 0.0f, 1.f); // Green

View File

@@ -102,7 +102,7 @@ namespace
EXPECT_TRUE(LineTracer::can_trace_line(short_ray, distant));
}
TEST(LineTracerTraceRayEdge, CantHit)
TEST(unit_test_unity_engine, CantHit)
{
constexpr omath::Triangle<Vector3<float>> triangle{{2, 0, 0}, {2, 2, 0}, {2, 2, 2}};
@@ -110,7 +110,7 @@ namespace
EXPECT_TRUE(omath::collision::LineTracer::can_trace_line(ray, triangle));
}
TEST(LineTracerTraceRayEdge, CanHit)
TEST(unit_test_unity_engine, CanHit)
{
constexpr omath::Triangle<Vector3<float>> triangle{{2, 0, 0}, {2, 2, 0}, {2, 2, 2}};

View File

@@ -167,8 +167,8 @@ TEST_F(UnitTestMat, StaticMethod_ToScreenMat)
TEST_F(UnitTestMat, Method_At_OutOfRange)
{
#if !defined(NDEBUG) && defined(OMATH_SUPRESS_SAFETY_CHECKS)
EXPECT_THROW(std::ignore = m2.At(2, 0), std::out_of_range);
EXPECT_THROW(std::ignore = m2.At(0, 2), std::out_of_range);
EXPECT_THROW(std::ignore = m2.at(2, 0), std::out_of_range);
EXPECT_THROW(std::ignore = m2.at(0, 2), std::out_of_range);
#endif
}

Some files were not shown because too many files have changed in this diff Show More