add screen to world to camera

This commit is contained in:
2022-02-01 15:24:16 +01:00
parent e64c68d942
commit 6aa7e3899e
2 changed files with 17 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ namespace MM::OpenGL {
// call updateView beforehand, does not cache
std::array<glm::vec4, 6> getFrustumPlanes(void) const;
// uses getViewProjection(), does not cache
// screen has to be in NDC, xy -> [-1, 1]
glm::vec4 screenToWorld(const glm::vec4& screen) const;
};
// test if aabb in frustum