EntityWrapper to uniquely identify entities and make using them a little easier

This commit is contained in:
2016-01-14 15:43:19 +01:00
parent 28392def79
commit d34470256b
20 changed files with 106 additions and 72 deletions
@@ -15,7 +15,7 @@ public:
{ }
virtual void Update(World* world, double dt) override;
virtual void UpdateComponent(World* world, ComponentWrapper& component, double dt) override;
virtual void UpdateComponent(World* world, EntityWrapper& entity, ComponentWrapper& component, double dt) override;
private:
Octree* m_Octree;
+2 -1
View File
@@ -13,6 +13,7 @@
#include "../Rendering/RawModel.h"
#include "../Rendering/RenderQueueFactory.h"
#include "../Core/Entity.h"
#include "../Core/EntityWrapper.h"
class World;
struct ComponentWrapper;
@@ -59,7 +60,7 @@ bool AABBVsAABB(const AABB& a, const AABB& b, glm::vec3& minimumTranslation);
bool IsSameBoxProbably(const AABB& first, const AABB& second, const float epsilon = 0.0001f);
// Calculates an absolute AABB from an entity AABB component
boost::optional<AABB> EntityAbsoluteAABB(World* world, EntityID entity);
boost::optional<AABB> EntityAbsoluteAABB(EntityWrapper& entity);
}
+1 -1
View File
@@ -23,7 +23,7 @@ public:
EVENT_SUBSCRIBE_MEMBER(m_EKeyUp, &CollisionSystem::OnKeyUp);
}
virtual void UpdateComponent(World* world, ComponentWrapper& cAABB, double dt) override;
virtual void UpdateComponent(World* world, EntityWrapper& entity, ComponentWrapper& component, double dt) override;
private:
Octree* m_Octree;
+1 -1
View File
@@ -20,7 +20,7 @@ public:
, m_Octree(octree)
{ }
virtual void UpdateComponent(World* world, ComponentWrapper& collision, double dt) override;
virtual void UpdateComponent(World* world, EntityWrapper& entity, ComponentWrapper& component, double dt) override;
private:
Octree* m_Octree;