#include <include/flecs.h> FLECS_API void ecs_iter_poly(const ecs_world_t *world, const ecs_poly_t *poly, ecs_iter_t *iter, ecs_term_t *filter)
Create iterator from poly object. The provided poly object must have the iterable mixin. If an object is provided that does not have the mixin, the function will assert.
When a filter is provided, an array of two iterators must be passed to the function. This allows the mixin implementation to create a chained iterator when necessary, which requires two iterator objects.
If a filter is provided, the first element in the array of two iterators is the one that should be iterated. The mixin implementation may or may not set the second element, depending on whether an iterator chain is required.
Additionally, when a filter is provided the returned iterator will be for a single term with the provided filter id. If the iterator is chained, the previous iterator in the chain can be accessed through it->chain_it.
world- The world or stage for which to create the iterator.
poly- The poly object from which to create the iterator.
iter- The iterator (out, ecs_iter_t when filter is set).
filter- Optional term used for filtering the results.