Camera Switch event now working, Camera models Rotation still bugged

This commit is contained in:
viktorljung
2015-12-15 15:29:19 +01:00
parent d9ea0192d1
commit fa66e9ff47
16 changed files with 164 additions and 79 deletions
+18 -1
View File
@@ -8,6 +8,8 @@
#include "../Core/ResourceManager.h"
#include "ESetCamera.h"
#include "Model.h"
#include "../Core/EKeyDown.h"
#include "../Input/EInputCommand.h"
class RenderSystem : public ImpureSystem
{
@@ -20,14 +22,29 @@ public:
static glm::quat AbsoluteOrientation(World* world, EntityID entity);
static glm::vec3 AbsoluteScale(World* world, EntityID entity);
private:
RenderQueueCollection* m_RenderQueues;
bool m_SwitchCamera = false;
EventRelay<RenderSystem, Events::SetCamera> m_ESetCamera;
bool OnSetCamera(const Events::SetCamera &event);
EntityID m_CurrentCamera = -1;
void SwitchCamera(EntityID entity);
void Initialize();
void UpdateViewMatrix(ComponentWrapper& cameraTransform);
void UpdateProjectionMatrix(ComponentWrapper& cameraComponent);
glm::mat4 m_ViewMatrix;
glm::mat4 m_ProjectionMatrix;
glm::mat4 ModelMatrix(World* world, EntityID entity);
void FillModels(World* world, RenderQueue* renderQueue);
EventRelay<RenderSystem, Events::InputCommand> m_EInputCommand;
bool OnInputCommand(const Events::InputCommand& e);
};
#endif