From 1cc08c51eb4b0f95c30c0a98ad1fc5ad3459b2df Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Wed, 12 Feb 2025 18:05:18 +1100 Subject: initial commit --- src/client/math.hh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/client/math.hh (limited to 'src/client/math.hh') diff --git a/src/client/math.hh b/src/client/math.hh new file mode 100644 index 0000000..da89d25 --- /dev/null +++ b/src/client/math.hh @@ -0,0 +1,22 @@ +#ifndef CLIENT_MATH_HH_ +#define CLIENT_MATH_HH_ + +#include + +#include + +#include "client/render/camera.hh" + +namespace client { +namespace math { + +std::optional world_to_screen( + const glm::vec3& pos, + const glm::mat4& matrix = client::render::camera::get_proj() * + client::render::camera::get_view(), + const glm::vec2& window = client::render::get_window_size()) noexcept; + +} // namespace math +} // namespace client + +#endif -- cgit v1.2.3