Flatten src into model, edit and ui, with .h headers

Resources and utilities sit directly in src. The ImGui windows, wizards, popups and helpers are in ui.
Headers that would shadow system ones are renamed: math_util, timestamp, subprocess, localization.
Includes are written from src.
This commit is contained in:
shweet committed 2026-11-22 17:12:05 -05:00
1 parent a515267e26
commit 7fb2c607c2
175 files changed
+537 -537

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <array>
#include <glm/glm/mat4x4.hpp>
namespace anm2ed::util::math
{
template <typename T> constexpr T percent_to_unit(T value) { return value / 100.0f; }
template <typename T> constexpr T unit_to_percent(T value) { return value * 100.0f; }
constexpr float uint8_to_float(int value) { return (float)(value / 255.0f); }
constexpr int float_to_uint8(float value) { return (int)(value * 255); }
constexpr std::array<float, 16> uv_vertices_get(glm::vec2 uvMin, glm::vec2 uvMax)
{
return {0.0f, 0.0f, uvMin.x, uvMin.y, 1.0f, 0.0f, uvMax.x, uvMin.y,
1.0f, 1.0f, uvMax.x, uvMax.y, 0.0f, 1.0f, uvMin.x, uvMax.y};
}
int float_decimals_needed(float);
const char* float_format_get(float);
const char* vec2_format_get(const glm::vec2&);
glm::mat4 quad_model_get(glm::vec2 = {}, glm::vec2 = {}, glm::vec2 = {}, glm::vec2 = glm::vec2(1.0f), float = {},
glm::vec2 = {});
glm::mat4 quad_model_parent_get(glm::vec2 = {}, glm::vec2 = {}, glm::vec2 = glm::vec2(1.0f), float = {},
glm::vec2 = {});
float random();
float random_in_range(float min, float max);
void random_seed_set();
}