Camera::WorldToScreen helper function

This commit is contained in:
2016-01-21 10:29:36 +01:00
parent 8854794cbc
commit 4aa9100c69
2 changed files with 16 additions and 1 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
#define Camera_h__
#include "../GLM.h"
#include "../Core/Util/Rectangle.h"
class Camera
{
@@ -32,7 +33,6 @@ public:
glm::mat4 ViewMatrix() const { return m_ViewMatrix; }
void SetViewMatrix(glm::mat4 val);
float AspectRatio() const { return m_AspectRatio; }
void SetAspectRatio(float val);
@@ -48,6 +48,8 @@ public:
void UpdateViewMatrix();
void UpdateProjectionMatrix();
glm::vec2 WorldToScreen(glm::vec3 worldCoord, Rectangle resolution);
private:
glm::vec3 m_Position;