Fixed so calculating absolute positions, etc. works. Sets the field of all children to dirty if a transform field is altered. Will also set Position to dirty if Scale or Orientation is altered.

Moved some methods in ComponentWrapper to a .cpp.
This commit is contained in:
William Moberg
2016-03-12 17:51:03 +01:00
parent 24bb05ec67
commit 36b84f7cc3
7 changed files with 74 additions and 57 deletions
+3 -1
View File
@@ -43,9 +43,10 @@ public:
typedef ComponentWrapper* pointer;
typedef ComponentWrapper& reference;
ComponentPool(const ::ComponentInfo& ci)
ComponentPool(const ::ComponentInfo& ci, World* world)
: m_ComponentInfo(ci)
, m_Pool(ci.Meta->Allocation, ci.GetHeaderSize() + ci.Stride)
, m_World(world)
{ }
~ComponentPool();
ComponentPool(const ComponentPool& other);
@@ -82,6 +83,7 @@ private:
MemoryPool<char> m_Pool;
std::unordered_map<EntityID, char*> m_EntityToComponent;
DirtySet m_DirtySet;
World* m_World;
};
#endif