mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 18:59:12 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user