math.hpp added

This commit is contained in:
2026-09-24 23:00:02 -07:00
parent ae8db07d6f
commit b5d28ce3eb
10 changed files with 34 additions and 35 deletions
+1 -4
View File
@@ -7,6 +7,7 @@
#include <sophia/canvas.hpp>
#include <sophia/console/console_command_registry.hpp>
#include <sophia/frame_info.hpp>
#include <sophia/math.hpp>
#include <sophia/resource_registry_ref.hpp>
#include <sophia/scene_registry.hpp>
#include <sophia/types.hpp>
@@ -16,10 +17,6 @@
#include <string>
#include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia {
class Application {
+1 -3
View File
@@ -1,9 +1,7 @@
#pragma once
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <sophia/math.hpp>
namespace sophia {
+1 -4
View File
@@ -2,12 +2,9 @@
#include <memory>
#include <sophia/frame_info.hpp>
#include <sophia/math.hpp>
#include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia {
class Application;
+3 -6
View File
@@ -1,20 +1,17 @@
#pragma once
#include <glm/gtc/matrix_transform.hpp>
#include <iostream>
#include <ostream>
#include <sophia/handles.hpp>
#include <sophia/math.hpp>
#include <string>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
namespace sophia {
struct TagComponent {
std::string tag; // entt::hashed_string ?
uint32_t mask = 0;
};
struct TransformComponent {
+1 -4
View File
@@ -1,12 +1,9 @@
#pragma once
#include <sophia/camera_2d.hpp>
#include <sophia/math.hpp>
#include <sophia/types.hpp>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia {
struct FrameInfo {
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
namespace sophia {
using vec2 = glm::vec2;
using vec3 = glm::vec3;
using vec4 = glm::vec4;
using ivec2 = glm::ivec2;
using uvec2 = glm::uvec2;
using mat3 = glm::mat3;
using mat4 = glm::mat4;
using quat = glm::quat;
} // namespace sophia
@@ -2,16 +2,13 @@
#include <sophia/canvas.hpp>
#include <sophia/handles.hpp>
#include <sophia/math.hpp>
#include <sophia/types.hpp>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace sophia {
class ResourceRegistry;