|
Porytiles
|
Metadata that maps PackableTile IDs to shape group membership for sharing-aware packing. More...
#include <shape_group_metadata.hpp>
Public Attributes | |
| std::map< PackableTile::Id, std::size_t > | tile_id_to_group |
| Maps PackableTile::Id to its shape group index. | |
| std::vector< std::vector< PackableTile::Id > > | group_members |
| For each group, the list of PackableTile::Ids that belong to it. | |
Metadata that maps PackableTile IDs to shape group membership for sharing-aware packing.
ShapeGroupMetadata is built from the output of analyze_shape_groups() and a parallel ID vector that maps combined tile indices back to PackableTile::Id values. Strategies use this metadata to detect when a candidate palette already contains a sibling tile from the same shape group, enabling sharing-aware cost penalties.
This struct is intended to be stored as an optional field in PackingInput. When absent, strategies behave identically to their non-sharing-aware versions.
Definition at line 24 of file shape_group_metadata.hpp.
| std::vector<std::vector<PackableTile::Id> > porytiles::ShapeGroupMetadata::group_members |
For each group, the list of PackableTile::Ids that belong to it.
Indexed by group index. Each inner vector has 2+ entries (groups with fewer than 2 members are not included).
Definition at line 42 of file shape_group_metadata.hpp.
| std::map<PackableTile::Id, std::size_t> porytiles::ShapeGroupMetadata::tile_id_to_group |
Maps PackableTile::Id to its shape group index.
Currently only RegularId tiles participate in shape groups. Anim tiles are excluded because they occupy DMA-overwritten VRAM slots and cannot share with regular tiles. Multi-palette animation support will re-enter anim tiles via user-provided color variants in a future feature. Only tiles that belong to a shape group with 2+ members (i.e., tiles that have sharing potential) have entries in this map.
Definition at line 34 of file shape_group_metadata.hpp.