Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Filters

Filters are cheaper to create, but slower to iterate than flecs::query. More...

Collaboration diagram for Filters:

Classes

struct  flecs::filter_builder< Components >
 Filter builder. More...
 
struct  flecs::filter_builder_i< Base, Components >
 Filter builder interface. More...
 
struct  flecs::filter< Components >
 
struct  flecs::term_id_builder_i< Base >
 Term identifier builder. More...
 
struct  flecs::term_builder_i< Base >
 Term builder interface. More...
 
struct  flecs::term
 Class that describes a term. More...
 
template<typename... Comps, typename... Args>
flecs::filter< Comps... > flecs::world::filter (Args &&... args) const
 Create a filter.
 
template<typename... Comps, typename... Args>
flecs::filter_builder< Comps... > filter_builder (Args &&... args) const
 Create a filter builder.
 
template<typename Func >
void each (Func &&func) const
 Iterate over all entities with components in argument list of function.
 
template<typename T , typename Func >
void each (Func &&func) const
 Iterate over all entities with provided component.
 
template<typename Func >
void each (flecs::id_t term_id, Func &&func) const
 Iterate over all entities with provided (component) id.
 
template<typename... Args>
flecs::term flecs::world::term (Args &&... args) const
 Create a term.
 
template<typename T >
flecs::term term () const
 Create a term for a (component) type.
 
template<typename First , typename Second >
flecs::term term () const
 Create a term for a pair.
 

Detailed Description

Filters are cheaper to create, but slower to iterate than flecs::query.

Function Documentation

◆ each() [1/2]

template<typename Func >
void each ( Func && func) const
related

Iterate over all entities with components in argument list of function.

The function parameter must match the following signature:

void(*)(T&, U&, ...)

or:

void(*)(flecs::entity, T&, U&, ...)
Entity.
Definition entity.hpp:30

◆ each() [2/2]

template<typename T , typename Func >
void each ( Func && func) const
related

Iterate over all entities with provided component.

The function parameter must match the following signature:

void(*)(T&)

or:

void(*)(flecs::entity, T&)

◆ filter()

template<typename... Comps, typename... Args>
flecs::filter< Comps... > filter ( Args &&... args) const

Create a filter.

See also
ecs_filter_init

◆ filter_builder()

template<typename... Comps, typename... Args>
flecs::filter_builder< Comps... > filter_builder ( Args &&... args) const
related

Create a filter builder.

See also
ecs_filter_init