Split off lots of editor functionality into new abstract INodeEditor class and viewport functionality into CBasicViewport class; added viewport subclasses and undo/redo system in the World Editor

This commit is contained in:
parax0
2015-09-01 13:05:48 -04:00
parent 281a605586
commit dbf002d12a
45 changed files with 1760 additions and 908 deletions

View File

@@ -1,4 +1,6 @@
#include "Math.h"
#include <Common/CMatrix4f.h>
#include <gtc/matrix_transform.hpp>
namespace Math
{
@@ -336,4 +338,10 @@ std::pair<bool,float> RayTriangleIntersection(const CRay& Ray,
return std::pair<bool,float>(true, t);
}
CMatrix4f PerspectiveMatrix(float fov, float aspect, float near, float far)
{
// todo: don't use glm
return CMatrix4f::FromGlmMat4(glm::perspective(fov, aspect, near, far)).Transpose();
}
} // End namespace