Function CE::Assets::Tilesets::Selection::select(const Rule&, const Sampler&, const Options&)

Function Documentation

Result CE::Assets::Tilesets::Selection::select(const Rule &rule, const Sampler &sampler, const Options &options)

Declaration: [[nodiscard]]

Visit the stored Wang or bitmask rule without changing its semantics.

See also

Detailed guide

Parameters:
  • rule – Stable CPU rule metadata; cells are not checked against an image/grid here.

  • sampler – Nonempty synchronous callback, never retained; keep sampled world data stable.

  • options – Valid fallback/diagonal choices and deterministic location seed.

Throws:

CE::Exceptions::invalid_args – For invalid options, sampler or relevant rule metadata. Sampler/allocation exceptions propagate. Unknown Wang terrain IDs use the unknown policy. No world storage, native resource, grid validation or animation lookup occurs; apply an owning tileset’s cell_at() separately when needed.

Returns:

Selected original cell, MissingRule for an absent/empty candidate set, or IncompleteNeighborhood for unresolved required sites.