mirror of
https://github.com/orange-cpp/omath.git
synced 2026-06-09 08:44:35 +00:00
Compare commits
262 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b8c0a15fdc | |||
| 790c49e796 | |||
| 87d2577937 | |||
| c4f4685ce5 | |||
| 89b60083f9 | |||
| cbd3ca9a73 | |||
| 20c4890b20 | |||
| ab5fb0ee35 | |||
| bcbe90737f | |||
| 812850393b | |||
| 98f8875dfc | |||
| 659072cf4c | |||
| 0e05e013fe | |||
| f4f385bc46 | |||
| dd5d2d5541 | |||
| 5c37e39358 | |||
| 0a7f69aeb0 | |||
| eea6195ec2 | |||
| 969ba6fd34 | |||
| 310e4989dd | |||
| c54ec32864 | |||
| 7c63336090 | |||
| 1eadf24553 | |||
| 683b323396 | |||
| 4ae6549405 | |||
| bc24ee0328 | |||
| 86dc35fb8d | |||
| 62010ae7be | |||
| 3e2a40d5e8 | |||
| f218e8fff4 | |||
| 52b320c642 | |||
| f2cbdd73a9 | |||
| 22c01a83b9 | |||
| 61abf6e893 | |||
| e6a5f00f15 | |||
| 65ba237c6e | |||
| 55041384c5 | |||
| 25dc212b08 | |||
| 4f4c911e4d | |||
| 652147f0bb | |||
| 44f8a52c44 | |||
| 555786819f | |||
| 41bec6c6cd | |||
| 93ab7a9b79 | |||
| c0481ef3fa | |||
| a22feeb1b9 | |||
| 2e41aa496f | |||
| 762edc2a37 | |||
| afb8f9cb80 | |||
| 10215e6e1c | |||
| 9af201069a | |||
| 5d692b4dbd | |||
| 4ebc5f83e9 | |||
| 4241f0cf89 | |||
| 4fc5eade06 | |||
| e00dc482e6 | |||
| b330265f45 | |||
| 6832799040 | |||
| 7be3bde498 | |||
| a8eac87f02 | |||
| 9fd666c2df | |||
| 5921004bfd | |||
| 697c9f2768 | |||
| 937b5c2b8c | |||
| 44d923766c | |||
| 515076b741 | |||
| 0d01309bf8 | |||
| 17e32d5a5c | |||
| 96ac0ba6a6 | |||
| e49f93fbc9 | |||
| 8d815389b8 | |||
| f32496896d | |||
| 9d5984093d | |||
| 104067a8c7 | |||
| 4c3b76f7d2 | |||
| 6573363683 | |||
| 656b1a2267 | |||
| a4cc02dff5 | |||
| bc94f49759 | |||
| 852f5ad556 | |||
| 84b9500837 | |||
| 83e48343dd | |||
| 3d130fd1fb | |||
| f1ee6e9e35 | |||
| 5ea1f00d09 | |||
| 63debc635e | |||
| 007340edaa | |||
| b9c5dcc2c5 | |||
| a304672ca9 | |||
| 1b45fdc7b3 | |||
| 0e824ef320 | |||
| cbf627c9f8 | |||
| dea896c6cb | |||
| a057b8c1e9 | |||
| 416f8c86c1 | |||
| b230051258 | |||
| ffb1e70552 | |||
| 70b9505166 | |||
| 9ccb25dd26 | |||
| 8344b745b7 | |||
| d2b64a52b0 | |||
| fd3d003251 | |||
| e93a6dc214 | |||
| 7329410f94 | |||
| 7bb23d3f7a | |||
| 932b0d8deb | |||
| 64e6ba3632 | |||
| 6319aa81ab | |||
| 544fa313c1 | |||
| 4e0c74a256 | |||
| d0684c388e | |||
| 137f1f6826 | |||
| 46457b81ac | |||
| 70f2f90100 | |||
| c8b2d963db | |||
| 033935918b | |||
| d27b3ebd53 | |||
| b69303faca | |||
| 4241e738f4 | |||
| e3d77e8681 | |||
| 259242b582 | |||
| 9d256901dd | |||
| 253361e1b7 | |||
| f7fe21d924 | |||
| 769261a584 | |||
| 988f81eeb4 | |||
| 28e48dabc9 | |||
| c4e61e3aa2 | |||
| eb6f0302a9 | |||
| 5ad1d763bb | |||
| cc68d4e2b7 | |||
| 899a9825a0 | |||
| 800435b407 | |||
| 0a72f8541a | |||
| a5ed088ce0 | |||
| 1e0cec2762 | |||
| 423dca43e4 | |||
| 7318644027 | |||
| 0515018605 | |||
| 152eafb78f | |||
| f8beaa4bab | |||
| 614e5ebb35 | |||
| 36e4cef2f3 | |||
| 577afd4d4a | |||
| aebb29d773 | |||
| 3c81aea2ca | |||
| 32d88f0881 | |||
| 15898e9b3d | |||
| e37fefae23 | |||
| f8f3f2c45d | |||
| aee78d7671 | |||
| eb443d533c | |||
| 5466638330 | |||
| 19350b2618 | |||
| 53b495a413 | |||
| 18a1349693 | |||
| 584a66b20c | |||
| 3e5fb1bdb5 | |||
| 3fa85f4c4d | |||
| d3c90253f7 | |||
| eeb4dccb12 | |||
| 708c8c082b | |||
| e9dbec778d | |||
| 99d77d7790 | |||
| df5ca54b90 | |||
| 80bae265c0 | |||
| 4929c96e5b | |||
| f66f028317 | |||
| dc3f2980db | |||
| 4505aee3c2 | |||
| ee8073ceb4 | |||
| 800965a16c | |||
| 3e560cbfa4 | |||
| fbebed3d16 | |||
| 439da31334 | |||
| f7cb5eef1f | |||
| f6254c6a8c | |||
| e0c5c1c56b | |||
| e090ac1d9a | |||
| dc3606301d | |||
| eb0ca6627f | |||
| e2be30f505 | |||
| a742d99205 | |||
| 578a4e1d32 | |||
| 13e0bb3262 | |||
| 619c15072c | |||
| 242fc45ffa | |||
| 36628c0400 | |||
| a630da39e3 | |||
| 910100c6dd | |||
| dbae07546f | |||
| d1d26352d6 | |||
| 4f0cfd4cef | |||
| 8c03a07600 | |||
| 498df95e3e | |||
| 7ad0e3f10b | |||
| 4372f429ae | |||
| 077653e5ce | |||
| 5ec26f9def | |||
| f48232cc1d | |||
| 32b1b90414 | |||
| 0b18129eac | |||
| 8983cfc6d9 | |||
| 123184987f | |||
| ac7aeee9be | |||
| 1d8dba6487 | |||
| 18b0b210cf | |||
| 9e08f5bb5c | |||
| a61d3f20b7 | |||
| 4340e83914 | |||
| 1efa28d676 | |||
| f393d0c1c3 | |||
| 55c5bb92da | |||
| 6f203e3a20 | |||
| 038de53783 | |||
| fde3e1dcb9 | |||
| 6153478d6e | |||
| 4a6ddb230b | |||
| bb61e2303e | |||
| 522597c196 | |||
| 9709ba8f61 | |||
| 5111695d84 | |||
| 50bfc3e943 | |||
| 15f2a3917f | |||
| dede0a145d | |||
| 4238c94fc0 | |||
| 6a6c265501 | |||
| d061f67d13 | |||
| 1546d8a90f | |||
| 55c7922b24 | |||
| 1af9eccad9 | |||
| 1c58340404 | |||
| 860686cb92 | |||
| fbacfa10ec | |||
| 62ad7157ff | |||
| 92689fbf21 | |||
| fe1ff12f74 | |||
| b19a4de904 | |||
| 392a204dd1 | |||
| 7b99e1f296 | |||
| d5eb607900 | |||
| 2965ab1b25 | |||
| e1b1471935 | |||
| e8925af4c1 | |||
| abf068262d | |||
| 7107b9c28f | |||
| 6b7c28e2a8 | |||
| f517ce7b5b | |||
| 9cbf9b2e5e | |||
| 2a4ad1c73a | |||
| bd0410fcac | |||
| 1f54cf50d2 | |||
| ddafd24ea6 | |||
| bdbf596647 | |||
| 2d4843700d | |||
| 28b3aecf9d | |||
| 16d6a5d038 | |||
| 2aa907a1c3 | |||
| ffba73271b | |||
| e6627c7a06 | |||
| ef86da13ad | |||
| 07de3d27ec |
+1
-1
@@ -56,7 +56,7 @@ SpaceBeforeParensOptions:
|
|||||||
AfterIfMacros: true
|
AfterIfMacros: true
|
||||||
AfterOverloadedOperator: false
|
AfterOverloadedOperator: false
|
||||||
BeforeNonEmptyParentheses: false
|
BeforeNonEmptyParentheses: false
|
||||||
SpaceBeforeRangeBasedForLoopColon: false
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
SpaceInEmptyParentheses: false
|
SpaceInEmptyParentheses: false
|
||||||
SpacesInCStyleCastParentheses: false
|
SpacesInCStyleCastParentheses: false
|
||||||
SpacesInConditionalStatement: false
|
SpacesInConditionalStatement: false
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -19,27 +19,32 @@ jobs:
|
|||||||
name: Arch Linux (Clang)
|
name: Arch Linux (Clang)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: archlinux:latest
|
container: archlinux:latest
|
||||||
|
env:
|
||||||
|
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
||||||
steps:
|
steps:
|
||||||
- name: Install basic tool-chain with pacman
|
- name: Install basic tool-chain with pacman
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pacman -Sy --noconfirm archlinux-keyring
|
pacman -Sy --noconfirm archlinux-keyring
|
||||||
pacman -Syu --noconfirm --needed \
|
pacman -Syu --noconfirm --needed \
|
||||||
git base-devel clang cmake ninja
|
git base-devel clang cmake ninja zip unzip fmt
|
||||||
|
|
||||||
- name: Checkout repository (with sub-modules)
|
- name: Checkout repository (with sub-modules)
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Set up vcpkg
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT"
|
||||||
- name: Configure (cmake --preset)
|
- name: Configure (cmake --preset)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON
|
run: cmake --preset linux-release-vcpkg -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --build cmake-build/build/linux-release --target all
|
run: cmake --build cmake-build/build/linux-release-vcpkg --target unit_tests omath
|
||||||
|
|
||||||
- name: Run unit_tests
|
- name: Run unit_tests
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -47,12 +52,14 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# 2) Windows – MSVC / Ninja
|
# 2) Windows – MSVC / Ninja
|
||||||
##############################################################################
|
##############################################################################
|
||||||
windows-build-and-test:
|
windows-build-and-test:
|
||||||
name: Windows (MSVC)
|
name: Windows (MSVC)
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
OMATH_BUILD_VIA_VCPKG: ON
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository (with sub-modules)
|
- name: Checkout repository (with sub-modules)
|
||||||
@@ -68,11 +75,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure (cmake --preset)
|
- name: Configure (cmake --preset)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON
|
run: cmake --preset windows-release-vcpkg -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --build cmake-build/build/windows-release --target all
|
run: cmake --build cmake-build/build/windows-release-vcpkg --target unit_tests omath
|
||||||
|
|
||||||
- name: Run unit_tests.exe
|
- name: Run unit_tests.exe
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/cmake-build/
|
/cmake-build/
|
||||||
/.idea
|
|
||||||
/out
|
/out
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
/extlibs/vcpkg
|
/extlibs/vcpkg
|
||||||
|
.idea/workspace.xml
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[submodule "extlibs/googletest"]
|
|
||||||
path = extlibs/googletest
|
|
||||||
url = https://github.com/google/googletest.git
|
|
||||||
Generated
+8
@@ -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
|
||||||
Generated
+209
@@ -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="<NamingElement Priority="1"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="namespace" /><type Name="namespace alias" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="7"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="macro" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></NamingElement>" 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="<NamingElement Priority="2"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="__interface" /><type Name="class" /><type Name="concept" /><type Name="enum" /><type Name="struct" /><type Name="type alias" /><type Name="type template parameter" /><type Name="typedef" /><type Name="union" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Functions/@EntryIndexedValue" value="<NamingElement Priority="3"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global function" /><type Name="member function" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Fields/@EntryIndexedValue" value="<NamingElement Priority="4"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="class field" /><type Name="struct field" /><type Name="union member" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Variables/@EntryIndexedValue" value="<NamingElement Priority="5"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global variable" /><type Name="local variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="1" Title="Namespaces"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="namespace" /><type Name="namespace alias" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=A279BB9D47B8754E9482D81B5D3B3489/@EntryIndexedValue" value="<NamingElement Priority="2" Title="Types"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="__interface" /><type Name="class" /><type Name="concept" /><type Name="enum" /><type Name="struct" /><type Name="type alias" /><type Name="type template parameter" /><type Name="typedef" /><type Name="union" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=82D01E1970D2F6419CE2737C415D3A01/@EntryIndexedValue" value="<NamingElement Priority="3" Title="Functions"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global function" /><type Name="member function" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2A0CD4590563D04B89402AC0279B5E10/@EntryIndexedValue" value="<NamingElement Priority="4" Title="Fields"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="class field" /><type Name="struct field" /><type Name="union member" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=DC1F6BB6E0EFFC49A38E940DB8A84CF6/@EntryIndexedValue" value="<NamingElement Priority="5" Title="Variables"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global variable" /><type Name="lambda" /><type Name="local variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=AA17EF9DE2E5364DAEBE52F9EBBEA658/@EntryIndexedValue" value="<NamingElement Priority="6" Title="Parameters"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="function parameter" /><type Name="lambda parameter" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=9BA140847B0718418342A07C8F0CE1ED/@EntryIndexedValue" value="<NamingElement Priority="7" Title="Macros"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="macro" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></NamingElement>" 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>
|
||||||
Generated
+6
@@ -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>
|
||||||
Generated
+6
@@ -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>
|
||||||
Generated
+435
@@ -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="DO_NOT_SHOW" 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="DO_NOT_SHOW" 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="<NamingElement Priority="4"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="class field" /><type Name="struct field" /><type Name="union member" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Functions/@EntryIndexedValue" value="<NamingElement Priority="3"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global function" /><type Name="member function" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="7"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="macro" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNaming/Rules/=Namespaces/@EntryIndexedValue" value="<NamingElement Priority="1"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="namespace" /><type Name="namespace alias" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="2"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="__interface" /><type Name="class" /><type Name="concept" /><type Name="enum" /><type Name="struct" /><type Name="type alias" /><type Name="type template parameter" /><type Name="typedef" /><type Name="union" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement>" 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="<NamingElement Priority="5"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global variable" /><type Name="local variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="1" Title="Namespaces"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="namespace" /><type Name="namespace alias" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/Naming/CppNamingOptions/Rules/=2A0CD4590563D04B89402AC0279B5E10/@EntryIndexedValue" value="<NamingElement Priority="4" Title="Fields"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="class field" /><type Name="struct field" /><type Name="union member" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="3" Title="Functions"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global function" /><type Name="member function" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="7" Title="Macros"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="macro" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AA_BB" /></NamingElement>" 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="<NamingElement Priority="2" Title="Types"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="__interface" /><type Name="class" /><type Name="concept" /><type Name="enum" /><type Name="struct" /><type Name="type alias" /><type Name="type template parameter" /><type Name="typedef" /><type Name="union" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></NamingElement>" 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="<NamingElement Priority="6" Title="Parameters"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="function parameter" /><type Name="lambda parameter" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" 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="<NamingElement Priority="5" Title="Variables"><Descriptor Static="Indeterminate" Constexpr="Indeterminate" Const="Indeterminate" Volatile="Indeterminate" Accessibility="NOT_APPLICABLE"><type Name="global variable" /><type Name="lambda" /><type Name="local variable" /></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aa_bb" /></NamingElement>" type="string" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
+8
@@ -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>
|
||||||
+7
@@ -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>
|
||||||
Generated
+12
@@ -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>
|
||||||
Generated
+8
@@ -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>
|
||||||
Generated
+2
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
+68
-12
@@ -1,36 +1,78 @@
|
|||||||
cmake_minimum_required(VERSION 3.26)
|
cmake_minimum_required(VERSION 3.26)
|
||||||
|
|
||||||
project(omath VERSION 3.2.1 LANGUAGES CXX)
|
project(omath VERSION 4.0.0 LANGUAGES CXX)
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
check_cxx_compiler_flag("/arch:AVX2" COMPILER_SUPPORTS_AVX2)
|
||||||
|
else ()
|
||||||
|
check_cxx_compiler_flag("-mavx2" COMPILER_SUPPORTS_AVX2)
|
||||||
|
endif ()
|
||||||
|
|
||||||
option(OMATH_BUILD_TESTS "Build unit tests" ${PROJECT_IS_TOP_LEVEL})
|
option(OMATH_BUILD_TESTS "Build unit tests" OFF)
|
||||||
|
option(OMATH_BUILD_BENCHMARK "Build benchmarks" OFF)
|
||||||
option(OMATH_THREAT_WARNING_AS_ERROR "Set highest level of warnings and force compiler to treat them as errors" ON)
|
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_BUILD_AS_SHARED_LIBRARY "Build Omath as .so or .dll" OFF)
|
||||||
option(OMATH_USE_AVX2 "Omath will use AVX2 to boost performance" ON)
|
option(OMATH_USE_AVX2 "Omath will use AVX2 to boost performance" ${COMPILER_SUPPORTS_AVX2})
|
||||||
option(OMATH_IMGUI_INTEGRATION "Omath will define method to convert omath types to imgui types" OFF)
|
option(OMATH_IMGUI_INTEGRATION "Omath will define method to convert omath types to imgui types" OFF)
|
||||||
option(OMATH_BUILD_EXAMPLES "Build example projects with you can learn & play" OFF)
|
option(OMATH_BUILD_EXAMPLES "Build example projects with you can learn & play" OFF)
|
||||||
option(OMATH_STATIC_MSVC_RUNTIME_LIBRARY "Force Omath to link static runtime" OFF)
|
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_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_USE_UNITY_BUILD "Will enable unity build to speed up compilation" OFF)
|
||||||
option(OMATH_ENABLE_LEGACY "Will enable legacy classes that MUST be used ONLY for backward compatibility" OFF)
|
option(OMATH_ENABLE_LEGACY "Will enable legacy classes that MUST be used ONLY for backward compatibility" ON)
|
||||||
|
|
||||||
|
|
||||||
|
if (VCPKG_MANIFEST_FEATURES)
|
||||||
|
foreach (omath_feature IN LISTS VCPKG_MANIFEST_FEATURES)
|
||||||
|
if (omath_feature STREQUAL "imgui")
|
||||||
|
set(OMATH_IMGUI_INTEGRATION ON)
|
||||||
|
elseif (omath_feature STREQUAL "avx2")
|
||||||
|
set(OMATH_USE_AVX2 ${COMPILER_SUPPORTS_AVX2})
|
||||||
|
elseif (omath_feature STREQUAL "tests")
|
||||||
|
set(OMATH_BUILD_TESTS ON)
|
||||||
|
elseif (omath_feature STREQUAL "benchmark")
|
||||||
|
set(OMATH_BUILD_BENCHMARK ON)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
endforeach ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (OMATH_USE_AVX2 AND NOT COMPILER_SUPPORTS_AVX2)
|
||||||
|
message(WARNING "OMATH_USE_AVX2 requested, but compiler/target does not support AVX2. Disabling.")
|
||||||
|
set(OMATH_USE_AVX2 OFF CACHE BOOL "Omath will use AVX2 to boost performance" FORCE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (${PROJECT_IS_TOP_LEVEL})
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Building on ${CMAKE_HOST_SYSTEM_NAME}, compiler ${CMAKE_CXX_COMPILER_ID}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Warnings as errors ${OMATH_THREAT_WARNING_AS_ERROR}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Build unit tests ${OMATH_BUILD_TESTS}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Build benchmark ${OMATH_BUILD_BENCHMARK}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: As dynamic library ${OMATH_BUILD_AS_SHARED_LIBRARY}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Static C++ runtime ${OMATH_STATIC_MSVC_RUNTIME_LIBRARY}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: CMake unity build ${OMATH_USE_UNITY_BUILD}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Example projects ${OMATH_BUILD_EXAMPLES}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: AVX2 feature status ${OMATH_USE_AVX2}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: ImGUI integration feature status ${OMATH_IMGUI_INTEGRATION}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Legacy features support ${OMATH_ENABLE_LEGACY}")
|
||||||
|
message(STATUS "[${PROJECT_NAME}]: Building using vcpkg ${OMATH_BUILD_VIA_VCPKG}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
file(GLOB_RECURSE OMATH_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp")
|
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")
|
file(GLOB_RECURSE OMATH_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp")
|
||||||
|
|
||||||
|
|
||||||
if (OMATH_BUILD_AS_SHARED_LIBRARY)
|
if (OMATH_BUILD_AS_SHARED_LIBRARY)
|
||||||
add_library(${PROJECT_NAME} SHARED ${OMATH_SOURCES} ${OMATH_HEADERS})
|
add_library(${PROJECT_NAME} SHARED ${OMATH_SOURCES} ${OMATH_HEADERS})
|
||||||
else ()
|
else ()
|
||||||
add_library(${PROJECT_NAME} STATIC ${OMATH_SOURCES} ${OMATH_HEADERS})
|
add_library(${PROJECT_NAME} STATIC ${OMATH_SOURCES} ${OMATH_HEADERS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
message(STATUS "[OMATH]: Building on ${CMAKE_HOST_SYSTEM_NAME}")
|
|
||||||
|
|
||||||
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_VERSION="${PROJECT_VERSION}")
|
||||||
|
|
||||||
if (OMATH_IMGUI_INTEGRATION)
|
if (OMATH_IMGUI_INTEGRATION)
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_IMGUI_INTEGRATION)
|
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_IMGUI_INTEGRATION)
|
||||||
|
|
||||||
@@ -59,7 +101,7 @@ if (OMATH_SUPRESS_SAFETY_CHECKS)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (OMATH_ENABLE_LEGACY)
|
if (OMATH_ENABLE_LEGACY)
|
||||||
target_compile_options(${PROJECT_NAME} PUBLIC OMATH_ENABLE_LEGACY)
|
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_ENABLE_LEGACY)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
@@ -80,16 +122,25 @@ if (OMATH_STATIC_MSVC_RUNTIME_LIBRARY)
|
|||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (OMATH_USE_AVX2)
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE -mavx2 -mfma)
|
if (MSVC)
|
||||||
|
target_compile_options(${PROJECT_NAME} PUBLIC /arch:AVX2)
|
||||||
|
elseif (EMSCRIPTEN)
|
||||||
|
target_compile_options(${PROJECT_NAME} PUBLIC -msimd128 -mavx2)
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||||
|
target_compile_options(${PROJECT_NAME} PUBLIC -mfma -mavx2)
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_23)
|
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_23)
|
||||||
|
|
||||||
|
|
||||||
if (OMATH_BUILD_TESTS)
|
if (OMATH_BUILD_TESTS)
|
||||||
add_subdirectory(extlibs)
|
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PUBLIC OMATH_BUILD_TESTS)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (OMATH_BUILD_BENCHMARK)
|
||||||
|
add_subdirectory(benchmark)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (OMATH_BUILD_EXAMPLES)
|
if (OMATH_BUILD_EXAMPLES)
|
||||||
@@ -102,6 +153,11 @@ elseif (OMATH_THREAT_WARNING_AS_ERROR)
|
|||||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror)
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# 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}
|
target_include_directories(${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> # Use this path when building the project
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> # Use this path when building the project
|
||||||
|
|||||||
+75
-5
@@ -8,8 +8,8 @@
|
|||||||
"binaryDir": "${sourceDir}/cmake-build/build/${presetName}",
|
"binaryDir": "${sourceDir}/cmake-build/build/${presetName}",
|
||||||
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
|
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_C_COMPILER": "cl.exe",
|
"CMAKE_CXX_COMPILER": "cl.exe",
|
||||||
"CMAKE_CXX_COMPILER": "cl.exe"
|
"CMAKE_MAKE_PROGRAM": "Ninja"
|
||||||
},
|
},
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "equals",
|
"type": "equals",
|
||||||
@@ -17,6 +17,17 @@
|
|||||||
"rhs": "Windows"
|
"rhs": "Windows"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-base-vcpkg",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "windows-base",
|
||||||
|
"cacheVariables": {
|
||||||
|
"OMATH_BUILD_VIA_VCPKG": "ON",
|
||||||
|
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||||
|
"VCPKG_INSTALLED_DIR": "${sourceDir}/cmake-build/vcpkg_installed",
|
||||||
|
"VCPKG_MANIFEST_FEATURES": "tests;imgui;avx2"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "windows-debug",
|
"name": "windows-debug",
|
||||||
"displayName": "Debug",
|
"displayName": "Debug",
|
||||||
@@ -25,6 +36,23 @@
|
|||||||
"CMAKE_BUILD_TYPE": "Debug"
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-debug-vcpkg",
|
||||||
|
"displayName": "Debug",
|
||||||
|
"inherits": "windows-base-vcpkg",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-release-vcpkg",
|
||||||
|
"displayName": "Release",
|
||||||
|
"inherits": "windows-base-vcpkg",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"OMATH_BUILD_VIA_VCPKG": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "windows-release",
|
"name": "windows-release",
|
||||||
"displayName": "Release",
|
"displayName": "Release",
|
||||||
@@ -40,8 +68,8 @@
|
|||||||
"binaryDir": "${sourceDir}/cmake-build/build/${presetName}",
|
"binaryDir": "${sourceDir}/cmake-build/build/${presetName}",
|
||||||
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
|
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_C_COMPILER": "clang",
|
"CMAKE_CXX_COMPILER": "clang++",
|
||||||
"CMAKE_CXX_COMPILER": "clang++"
|
"CMAKE_MAKE_PROGRAM": "ninja"
|
||||||
},
|
},
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "equals",
|
"type": "equals",
|
||||||
@@ -49,6 +77,17 @@
|
|||||||
"rhs": "Linux"
|
"rhs": "Linux"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-base-vcpkg",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "linux-base",
|
||||||
|
"cacheVariables": {
|
||||||
|
"OMATH_BUILD_VIA_VCPKG": "ON",
|
||||||
|
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
|
||||||
|
"VCPKG_INSTALLED_DIR": "${sourceDir}/cmake-build/vcpkg_installed",
|
||||||
|
"VCPKG_MANIFEST_FEATURES": "tests;imgui;avx2"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-debug",
|
"name": "linux-debug",
|
||||||
"displayName": "Linux Debug",
|
"displayName": "Linux Debug",
|
||||||
@@ -57,6 +96,14 @@
|
|||||||
"CMAKE_BUILD_TYPE": "Debug"
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-debug-vcpkg",
|
||||||
|
"displayName": "Linux Debug",
|
||||||
|
"inherits": "linux-base-vcpkg",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-release",
|
"name": "linux-release",
|
||||||
"displayName": "Linux Release",
|
"displayName": "Linux Release",
|
||||||
@@ -65,6 +112,14 @@
|
|||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-release-vcpkg",
|
||||||
|
"displayName": "Linux Release",
|
||||||
|
"inherits": "linux-base-vcpkg",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "darwin-base",
|
"name": "darwin-base",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
@@ -72,7 +127,6 @@
|
|||||||
"binaryDir": "${sourceDir}/cmake-build/build/${presetName}",
|
"binaryDir": "${sourceDir}/cmake-build/build/${presetName}",
|
||||||
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
|
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_C_COMPILER": "clang",
|
|
||||||
"CMAKE_CXX_COMPILER": "clang++"
|
"CMAKE_CXX_COMPILER": "clang++"
|
||||||
},
|
},
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -89,6 +143,14 @@
|
|||||||
"CMAKE_BUILD_TYPE": "Debug"
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "darwin-debug-vcpkg",
|
||||||
|
"displayName": "Darwin Debug",
|
||||||
|
"inherits": "darwin-base",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "darwin-release",
|
"name": "darwin-release",
|
||||||
"displayName": "Darwin Release",
|
"displayName": "Darwin Release",
|
||||||
@@ -96,6 +158,14 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "darwin-release-vcpkg",
|
||||||
|
"displayName": "Darwin Release",
|
||||||
|
"inherits": "darwin-debug",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ In order to send code back to the official OMath repository, you must first crea
|
|||||||
account ([fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)) and
|
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.
|
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
|
OMath development 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.
|
merged into master will not roll out to stable build users unless the `stable` tag is updated.
|
||||||
|
|
||||||
### 📜 Code-Style
|
### 📜 Code-Style
|
||||||
|
|||||||
+4
-2
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
Thanks to everyone who made this possible, including:
|
Thanks to everyone who made this possible, including:
|
||||||
|
|
||||||
- Saikari aka luadebug for VCPKG port.
|
- Saikari aka luadebug for VCPKG port and awesome new initial logo design.
|
||||||
|
- AmbushedRaccoon for telegram post about omath to boost repository activity.
|
||||||
|
- Billy O'Neal aka BillyONeal for fixing compilation issues due to C math library compatibility.
|
||||||
|
|
||||||
And a big hand to everyone else who has contributed over the past!
|
And a big hand to everyone else who has contributed over the past!
|
||||||
|
|
||||||
THANKS! <3
|
THANKS! <3
|
||||||
|
|
||||||
-- Orange++ <orange-cpp@yandex.ru>
|
-- Orange++ <orange_github@proton.me>
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ target("...")
|
|||||||
cmake --preset windows-release -S .
|
cmake --preset windows-release -S .
|
||||||
cmake --build cmake-build/build/windows-release --target omath -j 6
|
cmake --build cmake-build/build/windows-release --target omath -j 6
|
||||||
```
|
```
|
||||||
Use **\<platform\>-\<build configuration\>** preset to build siutable version for yourself. Like **windows-release** or **linux-release**.
|
Use **\<platform\>-\<build configuration\>** preset to build suitable version for yourself. Like **windows-release** or **linux-release**.
|
||||||
|
|
||||||
| Platform Name | Build Config |
|
| Platform Name | Build Config |
|
||||||
|---------------|---------------|
|
|---------------|---------------|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Copyright (C) 2024-2025 Orange++ <orange-cpp@yandex.ru>
|
Copyright (C) 2024-2025 Orange++ <orange_github@proton.me>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
arising from the use of this software.
|
arising from the use of this software.
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
@@ -14,4 +14,46 @@ freely, subject to the following restrictions:
|
|||||||
appreciated but is not required.
|
appreciated but is not required.
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
misrepresented as being the original software.
|
misrepresented as being the original software.
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
4. If you are an employee, contractor, volunteer, representative,
|
||||||
|
or have any other affiliation (past or present)
|
||||||
|
with any of the following entities:
|
||||||
|
* "Advertising Placement Services" LLC
|
||||||
|
* "NEW SOLUTIONS VERTICALS" LLC
|
||||||
|
* "Autoexpert" LLC
|
||||||
|
* "Creditit" LLC
|
||||||
|
* "Yandex.Taxi" LLC
|
||||||
|
* "Yandex.Eda" LLC
|
||||||
|
* "Yandex.Lavka" LLC
|
||||||
|
* "Yandex.Telecom" LLC
|
||||||
|
* "Yandex.Cloud" LLC
|
||||||
|
* "Micromobility" LLC
|
||||||
|
* "MM-Tech" LLC
|
||||||
|
* "Carsharing" LLC
|
||||||
|
* "Yandex.Drive" LLC
|
||||||
|
* "EDADIL PROMO" LLC
|
||||||
|
* "Kinopoisk" LLC
|
||||||
|
* "Yandex.Music" LLC
|
||||||
|
* "Refueling (Yandex.Zapravki)" LLC
|
||||||
|
* "Yandex.Pay" LLC
|
||||||
|
* "Financial and Payment Technologies" LLC
|
||||||
|
* "Yandex.Delivery" LLC
|
||||||
|
* "Delivery Club" LLC
|
||||||
|
* "Yandex.Check" LLC
|
||||||
|
* "SMB-Service" LLC
|
||||||
|
* "ADV-TECH" LLC
|
||||||
|
* "Yandex Fantech" LLC
|
||||||
|
* "Yandex Smena" LLC
|
||||||
|
* "Market.Operations" LLC
|
||||||
|
* "Yandex.Market" LLC
|
||||||
|
* "ID Tech" LLC
|
||||||
|
* "Yandex.Crowd" LLC
|
||||||
|
* "Yandex" LLC
|
||||||
|
* "Rutube" LLC
|
||||||
|
* "Kaspersky" LLC
|
||||||
|
Or if you represent or are associated with any legal, organizational, or
|
||||||
|
professional entity providing services to or on behalf of the aforementioned entities:
|
||||||
|
You are expressly forbidden from accessing, using, modifying, distributing, or
|
||||||
|
interacting with the Software and its source code in any form. You must immediately
|
||||||
|
delete or destroy any physical or digital copies of the Software and/or
|
||||||
|
its source code, including any derivative works, tools, or information obtained from the Software.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<div align = center>
|
<div align = center>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
[](https://www.codefactor.io/repository/github/orange-cpp/omath)
|
[](https://www.codefactor.io/repository/github/orange-cpp/omath)
|
||||||
@@ -12,9 +12,26 @@
|
|||||||
[](https://discord.gg/eDgdaWbqwZ)
|
[](https://discord.gg/eDgdaWbqwZ)
|
||||||
[](https://t.me/orangennotes)
|
[](https://t.me/orangennotes)
|
||||||
|
|
||||||
|
OMath is a 100% independent, constexpr template blazingly fast math library that doesn't have legacy C++ code.
|
||||||
|
|
||||||
|
It provides the latest features, is highly customizable, has all for cheat development, DirectX/OpenGL/Vulkan support, premade support for different game engines, much more constexpr stuff than in other libraries and more...
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**[<kbd> <br> Install <br> </kbd>][INSTALL]**
|
||||||
|
**[<kbd> <br> Examples <br> </kbd>][EXAMPLES]**
|
||||||
|
**[<kbd> <br> Documentation <br> </kbd>][DOCUMENTATION]**
|
||||||
|
**[<kbd> <br> Contribute <br> </kbd>][CONTRIBUTING]**
|
||||||
|
**[<kbd> <br> Donate <br> </kbd>][SPONSOR]**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
</div>
|
</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>
|
<div align = center>
|
||||||
<a href="https://www.star-history.com/#orange-cpp/omath&Date">
|
<a href="https://www.star-history.com/#orange-cpp/omath&Date">
|
||||||
@@ -26,7 +43,7 @@ Oranges's Math Library (omath) is a comprehensive, open-source library aimed at
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## 👁🗨 Features
|
# Features
|
||||||
- **Efficiency**: Optimized for performance, ensuring quick computations using AVX2.
|
- **Efficiency**: Optimized for performance, ensuring quick computations using AVX2.
|
||||||
- **Versatility**: Includes a wide array of mathematical functions and algorithms.
|
- **Versatility**: Includes a wide array of mathematical functions and algorithms.
|
||||||
- **Ease of Use**: Simplified interface for convenient integration into various projects.
|
- **Ease of Use**: Simplified interface for convenient integration into various projects.
|
||||||
@@ -35,57 +52,49 @@ Oranges's Math Library (omath) is a comprehensive, open-source library aimed at
|
|||||||
- **Collision Detection**: Production ready code to handle collision detection by using simple interfaces.
|
- **Collision Detection**: Production ready code to handle collision detection by using simple interfaces.
|
||||||
- **No Additional Dependencies**: No additional dependencies need to use OMath except unit test execution
|
- **No Additional Dependencies**: No additional dependencies need to use OMath except unit test execution
|
||||||
- **Ready for meta-programming**: Omath use templates for common types like Vectors, Matrixes etc, to handle all types!
|
- **Ready for meta-programming**: Omath use templates for common types like Vectors, Matrixes etc, to handle all types!
|
||||||
|
- **Engine support**: Supports coordinate systems of **Source, Unity, Unreal, Frostbite, IWEngine and canonical OpenGL**.
|
||||||
|
- **Cross platform**: Supports Windows, MacOS and Linux.
|
||||||
|
- **Algorithms**: Has ability to scan for byte pattern with wildcards in PE files/modules, binary slices, works even with Wine apps.
|
||||||
|
<div align = center>
|
||||||
|
|
||||||
|
# Gallery
|
||||||
|
|
||||||
## Supported Render Pipelines
|
<br>
|
||||||
| ENGINE | SUPPORT |
|
|
||||||
|----------|---------|
|
|
||||||
| Source | ✅YES |
|
|
||||||
| Unity | ✅YES |
|
|
||||||
| IWEngine | ✅YES |
|
|
||||||
| Unreal | ❌NO |
|
|
||||||
|
|
||||||
## Supported Operating Systems
|
[](https://youtu.be/lM_NJ1yCunw?si=-Qf5yzDcWbaxAXGQ)
|
||||||
|
|
||||||
| OS | SUPPORT |
|
<br>
|
||||||
|----------------|---------|
|
|
||||||
| Windows 10/11 | ✅YES |
|
|
||||||
| Linux | ✅YES |
|
|
||||||
| Darwin (MacOS) | ✅YES |
|
|
||||||
|
|
||||||
## ⏬ Installation
|
![APEX Preview]
|
||||||
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
|
<br>
|
||||||
Simple world to screen function
|
|
||||||
```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);
|
|
||||||
|
|
||||||
const auto proj = camera.WorldToScreen({100, 0, 15});
|
![BO2 Preview]
|
||||||
EXPECT_TRUE(proj.has_value());
|
|
||||||
}
|
|
||||||
```
|
|
||||||
## Showcase
|
|
||||||
<details>
|
|
||||||
<summary>OMATH for making cheats (click to open)</summary>
|
|
||||||
|
|
||||||
With `omath/projection` module you can achieve simple ESP hack for powered by Source/Unreal/Unity engine games, like [Apex Legends](https://store.steampowered.com/app/1172470/Apex_Legends/).
|
<br>
|
||||||
|
|
||||||

|
![CS2 Preview]
|
||||||
Or for InfinityWard Engine based games. Like Call of Duty Black Ops 2!
|
|
||||||

|
|
||||||
Or create simple trigger bot with embeded traceline from omath::collision::LineTrace
|
|
||||||

|
|
||||||
Or even advanced projectile aimbot
|
|
||||||
[Watch Video](https://youtu.be/lM_NJ1yCunw?si=5E87OrQMeypxSJ3E)
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## 🫵🏻 Contributing
|
<br>
|
||||||
Contributions to `omath` are welcome! Please read `CONTRIBUTING.md` for details on our code of conduct and the process for submitting pull requests.
|
|
||||||
|
|
||||||
## 📜 License
|
![TF2 Preview]
|
||||||
This project is licensed under the ZLIB - see the `LICENSE` file for details.
|
|
||||||
|
|
||||||
## 💘 Acknowledgments
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
# 💘 Acknowledgments
|
||||||
- [All contributors](https://github.com/orange-cpp/omath/graphs/contributors)
|
- [All contributors](https://github.com/orange-cpp/omath/graphs/contributors)
|
||||||
|
|
||||||
|
<!----------------------------------{ Images }--------------------------------->
|
||||||
|
[APEX Preview]: .github/images/showcase/apex.png
|
||||||
|
[BO2 Preview]: .github/images/showcase/cod_bo2.png
|
||||||
|
[CS2 Preview]: .github/images/showcase/cs2.jpeg
|
||||||
|
[TF2 Preview]: .github/images/showcase/tf2.jpg
|
||||||
|
<!----------------------------------{ Buttons }--------------------------------->
|
||||||
|
[INSTALL]: INSTALL.md
|
||||||
|
[DOCUMENTATION]: http://libomath.org
|
||||||
|
[CONTRIBUTING]: CONTRIBUTING.md
|
||||||
|
[EXAMPLES]: examples
|
||||||
|
[SPONSOR]: https://boosty.to/orangecpp/purchase/3568644?ssource=DIRECT&share=subscription_link
|
||||||
|
|||||||
+1
-1
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
Please report security issues to `orange-cpp@yandex.ru`
|
Please report security issues to `orange_github@proton.me`
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
project(omath_benchmark)
|
||||||
|
|
||||||
|
|
||||||
|
file(GLOB_RECURSE OMATH_BENCHMARK_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
||||||
|
add_executable(${PROJECT_NAME} ${OMATH_BENCHMARK_SOURCES})
|
||||||
|
|
||||||
|
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}"
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
|
||||||
|
CXX_STANDARD 23
|
||||||
|
CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
if (TARGET benchmark::benchmark) # Benchmark is being linked as submodule
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE benchmark::benchmark omath)
|
||||||
|
else()
|
||||||
|
find_package(benchmark CONFIG REQUIRED) # Benchmark is being linked as vcpkg package
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE benchmark::benchmark omath)
|
||||||
|
endif ()
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 9/17/2025.
|
||||||
|
//
|
||||||
|
#include <benchmark/benchmark.h>
|
||||||
|
|
||||||
|
#include <omath/omath.hpp>
|
||||||
|
using namespace omath;
|
||||||
|
|
||||||
|
|
||||||
|
void mat_float_multiplication_col_major(benchmark::State& state)
|
||||||
|
{
|
||||||
|
using MatType = Mat<128, 128, float, MatStoreType::COLUMN_MAJOR>;
|
||||||
|
MatType a;
|
||||||
|
MatType b;
|
||||||
|
a.set(3.f);
|
||||||
|
b.set(7.f);
|
||||||
|
|
||||||
|
|
||||||
|
for ([[maybe_unused]] const auto _ : state)
|
||||||
|
std::ignore = a * b;
|
||||||
|
}
|
||||||
|
void mat_float_multiplication_row_major(benchmark::State& state)
|
||||||
|
{
|
||||||
|
using MatType = Mat<128, 128, float, MatStoreType::ROW_MAJOR>;
|
||||||
|
MatType a;
|
||||||
|
MatType b;
|
||||||
|
a.set(3.f);
|
||||||
|
b.set(7.f);
|
||||||
|
|
||||||
|
|
||||||
|
for ([[maybe_unused]] const auto _ : state)
|
||||||
|
std::ignore = a * b;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mat_double_multiplication_row_major(benchmark::State& state)
|
||||||
|
{
|
||||||
|
using MatType = Mat<128, 128, double, MatStoreType::ROW_MAJOR>;
|
||||||
|
MatType a;
|
||||||
|
MatType b;
|
||||||
|
a.set(3.f);
|
||||||
|
b.set(7.f);
|
||||||
|
|
||||||
|
|
||||||
|
for ([[maybe_unused]] const auto _ : state)
|
||||||
|
std::ignore = a * b;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mat_double_multiplication_col_major(benchmark::State& state)
|
||||||
|
{
|
||||||
|
using MatType = Mat<128, 128, double, MatStoreType::COLUMN_MAJOR>;
|
||||||
|
MatType a;
|
||||||
|
MatType b;
|
||||||
|
a.set(3.f);
|
||||||
|
b.set(7.f);
|
||||||
|
|
||||||
|
|
||||||
|
for ([[maybe_unused]] const auto _ : state)
|
||||||
|
std::ignore = a * b;
|
||||||
|
}
|
||||||
|
|
||||||
|
BENCHMARK(mat_float_multiplication_col_major)->Iterations(5000);
|
||||||
|
BENCHMARK(mat_float_multiplication_row_major)->Iterations(5000);
|
||||||
|
|
||||||
|
BENCHMARK(mat_double_multiplication_col_major)->Iterations(5000);
|
||||||
|
BENCHMARK(mat_double_multiplication_row_major)->Iterations(5000);
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 9/18/2025.
|
||||||
|
//
|
||||||
|
#include <benchmark/benchmark.h>
|
||||||
|
#include <omath/omath.hpp>
|
||||||
|
using namespace omath;
|
||||||
|
|
||||||
|
using namespace omath::projectile_prediction;
|
||||||
|
|
||||||
|
constexpr float simulation_time_step = 1.f / 1000.f;
|
||||||
|
constexpr float hit_distance_tolerance = 5.f;
|
||||||
|
|
||||||
|
void source_engine_projectile_prediction(benchmark::State& state)
|
||||||
|
{
|
||||||
|
constexpr Target target{.m_origin = {100, 0, 90}, .m_velocity = {0, 0, 0}, .m_is_airborne = false};
|
||||||
|
constexpr Projectile projectile = {.m_origin = {3, 2, 1}, .m_launch_speed = 5000, .m_gravity_scale = 0.4};
|
||||||
|
|
||||||
|
for ([[maybe_unused]] const auto _: state)
|
||||||
|
std::ignore = ProjPredEngineLegacy(400, simulation_time_step, 50, hit_distance_tolerance)
|
||||||
|
.maybe_calculate_aim_point(projectile, target);
|
||||||
|
}
|
||||||
|
|
||||||
|
BENCHMARK(source_engine_projectile_prediction)->Iterations(10'000);
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 9/17/2025.
|
||||||
|
//
|
||||||
|
#include <benchmark/benchmark.h>
|
||||||
|
BENCHMARK_MAIN();
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Welcome to MkDocs
|
||||||
|
|
||||||
|
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
* `mkdocs new [dir-name]` - Create a new project.
|
||||||
|
* `mkdocs serve` - Start the live-reloading docs server.
|
||||||
|
* `mkdocs build` - Build the documentation site.
|
||||||
|
* `mkdocs -h` - Print help message and exit.
|
||||||
|
|
||||||
|
## Project layout
|
||||||
|
|
||||||
|
mkdocs.yml # The configuration file.
|
||||||
|
docs/
|
||||||
|
index.md # The documentation homepage.
|
||||||
|
... # Other markdown pages, images and other files.
|
||||||
@@ -1 +0,0 @@
|
|||||||
add_subdirectory(googletest)
|
|
||||||
Submodule extlibs/googletest deleted from 52eb8108c5
@@ -3,10 +3,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "omath/linear_algebra/triangle.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "omath/triangle.hpp"
|
|
||||||
#include "omath/vector3.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
namespace omath::primitives
|
namespace omath::primitives
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 8/28/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "omath/linear_algebra/triangle.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
namespace omath::primitives
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
std::array<Triangle<Vector3<float>>, 2> create_plane(const Vector3<float>& vertex_a,
|
||||||
|
const Vector3<float>& vertex_b,
|
||||||
|
const Vector3<float>& direction, float size) noexcept;
|
||||||
|
}
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "omath/triangle.hpp"
|
#include "omath/linear_algebra/triangle.hpp"
|
||||||
#include "omath/vector3.hpp"
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
|
||||||
namespace omath::collision
|
namespace omath::collision
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 3/22/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "omath/engines/frostbite_engine/constants.hpp"
|
||||||
|
#include "omath/projection/camera.hpp"
|
||||||
|
#include "traits/camera_trait.hpp"
|
||||||
|
|
||||||
|
namespace omath::frostbite_engine
|
||||||
|
{
|
||||||
|
using Camera = projection::Camera<Mat4X4, ViewAngles, CameraTrait>;
|
||||||
|
} // namespace omath::unity_engine
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 10/21/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
#include <omath/trigonometry/angle.hpp>
|
||||||
|
#include <omath/trigonometry/view_angles.hpp>
|
||||||
|
|
||||||
|
namespace omath::frostbite_engine
|
||||||
|
{
|
||||||
|
constexpr Vector3<float> k_abs_up = {0, 1, 0};
|
||||||
|
constexpr Vector3<float> k_abs_right = {1, 0, 0};
|
||||||
|
constexpr Vector3<float> k_abs_forward = {0, 0, 1};
|
||||||
|
|
||||||
|
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::frostbite_engine
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 3/22/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "omath/engines/frostbite_engine/constants.hpp"
|
||||||
|
|
||||||
|
namespace omath::frostbite_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::unity_engine
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 8/10/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "omath/engines/frostbite_engine/formulas.hpp"
|
||||||
|
#include "omath/projection/camera.hpp"
|
||||||
|
|
||||||
|
namespace omath::frostbite_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
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 8/6/2025.
|
||||||
|
//
|
||||||
|
#pragma once
|
||||||
|
#include "omath/engines/frostbite_engine/formulas.hpp"
|
||||||
|
#include "omath/projectile_prediction/projectile.hpp"
|
||||||
|
#include "omath/projectile_prediction/target.hpp"
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
|
namespace omath::frostbite_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 direction = (view_to - origin).normalized();
|
||||||
|
return angles::radians_to_degrees(std::asin(direction.y));
|
||||||
|
}
|
||||||
|
[[nodiscard]]
|
||||||
|
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
||||||
|
{
|
||||||
|
const auto direction = (view_to - origin).normalized();
|
||||||
|
|
||||||
|
return angles::radians_to_degrees(std::atan2(direction.x, direction.z));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} // namespace omath::unity_engine
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <omath/angle.hpp>
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
#include <omath/mat.hpp>
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include <omath/vector3.hpp>
|
#include <omath/trigonometry/angle.hpp>
|
||||||
#include <omath/view_angles.hpp>
|
#include <omath/trigonometry/view_angles.hpp>
|
||||||
|
|
||||||
namespace omath::iw_engine
|
namespace omath::iw_engine
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <omath/angle.hpp>
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
#include <omath/mat.hpp>
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include <omath/vector3.hpp>
|
#include <omath/trigonometry/angle.hpp>
|
||||||
#include <omath/view_angles.hpp>
|
#include <omath/trigonometry/view_angles.hpp>
|
||||||
|
|
||||||
namespace omath::opengl_engine
|
namespace omath::opengl_engine
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,17 +62,15 @@ namespace omath::opengl_engine
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
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 direction = (view_to - origin).normalized();
|
||||||
const auto delta = view_to - origin;
|
return angles::radians_to_degrees(std::asin(direction.y));
|
||||||
|
|
||||||
return angles::radians_to_degrees(std::asin(delta.y / distance));
|
|
||||||
}
|
}
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
||||||
{
|
{
|
||||||
const auto delta = view_to - origin;
|
const auto direction = (view_to - origin).normalized();
|
||||||
|
|
||||||
return angles::radians_to_degrees(std::atan2(delta.z, delta.x));
|
return angles::radians_to_degrees(-std::atan2(direction.x, -direction.z));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} // namespace omath::opengl_engine
|
} // namespace omath::opengl_engine
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <omath/angle.hpp>
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
#include <omath/mat.hpp>
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include <omath/vector3.hpp>
|
#include <omath/trigonometry/angle.hpp>
|
||||||
#include <omath/view_angles.hpp>
|
#include <omath/trigonometry/view_angles.hpp>
|
||||||
|
|
||||||
namespace omath::source_engine
|
namespace omath::source_engine
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <omath/angle.hpp>
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
#include <omath/mat.hpp>
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include <omath/vector3.hpp>
|
#include <omath/trigonometry/angle.hpp>
|
||||||
#include <omath/view_angles.hpp>
|
#include <omath/trigonometry/view_angles.hpp>
|
||||||
|
|
||||||
namespace omath::unity_engine
|
namespace omath::unity_engine
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,17 +62,15 @@ namespace omath::unity_engine
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static float calc_direct_pitch_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
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 direction = (view_to - origin).normalized();
|
||||||
const auto delta = view_to - origin;
|
return angles::radians_to_degrees(std::asin(direction.y));
|
||||||
|
|
||||||
return angles::radians_to_degrees(std::asin(delta.y / distance));
|
|
||||||
}
|
}
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
||||||
{
|
{
|
||||||
const auto delta = view_to - origin;
|
const auto direction = (view_to - origin).normalized();
|
||||||
|
|
||||||
return angles::radians_to_degrees(std::atan2(delta.z, delta.x));
|
return angles::radians_to_degrees(std::atan2(direction.x, direction.z));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} // namespace omath::unity_engine
|
} // namespace omath::unity_engine
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 3/22/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
#include <omath/trigonometry/angle.hpp>
|
||||||
|
#include <omath/trigonometry/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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
//
|
||||||
|
// 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 direction = (view_to - origin).normalized();
|
||||||
|
|
||||||
|
return angles::radians_to_degrees(std::asin(direction.z));
|
||||||
|
}
|
||||||
|
[[nodiscard]]
|
||||||
|
static float calc_direct_yaw_angle(const Vector3<float>& origin, const Vector3<float>& view_to) noexcept
|
||||||
|
{
|
||||||
|
const auto direction = (view_to - origin).normalized();
|
||||||
|
|
||||||
|
return angles::radians_to_degrees(std::atan2(direction.y, direction.x));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} // namespace omath::unreal_engine
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
// Created by vlad on 9/29/2024.
|
// Created by vlad on 9/29/2024.
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "omath/vector3.hpp"
|
#include "vector3.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@@ -11,14 +11,12 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#ifdef near
|
#ifdef OMATH_USE_AVX2
|
||||||
|
#include <immintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef near
|
#undef near
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef far
|
|
||||||
#undef far
|
#undef far
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace omath
|
namespace omath
|
||||||
{
|
{
|
||||||
struct MatSize
|
struct MatSize
|
||||||
@@ -41,6 +39,7 @@ namespace omath
|
|||||||
class Mat final
|
class Mat final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
using ContainedType = Type;
|
||||||
constexpr Mat() noexcept
|
constexpr Mat() noexcept
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
@@ -88,7 +87,7 @@ namespace omath
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr Type& operator[](const size_t row, const size_t col) const
|
constexpr const Type& operator[](const size_t row, const size_t col) const
|
||||||
{
|
{
|
||||||
return at(row, col);
|
return at(row, col);
|
||||||
}
|
}
|
||||||
@@ -162,17 +161,19 @@ namespace omath
|
|||||||
constexpr Mat<Rows, OtherColumns, Type, StoreType>
|
constexpr Mat<Rows, OtherColumns, Type, StoreType>
|
||||||
operator*(const Mat<Columns, OtherColumns, Type, StoreType>& other) const
|
operator*(const Mat<Columns, OtherColumns, Type, StoreType>& other) const
|
||||||
{
|
{
|
||||||
Mat<Rows, OtherColumns, Type, StoreType> result;
|
#ifdef OMATH_USE_AVX2
|
||||||
|
if constexpr (StoreType == MatStoreType::ROW_MAJOR)
|
||||||
for (size_t i = 0; i < Rows; ++i)
|
return avx_multiply_row_major(other);
|
||||||
for (size_t j = 0; j < OtherColumns; ++j)
|
else if constexpr (StoreType == MatStoreType::COLUMN_MAJOR)
|
||||||
{
|
return avx_multiply_col_major(other);
|
||||||
Type sum = 0;
|
#else
|
||||||
for (size_t k = 0; k < Columns; ++k)
|
if constexpr (StoreType == MatStoreType::ROW_MAJOR)
|
||||||
sum += at(i, k) * other.at(k, j);
|
return cache_friendly_multiply_row_major(other);
|
||||||
result.at(i, j) = sum;
|
else if constexpr (StoreType == MatStoreType::COLUMN_MAJOR)
|
||||||
}
|
return cache_friendly_multiply_col_major(other);
|
||||||
return result;
|
#endif
|
||||||
|
else
|
||||||
|
std::unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Mat& operator*=(const Type& f) noexcept
|
constexpr Mat& operator*=(const Type& f) noexcept
|
||||||
@@ -328,6 +329,21 @@ namespace omath
|
|||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
std::wstring to_wstring() const noexcept
|
||||||
|
{
|
||||||
|
const auto ascii_string = to_string();
|
||||||
|
return {ascii_string.cbegin(), ascii_string.cend()};
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
// ReSharper disable once CppInconsistentNaming
|
||||||
|
std::u8string to_u8string() const noexcept
|
||||||
|
{
|
||||||
|
const auto ascii_string = to_string();
|
||||||
|
return {ascii_string.cbegin(), ascii_string.cend()};
|
||||||
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
bool operator==(const Mat& mat) const
|
bool operator==(const Mat& mat) const
|
||||||
{
|
{
|
||||||
@@ -374,6 +390,176 @@ namespace omath
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<Type, Rows * Columns> m_data;
|
std::array<Type, Rows * Columns> m_data;
|
||||||
|
|
||||||
|
template<size_t OtherColumns> [[nodiscard]]
|
||||||
|
constexpr Mat<Rows, OtherColumns, Type, MatStoreType::ROW_MAJOR>
|
||||||
|
cache_friendly_multiply_row_major(const Mat<Columns, OtherColumns, Type, MatStoreType::ROW_MAJOR>& other) const
|
||||||
|
{
|
||||||
|
Mat<Rows, OtherColumns, Type, MatStoreType::ROW_MAJOR> result;
|
||||||
|
for (std::size_t row_index = 0; row_index < Rows; ++row_index)
|
||||||
|
for (std::size_t column_index = 0; column_index < Columns; ++column_index)
|
||||||
|
{
|
||||||
|
const Type& current_number = at(row_index, column_index);
|
||||||
|
for (std::size_t other_column = 0; other_column < OtherColumns; ++other_column)
|
||||||
|
result.at(row_index, other_column) += current_number * other.at(column_index, other_column);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<size_t OtherColumns> [[nodiscard]]
|
||||||
|
constexpr Mat<Rows, OtherColumns, Type, MatStoreType::COLUMN_MAJOR> cache_friendly_multiply_col_major(
|
||||||
|
const Mat<Columns, OtherColumns, Type, MatStoreType::COLUMN_MAJOR>& other) const
|
||||||
|
{
|
||||||
|
Mat<Rows, OtherColumns, Type, MatStoreType::COLUMN_MAJOR> result;
|
||||||
|
for (std::size_t other_column = 0; other_column < OtherColumns; ++other_column)
|
||||||
|
for (std::size_t column_index = 0; column_index < Columns; ++column_index)
|
||||||
|
{
|
||||||
|
const Type& current_number = other.at(column_index, other_column);
|
||||||
|
for (std::size_t row_index = 0; row_index < Rows; ++row_index)
|
||||||
|
result.at(row_index, other_column) += at(row_index, column_index) * current_number;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#ifdef OMATH_USE_AVX2
|
||||||
|
template<size_t OtherColumns> [[nodiscard]]
|
||||||
|
constexpr Mat<Rows, OtherColumns, Type, MatStoreType::COLUMN_MAJOR>
|
||||||
|
avx_multiply_col_major(const Mat<Columns, OtherColumns, Type, MatStoreType::COLUMN_MAJOR>& other) const
|
||||||
|
{
|
||||||
|
Mat<Rows, OtherColumns, Type, MatStoreType::COLUMN_MAJOR> result;
|
||||||
|
|
||||||
|
const Type* this_mat_data = this->raw_array().data();
|
||||||
|
const Type* other_mat_data = other.raw_array().data();
|
||||||
|
Type* result_mat_data = result.raw_array().data();
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<Type, float>)
|
||||||
|
{
|
||||||
|
// ReSharper disable once CppTooWideScopeInitStatement
|
||||||
|
constexpr std::size_t vector_size = 8;
|
||||||
|
for (std::size_t j = 0; j < OtherColumns; ++j)
|
||||||
|
{
|
||||||
|
auto* c_col = reinterpret_cast<float*>(result_mat_data + j * Rows);
|
||||||
|
for (std::size_t k = 0; k < Columns; ++k)
|
||||||
|
{
|
||||||
|
const float bkj = reinterpret_cast<const float*>(other_mat_data)[k + j * Columns];
|
||||||
|
const __m256 bkj_vec = _mm256_set1_ps(bkj);
|
||||||
|
|
||||||
|
const auto* a_col_k = reinterpret_cast<const float*>(this_mat_data + k * Rows);
|
||||||
|
|
||||||
|
std::size_t i = 0;
|
||||||
|
for (; i + vector_size <= Rows; i += vector_size)
|
||||||
|
{
|
||||||
|
__m256 cvec = _mm256_loadu_ps(c_col + i);
|
||||||
|
const __m256 a_vec = _mm256_loadu_ps(a_col_k + i);
|
||||||
|
cvec = _mm256_fmadd_ps(a_vec, bkj_vec, cvec);
|
||||||
|
_mm256_storeu_ps(c_col + i, cvec);
|
||||||
|
}
|
||||||
|
for (; i < Rows; ++i)
|
||||||
|
c_col[i] += a_col_k[i] * bkj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (std::is_same_v<Type, double>)
|
||||||
|
{ // double
|
||||||
|
// ReSharper disable once CppTooWideScopeInitStatement
|
||||||
|
constexpr std::size_t vector_size = 4;
|
||||||
|
for (std::size_t j = 0; j < OtherColumns; ++j)
|
||||||
|
{
|
||||||
|
auto* c_col = reinterpret_cast<double*>(result_mat_data + j * Rows);
|
||||||
|
for (std::size_t k = 0; k < Columns; ++k)
|
||||||
|
{
|
||||||
|
const double bkj = reinterpret_cast<const double*>(other_mat_data)[k + j * Columns];
|
||||||
|
const __m256d bkj_vec = _mm256_set1_pd(bkj);
|
||||||
|
|
||||||
|
const auto* a_col_k = reinterpret_cast<const double*>(this_mat_data + k * Rows);
|
||||||
|
|
||||||
|
std::size_t i = 0;
|
||||||
|
for (; i + vector_size <= Rows; i += vector_size)
|
||||||
|
{
|
||||||
|
__m256d cvec = _mm256_loadu_pd(c_col + i);
|
||||||
|
const __m256d a_vec = _mm256_loadu_pd(a_col_k + i);
|
||||||
|
cvec = _mm256_fmadd_pd(a_vec, bkj_vec, cvec);
|
||||||
|
_mm256_storeu_pd(c_col + i, cvec);
|
||||||
|
}
|
||||||
|
for (; i < Rows; ++i)
|
||||||
|
c_col[i] += a_col_k[i] * bkj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
std::unreachable();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<size_t OtherColumns> [[nodiscard]]
|
||||||
|
constexpr Mat<Rows, OtherColumns, Type, MatStoreType::ROW_MAJOR>
|
||||||
|
avx_multiply_row_major(const Mat<Columns, OtherColumns, Type, MatStoreType::ROW_MAJOR>& other) const
|
||||||
|
{
|
||||||
|
Mat<Rows, OtherColumns, Type, MatStoreType::ROW_MAJOR> result;
|
||||||
|
|
||||||
|
const Type* this_mat_data = this->raw_array().data();
|
||||||
|
const Type* other_mat_data = other.raw_array().data();
|
||||||
|
Type* result_mat_data = result.raw_array().data();
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<Type, float>)
|
||||||
|
{
|
||||||
|
// ReSharper disable once CppTooWideScopeInitStatement
|
||||||
|
constexpr std::size_t vector_size = 8;
|
||||||
|
for (std::size_t i = 0; i < Rows; ++i)
|
||||||
|
{
|
||||||
|
Type* c_row = result_mat_data + i * OtherColumns;
|
||||||
|
for (std::size_t k = 0; k < Columns; ++k)
|
||||||
|
{
|
||||||
|
const auto aik = static_cast<float>(this_mat_data[i * Columns + k]);
|
||||||
|
const __m256 aik_vec = _mm256_set1_ps(aik);
|
||||||
|
const auto* b_row = reinterpret_cast<const float*>(other_mat_data + k * OtherColumns);
|
||||||
|
|
||||||
|
std::size_t j = 0;
|
||||||
|
for (; j + vector_size <= OtherColumns; j += vector_size)
|
||||||
|
{
|
||||||
|
__m256 cvec = _mm256_loadu_ps(c_row + j);
|
||||||
|
const __m256 b_vec = _mm256_loadu_ps(b_row + j);
|
||||||
|
cvec = _mm256_fmadd_ps(b_vec, aik_vec, cvec);
|
||||||
|
|
||||||
|
_mm256_storeu_ps(c_row + j, cvec);
|
||||||
|
}
|
||||||
|
for (; j < OtherColumns; ++j)
|
||||||
|
c_row[j] += aik * b_row[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (std::is_same_v<Type, double>)
|
||||||
|
{ // double
|
||||||
|
// ReSharper disable once CppTooWideScopeInitStatement
|
||||||
|
constexpr std::size_t vector_size = 4;
|
||||||
|
for (std::size_t i = 0; i < Rows; ++i)
|
||||||
|
{
|
||||||
|
Type* c_row = result_mat_data + i * OtherColumns;
|
||||||
|
for (std::size_t k = 0; k < Columns; ++k)
|
||||||
|
{
|
||||||
|
const auto aik = static_cast<double>(this_mat_data[i * Columns + k]);
|
||||||
|
const __m256d aik_vec = _mm256_set1_pd(aik);
|
||||||
|
const auto* b_row = reinterpret_cast<const double*>(other_mat_data + k * OtherColumns);
|
||||||
|
|
||||||
|
std::size_t j = 0;
|
||||||
|
for (; j + vector_size <= OtherColumns; j += vector_size)
|
||||||
|
{
|
||||||
|
__m256d cvec = _mm256_loadu_pd(c_row + j);
|
||||||
|
const __m256d b_vec = _mm256_loadu_pd(b_row + j);
|
||||||
|
cvec = _mm256_fmadd_pd(b_vec, aik_vec, cvec);
|
||||||
|
|
||||||
|
_mm256_storeu_pd(c_row + j, cvec);
|
||||||
|
}
|
||||||
|
for (; j < OtherColumns; ++j)
|
||||||
|
c_row[j] += aik * b_row[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
std::unreachable();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class Type = float, MatStoreType St = MatStoreType::ROW_MAJOR> [[nodiscard]]
|
template<class Type = float, MatStoreType St = MatStoreType::ROW_MAJOR> [[nodiscard]]
|
||||||
@@ -479,4 +665,73 @@ namespace omath
|
|||||||
{0.f, 0.f, -(far + near) / (far - near), -(2.f * near * far) / (far - near)},
|
{0.f, 0.f, -(far + near) / (far - near), -(2.f * near * far) / (far - near)},
|
||||||
{0.f, 0.f, -1.f, 0.f}};
|
{0.f, 0.f, -1.f, 0.f}};
|
||||||
}
|
}
|
||||||
|
template<class Type = float, MatStoreType St = MatStoreType::ROW_MAJOR>
|
||||||
|
[[nodiscard]]
|
||||||
|
Mat<4, 4, Type, St> mat_ortho_left_handed(const Type left, const Type right, const Type bottom, const Type top,
|
||||||
|
const Type near, const Type far) noexcept
|
||||||
|
{
|
||||||
|
return
|
||||||
|
{
|
||||||
|
{ static_cast<Type>(2) / (right - left), 0.f, 0.f, -(right + left) / (right - left)},
|
||||||
|
{ 0.f, static_cast<Type>(2) / (top - bottom), 0.f, -(top + bottom) / (top - bottom)},
|
||||||
|
{ 0.f, 0.f, static_cast<Type>(2) / (far - near), -(far + near) / (far - near) },
|
||||||
|
{ 0.f, 0.f, 0.f, 1.f }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
template<class Type = float, MatStoreType St = MatStoreType::ROW_MAJOR>
|
||||||
|
[[nodiscard]]
|
||||||
|
Mat<4, 4, Type, St> mat_ortho_right_handed(const Type left, const Type right, const Type bottom, const Type top,
|
||||||
|
const Type near, const Type far) noexcept
|
||||||
|
{
|
||||||
|
return
|
||||||
|
{
|
||||||
|
{ static_cast<Type>(2) / (right - left), 0.f, 0.f, -(right + left) / (right - left)},
|
||||||
|
{ 0.f, static_cast<Type>(2) / (top - bottom), 0.f, -(top + bottom) / (top - bottom)},
|
||||||
|
{ 0.f, 0.f, -static_cast<Type>(2) / (far - near), -(far + near) / (far - near) },
|
||||||
|
{ 0.f, 0.f, 0.f, 1.f }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
template<class T = float, MatStoreType St = MatStoreType::COLUMN_MAJOR>
|
||||||
|
Mat<4, 4, T, St> mat_look_at_left_handed(const Vector3<T>& eye, const Vector3<T>& center, const Vector3<T>& up)
|
||||||
|
{
|
||||||
|
const Vector3<T> f = (center - eye).normalized();
|
||||||
|
const Vector3<T> s = f.cross(up).normalized();
|
||||||
|
const Vector3<T> u = s.cross(f);
|
||||||
|
return mat_camera_view<T, St>(f, s, u, eye);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T = float, MatStoreType St = MatStoreType::COLUMN_MAJOR>
|
||||||
|
Mat<4, 4, T, St>mat_look_at_right_handed(const Vector3<T>& eye, const Vector3<T>& center, const Vector3<T>& up)
|
||||||
|
{
|
||||||
|
const Vector3<T> f = (center - eye).normalized();
|
||||||
|
const Vector3<T> s = f.cross(up).normalized();
|
||||||
|
const Vector3<T> u = s.cross(f);
|
||||||
|
return mat_camera_view<T, St>(-f, s, u, eye);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace omath
|
} // namespace omath
|
||||||
|
|
||||||
|
template<size_t Rows, size_t Columns, class Type, omath::MatStoreType StoreType>
|
||||||
|
struct std::formatter<omath::Mat<Rows, Columns, Type, StoreType>> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
using MatType = omath::Mat<Rows, Columns, Type, StoreType>;
|
||||||
|
[[nodiscard]]
|
||||||
|
static constexpr auto parse(std::format_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
static auto format(const MatType& mat, FormatContext& ctx)
|
||||||
|
{
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char>)
|
||||||
|
return std::format_to(ctx.out(), "{}", mat.to_string());
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, wchar_t>)
|
||||||
|
return std::format_to(ctx.out(), L"{}", mat.to_wstring());
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char8_t>)
|
||||||
|
return std::format_to(ctx.out(), u8"{}", mat.to_u8string());
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
// Created by Orange on 11/13/2024.
|
// Created by Orange on 11/13/2024.
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "omath/vector3.hpp"
|
#include "vector3.hpp"
|
||||||
|
|
||||||
namespace omath
|
namespace omath
|
||||||
{
|
{
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <format>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
#ifdef OMATH_IMGUI_INTEGRATION
|
#ifdef OMATH_IMGUI_INTEGRATION
|
||||||
@@ -218,10 +219,9 @@ namespace omath
|
|||||||
{
|
{
|
||||||
return std::make_tuple(x, y);
|
return std::make_tuple(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OMATH_IMGUI_INTEGRATION
|
#ifdef OMATH_IMGUI_INTEGRATION
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
ImVec2 to_im_vec2() const noexcept
|
constexpr ImVec2 to_im_vec2() const noexcept
|
||||||
{
|
{
|
||||||
return {static_cast<float>(this->x), static_cast<float>(this->y)};
|
return {static_cast<float>(this->x), static_cast<float>(this->y)};
|
||||||
}
|
}
|
||||||
@@ -233,3 +233,42 @@ namespace omath
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
} // namespace omath
|
} // namespace omath
|
||||||
|
|
||||||
|
template<> struct std::hash<omath::Vector2<float>>
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
std::size_t operator()(const omath::Vector2<float>& vec) const noexcept
|
||||||
|
{
|
||||||
|
std::size_t hash = 0;
|
||||||
|
constexpr std::hash<float> hasher;
|
||||||
|
|
||||||
|
hash ^= hasher(vec.x) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
hash ^= hasher(vec.y) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
struct std::formatter<omath::Vector2<Type>> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
static constexpr auto parse(std::format_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
static auto format(const omath::Vector2<Type>& vec, FormatContext& ctx)
|
||||||
|
{
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char>)
|
||||||
|
return std::format_to(ctx.out(), "[{}, {}]", vec.x, vec.y);
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, wchar_t>)
|
||||||
|
return std::format_to(ctx.out(), L"[{}, {}]", vec.x, vec.y);
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char8_t>)
|
||||||
|
return std::format_to(ctx.out(), u8"[{}, {}]", vec.x, vec.y);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "omath/angle.hpp"
|
#include "omath/trigonometry/angle.hpp"
|
||||||
#include "omath/vector2.hpp"
|
#include "omath/linear_algebra/vector2.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <expected>
|
#include <expected>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -159,9 +159,9 @@ namespace omath
|
|||||||
return Vector2<Type>::length();
|
return Vector2<Type>::length();
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] Type distance_to(const Vector3& vOther) const noexcept
|
[[nodiscard]] Type distance_to(const Vector3& v_other) const noexcept
|
||||||
{
|
{
|
||||||
return (*this - vOther).length();
|
return (*this - v_other).length();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -245,15 +245,6 @@ namespace omath
|
|||||||
return std::make_tuple(this->x, this->y, z);
|
return std::make_tuple(this->x, this->y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] Vector3 view_angle_to(const Vector3& other) const noexcept
|
|
||||||
{
|
|
||||||
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]]
|
[[nodiscard]]
|
||||||
bool operator<(const Vector3& other) const noexcept
|
bool operator<(const Vector3& other) const noexcept
|
||||||
{
|
{
|
||||||
@@ -279,21 +270,43 @@ namespace omath
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace omath
|
} // namespace omath
|
||||||
// ReSharper disable once CppRedundantNamespaceDefinition
|
|
||||||
namespace std
|
template<> struct std::hash<omath::Vector3<float>>
|
||||||
{
|
{
|
||||||
template<> struct hash<omath::Vector3<float>>
|
[[nodiscard]]
|
||||||
|
std::size_t operator()(const omath::Vector3<float>& vec) const noexcept
|
||||||
{
|
{
|
||||||
std::size_t operator()(const omath::Vector3<float>& vec) const noexcept
|
std::size_t hash = 0;
|
||||||
{
|
constexpr std::hash<float> hasher;
|
||||||
std::size_t hash = 0;
|
|
||||||
constexpr std::hash<float> hasher;
|
|
||||||
|
|
||||||
hash ^= hasher(vec.x) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
hash ^= hasher(vec.x) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
hash ^= hasher(vec.y) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
hash ^= hasher(vec.y) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
hash ^= hasher(vec.z) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
hash ^= hasher(vec.z) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace std
|
|
||||||
|
template<class Type>
|
||||||
|
struct std::formatter<omath::Vector3<Type>> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
static constexpr auto parse(std::format_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
static auto format(const omath::Vector3<Type>& vec, FormatContext& ctx)
|
||||||
|
{
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char>)
|
||||||
|
return std::format_to(ctx.out(), "[{}, {}, {}]", vec.x, vec.y, vec.z);
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, wchar_t>)
|
||||||
|
return std::format_to(ctx.out(), L"[{}, {}, {}]", vec.x, vec.y, vec.z);
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char8_t>)
|
||||||
|
return std::format_to(ctx.out(), u8"[{}, {}, {}]", vec.x, vec.y, vec.z);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <omath/vector3.hpp>
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
|
||||||
namespace omath
|
namespace omath
|
||||||
{
|
{
|
||||||
@@ -184,7 +184,7 @@ namespace omath
|
|||||||
|
|
||||||
#ifdef OMATH_IMGUI_INTEGRATION
|
#ifdef OMATH_IMGUI_INTEGRATION
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
ImVec4 to_im_vec4() const noexcept
|
constexpr ImVec4 to_im_vec4() const noexcept
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
static_cast<float>(this->x),
|
static_cast<float>(this->x),
|
||||||
@@ -201,3 +201,42 @@ namespace omath
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
} // namespace omath
|
} // namespace omath
|
||||||
|
|
||||||
|
template<> struct std::hash<omath::Vector4<float>>
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
std::size_t operator()(const omath::Vector4<float>& vec) const noexcept
|
||||||
|
{
|
||||||
|
std::size_t hash = 0;
|
||||||
|
constexpr std::hash<float> hasher;
|
||||||
|
|
||||||
|
hash ^= hasher(vec.x) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
hash ^= hasher(vec.y) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
hash ^= hasher(vec.z) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
hash ^= hasher(vec.w) + 0x9e3779b9 + (hash << 6) + (hash >> 2);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
struct std::formatter<omath::Vector4<Type>> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
static constexpr auto parse(std::format_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
static auto format(const omath::Vector4<Type>& vec, FormatContext& ctx)
|
||||||
|
{
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char>)
|
||||||
|
return std::format_to(ctx.out(), "[{}, {}, {}, {}]", vec.x, vec.y, vec.z, vec.w);
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, wchar_t>)
|
||||||
|
return std::format_to(ctx.out(), L"[{}, {}, {}, {}]", vec.x, vec.y, vec.z, vec.w);
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char8_t>)
|
||||||
|
return std::format_to(ctx.out(), u8"[{}, {}, {}, {}]", vec.x, vec.y, vec.z, vec.w);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef OMATH_ENABLE_LEGACY
|
|
||||||
|
|
||||||
#include "omath/vector3.hpp"
|
|
||||||
#include <initializer_list>
|
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace omath
|
|
||||||
{
|
|
||||||
|
|
||||||
class Matrix final
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Matrix();
|
|
||||||
Matrix(size_t rows, size_t columns);
|
|
||||||
|
|
||||||
Matrix(const std::initializer_list<std::initializer_list<float>>& rows);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
static Matrix to_screen_matrix(float screen_width, float screen_height);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
static Matrix translation_matrix(const Vector3<float>& diff);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
static Matrix orientation_matrix(const Vector3<float>& forward, const Vector3<float>& right,
|
|
||||||
const Vector3<float>& up);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
static Matrix projection_matrix(float field_of_view, float aspect_ratio, float near, float far);
|
|
||||||
|
|
||||||
Matrix(const Matrix& other);
|
|
||||||
|
|
||||||
Matrix(size_t rows, size_t columns, const float* raw_data);
|
|
||||||
|
|
||||||
Matrix(Matrix&& other) noexcept;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
size_t row_count() const noexcept;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
float& operator[](size_t row, size_t column);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
size_t columns_count() const noexcept;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
std::pair<size_t, size_t> size() const noexcept;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
float& at(size_t row, size_t col);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
float sum();
|
|
||||||
|
|
||||||
void set_data_from_raw(const float* raw_matrix);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
Matrix transpose() const;
|
|
||||||
|
|
||||||
void set(float val);
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
const float& at(size_t row, size_t col) const;
|
|
||||||
|
|
||||||
Matrix operator*(const Matrix& other) const;
|
|
||||||
|
|
||||||
Matrix& operator*=(const Matrix& other);
|
|
||||||
|
|
||||||
Matrix operator*(float f) const;
|
|
||||||
|
|
||||||
Matrix& operator*=(float f);
|
|
||||||
|
|
||||||
Matrix& operator/=(float f);
|
|
||||||
|
|
||||||
void clear();
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
Matrix strip(size_t row, size_t column) const;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
float minor(size_t i, size_t j) const;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
float alg_complement(size_t i, size_t j) const;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
float determinant() const;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
const float* raw() const;
|
|
||||||
|
|
||||||
Matrix& operator=(const Matrix& other);
|
|
||||||
|
|
||||||
Matrix& operator=(Matrix&& other) noexcept;
|
|
||||||
|
|
||||||
Matrix operator/(float f) const;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
std::string to_string() const;
|
|
||||||
|
|
||||||
~Matrix();
|
|
||||||
|
|
||||||
private:
|
|
||||||
size_t m_rows;
|
|
||||||
size_t m_columns;
|
|
||||||
std::unique_ptr<float[]> m_data;
|
|
||||||
};
|
|
||||||
} // namespace omath
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
//
|
||||||
|
// omath.hpp - Main header file that includes all omath library components
|
||||||
|
// Created for the omath library
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Basic math utilities
|
||||||
|
#include "omath/trigonometry/angles.hpp"
|
||||||
|
#include "omath/trigonometry/angle.hpp"
|
||||||
|
|
||||||
|
// Vector classes (in dependency order)
|
||||||
|
#include "omath/linear_algebra/vector2.hpp"
|
||||||
|
#include "omath/linear_algebra/vector4.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
|
||||||
|
// Matrix classes
|
||||||
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
|
|
||||||
|
// Color functionality
|
||||||
|
#include "omath/utility/color.hpp"
|
||||||
|
|
||||||
|
// Geometric primitives
|
||||||
|
#include "omath/linear_algebra/triangle.hpp"
|
||||||
|
#include "omath/trigonometry/view_angles.hpp"
|
||||||
|
|
||||||
|
// 3D primitives
|
||||||
|
#include "omath/3d_primitives/box.hpp"
|
||||||
|
#include "omath/3d_primitives/plane.hpp"
|
||||||
|
|
||||||
|
// Collision detection
|
||||||
|
#include "omath/collision/line_tracer.hpp"
|
||||||
|
|
||||||
|
// Pathfinding algorithms
|
||||||
|
#include "omath/pathfinding/a_star.hpp"
|
||||||
|
#include "omath/pathfinding/navigation_mesh.hpp"
|
||||||
|
|
||||||
|
// Projectile prediction
|
||||||
|
#include "omath/projectile_prediction/projectile.hpp"
|
||||||
|
#include "omath/projectile_prediction/target.hpp"
|
||||||
|
#include "omath/projectile_prediction/proj_pred_engine.hpp"
|
||||||
|
#include "omath/projectile_prediction/proj_pred_engine_legacy.hpp"
|
||||||
|
#include "omath/projectile_prediction/proj_pred_engine_avx2.hpp"
|
||||||
|
|
||||||
|
// Projection functionality
|
||||||
|
#include "omath/projection/error_codes.hpp"
|
||||||
|
#include "omath/projection/camera.hpp"
|
||||||
|
|
||||||
|
// Engine-specific implementations
|
||||||
|
|
||||||
|
// IW Engine
|
||||||
|
#include "omath/engines/iw_engine/constants.hpp"
|
||||||
|
#include "omath/engines/iw_engine/formulas.hpp"
|
||||||
|
#include "omath/engines/iw_engine/camera.hpp"
|
||||||
|
#include "omath/engines/iw_engine/traits/camera_trait.hpp"
|
||||||
|
#include "omath/engines/iw_engine/traits/pred_engine_trait.hpp"
|
||||||
|
|
||||||
|
// OpenGL Engine
|
||||||
|
#include "omath/engines/opengl_engine/constants.hpp"
|
||||||
|
#include "omath/engines/opengl_engine/formulas.hpp"
|
||||||
|
#include "omath/engines/opengl_engine/camera.hpp"
|
||||||
|
#include "omath/engines/opengl_engine/traits/camera_trait.hpp"
|
||||||
|
#include "omath/engines/opengl_engine/traits/pred_engine_trait.hpp"
|
||||||
|
|
||||||
|
// Source Engine
|
||||||
|
#include "omath/engines/source_engine/constants.hpp"
|
||||||
|
#include "omath/engines/source_engine/formulas.hpp"
|
||||||
|
#include "omath/engines/source_engine/camera.hpp"
|
||||||
|
#include "omath/engines/source_engine/traits/camera_trait.hpp"
|
||||||
|
#include "omath/engines/source_engine/traits/pred_engine_trait.hpp"
|
||||||
|
|
||||||
|
// Unity Engine
|
||||||
|
#include "omath/engines/unity_engine/constants.hpp"
|
||||||
|
#include "omath/engines/unity_engine/formulas.hpp"
|
||||||
|
#include "omath/engines/unity_engine/camera.hpp"
|
||||||
|
#include "omath/engines/unity_engine/traits/camera_trait.hpp"
|
||||||
|
#include "omath/engines/unity_engine/traits/pred_engine_trait.hpp"
|
||||||
|
|
||||||
|
//Frostbite Engine
|
||||||
|
#include "omath/engines/frostbite_engine/constants.hpp"
|
||||||
|
#include "omath/engines/frostbite_engine/formulas.hpp"
|
||||||
|
#include "omath/engines/frostbite_engine/camera.hpp"
|
||||||
|
#include "omath/engines/frostbite_engine/traits/camera_trait.hpp"
|
||||||
|
#include "omath/engines/frostbite_engine/traits/pred_engine_trait.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
// Unreal Engine
|
||||||
|
#include "omath/engines/unreal_engine/constants.hpp"
|
||||||
|
#include "omath/engines/unreal_engine/formulas.hpp"
|
||||||
|
#include "omath/engines/unreal_engine/camera.hpp"
|
||||||
|
#include "omath/engines/unreal_engine/traits/camera_trait.hpp"
|
||||||
|
#include "omath/engines/unreal_engine/traits/pred_engine_trait.hpp"
|
||||||
|
|
||||||
|
// Reverse Engineering
|
||||||
|
#include "omath/rev_eng/external_rev_object.hpp"
|
||||||
|
#include "omath/rev_eng/internal_rev_object.hpp"
|
||||||
|
|
||||||
|
// Utility
|
||||||
|
#include "omath/utility/pattern_scan.hpp"
|
||||||
|
#include "omath/utility/pe_pattern_scan.hpp"
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include "omath/pathfinding/navigation_mesh.hpp"
|
#include "omath/pathfinding/navigation_mesh.hpp"
|
||||||
#include "omath/vector3.hpp"
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace omath::pathfinding
|
namespace omath::pathfinding
|
||||||
@@ -22,9 +22,5 @@ namespace omath::pathfinding
|
|||||||
static std::vector<Vector3<float>>
|
static std::vector<Vector3<float>>
|
||||||
reconstruct_final_path(const std::unordered_map<Vector3<float>, PathNode>& closed_list,
|
reconstruct_final_path(const std::unordered_map<Vector3<float>, PathNode>& closed_list,
|
||||||
const Vector3<float>& current) noexcept;
|
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) noexcept;
|
|
||||||
};
|
};
|
||||||
} // namespace omath::pathfinding
|
} // namespace omath::pathfinding
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "omath/vector3.hpp"
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include <expected>
|
#include <expected>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
// Created by Vlad on 2/23/2025.
|
// Created by Vlad on 2/23/2025.
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include "omath/projectile_prediction/projectile.hpp"
|
#include "omath/projectile_prediction/projectile.hpp"
|
||||||
#include "omath/projectile_prediction/target.hpp"
|
#include "omath/projectile_prediction/target.hpp"
|
||||||
#include "omath/vector3.hpp"
|
|
||||||
|
|
||||||
namespace omath::projectile_prediction
|
namespace omath::projectile_prediction
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "omath/engines/source_engine/traits/pred_engine_trait.hpp"
|
#include "omath/engines/source_engine/traits/pred_engine_trait.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include "omath/projectile_prediction/proj_pred_engine.hpp"
|
#include "omath/projectile_prediction/proj_pred_engine.hpp"
|
||||||
#include "omath/projectile_prediction/projectile.hpp"
|
#include "omath/projectile_prediction/projectile.hpp"
|
||||||
#include "omath/projectile_prediction/target.hpp"
|
#include "omath/projectile_prediction/target.hpp"
|
||||||
#include "omath/vector3.hpp"
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
namespace omath::projectile_prediction
|
namespace omath::projectile_prediction
|
||||||
@@ -20,11 +20,13 @@ namespace omath::projectile_prediction
|
|||||||
Vector3<float> v3, // by-value for calc_viewpoint_from_angles
|
Vector3<float> v3, // by-value for calc_viewpoint_from_angles
|
||||||
float pitch, float yaw, float time, float gravity, std::optional<float> maybe_pitch) {
|
float pitch, float yaw, float time, float gravity, std::optional<float> maybe_pitch) {
|
||||||
// Presence + return types
|
// 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::predict_projectile_position(projectile, pitch, yaw, time, gravity)
|
||||||
|
} -> std::same_as<Vector3<float>>;
|
||||||
|
{ T::predict_target_position(target, time, gravity) } -> std::same_as<Vector3<float>>;
|
||||||
{ T::calc_vector_2d_distance(vec_a) } -> std::same_as<float>;
|
{ T::calc_vector_2d_distance(vec_a) } -> std::same_as<float>;
|
||||||
{ T::get_vector_height_coordinate(vec_b) } -> 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_viewpoint_from_angles(projectile, v3, maybe_pitch) } -> std::same_as<Vector3<float>>;
|
||||||
{ T::calc_direct_pitch_angle(vec_a, vec_b) } -> std::same_as<float>;
|
{ 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>;
|
{ T::calc_direct_yaw_angle(vec_a, vec_b) } -> std::same_as<float>;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "omath/vector3.hpp"
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
|
||||||
namespace omath::projectile_prediction
|
namespace omath::projectile_prediction
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "omath/vector3.hpp"
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
|
|
||||||
namespace omath::projectile_prediction
|
namespace omath::projectile_prediction
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,13 +4,18 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "omath/linear_algebra/mat.hpp"
|
||||||
|
#include "omath/linear_algebra/vector3.hpp"
|
||||||
#include "omath/projection/error_codes.hpp"
|
#include "omath/projection/error_codes.hpp"
|
||||||
|
#include <omath/trigonometry/angle.hpp>
|
||||||
#include <expected>
|
#include <expected>
|
||||||
#include <omath/angle.hpp>
|
|
||||||
#include <omath/mat.hpp>
|
|
||||||
#include <omath/vector3.hpp>
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
#ifdef OMATH_BUILD_TESTS
|
||||||
|
// ReSharper disable once CppInconsistentNaming
|
||||||
|
class UnitTestProjection_Projection_Test;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace omath::projection
|
namespace omath::projection
|
||||||
{
|
{
|
||||||
class ViewPort final
|
class ViewPort final
|
||||||
@@ -45,7 +50,16 @@ namespace omath::projection
|
|||||||
requires CameraEngineConcept<TraitClass, Mat4X4Type, ViewAnglesType>
|
requires CameraEngineConcept<TraitClass, Mat4X4Type, ViewAnglesType>
|
||||||
class Camera final
|
class Camera final
|
||||||
{
|
{
|
||||||
|
#ifdef OMATH_BUILD_TESTS
|
||||||
|
friend UnitTestProjection_Projection_Test;
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
|
enum class ScreenStart
|
||||||
|
{
|
||||||
|
TOP_LEFT_CORNER,
|
||||||
|
BOTTOM_LEFT_CORNER,
|
||||||
|
};
|
||||||
|
|
||||||
~Camera() = default;
|
~Camera() = default;
|
||||||
Camera(const Vector3<float>& position, const ViewAnglesType& view_angles, const ViewPort& view_port,
|
Camera(const Vector3<float>& position, const ViewAnglesType& view_angles, const ViewPort& view_port,
|
||||||
const FieldOfView& fov, const float near, const float far) noexcept
|
const FieldOfView& fov, const float near, const float far) noexcept
|
||||||
@@ -54,12 +68,13 @@ namespace omath::projection
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
void look_at(const Vector3<float>& target)
|
void look_at(const Vector3<float>& target)
|
||||||
{
|
{
|
||||||
m_view_angles = TraitClass::calc_look_at_angle(m_origin, target);
|
m_view_angles = TraitClass::calc_look_at_angle(m_origin, target);
|
||||||
|
m_view_projection_matrix = std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
[[nodiscard]] Mat4X4Type calc_view_projection_matrix() const noexcept
|
[[nodiscard]] Mat4X4Type calc_view_projection_matrix() const noexcept
|
||||||
{
|
{
|
||||||
return TraitClass::calc_projection_matrix(m_field_of_view, m_view_port, m_near_plane_distance,
|
return TraitClass::calc_projection_matrix(m_field_of_view, m_view_port, m_near_plane_distance,
|
||||||
@@ -137,15 +152,22 @@ namespace omath::projection
|
|||||||
return m_origin;
|
return m_origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<ScreenStart screen_start = ScreenStart::TOP_LEFT_CORNER>
|
||||||
[[nodiscard]] std::expected<Vector3<float>, Error>
|
[[nodiscard]] std::expected<Vector3<float>, Error>
|
||||||
world_to_screen(const Vector3<float>& world_position) const noexcept
|
world_to_screen(const Vector3<float>& world_position) const noexcept
|
||||||
{
|
{
|
||||||
auto normalized_cords = world_to_view_port(world_position);
|
const auto normalized_cords = world_to_view_port(world_position);
|
||||||
|
|
||||||
if (!normalized_cords.has_value())
|
if (!normalized_cords.has_value())
|
||||||
return std::unexpected{normalized_cords.error()};
|
return std::unexpected{normalized_cords.error()};
|
||||||
|
|
||||||
return ndc_to_screen_position(*normalized_cords);
|
if constexpr (screen_start == ScreenStart::TOP_LEFT_CORNER)
|
||||||
|
return ndc_to_screen_position_from_top_left_corner(*normalized_cords);
|
||||||
|
else if constexpr (screen_start == ScreenStart::BOTTOM_LEFT_CORNER)
|
||||||
|
return ndc_to_screen_position_from_bottom_left_corner(*normalized_cords);
|
||||||
|
else
|
||||||
|
std::unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] std::expected<Vector3<float>, Error>
|
[[nodiscard]] std::expected<Vector3<float>, Error>
|
||||||
@@ -164,6 +186,38 @@ namespace omath::projection
|
|||||||
|
|
||||||
return Vector3<float>{projected.at(0, 0), projected.at(1, 0), projected.at(2, 0)};
|
return Vector3<float>{projected.at(0, 0), projected.at(1, 0), projected.at(2, 0)};
|
||||||
}
|
}
|
||||||
|
[[nodiscard]]
|
||||||
|
std::expected<Vector3<float>, Error> view_port_to_screen(const Vector3<float>& ndc) const noexcept
|
||||||
|
{
|
||||||
|
const auto inv_view_proj = get_view_projection_matrix().inverted();
|
||||||
|
|
||||||
|
if (!inv_view_proj)
|
||||||
|
return std::unexpected(Error::INV_VIEW_PROJ_MAT_DET_EQ_ZERO);
|
||||||
|
|
||||||
|
auto inverted_projection =
|
||||||
|
inv_view_proj.value() * mat_column_from_vector<float, Mat4X4Type::get_store_ordering()>(ndc);
|
||||||
|
|
||||||
|
if (!inverted_projection.at(3, 0))
|
||||||
|
return std::unexpected(Error::WORLD_POSITION_IS_OUT_OF_SCREEN_BOUNDS);
|
||||||
|
|
||||||
|
inverted_projection /= inverted_projection.at(3, 0);
|
||||||
|
|
||||||
|
return Vector3<float>{inverted_projection.at(0, 0), inverted_projection.at(1, 0),
|
||||||
|
inverted_projection.at(2, 0)};
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
std::expected<Vector3<float>, Error> screen_to_world(const Vector3<float>& screen_pos) const noexcept
|
||||||
|
{
|
||||||
|
return view_port_to_screen(screen_to_ndc(screen_pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
std::expected<Vector3<float>, Error> screen_to_world(const Vector2<float>& screen_pos) const noexcept
|
||||||
|
{
|
||||||
|
const auto& [x, y] = screen_pos;
|
||||||
|
return screen_to_world({x, y, 1.f});
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ViewPort m_view_port{};
|
ViewPort m_view_port{};
|
||||||
@@ -184,21 +238,58 @@ namespace omath::projection
|
|||||||
return std::ranges::any_of(ndc.raw_array(), [](const auto& val) { return val < -1 || val > 1; });
|
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 noexcept
|
// NDC REPRESENTATION:
|
||||||
|
/*
|
||||||
|
^
|
||||||
|
| y
|
||||||
|
1 |
|
||||||
|
|
|
||||||
|
|
|
||||||
|
-1 ---------0--------- 1 --> x
|
||||||
|
|
|
||||||
|
|
|
||||||
|
-1 |
|
||||||
|
v
|
||||||
|
*/
|
||||||
|
|
||||||
|
[[nodiscard]] Vector3<float>
|
||||||
|
ndc_to_screen_position_from_top_left_corner(const Vector3<float>& ndc) const noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
^
|
+------------------------>
|
||||||
| y
|
| (0, 0)
|
||||||
1 |
|
|
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
-1 ---------0--------- 1 --> x
|
|
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
-1 |
|
⌄
|
||||||
v
|
*/
|
||||||
*/
|
return {(ndc.x + 1.f) / 2.f * m_view_port.m_width, (ndc.y / -2.f + 0.5f) * m_view_port.m_height, ndc.z};
|
||||||
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};
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] Vector3<float>
|
||||||
|
ndc_to_screen_position_from_bottom_left_corner(const Vector3<float>& ndc) const noexcept
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
^
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| (0, 0)
|
||||||
|
+------------------------>
|
||||||
|
*/
|
||||||
|
return {(ndc.x + 1.f) / 2.f * m_view_port.m_width, (ndc.y / 2.f + 0.5f) * m_view_port.m_height, ndc.z};
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] Vector3<float> screen_to_ndc(const Vector3<float>& screen_pos) const noexcept
|
||||||
|
{
|
||||||
|
return {screen_pos.x / m_view_port.m_width * 2.f - 1.f, 1.f - screen_pos.y / m_view_port.m_height * 2.f,
|
||||||
|
screen_pos.z};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace omath::projection
|
} // namespace omath::projection
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ namespace omath::projection
|
|||||||
enum class Error : uint16_t
|
enum class Error : uint16_t
|
||||||
{
|
{
|
||||||
WORLD_POSITION_IS_OUT_OF_SCREEN_BOUNDS,
|
WORLD_POSITION_IS_OUT_OF_SCREEN_BOUNDS,
|
||||||
|
INV_VIEW_PROJ_MAT_DET_EQ_ZERO,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 10/4/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace omath::rev_eng
|
||||||
|
{
|
||||||
|
template<class ExternalMemoryManagementTrait>
|
||||||
|
class ExternalReverseEngineeredObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit ExternalReverseEngineeredObject(const std::uintptr_t addr): m_object_address(addr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
std::uintptr_t m_object_address{};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
template<class Type>
|
||||||
|
[[nodiscard]]
|
||||||
|
Type get_by_offset(const std::ptrdiff_t offset) const
|
||||||
|
{
|
||||||
|
return ExternalMemoryManagementTrait::read_memory(m_object_address+offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void set_by_offset(const std::ptrdiff_t offset, const Type& value) const
|
||||||
|
{
|
||||||
|
return ExternalMemoryManagementTrait::write_memory(m_object_address+offset, value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} // namespace omath::rev_eng
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 8/8/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace omath::rev_eng
|
||||||
|
{
|
||||||
|
class InternalReverseEngineeredObject
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
template<class Type>
|
||||||
|
[[nodiscard]] Type& get_by_offset(const std::ptrdiff_t offset)
|
||||||
|
{
|
||||||
|
return *reinterpret_cast<Type*>(reinterpret_cast<std::uintptr_t>(this) + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
[[nodiscard]] const Type& get_by_offset(const std::ptrdiff_t offset) const
|
||||||
|
{
|
||||||
|
return *reinterpret_cast<Type*>(reinterpret_cast<std::uintptr_t>(this) + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<std::size_t id, class ReturnType>
|
||||||
|
ReturnType call_virtual_method(auto... arg_list)
|
||||||
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
using VirtualMethodType = ReturnType(__thiscall*)(void*, decltype(arg_list)...);
|
||||||
|
#else
|
||||||
|
using VirtualMethodType = ReturnType(*)(void*, decltype(arg_list)...);
|
||||||
|
#endif
|
||||||
|
return (*reinterpret_cast<VirtualMethodType**>(this))[id](this, arg_list...);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} // namespace omath::rev_eng
|
||||||
@@ -3,8 +3,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "omath/angles.hpp"
|
#include "omath/trigonometry/angles.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <format>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace omath
|
namespace omath
|
||||||
@@ -122,13 +123,13 @@ namespace omath
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr Angle& operator+(const Angle& other) noexcept
|
constexpr Angle operator+(const Angle& other) noexcept
|
||||||
{
|
{
|
||||||
if constexpr (flags == AngleFlags::Normalized)
|
if constexpr (flags == AngleFlags::Normalized)
|
||||||
return {angles::wrap_angle(m_angle + other.m_angle, min, max)};
|
return Angle{angles::wrap_angle(m_angle + other.m_angle, min, max)};
|
||||||
|
|
||||||
else if constexpr (flags == AngleFlags::Clamped)
|
else if constexpr (flags == AngleFlags::Clamped)
|
||||||
return {std::clamp(m_angle + other.m_angle, min, max)};
|
return Angle{std::clamp(m_angle + other.m_angle, min, max)};
|
||||||
|
|
||||||
else
|
else
|
||||||
static_assert(false);
|
static_assert(false);
|
||||||
@@ -137,7 +138,7 @@ namespace omath
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr Angle& operator-(const Angle& other) noexcept
|
constexpr Angle operator-(const Angle& other) noexcept
|
||||||
{
|
{
|
||||||
return operator+(-other);
|
return operator+(-other);
|
||||||
}
|
}
|
||||||
@@ -149,3 +150,62 @@ namespace omath
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace omath
|
} // namespace omath
|
||||||
|
|
||||||
|
template<class T, T MinV, T MaxV, omath::AngleFlags F>
|
||||||
|
struct std::formatter<omath::Angle<T, MinV, MaxV, F>, char> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
using AngleT = omath::Angle<T, MinV, MaxV, F>;
|
||||||
|
|
||||||
|
static constexpr auto parse(std::format_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
auto format(const AngleT& a, FormatContext& ctx) const
|
||||||
|
{
|
||||||
|
static_assert(std::is_same_v<typename FormatContext::char_type, char>);
|
||||||
|
return std::format_to(ctx.out(), "{}deg", a.as_degrees());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// wchar_t formatter
|
||||||
|
template<class T, T MinV, T MaxV, omath::AngleFlags F>
|
||||||
|
struct std::formatter<omath::Angle<T, MinV, MaxV, F>, wchar_t> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
using AngleT = omath::Angle<T, MinV, MaxV, F>;
|
||||||
|
|
||||||
|
static constexpr auto parse(std::wformat_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
auto format(const AngleT& a, FormatContext& ctx) const
|
||||||
|
{
|
||||||
|
static_assert(std::is_same_v<typename FormatContext::char_type, wchar_t>);
|
||||||
|
return std::format_to(ctx.out(), L"{}deg", a.as_degrees());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// wchar_t formatter
|
||||||
|
template<class T, T MinV, T MaxV, omath::AngleFlags F>
|
||||||
|
struct std::formatter<omath::Angle<T, MinV, MaxV, F>, char8_t> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
using AngleT = omath::Angle<T, MinV, MaxV, F>;
|
||||||
|
|
||||||
|
static constexpr auto parse(std::wformat_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
auto format(const AngleT& a, FormatContext& ctx) const
|
||||||
|
{
|
||||||
|
static_assert(std::is_same_v<typename FormatContext::char_type, char8_t>);
|
||||||
|
return std::format_to(ctx.out(), u8"{}deg", a.as_degrees());
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -4,18 +4,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "omath/vector3.hpp"
|
#include "omath/linear_algebra/vector4.hpp"
|
||||||
#include "omath/vector4.hpp"
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#ifdef max
|
|
||||||
#undef max
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef min
|
|
||||||
#undef min
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace omath
|
namespace omath
|
||||||
{
|
{
|
||||||
struct Hsv
|
struct Hsv
|
||||||
@@ -104,7 +95,7 @@ namespace omath
|
|||||||
hsv_data.hue = 0.f;
|
hsv_data.hue = 0.f;
|
||||||
|
|
||||||
else if (max == red)
|
else if (max == red)
|
||||||
hsv_data.hue = 60.f * (std::fmodf(((green - blue) / delta), 6.f));
|
hsv_data.hue = 60.f * (std::fmod(static_cast<float>((green - blue) / delta), 6.f));
|
||||||
else if (max == green)
|
else if (max == green)
|
||||||
hsv_data.hue = 60.f * (((blue - red) / delta) + 2.f);
|
hsv_data.hue = 60.f * (((blue - red) / delta) + 2.f);
|
||||||
else if (max == blue)
|
else if (max == blue)
|
||||||
@@ -173,5 +164,49 @@ namespace omath
|
|||||||
return {to_im_vec4()};
|
return {to_im_vec4()};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
[[nodiscard]] std::string to_string() const noexcept
|
||||||
|
{
|
||||||
|
return std::format("[r:{}, g:{}, b:{}, a:{}]",
|
||||||
|
static_cast<int>(x * 255.f),
|
||||||
|
static_cast<int>(y * 255.f),
|
||||||
|
static_cast<int>(z * 255.f),
|
||||||
|
static_cast<int>(w * 255.f));
|
||||||
|
}
|
||||||
|
[[nodiscard]] std::wstring to_wstring() const noexcept
|
||||||
|
{
|
||||||
|
const auto ascii_string = to_string();
|
||||||
|
return {ascii_string.cbegin(), ascii_string.cend()};
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReSharper disable once CppInconsistentNaming
|
||||||
|
[[nodiscard]] std::u8string to_u8string() const noexcept
|
||||||
|
{
|
||||||
|
const auto ascii_string = to_string();
|
||||||
|
return {ascii_string.cbegin(), ascii_string.cend()};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} // namespace omath
|
} // namespace omath
|
||||||
|
template<>
|
||||||
|
struct std::formatter<omath::Color> // NOLINT(*-dcl58-cpp)
|
||||||
|
{
|
||||||
|
[[nodiscard]]
|
||||||
|
static constexpr auto parse(std::format_parse_context& ctx)
|
||||||
|
{
|
||||||
|
return ctx.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class FormatContext>
|
||||||
|
[[nodiscard]]
|
||||||
|
static auto format(const omath::Color& col, FormatContext& ctx)
|
||||||
|
{
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char>)
|
||||||
|
return std::format_to(ctx.out(), "{}", col.to_string());
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, wchar_t>)
|
||||||
|
return std::format_to(ctx.out(), L"{}", col.to_wstring());
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<typename FormatContext::char_type, char8_t>)
|
||||||
|
return std::format_to(ctx.out(), u8"{}", col.to_u8string());
|
||||||
|
|
||||||
|
return std::unreachable();
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 10/4/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <expected>
|
||||||
|
#include <optional>
|
||||||
|
#include <span>
|
||||||
|
#include <string_view>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
// ReSharper disable CppInconsistentNaming
|
||||||
|
class unit_test_pattern_scan_read_test_Test;
|
||||||
|
class unit_test_pattern_scan_corner_case_1_Test;
|
||||||
|
class unit_test_pattern_scan_corner_case_2_Test;
|
||||||
|
class unit_test_pattern_scan_corner_case_3_Test;
|
||||||
|
class unit_test_pattern_scan_corner_case_4_Test;
|
||||||
|
// ReSharper restore CppInconsistentNaming
|
||||||
|
namespace omath
|
||||||
|
{
|
||||||
|
enum class PatternScanError
|
||||||
|
{
|
||||||
|
INVALID_PATTERN_STRING
|
||||||
|
};
|
||||||
|
class PatternScanner final
|
||||||
|
{
|
||||||
|
friend unit_test_pattern_scan_read_test_Test;
|
||||||
|
friend unit_test_pattern_scan_corner_case_1_Test;
|
||||||
|
friend unit_test_pattern_scan_corner_case_2_Test;
|
||||||
|
friend unit_test_pattern_scan_corner_case_3_Test;
|
||||||
|
friend unit_test_pattern_scan_corner_case_4_Test;
|
||||||
|
|
||||||
|
public:
|
||||||
|
[[nodiscard]]
|
||||||
|
static std::span<std::byte>::iterator scan_for_pattern(const std::span<std::byte>& range,
|
||||||
|
const std::string_view& pattern);
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
static std::span<std::byte>::iterator scan_for_pattern(std::span<std::byte>&& range,
|
||||||
|
const std::string_view& pattern) = delete;
|
||||||
|
|
||||||
|
template<class IteratorType>
|
||||||
|
requires std::input_or_output_iterator<std::remove_cvref_t<IteratorType>>
|
||||||
|
static IteratorType scan_for_pattern(const IteratorType& begin, const IteratorType& end,
|
||||||
|
const std::string_view& pattern)
|
||||||
|
{
|
||||||
|
const auto parsed_pattern = parse_pattern(pattern);
|
||||||
|
|
||||||
|
if (!parsed_pattern) [[unlikely]]
|
||||||
|
return end;
|
||||||
|
|
||||||
|
const auto whole_range_size = static_cast<std::ptrdiff_t>(std::distance(begin, end));
|
||||||
|
|
||||||
|
const std::ptrdiff_t scan_size = whole_range_size - static_cast<std::ptrdiff_t>(pattern.size());
|
||||||
|
|
||||||
|
for (std::ptrdiff_t i = 0; i < scan_size; i++)
|
||||||
|
{
|
||||||
|
bool found = true;
|
||||||
|
|
||||||
|
for (std::ptrdiff_t j = 0; j < static_cast<std::ptrdiff_t>(parsed_pattern->size()); j++)
|
||||||
|
{
|
||||||
|
found = parsed_pattern->at(j) == std::nullopt || parsed_pattern->at(j) == *(begin + i + j);
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (found)
|
||||||
|
return begin + i;
|
||||||
|
}
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
[[nodiscard]]
|
||||||
|
static std::expected<std::vector<std::optional<std::byte>>, PatternScanError>
|
||||||
|
parse_pattern(const std::string_view& pattern_string);
|
||||||
|
};
|
||||||
|
} // namespace omath
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 10/7/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <optional>
|
||||||
|
#include <string_view>
|
||||||
|
namespace omath
|
||||||
|
{
|
||||||
|
struct PeSectionScanResult
|
||||||
|
{
|
||||||
|
std::uint64_t virtual_base_addr;
|
||||||
|
std::uint64_t raw_base_addr;
|
||||||
|
std::ptrdiff_t target_offset;
|
||||||
|
};
|
||||||
|
class PePatternScanner final
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
[[nodiscard]]
|
||||||
|
static std::optional<std::uintptr_t> scan_for_pattern_in_loaded_module(const void* module_base_address,
|
||||||
|
const std::string_view& pattern);
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
static std::optional<PeSectionScanResult>
|
||||||
|
scan_for_pattern_in_file(const std::filesystem::path& path_to_file, const std::string_view& pattern,
|
||||||
|
const std::string_view& target_section_name = ".text");
|
||||||
|
};
|
||||||
|
} // namespace omath
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
site_name: My Docs
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 8/28/2025.
|
||||||
|
//
|
||||||
|
#include "omath/3d_primitives/plane.hpp"
|
||||||
|
|
||||||
|
namespace omath::primitives
|
||||||
|
{
|
||||||
|
std::array<Triangle<Vector3<float>>, 2> create_plane(const Vector3<float>& vertex_a,
|
||||||
|
const Vector3<float>& vertex_b,
|
||||||
|
const Vector3<float>& direction, const float size) noexcept
|
||||||
|
{
|
||||||
|
const auto second_vertex_a = vertex_a + direction * size;
|
||||||
|
return std::array
|
||||||
|
{
|
||||||
|
Triangle{second_vertex_a, vertex_a, vertex_b},
|
||||||
|
Triangle{second_vertex_a, vertex_b + direction * size, vertex_b}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} // namespace omath::primitives
|
||||||
@@ -50,12 +50,10 @@ namespace omath::collision
|
|||||||
|
|
||||||
const auto t_hit = side_b.dot(q) * inv_det;
|
const auto t_hit = side_b.dot(q) * inv_det;
|
||||||
|
|
||||||
if (ray.infinite_length)
|
if (ray.infinite_length && t_hit <= k_epsilon)
|
||||||
{
|
return ray.end;
|
||||||
if (t_hit <= k_epsilon)
|
|
||||||
return ray.end;
|
if (t_hit <= k_epsilon || t_hit > 1.0f - k_epsilon)
|
||||||
}
|
|
||||||
else if (t_hit <= k_epsilon || t_hit > 1.0f - k_epsilon)
|
|
||||||
return ray.end;
|
return ray.end;
|
||||||
|
|
||||||
return ray.start + ray_dir * t_hit;
|
return ray.start + ray_dir * t_hit;
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 3/22/2025.
|
||||||
|
//
|
||||||
|
#include "omath/engines/frostbite_engine/formulas.hpp"
|
||||||
|
|
||||||
|
namespace omath::frostbite_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_z<float, MatStoreType::ROW_MAJOR>(angles.roll)
|
||||||
|
* mat_rotation_axis_y<float, MatStoreType::ROW_MAJOR>(angles.yaw)
|
||||||
|
* mat_rotation_axis_x<float, MatStoreType::ROW_MAJOR>(angles.pitch);
|
||||||
|
}
|
||||||
|
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
||||||
|
const float far) noexcept
|
||||||
|
{
|
||||||
|
return mat_perspective_left_handed(field_of_view, aspect_ratio, near, far);
|
||||||
|
}
|
||||||
|
} // namespace omath::unity_engine
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// Created by Vlad on 8/11/2025.
|
||||||
|
//
|
||||||
|
#include "omath/engines/frostbite_engine/traits/camera_trait.hpp"
|
||||||
|
|
||||||
|
namespace omath::frostbite_engine
|
||||||
|
{
|
||||||
|
|
||||||
|
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
|
||||||
|
{
|
||||||
|
const auto direction = (look_at - cam_origin).normalized();
|
||||||
|
|
||||||
|
return {PitchAngle::from_radians(-std::asin(direction.y)),
|
||||||
|
YawAngle::from_radians(std::atan2(direction.x, direction.z)), RollAngle::from_radians(0.f)};
|
||||||
|
}
|
||||||
|
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
||||||
|
{
|
||||||
|
return frostbite_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
|
||||||
@@ -8,11 +8,10 @@ namespace omath::iw_engine
|
|||||||
|
|
||||||
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
|
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 direction = (look_at - cam_origin).normalized();
|
||||||
const auto delta = cam_origin - look_at;
|
|
||||||
|
|
||||||
return {PitchAngle::from_radians(-std::asin(delta.z / distance)),
|
return {PitchAngle::from_radians(-std::asin(direction.z)),
|
||||||
YawAngle::from_radians(std::atan2(delta.y, delta.x)), RollAngle::from_radians(0.f)};
|
YawAngle::from_radians(std::atan2(direction.y, direction.x)), RollAngle::from_radians(0.f)};
|
||||||
}
|
}
|
||||||
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,14 +28,13 @@ namespace omath::opengl_engine
|
|||||||
}
|
}
|
||||||
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
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),
|
return mat_look_at_right_handed(cam_origin, cam_origin+forward_vector(angles), up_vector(angles));
|
||||||
up_vector(angles), cam_origin);
|
|
||||||
}
|
}
|
||||||
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
|
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
|
||||||
{
|
{
|
||||||
return mat_rotation_axis_x<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch)
|
return mat_rotation_axis_z<float, MatStoreType::COLUMN_MAJOR>(angles.roll)
|
||||||
* mat_rotation_axis_y<float, MatStoreType::COLUMN_MAJOR>(-angles.yaw)
|
* mat_rotation_axis_y<float, MatStoreType::COLUMN_MAJOR>(angles.yaw)
|
||||||
* mat_rotation_axis_z<float, MatStoreType::COLUMN_MAJOR>(angles.roll);
|
* mat_rotation_axis_x<float, MatStoreType::COLUMN_MAJOR>(angles.pitch);
|
||||||
}
|
}
|
||||||
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
||||||
const float far) noexcept
|
const float far) noexcept
|
||||||
|
|||||||
@@ -9,11 +9,10 @@ namespace omath::opengl_engine
|
|||||||
|
|
||||||
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
|
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 direction = (look_at - cam_origin).normalized();
|
||||||
const auto delta = cam_origin - look_at;
|
|
||||||
|
|
||||||
return {PitchAngle::from_radians(-std::asin(delta.y / distance)),
|
return {PitchAngle::from_radians(std::asin(direction.y)),
|
||||||
YawAngle::from_radians(std::atan2(delta.z, delta.x)), RollAngle::from_radians(0.f)};
|
YawAngle::from_radians(-std::atan2(direction.x, -direction.z)), RollAngle::from_radians(0.f)};
|
||||||
}
|
}
|
||||||
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ namespace omath::source_engine
|
|||||||
|
|
||||||
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
|
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 direction = (look_at - cam_origin).normalized();
|
||||||
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)};
|
return {PitchAngle::from_radians(-std::asin(direction.z)),
|
||||||
|
YawAngle::from_radians(std::atan2(direction.y, direction.x)), RollAngle::from_radians(0.f)};
|
||||||
}
|
}
|
||||||
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,25 +25,18 @@ namespace omath::unity_engine
|
|||||||
}
|
}
|
||||||
Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
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),
|
return mat_camera_view<float, MatStoreType::ROW_MAJOR>(-forward_vector(angles), right_vector(angles),
|
||||||
up_vector(angles), cam_origin);
|
up_vector(angles), cam_origin);
|
||||||
}
|
}
|
||||||
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
|
Mat4X4 rotation_matrix(const ViewAngles& angles) noexcept
|
||||||
{
|
{
|
||||||
return mat_rotation_axis_x<float, MatStoreType::ROW_MAJOR>(angles.pitch)
|
return mat_rotation_axis_z<float, MatStoreType::ROW_MAJOR>(angles.roll)
|
||||||
* mat_rotation_axis_y<float, MatStoreType::ROW_MAJOR>(angles.yaw)
|
* mat_rotation_axis_y<float, MatStoreType::ROW_MAJOR>(angles.yaw)
|
||||||
* mat_rotation_axis_z<float, MatStoreType::ROW_MAJOR>(angles.roll);
|
* mat_rotation_axis_x<float, MatStoreType::ROW_MAJOR>(angles.pitch);
|
||||||
}
|
}
|
||||||
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
||||||
const float far) noexcept
|
const float far) noexcept
|
||||||
{
|
{
|
||||||
const float fov_half_tan = std::tan(angles::degrees_to_radians(field_of_view) / 2.f);
|
return omath::mat_perspective_right_handed(field_of_view, aspect_ratio, near, far);
|
||||||
|
|
||||||
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::unity_engine
|
} // namespace omath::unity_engine
|
||||||
|
|||||||
@@ -8,11 +8,10 @@ namespace omath::unity_engine
|
|||||||
|
|
||||||
ViewAngles CameraTrait::calc_look_at_angle(const Vector3<float>& cam_origin, const Vector3<float>& look_at) noexcept
|
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 direction = (look_at - cam_origin).normalized();
|
||||||
const auto delta = cam_origin - look_at;
|
|
||||||
|
|
||||||
return {PitchAngle::from_radians(-std::asin(delta.y / distance)),
|
return {PitchAngle::from_radians(-std::asin(direction.y)),
|
||||||
YawAngle::from_radians(std::atan2(delta.z, delta.x)), RollAngle::from_radians(0.f)};
|
YawAngle::from_radians(std::atan2(direction.x, direction.z)), RollAngle::from_radians(0.f)};
|
||||||
}
|
}
|
||||||
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
Mat4X4 CameraTrait::calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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_z<float, MatStoreType::ROW_MAJOR>(angles.yaw)
|
||||||
|
* mat_rotation_axis_y<float, MatStoreType::ROW_MAJOR>(angles.pitch);
|
||||||
|
}
|
||||||
|
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
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// 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 direction = (look_at - cam_origin).normalized();
|
||||||
|
|
||||||
|
return {PitchAngle::from_radians(-std::asin(direction.z)),
|
||||||
|
YawAngle::from_radians(std::atan2(direction.y, direction.x)), 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
|
||||||
@@ -1,364 +0,0 @@
|
|||||||
#ifdef OMATH_ENABLE_LEGACY
|
|
||||||
|
|
||||||
#include "omath/matrix.hpp"
|
|
||||||
#include "omath/angles.hpp"
|
|
||||||
#include "omath/vector3.hpp"
|
|
||||||
#include <complex>
|
|
||||||
#include <format>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
namespace omath
|
|
||||||
{
|
|
||||||
Matrix::Matrix(const size_t rows, const size_t columns)
|
|
||||||
{
|
|
||||||
if (rows == 0 and columns == 0)
|
|
||||||
throw std::runtime_error("Matrix cannot be 0x0");
|
|
||||||
|
|
||||||
m_rows = rows;
|
|
||||||
m_columns = columns;
|
|
||||||
|
|
||||||
m_data = std::make_unique<float[]>(m_rows * m_columns);
|
|
||||||
|
|
||||||
set(0.f);
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix::Matrix(const std::initializer_list<std::initializer_list<float>>& rows)
|
|
||||||
{
|
|
||||||
m_rows = rows.size();
|
|
||||||
m_columns = rows.begin()->size();
|
|
||||||
|
|
||||||
for (const auto& row: rows)
|
|
||||||
if (row.size() != m_columns)
|
|
||||||
throw std::invalid_argument("All rows must have the same number of columns.");
|
|
||||||
|
|
||||||
m_data = std::make_unique<float[]>(m_rows * m_columns);
|
|
||||||
|
|
||||||
size_t i = 0;
|
|
||||||
for (const auto& row: rows)
|
|
||||||
{
|
|
||||||
size_t j = 0;
|
|
||||||
for (const auto& value: row)
|
|
||||||
at(i, j++) = value;
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix::Matrix(const Matrix& other)
|
|
||||||
{
|
|
||||||
m_rows = other.m_rows;
|
|
||||||
m_columns = other.m_columns;
|
|
||||||
|
|
||||||
m_data = std::make_unique<float[]>(m_rows * m_columns);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
at(i, j) = other.at(i, j);
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix::Matrix(const size_t rows, const size_t columns, const float* raw_data)
|
|
||||||
{
|
|
||||||
m_rows = rows;
|
|
||||||
m_columns = columns;
|
|
||||||
|
|
||||||
m_data = std::make_unique<float[]>(m_rows * m_columns);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < rows * columns; ++i)
|
|
||||||
at(i / rows, i % columns) = raw_data[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t Matrix::row_count() const noexcept
|
|
||||||
{
|
|
||||||
return m_rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
float& Matrix::operator[](const size_t row, const size_t column)
|
|
||||||
{
|
|
||||||
return at(row, column);
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix::Matrix(Matrix&& other) noexcept
|
|
||||||
{
|
|
||||||
m_rows = other.m_rows;
|
|
||||||
m_columns = other.m_columns;
|
|
||||||
m_data = std::move(other.m_data);
|
|
||||||
|
|
||||||
other.m_rows = 0;
|
|
||||||
other.m_columns = 0;
|
|
||||||
|
|
||||||
other.m_data = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t Matrix::columns_count() const noexcept
|
|
||||||
{
|
|
||||||
return m_columns;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::pair<size_t, size_t> Matrix::size() const noexcept
|
|
||||||
{
|
|
||||||
return {row_count(), columns_count()};
|
|
||||||
}
|
|
||||||
|
|
||||||
float& Matrix::at(const size_t row, const size_t col)
|
|
||||||
{
|
|
||||||
return const_cast<float&>(std::as_const(*this).at(row, col));
|
|
||||||
}
|
|
||||||
|
|
||||||
float Matrix::sum()
|
|
||||||
{
|
|
||||||
float sum = 0;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < row_count(); i++)
|
|
||||||
for (size_t j = 0; j < columns_count(); j++)
|
|
||||||
sum += at(i, j);
|
|
||||||
|
|
||||||
return sum;
|
|
||||||
}
|
|
||||||
|
|
||||||
const float& Matrix::at(const size_t row, const size_t col) const
|
|
||||||
{
|
|
||||||
return m_data[row * m_columns + col];
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::operator*(const Matrix& other) const
|
|
||||||
{
|
|
||||||
if (m_columns != other.m_rows)
|
|
||||||
throw std::runtime_error("n != m");
|
|
||||||
|
|
||||||
auto out_mat = Matrix(m_rows, other.m_columns);
|
|
||||||
|
|
||||||
for (size_t d = 0; d < m_rows; ++d)
|
|
||||||
for (size_t i = 0; i < other.m_columns; ++i)
|
|
||||||
for (size_t j = 0; j < other.m_rows; ++j)
|
|
||||||
out_mat.at(d, i) += at(d, j) * other.at(j, i);
|
|
||||||
|
|
||||||
return out_mat;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix& Matrix::operator*=(const Matrix& other)
|
|
||||||
{
|
|
||||||
*this = *this * other;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::operator*(const float f) const
|
|
||||||
{
|
|
||||||
auto out = *this;
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
out.at(i, j) *= f;
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix& Matrix::operator*=(const float f)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < row_count(); i++)
|
|
||||||
for (size_t j = 0; j < columns_count(); j++)
|
|
||||||
at(i, j) *= f;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Matrix::clear()
|
|
||||||
{
|
|
||||||
set(0.f);
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix& Matrix::operator=(const Matrix& other)
|
|
||||||
{
|
|
||||||
if (this == &other)
|
|
||||||
return *this;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
at(i, j) = other.at(i, j);
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix& Matrix::operator=(Matrix&& other) noexcept
|
|
||||||
{
|
|
||||||
if (this == &other)
|
|
||||||
return *this;
|
|
||||||
|
|
||||||
m_rows = other.m_rows;
|
|
||||||
m_columns = other.m_columns;
|
|
||||||
m_data = std::move(other.m_data);
|
|
||||||
|
|
||||||
other.m_rows = 0;
|
|
||||||
other.m_columns = 0;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix& Matrix::operator/=(const float f)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
at(i, j) /= f;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::operator/(const float f) const
|
|
||||||
{
|
|
||||||
auto out = *this;
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
out.at(i, j) /= f;
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string Matrix::to_string() const
|
|
||||||
{
|
|
||||||
std::string str;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_rows; i++)
|
|
||||||
{
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
{
|
|
||||||
str += std::format("{:.1f}", at(i, j));
|
|
||||||
|
|
||||||
if (j == m_columns - 1)
|
|
||||||
str += '\n';
|
|
||||||
else
|
|
||||||
str += ' ';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Matrix::determinant() const // NOLINT(*-no-recursion)
|
|
||||||
{
|
|
||||||
if (m_rows + m_columns == 2)
|
|
||||||
return at(0, 0);
|
|
||||||
|
|
||||||
if (m_rows == 2 and m_columns == 2)
|
|
||||||
return at(0, 0) * at(1, 1) - at(0, 1) * at(1, 0);
|
|
||||||
|
|
||||||
float det = 0;
|
|
||||||
for (size_t i = 0; i < m_columns; i++)
|
|
||||||
det += alg_complement(0, i) * at(0, i);
|
|
||||||
|
|
||||||
return det;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Matrix::alg_complement(const size_t i, const size_t j) const // NOLINT(*-no-recursion)
|
|
||||||
{
|
|
||||||
const auto tmp = minor(i, j);
|
|
||||||
return ((i + j + 2) % 2 == 0) ? tmp : -tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::transpose() const
|
|
||||||
{
|
|
||||||
Matrix transposed = {m_columns, m_rows};
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
transposed.at(j, i) = at(i, j);
|
|
||||||
|
|
||||||
return transposed;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix::~Matrix() = default;
|
|
||||||
|
|
||||||
void Matrix::set(const float val)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < m_rows; ++i)
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
at(i, j) = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::strip(const size_t row, const size_t column) const
|
|
||||||
{
|
|
||||||
Matrix stripped = {m_rows - 1, m_columns - 1};
|
|
||||||
size_t strip_row_index = 0;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_rows; i++)
|
|
||||||
{
|
|
||||||
if (i == row)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
size_t strip_column_index = 0;
|
|
||||||
for (size_t j = 0; j < m_columns; ++j)
|
|
||||||
{
|
|
||||||
if (j == column)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
stripped.at(strip_row_index, strip_column_index) = at(i, j);
|
|
||||||
strip_column_index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_row_index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return stripped;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Matrix::minor(const size_t i, const size_t j) const // NOLINT(*-no-recursion)
|
|
||||||
{
|
|
||||||
return strip(i, j).determinant();
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::to_screen_matrix(const float screen_width, const float screen_height)
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
{screen_width / 2.f, 0.f, 0.f, 0.f},
|
|
||||||
{0.f, -screen_height / 2.f, 0.f, 0.f},
|
|
||||||
{0.f, 0.f, 1.f, 0.f},
|
|
||||||
{screen_width / 2.f, screen_height / 2.f, 0.f, 1.f},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::translation_matrix(const Vector3<float>& diff)
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
{1.f, 0.f, 0.f, 0.f},
|
|
||||||
{0.f, 1.f, 0.f, 0.f},
|
|
||||||
{0.f, 0.f, 1.f, 0.f},
|
|
||||||
{diff.x, diff.y, diff.z, 1.f},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::orientation_matrix(const Vector3<float>& forward, const Vector3<float>& right,
|
|
||||||
const Vector3<float>& up)
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
{right.x, up.x, forward.x, 0.f},
|
|
||||||
{right.y, up.y, forward.y, 0.f},
|
|
||||||
{right.z, up.z, forward.z, 0.f},
|
|
||||||
{0.f, 0.f, 0.f, 1.f},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix Matrix::projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
|
||||||
const float far)
|
|
||||||
{
|
|
||||||
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.f, 0.f, 0.f},
|
|
||||||
{0.f, 1.f / fov_half_tan, 0.f, 0.f},
|
|
||||||
{0.f, 0.f, (far + near) / (far - near), 2.f * near * far / (far - near)},
|
|
||||||
{0.f, 0.f, -1.f, 0.f}};
|
|
||||||
}
|
|
||||||
|
|
||||||
const float* Matrix::raw() const
|
|
||||||
{
|
|
||||||
return m_data.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Matrix::set_data_from_raw(const float* raw_matrix)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < m_columns * m_rows; ++i)
|
|
||||||
at(i / m_rows, i % m_columns) = raw_matrix[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix::Matrix()
|
|
||||||
{
|
|
||||||
m_columns = 0;
|
|
||||||
m_rows = 0;
|
|
||||||
m_data = nullptr;
|
|
||||||
}
|
|
||||||
} // namespace omath
|
|
||||||
#endif
|
|
||||||
@@ -4,9 +4,25 @@
|
|||||||
#include "omath/pathfinding/a_star.hpp"
|
#include "omath/pathfinding/a_star.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <queue>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
struct OpenListNode final
|
||||||
|
{
|
||||||
|
omath::Vector3<float> position;
|
||||||
|
float f_cost;
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
bool operator>(const OpenListNode& other) const noexcept
|
||||||
|
{
|
||||||
|
return f_cost > other.f_cost;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
namespace omath::pathfinding
|
namespace omath::pathfinding
|
||||||
{
|
{
|
||||||
struct PathNode final
|
struct PathNode final
|
||||||
@@ -37,23 +53,13 @@ namespace omath::pathfinding
|
|||||||
std::ranges::reverse(path);
|
std::ranges::reverse(path);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
auto Astar::get_perfect_node(const std::unordered_map<Vector3<float>, PathNode>& open_list,
|
|
||||||
const Vector3<float>& end_vertex) noexcept
|
|
||||||
{
|
|
||||||
return std::ranges::min_element(open_list,
|
|
||||||
[&end_vertex](const auto& a, const auto& b)
|
|
||||||
{
|
|
||||||
const float fa = a.second.g_cost + a.first.distance_to(end_vertex);
|
|
||||||
const float fb = b.second.g_cost + b.first.distance_to(end_vertex);
|
|
||||||
return fa < fb;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<Vector3<float>> Astar::find_path(const Vector3<float>& start, const Vector3<float>& end,
|
std::vector<Vector3<float>> Astar::find_path(const Vector3<float>& start, const Vector3<float>& end,
|
||||||
const NavigationMesh& nav_mesh) noexcept
|
const NavigationMesh& nav_mesh) noexcept
|
||||||
{
|
{
|
||||||
std::unordered_map<Vector3<float>, PathNode> closed_list;
|
std::unordered_map<Vector3<float>, PathNode> closed_list;
|
||||||
std::unordered_map<Vector3<float>, PathNode> open_list;
|
std::unordered_map<Vector3<float>, PathNode> node_data;
|
||||||
|
std::priority_queue<OpenListNode, std::vector<OpenListNode>, std::greater<>> open_list;
|
||||||
|
|
||||||
auto maybe_start_vertex = nav_mesh.get_closest_vertex(start);
|
auto maybe_start_vertex = nav_mesh.get_closest_vertex(start);
|
||||||
auto maybe_end_vertex = nav_mesh.get_closest_vertex(end);
|
auto maybe_end_vertex = nav_mesh.get_closest_vertex(end);
|
||||||
@@ -64,20 +70,27 @@ namespace omath::pathfinding
|
|||||||
const auto start_vertex = maybe_start_vertex.value();
|
const auto start_vertex = maybe_start_vertex.value();
|
||||||
const auto end_vertex = maybe_end_vertex.value();
|
const auto end_vertex = maybe_end_vertex.value();
|
||||||
|
|
||||||
open_list.emplace(start_vertex, PathNode{std::nullopt, 0.f});
|
node_data.emplace(start_vertex, PathNode{std::nullopt, 0.f});
|
||||||
|
open_list.push({start_vertex, start_vertex.distance_to(end_vertex)});
|
||||||
|
|
||||||
while (!open_list.empty())
|
while (!open_list.empty())
|
||||||
{
|
{
|
||||||
auto current_it = get_perfect_node(open_list, end_vertex);
|
auto current = open_list.top().position;
|
||||||
|
open_list.pop();
|
||||||
|
|
||||||
const auto current = current_it->first;
|
if (closed_list.contains(current))
|
||||||
const auto current_node = current_it->second;
|
continue;
|
||||||
|
|
||||||
|
auto current_node_it = node_data.find(current);
|
||||||
|
if (current_node_it == node_data.end())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
const auto current_node = current_node_it->second;
|
||||||
|
|
||||||
if (current == end_vertex)
|
if (current == end_vertex)
|
||||||
return reconstruct_final_path(closed_list, current);
|
return reconstruct_final_path(closed_list, current);
|
||||||
|
|
||||||
closed_list.emplace(current, current_node);
|
closed_list.emplace(current, current_node);
|
||||||
open_list.erase(current_it);
|
|
||||||
|
|
||||||
for (const auto& neighbor: nav_mesh.get_neighbors(current))
|
for (const auto& neighbor: nav_mesh.get_neighbors(current))
|
||||||
{
|
{
|
||||||
@@ -86,11 +99,14 @@ namespace omath::pathfinding
|
|||||||
|
|
||||||
const float tentative_g_cost = current_node.g_cost + neighbor.distance_to(current);
|
const float tentative_g_cost = current_node.g_cost + neighbor.distance_to(current);
|
||||||
|
|
||||||
// ReSharper disable once CppTooWideScopeInitStatement
|
auto node_it = node_data.find(neighbor);
|
||||||
const auto open_it = open_list.find(neighbor);
|
|
||||||
|
|
||||||
if (open_it == open_list.end() || tentative_g_cost < open_it->second.g_cost)
|
if (node_it == node_data.end() || tentative_g_cost < node_it->second.g_cost)
|
||||||
open_list[neighbor] = PathNode{current, tentative_g_cost};
|
{
|
||||||
|
node_data[neighbor] = PathNode{current, tentative_g_cost};
|
||||||
|
const float f_cost = tentative_g_cost + neighbor.distance_to(end_vertex);
|
||||||
|
open_list.push({neighbor, f_cost});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
//
|
//
|
||||||
#include "omath/pathfinding/navigation_mesh.hpp"
|
#include "omath/pathfinding/navigation_mesh.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstring>
|
||||||
|
#include <limits>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
namespace omath::pathfinding
|
namespace omath::pathfinding
|
||||||
{
|
{
|
||||||
@@ -13,7 +15,7 @@ namespace omath::pathfinding
|
|||||||
{ return a.first.distance_to(point) < b.first.distance_to(point); });
|
{ return a.first.distance_to(point) < b.first.distance_to(point); });
|
||||||
|
|
||||||
if (res == m_vertex_map.cend())
|
if (res == m_vertex_map.cend())
|
||||||
return std::unexpected("Failed to get clossest point");
|
return std::unexpected("Failed to get closest point");
|
||||||
|
|
||||||
return res->first;
|
return res->first;
|
||||||
}
|
}
|
||||||
@@ -30,55 +32,68 @@ namespace omath::pathfinding
|
|||||||
|
|
||||||
std::vector<uint8_t> NavigationMesh::serialize() const noexcept
|
std::vector<uint8_t> NavigationMesh::serialize() const noexcept
|
||||||
{
|
{
|
||||||
auto dump_to_vector = []<typename T>(const T& t, std::vector<uint8_t>& vec)
|
std::vector<std::uint8_t> raw;
|
||||||
|
|
||||||
|
// Pre-calculate total size for better performance
|
||||||
|
std::size_t total_size = 0;
|
||||||
|
for (const auto& [vertex, neighbors] : m_vertex_map)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < sizeof(t); i++)
|
total_size += sizeof(vertex) + sizeof(std::uint16_t) + sizeof(Vector3<float>) * neighbors.size();
|
||||||
vec.push_back(*(reinterpret_cast<const uint8_t*>(&t) + i));
|
}
|
||||||
|
raw.reserve(total_size);
|
||||||
|
|
||||||
|
auto dump_to_vector = [&raw]<typename T>(const T& t)
|
||||||
|
{
|
||||||
|
const auto* byte_ptr = reinterpret_cast<const std::uint8_t*>(&t);
|
||||||
|
raw.insert(raw.end(), byte_ptr, byte_ptr + sizeof(T));
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<uint8_t> raw;
|
for (const auto& [vertex, neighbors] : m_vertex_map)
|
||||||
|
|
||||||
for (const auto& [vertex, neighbors]: m_vertex_map)
|
|
||||||
{
|
{
|
||||||
const auto neighbors_count = neighbors.size();
|
// Clamp neighbors count to fit in uint16_t (prevents silent data corruption)
|
||||||
|
// NOTE: If neighbors.size() > 65535, only the first 65535 neighbors will be serialized.
|
||||||
|
// This is a limitation of the current serialization format using uint16_t for count.
|
||||||
|
const auto clamped_count =
|
||||||
|
std::min<std::size_t>(neighbors.size(), std::numeric_limits<std::uint16_t>::max());
|
||||||
|
const auto neighbors_count = static_cast<std::uint16_t>(clamped_count);
|
||||||
|
|
||||||
dump_to_vector(vertex, raw);
|
dump_to_vector(vertex);
|
||||||
dump_to_vector(neighbors_count, raw);
|
dump_to_vector(neighbors_count);
|
||||||
|
|
||||||
for (const auto& neighbor: neighbors)
|
// Only serialize up to the clamped count
|
||||||
dump_to_vector(neighbor, raw);
|
for (std::size_t i = 0; i < clamped_count; ++i)
|
||||||
|
dump_to_vector(neighbors[i]);
|
||||||
}
|
}
|
||||||
return raw;
|
return raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigationMesh::deserialize(const std::vector<uint8_t>& raw) noexcept
|
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)
|
auto load_from_vector = [](const std::vector<uint8_t>& vec, std::size_t& offset, auto& value)
|
||||||
{
|
{
|
||||||
if (offset + sizeof(value) > vec.size())
|
if (offset + sizeof(value) > vec.size())
|
||||||
{
|
|
||||||
throw std::runtime_error("Deserialize: Invalid input data size.");
|
throw std::runtime_error("Deserialize: Invalid input data size.");
|
||||||
}
|
|
||||||
std::copy_n(vec.data() + offset, sizeof(value), reinterpret_cast<uint8_t*>(&value));
|
std::copy_n(vec.data() + offset, sizeof(value), reinterpret_cast<uint8_t*>(&value));
|
||||||
offset += sizeof(value);
|
offset += sizeof(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
m_vertex_map.clear();
|
m_vertex_map.clear();
|
||||||
|
|
||||||
size_t offset = 0;
|
std::size_t offset = 0;
|
||||||
|
|
||||||
while (offset < raw.size())
|
while (offset < raw.size())
|
||||||
{
|
{
|
||||||
Vector3<float> vertex;
|
Vector3<float> vertex;
|
||||||
load_from_vector(raw, offset, vertex);
|
load_from_vector(raw, offset, vertex);
|
||||||
|
|
||||||
uint16_t neighbors_count;
|
std::uint16_t neighbors_count;
|
||||||
load_from_vector(raw, offset, neighbors_count);
|
load_from_vector(raw, offset, neighbors_count);
|
||||||
|
|
||||||
std::vector<Vector3<float>> neighbors;
|
std::vector<Vector3<float>> neighbors;
|
||||||
neighbors.reserve(neighbors_count);
|
neighbors.reserve(neighbors_count);
|
||||||
|
|
||||||
for (size_t i = 0; i < neighbors_count; ++i)
|
for (std::size_t i = 0; i < neighbors_count; ++i)
|
||||||
{
|
{
|
||||||
Vector3<float> neighbor;
|
Vector3<float> neighbor;
|
||||||
load_from_vector(raw, offset, neighbor);
|
load_from_vector(raw, offset, neighbor);
|
||||||
|
|||||||
@@ -18,97 +18,104 @@ namespace omath::projectile_prediction
|
|||||||
[[maybe_unused]] const Target& target) const
|
[[maybe_unused]] const Target& target) const
|
||||||
{
|
{
|
||||||
#if defined(OMATH_USE_AVX2) && defined(__i386__) && defined(__x86_64__)
|
#if defined(OMATH_USE_AVX2) && defined(__i386__) && defined(__x86_64__)
|
||||||
const float bulletGravity = m_gravityConstant * projectile.m_gravityScale;
|
const float bullet_gravity = m_gravity_constant * projectile.m_gravity_scale;
|
||||||
const float v0 = projectile.m_launchSpeed;
|
const float v0 = projectile.m_launch_speed;
|
||||||
const float v0Sqr = v0 * v0;
|
const float v0_sqr = v0 * v0;
|
||||||
const Vector3 projOrigin = projectile.m_origin;
|
const Vector3 proj_origin = projectile.m_origin;
|
||||||
|
|
||||||
constexpr int SIMD_FACTOR = 8;
|
constexpr int SIMD_FACTOR = 8;
|
||||||
float currentTime = m_simulationTimeStep;
|
float current_time = m_simulation_time_step;
|
||||||
|
|
||||||
for (; currentTime <= m_maximumSimulationTime; currentTime += m_simulationTimeStep * SIMD_FACTOR)
|
for (; current_time <= m_maximum_simulation_time; current_time += m_simulation_time_step * SIMD_FACTOR)
|
||||||
{
|
{
|
||||||
const __m256 times
|
const __m256 times
|
||||||
= _mm256_setr_ps(currentTime, currentTime + m_simulationTimeStep,
|
= _mm256_setr_ps(current_time, current_time + m_simulation_time_step,
|
||||||
currentTime + m_simulationTimeStep * 2, currentTime + m_simulationTimeStep * 3,
|
current_time + m_simulation_time_step * 2, current_time + m_simulation_time_step * 3,
|
||||||
currentTime + m_simulationTimeStep * 4, currentTime + m_simulationTimeStep * 5,
|
current_time + m_simulation_time_step * 4, current_time + m_simulation_time_step * 5,
|
||||||
currentTime + m_simulationTimeStep * 6, currentTime + m_simulationTimeStep * 7);
|
current_time + m_simulation_time_step * 6, current_time + m_simulation_time_step * 7);
|
||||||
|
|
||||||
const __m256 targetX
|
const __m256 target_x
|
||||||
= _mm256_fmadd_ps(_mm256_set1_ps(target.m_velocity.x), times, _mm256_set1_ps(target.m_origin.x));
|
= _mm256_fmadd_ps(_mm256_set1_ps(target.m_velocity.x), times, _mm256_set1_ps(target.m_origin.x));
|
||||||
const __m256 targetY
|
const __m256 target_y
|
||||||
= _mm256_fmadd_ps(_mm256_set1_ps(target.m_velocity.y), times, _mm256_set1_ps(target.m_origin.y));
|
= _mm256_fmadd_ps(_mm256_set1_ps(target.m_velocity.y), times, _mm256_set1_ps(target.m_origin.y));
|
||||||
const __m256 timesSq = _mm256_mul_ps(times, times);
|
const __m256 times_sq = _mm256_mul_ps(times, times);
|
||||||
const __m256 targetZ = _mm256_fmadd_ps(_mm256_set1_ps(target.m_velocity.z), times,
|
const __m256 target_z = _mm256_fmadd_ps(_mm256_set1_ps(target.m_velocity.z), times,
|
||||||
_mm256_fnmadd_ps(_mm256_set1_ps(0.5f * m_gravityConstant), timesSq,
|
_mm256_fnmadd_ps(_mm256_set1_ps(0.5f * m_gravity_constant), times_sq,
|
||||||
_mm256_set1_ps(target.m_origin.z)));
|
_mm256_set1_ps(target.m_origin.z)));
|
||||||
|
|
||||||
const __m256 deltaX = _mm256_sub_ps(targetX, _mm256_set1_ps(projOrigin.x));
|
const __m256 delta_x = _mm256_sub_ps(target_x, _mm256_set1_ps(proj_origin.x));
|
||||||
const __m256 deltaY = _mm256_sub_ps(targetY, _mm256_set1_ps(projOrigin.y));
|
const __m256 delta_y = _mm256_sub_ps(target_y, _mm256_set1_ps(proj_origin.y));
|
||||||
const __m256 deltaZ = _mm256_sub_ps(targetZ, _mm256_set1_ps(projOrigin.z));
|
const __m256 delta_z = _mm256_sub_ps(target_z, _mm256_set1_ps(proj_origin.z));
|
||||||
|
|
||||||
const __m256 dSqr = _mm256_add_ps(_mm256_mul_ps(deltaX, deltaX), _mm256_mul_ps(deltaY, deltaY));
|
const __m256 d_sqr = _mm256_add_ps(_mm256_mul_ps(delta_x, delta_x), _mm256_mul_ps(delta_y, delta_y));
|
||||||
|
|
||||||
const __m256 bgTimesSq = _mm256_mul_ps(_mm256_set1_ps(bulletGravity), timesSq);
|
const __m256 bg_times_sq = _mm256_mul_ps(_mm256_set1_ps(bullet_gravity), times_sq);
|
||||||
const __m256 term = _mm256_add_ps(deltaZ, _mm256_mul_ps(_mm256_set1_ps(0.5f), bgTimesSq));
|
const __m256 term = _mm256_add_ps(delta_z, _mm256_mul_ps(_mm256_set1_ps(0.5f), bg_times_sq));
|
||||||
const __m256 termSq = _mm256_mul_ps(term, term);
|
const __m256 term_sq = _mm256_mul_ps(term, term);
|
||||||
const __m256 numerator = _mm256_add_ps(dSqr, termSq);
|
const __m256 numerator = _mm256_add_ps(d_sqr, term_sq);
|
||||||
const __m256 denominator = _mm256_add_ps(timesSq, _mm256_set1_ps(1e-8f)); // Avoid division by zero
|
const __m256 denominator = _mm256_add_ps(times_sq, _mm256_set1_ps(1e-8f)); // Avoid division by zero
|
||||||
const __m256 requiredV0Sqr = _mm256_div_ps(numerator, denominator);
|
const __m256 required_v0_sqr = _mm256_div_ps(numerator, denominator);
|
||||||
|
|
||||||
const __m256 v0SqrVec = _mm256_set1_ps(v0Sqr + 1e-3f);
|
const __m256 v0_sqr_vec = _mm256_set1_ps(v0_sqr + 1e-3f);
|
||||||
const __m256 mask = _mm256_cmp_ps(requiredV0Sqr, v0SqrVec, _CMP_LE_OQ);
|
const __m256 mask = _mm256_cmp_ps(required_v0_sqr, v0_sqr_vec, _CMP_LE_OQ);
|
||||||
|
|
||||||
const unsigned validMask = _mm256_movemask_ps(mask);
|
const unsigned valid_mask = _mm256_movemask_ps(mask);
|
||||||
|
|
||||||
if (!validMask)
|
if (!valid_mask)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
alignas(32) float validTimes[SIMD_FACTOR];
|
alignas(32) float valid_times[SIMD_FACTOR];
|
||||||
_mm256_store_ps(validTimes, times);
|
_mm256_store_ps(valid_times, times);
|
||||||
|
|
||||||
for (int i = 0; i < SIMD_FACTOR; ++i)
|
for (int i = 0; i < SIMD_FACTOR; ++i)
|
||||||
{
|
{
|
||||||
if (!(validMask & (1 << i)))
|
if (!(valid_mask & (1 << i)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const float candidateTime = validTimes[i];
|
const float candidate_time = valid_times[i];
|
||||||
|
|
||||||
if (candidateTime > m_maximumSimulationTime)
|
if (candidate_time > m_maximum_simulation_time)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Fine search around candidate time
|
// Fine search around candidate time
|
||||||
for (float fineTime = candidateTime - m_simulationTimeStep * 2;
|
for (float fine_time = candidate_time - m_simulation_time_step * 2;
|
||||||
fineTime <= candidateTime + m_simulationTimeStep * 2; fineTime += m_simulationTimeStep)
|
fine_time <= candidate_time + m_simulation_time_step * 2; fine_time += m_simulation_time_step)
|
||||||
{
|
{
|
||||||
if (fineTime < 0)
|
if (fine_time < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const Vector3 targetPos = target.PredictPosition(fineTime, m_gravityConstant);
|
// Manually compute predicted target position to avoid adding method to Target
|
||||||
const auto pitch = CalculatePitch(projOrigin, targetPos, bulletGravity, v0, fineTime);
|
Vector3 target_pos = target.m_origin + target.m_velocity * fine_time;
|
||||||
|
if (target.m_is_airborne)
|
||||||
|
target_pos.z -= 0.5f * m_gravity_constant * fine_time * fine_time;
|
||||||
|
|
||||||
|
const auto pitch = calculate_pitch(proj_origin, target_pos, bullet_gravity, v0, fine_time);
|
||||||
if (!pitch)
|
if (!pitch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const Vector3 delta = targetPos - projOrigin;
|
const Vector3 delta = target_pos - proj_origin;
|
||||||
const float d = std::sqrt(delta.x * delta.x + delta.y * delta.y);
|
const float d = std::sqrt(delta.x * delta.x + delta.y * delta.y);
|
||||||
const float height = d * std::tan(angles::DegreesToRadians(*pitch));
|
const float height = d * std::tan(angles::degrees_to_radians(*pitch));
|
||||||
return Vector3(targetPos.x, targetPos.y, projOrigin.z + height);
|
return Vector3(target_pos.x, target_pos.y, proj_origin.z + height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback scalar processing for remaining times
|
// Fallback scalar processing for remaining times
|
||||||
for (; currentTime <= m_maximumSimulationTime; currentTime += m_simulationTimeStep)
|
for (; current_time <= m_maximum_simulation_time; current_time += m_simulation_time_step)
|
||||||
{
|
{
|
||||||
const Vector3 targetPos = target.PredictPosition(currentTime, m_gravityConstant);
|
Vector3 target_pos = target.m_origin + target.m_velocity * current_time;
|
||||||
const auto pitch = CalculatePitch(projOrigin, targetPos, bulletGravity, v0, currentTime);
|
if (target.m_is_airborne)
|
||||||
|
target_pos.z -= 0.5f * m_gravity_constant * current_time * current_time;
|
||||||
|
|
||||||
|
const auto pitch = calculate_pitch(proj_origin, target_pos, bullet_gravity, v0, current_time);
|
||||||
if (!pitch)
|
if (!pitch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const Vector3 delta = targetPos - projOrigin;
|
const Vector3 delta = target_pos - proj_origin;
|
||||||
const float d = std::sqrt(delta.x * delta.x + delta.y * delta.y);
|
const float d = std::sqrt(delta.x * delta.x + delta.y * delta.y);
|
||||||
const float height = d * std::tan(angles::DegreesToRadians(*pitch));
|
const float height = d * std::tan(angles::degrees_to_radians(*pitch));
|
||||||
return Vector3(targetPos.x, targetPos.y, projOrigin.z + height);
|
return Vector3(target_pos.x, target_pos.y, proj_origin.z + height);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
@@ -134,22 +141,22 @@ namespace omath::projectile_prediction
|
|||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
||||||
const Vector3 delta = target_pos - proj_origin;
|
const Vector3 delta = target_pos - proj_origin;
|
||||||
const float dSqr = delta.x * delta.x + delta.y * delta.y;
|
const float d_sqr = delta.x * delta.x + delta.y * delta.y;
|
||||||
const float h = delta.z;
|
const float h = delta.z;
|
||||||
|
|
||||||
const float term = h + 0.5f * bullet_gravity * time * time;
|
const float term = h + 0.5f * bullet_gravity * time * time;
|
||||||
const float requiredV0Sqr = (dSqr + term * term) / (time * time);
|
const float required_v0_sqr = (d_sqr + term * term) / (time * time);
|
||||||
const float v0Sqr = v0 * v0;
|
const float v0_sqr = v0 * v0;
|
||||||
|
|
||||||
if (requiredV0Sqr > v0Sqr + 1e-3f)
|
if (required_v0_sqr > v0_sqr + 1e-3f)
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
||||||
if (dSqr == 0.0f)
|
if (d_sqr == 0.0f)
|
||||||
return term >= 0.0f ? 90.0f : -90.0f;
|
return term >= 0.0f ? 90.0f : -90.0f;
|
||||||
|
|
||||||
const float d = std::sqrt(dSqr);
|
const float d = std::sqrt(d_sqr);
|
||||||
const float tanTheta = term / d;
|
const float tan_theta = term / d;
|
||||||
return angles::RadiansToDegrees(std::atan(tanTheta));
|
return angles::radians_to_degrees(std::atan(tan_theta));
|
||||||
#else
|
#else
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
std::format("{} AVX2 feature is not enabled!", std::source_location::current().function_name()));
|
std::format("{} AVX2 feature is not enabled!", std::source_location::current().function_name()));
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user