Perfectly working abs pos caching using dirty flags! :D

This commit is contained in:
2016-03-12 03:29:41 +01:00
parent ee5c13d463
commit 5baac926aa
6 changed files with 101 additions and 96 deletions
-1
View File
@@ -56,7 +56,6 @@ struct ComponentWrapper
void SetAllDirty(const std::string& fieldName, bool dirty = true)
{
LOG_DEBUG("DIRTY: %s %s", Info.Name.c_str(), fieldName.c_str());
for (auto& kv : *DirtyBitField) {
SetDirty(kv.first, fieldName);
}
+6 -1
View File
@@ -8,7 +8,7 @@
namespace Transform
{
glm::mat4 AbsoluteTransformation(EntityWrapper entity);
//glm::mat4 AbsoluteTransformation(EntityWrapper entity);
glm::vec3 AbsolutePosition(EntityWrapper entity);
glm::vec3 AbsolutePosition(World* world, EntityID entity);
glm::vec3 AbsoluteOrientationEuler(EntityWrapper entity);
@@ -20,6 +20,11 @@ glm::mat4 ModelMatrix(EntityWrapper entity);
glm::mat4 ModelMatrix(EntityID entity, World* world);
glm::vec3 TransformPoint(const glm::vec3& point, const glm::mat4& matrix);
extern int RecalculatedPositions;
extern int RecalculatedOrientations;
extern int RecalculatedScales;
}
#endif