Crudely caching model matrix calculations, work in progress.
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
#include "../GLM.h"
|
||||
#include "World.h"
|
||||
#include "EntityWrapper.h"
|
||||
#include "System.h"
|
||||
|
||||
namespace Transform
|
||||
{
|
||||
|
||||
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,16 @@ glm::mat4 ModelMatrix(EntityWrapper entity);
|
||||
glm::mat4 ModelMatrix(EntityID entity, World* world);
|
||||
glm::vec3 TransformPoint(const glm::vec3& point, const glm::mat4& matrix);
|
||||
|
||||
class ClearCache : public ImpureSystem
|
||||
{
|
||||
public:
|
||||
ClearCache(SystemParams params)
|
||||
: System(params)
|
||||
{ }
|
||||
|
||||
virtual void Update(double dt) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user