Added Transform.h that holds all the AbsoluteTransformation functions. Camera now working better with scenes. Changed Modeljob Matrix to only hold the model matrix instad of all matrix info

This commit is contained in:
viktorljung
2016-01-14 11:12:02 +01:00
parent 0f17f9a888
commit e7f02f14a0
16 changed files with 135 additions and 133 deletions
+1 -8
View File
@@ -13,6 +13,7 @@
#include "Camera.h"
#include "ModelJob.h"
#include "Renderer.h"
#include "../Core/Transform.h"
class RenderSystem : public ImpureSystem
{
@@ -21,12 +22,6 @@ public:
virtual void Update(World* world, double dt) override;
static glm::vec3 AbsolutePosition(World* world, EntityID entity);
static glm::quat AbsoluteOrientation(World* world, EntityID entity);
static glm::vec3 AbsoluteScale(World* world, EntityID entity);
private:
World* m_World = nullptr;
const IRenderer* m_Renderer = nullptr;
@@ -44,13 +39,11 @@ private:
void switchCamera(EntityID entity);
void initialize();
void updateCamera(World* world, double dt);
void updateProjectionMatrix(ComponentWrapper& cameraComponent);
glm::mat4 m_ViewMatrix;
glm::mat4 m_ProjectionMatrix;
glm::mat4 ModelMatrix(EntityID entity, World* world);
void fillModels(std::list<std::shared_ptr<RenderJob>>& jobs, World* world);
EventRelay<RenderSystem, Events::InputCommand> m_EInputCommand;