28#include "guillaume/ecs/system_filler.hpp"
30#include "guillaume/components/bound.hpp"
31#include "guillaume/components/layout.hpp"
32#include "guillaume/components/transform.hpp"
144 const std::vector<ecs::Entity::Identifier> &childIdentifiers,
145 std::uint32_t layer = 0);
171 const utility::graphic::PositionF &position,
172 const utility::graphic::OrientationF &orientation,
173 const std::uint32_t &layer);
189 static const utility::graphic::PoseF
191 const utility::graphic::OrientationF &orientation,
192 const std::uint32_t &containerLayer);
Stores every component of a scene, per component type and per entity identifier, and knows which ones...
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...
static void apply(ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &parentIdentifier, const std::vector< ecs::Entity::Identifier > &childIdentifiers, std::uint32_t layer=0)
Arrange children inside a container and size the container.
static constexpr std::uint32_t ContentLayerOffset
Number of layers added between a container and what is placed on it.
static const utility::graphic::PoseF contentLayerPose(const utility::graphic::PositionF &position, const utility::graphic::OrientationF &orientation, const std::uint32_t &containerLayer)
Compute the pose of content placed by hand on a container.
static std::uint32_t layerOf(const ecs::ComponentRegistry ®istry, const ecs::Entity::Identifier &identifier)
Get the layer of an entity: its depth in the entity tree.
~Layout(void) override=default
Destroy the system. It owns no resource.
Layout(void)
Create the system in the Layout phase.
void update(const ecs::Entity::Identifier &entityIdentifier) override
Arrange the children listed in the components::Layout of one container, using the layer of its compon...
static constexpr float LayerDepthStep
Depth of one layer: the distance a child is moved towards the viewer, against the forward axis of its...
static const utility::graphic::PoseF applyLayerToPosition(const utility::graphic::PositionF &position, const utility::graphic::OrientationF &orientation, const std::uint32_t &layer)
Move a position in front of a container.
Rules. Every class here runs each frame on the entities that have the components it declares.