Function ecs_run_w_filter

Synopsis

#include <include/flecs/addons/system.h>

FLECS_API ecs_entity_t ecs_run_w_filter(ecs_world_t *world, ecs_entity_t system, ecs_ftime_t delta_time, int32_t offset, int32_t limit, void *param)

Description

Run system with offset/limit and type filter. This operation is the same as ecs_run, but filters the entities that will be iterated by the system.

Entities can be filtered in two ways. Offset and limit control the range of entities that is iterated over. The range is applied to all entities matched with the system, thus may cover multiple archetypes.

The type filter controls which entity types the system will evaluate. Only types that contain all components in the type filter will be iterated over. A type filter is only evaluated once per table, which makes filtering cheap if the number of entities is large and the number of tables is small, but not as cheap as filtering in the system signature.

Parameters

world - The world.

system - The system to invoke.

delta_time - The time passed since the last system invocation.

param - A user-defined parameter to pass to the system.

Returns
handle to last evaluated entity if system was interrupted.

Source

Line 203 in include/flecs/addons/system.h.