Refactors: Moves linear algebra to new directory

Moves linear algebra headers to a new subdirectory to improve project structure.

Updates includes to reflect the directory change.
Adds vcpkg to the tracked repositories.
This commit is contained in:
2025-08-31 23:36:05 +03:00
parent 7f1bc51905
commit d74c66990a
30 changed files with 58 additions and 45 deletions

1
.idea/vcs.xml generated
View File

@@ -3,5 +3,6 @@
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" /> <mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/extlibs/googletest" vcs="Git" /> <mapping directory="$PROJECT_DIR$/extlibs/googletest" vcs="Git" />
<mapping directory="$PROJECT_DIR$/extlibs/vcpkg" vcs="Git" />
</component> </component>
</project> </project>

View File

@@ -3,10 +3,9 @@
// //
#pragma once #pragma once
#include <array> #include "omath/linear_algebra/vector3.hpp"
#include "omath/triangle.hpp" #include "omath/triangle.hpp"
#include "omath/vector3.hpp" #include <array>
namespace omath::primitives namespace omath::primitives
{ {

View File

@@ -3,8 +3,8 @@
// //
#pragma once #pragma once
#include "omath/linear_algebra/vector3.hpp"
#include "omath/triangle.hpp" #include "omath/triangle.hpp"
#include "omath/vector3.hpp"
#include <array> #include <array>
namespace omath::primitives namespace omath::primitives

View File

@@ -3,8 +3,8 @@
// //
#pragma once #pragma once
#include "omath/linear_algebra/vector3.hpp"
#include "omath/triangle.hpp" #include "omath/triangle.hpp"
#include "omath/vector3.hpp"
namespace omath::collision namespace omath::collision
{ {

View File

@@ -4,8 +4,7 @@
#pragma once #pragma once
#include "omath/vector3.hpp" #include "linear_algebra/vector4.hpp"
#include "omath/vector4.hpp"
#include <cstdint> #include <cstdint>
namespace omath namespace omath

View File

@@ -3,9 +3,9 @@
// //
#pragma once #pragma once
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <omath/angle.hpp> #include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp> #include <omath/view_angles.hpp>
namespace omath::iw_engine namespace omath::iw_engine

View File

@@ -3,9 +3,9 @@
// //
#pragma once #pragma once
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <omath/angle.hpp> #include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp> #include <omath/view_angles.hpp>
namespace omath::opengl_engine namespace omath::opengl_engine

View File

@@ -3,9 +3,9 @@
// //
#pragma once #pragma once
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <omath/angle.hpp> #include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp> #include <omath/view_angles.hpp>
namespace omath::source_engine namespace omath::source_engine

View File

@@ -4,9 +4,9 @@
#pragma once #pragma once
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <omath/angle.hpp> #include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp> #include <omath/view_angles.hpp>
namespace omath::unity_engine namespace omath::unity_engine

View File

@@ -4,9 +4,9 @@
#pragma once #pragma once
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <omath/angle.hpp> #include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp> #include <omath/view_angles.hpp>
namespace omath::unreal_engine namespace omath::unreal_engine

View File

@@ -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>

View File

@@ -1,7 +1,22 @@
#pragma once #pragma once
#ifdef OMATH_ENABLE_LEGACY /*
THIS CODE IS DEPRECATED NEVER EVER USE Matrix CLASS
AND VERY SLOW USE Mat INSTEAD!!!!!!!!!!!
*/
#ifdef OMATH_ENABLE_LEGACY
#include "omath/vector3.hpp" #include "omath/vector3.hpp"
#include <initializer_list> #include <initializer_list>
#include <memory> #include <memory>

View File

@@ -5,7 +5,7 @@
#pragma once #pragma once
#include "omath/angle.hpp" #include "omath/angle.hpp"
#include "omath/vector2.hpp" #include "omath/linear_algebra/vector2.hpp"
#include <cstdint> #include <cstdint>
#include <expected> #include <expected>
#include <functional> #include <functional>

View File

@@ -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
{ {

View File

@@ -10,13 +10,13 @@
#include "omath/angle.hpp" #include "omath/angle.hpp"
// Vector classes (in dependency order) // Vector classes (in dependency order)
#include "omath/vector2.hpp" #include "linear_algebra/vector2.hpp"
#include "omath/vector3.hpp" #include "linear_algebra/vector4.hpp"
#include "omath/vector4.hpp" #include "omath/linear_algebra/vector3.hpp"
// Matrix classes // Matrix classes
#include "omath/mat.hpp" #include "linear_algebra/matrix.hpp"
#include "omath/matrix.hpp" #include "omath/linear_algebra/mat.hpp"
// Color functionality // Color functionality
#include "omath/color.hpp" #include "omath/color.hpp"

View File

@@ -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

View File

@@ -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>

View File

@@ -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
{ {

View File

@@ -4,11 +4,11 @@
#pragma once #pragma once
#include "omath/linear_algebra/vector3.hpp"
#include "omath/engines/source_engine/traits/pred_engine_trait.hpp" #include "omath/engines/source_engine/traits/pred_engine_trait.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

View File

@@ -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
{ {

View File

@@ -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
{ {

View File

@@ -5,10 +5,10 @@
#pragma once #pragma once
#include "omath/projection/error_codes.hpp" #include "omath/projection/error_codes.hpp"
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <expected> #include <expected>
#include <omath/angle.hpp> #include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <type_traits> #include <type_traits>
namespace omath::projection namespace omath::projection

View File

@@ -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 "linear_algebra/vector3.hpp"
namespace omath namespace omath
{ {

View File

@@ -2,10 +2,10 @@
// Revised unittest suite for LineTracer (segmentbased MöllerTrumbore) // Revised unittest suite for LineTracer (segmentbased MöllerTrumbore)
// Pure ASCII: avoids nonstandard characters that MSVC rejects. // Pure ASCII: avoids nonstandard characters that MSVC rejects.
// //
#include "gtest/gtest.h" #include "omath/linear_algebra/vector3.hpp"
#include "omath/collision/line_tracer.hpp" #include "omath/collision/line_tracer.hpp"
#include "omath/triangle.hpp" #include "omath/triangle.hpp"
#include "omath/vector3.hpp" #include "gtest/gtest.h"
#include <cmath> #include <cmath>
using namespace omath; using namespace omath;

View File

@@ -1,7 +1,7 @@
// UnitTestMat.cpp // UnitTestMat.cpp
#include "omath/linear_algebra/mat.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "omath/mat.hpp"
#include "omath/vector3.hpp"
using namespace omath; using namespace omath;

View File

@@ -1,11 +1,10 @@
// //
// Created by Orange on 1/6/2025. // Created by Orange on 1/6/2025.
// //
#include "omath/triangle.hpp"
#include "omath/linear_algebra/vector3.hpp"
#include <cmath> // For std::sqrt, std::isinf, std::isnan #include <cmath> // For std::sqrt, std::isinf, std::isnan
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <omath/vector3.hpp>
#include "omath/triangle.hpp"
using namespace omath; using namespace omath;

View File

@@ -2,10 +2,10 @@
// Created by Vlad on 02.09.2024. // Created by Vlad on 02.09.2024.
// //
#include <omath/linear_algebra/vector2.hpp>
#include <cfloat> // For FLT_MAX and FLT_MIN #include <cfloat> // For FLT_MAX and FLT_MIN
#include <cmath> // For std::isinf and std::isnan #include <cmath> // For std::isinf and std::isnan
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <omath/vector2.hpp>
using namespace omath; using namespace omath;

View File

@@ -2,11 +2,11 @@
// Created by Vlad on 01.09.2024. // Created by Vlad on 01.09.2024.
// //
#include <omath/linear_algebra/vector3.hpp>
#include <cfloat> // For FLT_MAX, FLT_MIN #include <cfloat> // For FLT_MAX, FLT_MIN
#include <cmath> #include <cmath>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <limits> // For std::numeric_limits #include <limits> // For std::numeric_limits
#include <omath/vector3.hpp>
using namespace omath; using namespace omath;

View File

@@ -5,9 +5,9 @@
// Vector4Test.cpp // Vector4Test.cpp
// //
#include <omath/linear_algebra/vector4.hpp>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <limits> // For std::numeric_limits #include <limits> // For std::numeric_limits
#include <omath/vector4.hpp>
using namespace omath; using namespace omath;