17 int32_t stage_current,
23 , m_delta_time(delta_time)
27 , m_stage_current(stage_current)
28 , m_stage_count(stage_count) { }
41 m_stage = stage.
c_ptr();
48 m_stage, m_id, m_stage_current, m_stage_count, m_delta_time,
52 m_stage, m_id, m_delta_time, m_offset, m_limit, m_param);
63 int32_t m_stage_current;
64 int32_t m_stage_count;
110 int32_t stage_current,
113 void *param =
nullptr)
const
116 m_world, m_id, stage_current, stage_count, delta_time, param);
120# include "../timer/system_mixin.inl"
130template <
typename... Comps,
typename... Args>
131inline system_builder<Comps...>
world::system(Args &&... args)
const {
138 world.
component<TickSource>(
"flecs::system::TickSource");
FLECS_API ecs_entity_t ecs_system_init(ecs_world_t *world, const ecs_system_desc_t *desc)
Create a system.
FLECS_API ecs_query_t * ecs_system_get_query(const ecs_world_t *world, ecs_entity_t system)
Get the query object for a system.
FLECS_API void * ecs_system_get_ctx(const ecs_world_t *world, ecs_entity_t system)
Get system context.
FLECS_API ecs_entity_t ecs_run_worker(ecs_world_t *world, ecs_entity_t system, int32_t stage_current, int32_t stage_count, ecs_ftime_t delta_time, void *param)
Same as ecs_run, but subdivides entities across number of provided stages.
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)
Run system with offset/limit and type filter.
flecs::component< T > component(Args &&... args) const
Find or register component.
#define ecs_ftime_t
Customizable precision for scalar time values.
ecs_term_t * terms_buffer
For filters with lots of terms an outside array can be provided.
bool instanced
When true, terms returned by an iterator may either contain 1 or N elements, where terms with N eleme...
ecs_filter_desc_t filter
Filter for the query.
Use with ecs_system_init.
void * ctx
Context to be passed to callback (as ecs_iter_t::param)
ecs_entity_t entity
Existing entity to associate with system (optional)
ecs_query_desc_t query
System query parameters.
world_t * c_ptr() const
Obtain pointer to C world object.
flecs::system system(flecs::entity e) const
Upcast entity to a system.