28#include <utility/ressource_provider.hpp>
30#include <utility/cache.hpp>
32#include <utility/graphic/model.hpp>
34#include <utility/engine.hpp>
36#include "guillaume/ecs/system_filler.hpp"
38#include "guillaume/components/bound.hpp"
39#include "guillaume/components/mesh.hpp"
40#include "guillaume/components/transform.hpp"
76 return !(*
this == other);
116 public utility::Cache<MeasureMeshCacheKey, utility::graphic::SizeF>,
118 components::Transform>
121 std::shared_ptr<utility::RessourceProvider>
123 utility::Engine &_engine;
135 std::shared_ptr<utility::RessourceProvider> ressourceProvider,
136 utility::Engine &engine);
std::size_t Identifier
The key under which an entity's components are stored. Systems and components refer to entities by th...
The base class to derive a system from: a System whose signature is the list of component types given...
virtual void update(const ecs::Entity::Identifier &entityIdentifier) override
Write the size of one model into its components::Bound, loading and measuring the file when it is not...
void prepare(void) override
Does nothing: the system needs no per-frame setup.
~MeasureMesh(void)
Destroy the system and its cache.
void cleanup(void) override
Does nothing: the cache is kept from one frame to the next.
MeasureMesh(std::shared_ptr< utility::RessourceProvider > ressourceProvider, utility::Engine &engine)
Create the system in the Measure phase, with an empty cache.
Rules. Every class here runs each frame on the entities that have the components it declares.
Key of the size cache of MeasureMesh: the path of the model file.
bool operator==(const MeasureMeshCacheKey &other) const
Compare two keys.
bool operator!=(const MeasureMeshCacheKey &other) const
Negation of operator==.
std::string meshPath
Path of the model file that was measured.
bool operator<(const MeasureMeshCacheKey &other) const
Order two keys by path.