diff options
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 |
