aboutsummaryrefslogtreecommitdiff
path: root/src/client/math.hh
blob: da89d252283c597b1484cf5b224f911294baf1ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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