mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
Defines constants for Frostbite engine
Introduces a constants header file for the Frostbite engine, including common vectors, matrices, and angle types. This provides a centralized location for defining and accessing essential mathematical constants used throughout the engine.
This commit is contained in:
25
include/omath/engines/frostbite_engine/constants.hpp
Normal file
25
include/omath/engines/frostbite_engine/constants.hpp
Normal file
@@ -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, -89.f, 89.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
|
||||||
Reference in New Issue
Block a user