Basic collisions using Octree. Seems buggy over octree boundaries.

This commit is contained in:
2016-01-13 15:34:43 +01:00
parent 8ed4ba1219
commit d6ef527f25
33 changed files with 290 additions and 267 deletions
+11 -6
View File
@@ -4,16 +4,19 @@
#include <GLFW/glfw3.h>
#include <glm/common.hpp>
#include "Common.h"
#include "Core/System.h"
#include "Core/EventBroker.h"
#include "Core/EKeyUp.h"
#include "../Common.h"
#include "../Core/System.h"
#include "../Core/EventBroker.h"
#include "../Core/EKeyUp.h"
#include "../Core/Octree.h"
class CollisionSystem : public PureSystem
{
public:
CollisionSystem(EventBroker* eventBroker)
: PureSystem(eventBroker, "AABB")
CollisionSystem(EventBroker* eventBroker, Octree* octree)
: System(eventBroker)
, PureSystem("AABB")
, m_Octree(octree)
, zPress(false)
{
//TODO: Debug stuff, remove later.
@@ -23,7 +26,9 @@ public:
virtual void UpdateComponent(World* world, ComponentWrapper& cAABB, double dt) override;
private:
Octree* m_Octree;
bool zPress;
EventRelay<CollisionSystem, Events::KeyUp> m_EKeyUp;
bool OnKeyUp(const Events::KeyUp &event);
};