EntityWrapper to uniquely identify entities and make using them a little easier
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user