removed gcem as dep

This commit is contained in:
2026-06-15 00:37:47 +03:00
parent 75c3f2409d
commit 47dcee037e
38 changed files with 1351 additions and 927 deletions
@@ -4,7 +4,7 @@
#pragma once
#include "omath/engines/source_engine/formulas.hpp"
#include "omath/internal/optional_constexpr_math.hpp"
#include "omath/internal/constexpr_math.hpp"
#include "omath/projection/camera.hpp"
namespace omath::source_engine
@@ -13,8 +13,8 @@ namespace omath::source_engine
{
public:
[[nodiscard]]
OMATH_CONSTEXPR static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin,
const Vector3<float>& look_at) noexcept
constexpr static ViewAngles calc_look_at_angle(const Vector3<float>& cam_origin,
const Vector3<float>& look_at) noexcept
{
const auto direction = (look_at - cam_origin).normalized();
@@ -23,16 +23,15 @@ namespace omath::source_engine
}
[[nodiscard]]
OMATH_CONSTEXPR static Mat4X4 calc_view_matrix(const ViewAngles& angles,
const Vector3<float>& cam_origin) noexcept
constexpr static Mat4X4 calc_view_matrix(const ViewAngles& angles, const Vector3<float>& cam_origin) noexcept
{
return source_engine::calc_view_matrix(angles, cam_origin);
}
[[nodiscard]]
OMATH_CONSTEXPR static Mat4X4
calc_projection_matrix(const projection::FieldOfView& fov, const projection::ViewPort& view_port,
const float near_plane, const float far_plane,
const NDCDepthRange ndc_depth_range) noexcept
constexpr static Mat4X4 calc_projection_matrix(const projection::FieldOfView& fov,
const projection::ViewPort& view_port, const float near_plane,
const float far_plane,
const NDCDepthRange ndc_depth_range) noexcept
{
return calc_perspective_projection_matrix(fov.as_degrees(), view_port.aspect_ratio(), near_plane, far_plane,
ndc_depth_range);