27#include <utility/engine.hpp>
28#include <utility/graphic/pose.hpp>
30#include "guillaume/ecs/system_filler.hpp"
32#include "guillaume/components/bound.hpp"
33#include "guillaume/components/clip.hpp"
34#include "guillaume/components/transform.hpp"
70 utility::Engine &_engine;
78 Clip(utility::Engine &engine);
115 computeRect(
const utility::graphic::PoseF &pose,
float width,
116 float height,
float margin);
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...
void update(const ecs::Entity::Identifier &entityIdentifier) override
Resolve the clip rectangle of one entity, store it in its components::Clip and make it the engine sci...
static components::Clip::Rect computeRect(const utility::graphic::PoseF &pose, float width, float height, float margin)
Compute a clip rectangle from the pose and size of a bound.
Clip(utility::Engine &engine)
Create the system in the Layout phase.
void prepare(void) override
Clear the engine scissor. Called once per frame before the entities are visited, so a frame without a...
~Clip(void) override=default
Destroy the system. The engine scissor is left as it is.
Rules. Every class here runs each frame on the entities that have the components it declares.
The clip rectangle, in the same coordinates as the position of a components::Transform.