diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-12 18:05:18 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-12 18:05:18 +1100 |
| commit | 1cc08c51eb4b0f95c30c0a98ad1fc5ad3459b2df (patch) | |
| tree | 222dfcd07a1e40716127a347bbfd7119ce3d0984 /src/client/math.hh | |
initial commit
Diffstat (limited to 'src/client/math.hh')
| -rw-r--r-- | src/client/math.hh | 22 |
1 files changed, 22 insertions, 0 deletions
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 <optional> + +#include <glm/glm.hpp> + +#include "client/render/camera.hh" + +namespace client { +namespace math { + +std::optional<glm::vec2> 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 |
