35#define ecs_float_t float
42#define ecs_ftime_t ecs_float_t
53#define FLECS_NO_DEPRECATED_WARNINGS
63#if defined(FLECS_DEBUG) && defined(FLECS_NDEBUG)
64#error "invalid configuration: cannot both define FLECS_DEBUG and FLECS_NDEBUG"
66#if defined(FLECS_DEBUG) && defined(NDEBUG)
67#error "invalid configuration: cannot both define FLECS_DEBUG and NDEBUG"
74#if !defined(FLECS_DEBUG) && !defined(FLECS_NDEBUG)
141#ifndef FLECS_CUSTOM_BUILD
148#define FLECS_SNAPSHOT
154#define FLECS_PIPELINE
165#define FLECS_OS_API_IMPL
175#ifdef FLECS_LOW_FOOTPRINT
176#define FLECS_HI_COMPONENT_ID (16)
177#define FLECS_HI_ID_RECORD_ID (16)
178#define FLECS_SPARSE_PAGE_BITS (6)
179#define FLECS_ENTITY_PAGE_BITS (6)
180#define FLECS_USE_OS_ALLOC
193#ifndef FLECS_HI_COMPONENT_ID
194#define FLECS_HI_COMPONENT_ID (256)
203#ifndef FLECS_HI_ID_RECORD_ID
204#define FLECS_HI_ID_RECORD_ID (1024)
212#ifndef FLECS_SPARSE_PAGE_BITS
213#define FLECS_SPARSE_PAGE_BITS (12)
218#ifndef FLECS_ENTITY_PAGE_BITS
219#define FLECS_ENTITY_PAGE_BITS (12)
230#ifndef FLECS_ID_DESC_MAX
231#define FLECS_ID_DESC_MAX (32)
236#define FLECS_TERM_DESC_MAX (16)
240#define FLECS_EVENT_DESC_MAX (8)
244#define FLECS_VARIABLE_COUNT_MAX (64)
248#define FLECS_QUERY_SCOPE_NESTING_MAX (8)
252#include "flecs/private/api_defines.h"
253#include "flecs/private/vec.h"
254#include "flecs/private/sparse.h"
255#include "flecs/private/block_allocator.h"
256#include "flecs/private/map.h"
257#include "flecs/private/allocator.h"
258#include "flecs/private/strbuf.h"
413typedef struct ecs_iter_t ecs_iter_t;
568typedef void* (*ecs_group_create_action_t)(
574typedef void (*ecs_group_delete_action_t)(
623typedef void (*ecs_poly_dtor_t)(
669#define EcsSelf (1u << 1)
670#define EcsUp (1u << 2)
671#define EcsDown (1u << 3)
672#define EcsTraverseAll (1u << 4)
673#define EcsCascade (1u << 5)
674#define EcsParent (1u << 6)
675#define EcsIsVariable (1u << 7)
676#define EcsIsEntity (1u << 8)
677#define EcsIsName (1u << 9)
678#define EcsFilter (1u << 10)
679#define EcsTraverseFlags (EcsUp|EcsDown|EcsTraverseAll|EcsSelf|EcsCascade|EcsParent)
683#define EcsTermMatchAny (1u << 0)
684#define EcsTermMatchAnySrc (1u << 1)
685#define EcsTermSrcFirstEq (1u << 2)
686#define EcsTermSrcSecondEq (1u << 3)
687#define EcsTermTransitive (1u << 4)
688#define EcsTermReflexive (1u << 5)
689#define EcsTermIdInherited (1u << 6)
692#define EcsTermMatchDisabled (1u << 7)
693#define EcsTermMatchPrefab (1u << 8)
789 int32_t last_event_id_storage;
801 ecs_poly_dtor_t dtor;
867#include "flecs/private/api_types.h"
868#include "flecs/private/api_support.h"
869#include "flecs/private/vec.h"
870#include "flecs/private/hashmap.h"
1284#ifdef FLECS_DEPRECATED
1333FLECS_API
extern const ecs_entity_t ecs_id(EcsPipelineQuery);
1549FLECS_API
extern const ecs_entity_t ecs_id(EcsPipeline);
1565#define EcsLastInternalComponentId (ecs_id(EcsPoly))
1569#define EcsFirstUserComponentId (8)
1573#define EcsFirstUserEntityId (FLECS_HI_COMPONENT_ID + 128)
2110 int32_t entity_count);
2172 ecs_flags32_t flags);
2211 uint16_t clear_generation,
2212 uint16_t delete_generation,
2213 int32_t min_id_count,
2214 double time_budget_seconds);
2249#define ecs_poly_is(object, type)\
2250 ecs_poly_is_(object, type##_magic)
3358 const char *symbol);
3449 bool lookup_as_path,
3477 const char *prefix);
3518 const char *prefix);
3541 const char *prefix);
3582 const char *prefix);
3902 const ecs_iter_t *it,
4177 const ecs_iter_t *it,
4443 const ecs_iter_t *it);
4834 const ecs_table_range_t *range);
4918 const ecs_iter_t *it);
4937 const ecs_iter_t *it,
4973 const ecs_iter_t *it,
5012 const ecs_iter_t *it,
5026 const ecs_iter_t *it,
5041 const ecs_iter_t *it,
5052 const ecs_iter_t *it,
5063 const ecs_iter_t *it,
5076 const ecs_iter_t *it,
5088 const ecs_iter_t *it,
5100 const ecs_iter_t *it,
5118 const ecs_iter_t *it,
5380 ecs_flags32_t flags);
5543 ecs_flags32_t flags,
5746#include "flecs/private/addons.h"
The deprecated addon contains deprecated operations.
Extends the core API with convenience macros for C applications.
ecs_entity_t ecs_set_with(ecs_world_t *world, ecs_id_t id)
Set current with id.
void ecs_override_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Add override for (component) id.
void ecs_add_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Add a (component) id to an entity.
void ecs_remove_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Remove a (component) id from an entity.
void ecs_clear(ecs_world_t *world, ecs_entity_t entity)
Clear all components.
ecs_id_t ecs_get_with(const ecs_world_t *world)
Get current with id.
void ecs_remove_all(ecs_world_t *world, ecs_id_t id)
Remove all instances of the specified (component) id.
ecs_iterable_t EcsIterable
Component for iterable entities.
bool ecs_defer_end(ecs_world_t *world)
End block of operations to defer.
void ecs_defer_resume(ecs_world_t *world)
Resume deferring.
bool ecs_defer_begin(ecs_world_t *world)
Defer operations until end of frame.
void ecs_defer_suspend(ecs_world_t *world)
Suspend deferring but do not flush queue.
bool ecs_is_deferred(const ecs_world_t *world)
Test if deferring is enabled for current stage.
bool ecs_stage_is_async(ecs_world_t *stage)
Test whether provided stage is asynchronous.
void ecs_merge(ecs_world_t *world)
Merge world or stage.
void ecs_async_stage_free(ecs_world_t *stage)
Free asynchronous stage.
void ecs_set_automerge(ecs_world_t *world, bool automerge)
Enable/disable automerging for world or stage.
ecs_world_t * ecs_async_stage_new(ecs_world_t *world)
Create asynchronous stage.
bool ecs_stage_is_readonly(const ecs_world_t *world)
Test whether the current world is readonly.
int32_t ecs_get_stage_count(const ecs_world_t *world)
Get number of configured stages.
bool ecs_readonly_begin(ecs_world_t *world)
Begin readonly mode.
ecs_world_t * ecs_get_stage(const ecs_world_t *world, int32_t stage_id)
Get stage-specific world pointer.
void ecs_set_stage_count(ecs_world_t *world, int32_t stages)
Configure world to have N stages.
void ecs_readonly_end(ecs_world_t *world)
End readonly mode.
int32_t ecs_get_stage_id(const ecs_world_t *world)
Get current stage id.
const ecs_type_hooks_t * ecs_get_hooks_id(ecs_world_t *world, ecs_entity_t id)
Get hooks for component.
ecs_entity_t ecs_component_init(ecs_world_t *world, const ecs_component_desc_t *desc)
Find or create a component.
void ecs_set_hooks_id(ecs_world_t *world, ecs_entity_t id, const ecs_type_hooks_t *hooks)
Register hooks for component.
const ecs_type_info_t * ecs_get_type_info(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
struct ecs_ref_t ecs_ref_t
A ref is a fast way to fetch a component for a specific entity.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_rule_t ecs_rule_t
A rule is a query with advanced graph traversal features.
struct ecs_table_record_t ecs_table_record_t
Information about where in a table a specific (component) id is stored.
struct ecs_id_record_t ecs_id_record_t
Information about a (component) id, such as type info and tables with the id.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
struct ecs_mixins_t ecs_mixins_t
Type that stores poly mixins.
uint64_t ecs_id_t
Ids are the things that can be added to an entity.
struct ecs_query_t ecs_query_t
A query that caches its results.
struct ecs_observable_t ecs_observable_t
An observable produces events that can be listened for by an observer.
struct ecs_record_t ecs_record_t
Information about an entity, like its table and row.
struct ecs_table_t ecs_table_t
A table stores entities and components for a specific type.
void ecs_poly_t
A poly object.
ecs_entity_t ecs_new_low_id(ecs_world_t *world)
Create new low id.
ecs_entity_t ecs_new_w_id(ecs_world_t *world, ecs_id_t id)
Create new entity with (component) id.
ecs_entity_t ecs_new_id(ecs_world_t *world)
Create new entity id.
const ecs_entity_t * ecs_bulk_init(ecs_world_t *world, const ecs_bulk_desc_t *desc)
Bulk create/populate new entities.
ecs_entity_t ecs_clone(ecs_world_t *world, ecs_entity_t dst, ecs_entity_t src, bool copy_value)
Clone an entity This operation clones the components of one entity into another entity.
const ecs_entity_t * ecs_bulk_new_w_id(ecs_world_t *world, ecs_id_t id, int32_t count)
Create N new entities.
ecs_entity_t ecs_entity_init(ecs_world_t *world, const ecs_entity_desc_t *desc)
Find or create an entity.
void ecs_delete_with(ecs_world_t *world, ecs_id_t id)
Delete all entities with the specified id.
void ecs_delete(ecs_world_t *world, ecs_entity_t entity)
Delete an entity.
ecs_entity_t ecs_new_w_table(ecs_world_t *world, ecs_table_t *table)
Create new entity in table.
bool ecs_is_enabled_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if component is enabled.
void ecs_enable_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, bool enable)
Enable or disable component.
void ecs_enable(ecs_world_t *world, ecs_entity_t entity, bool enabled)
Enable or disable entity.
char * ecs_entity_str(const ecs_world_t *world, ecs_entity_t entity)
Convert entity to string.
ecs_entity_t ecs_get_target(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel, int32_t index)
Get the target of a relationship.
ecs_entity_t ecs_get_parent(const ecs_world_t *world, ecs_entity_t entity)
Get parent (target of ChildOf relationship) for entity.
const ecs_type_t * ecs_get_type(const ecs_world_t *world, ecs_entity_t entity)
Get the type of an entity.
bool ecs_has_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if an entity has an id.
char * ecs_type_str(const ecs_world_t *world, const ecs_type_t *type)
Convert type to string.
char * ecs_table_str(const ecs_world_t *world, const ecs_table_t *table)
Convert table to string.
int32_t ecs_count_id(const ecs_world_t *world, ecs_id_t entity)
Count entities that have the specified id.
void ecs_flatten(ecs_world_t *world, ecs_id_t pair, const ecs_flatten_desc_t *desc)
Recursively flatten relationship for target entity (experimental).
bool ecs_owns_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if an entity owns an id.
int32_t ecs_get_depth(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel)
Return depth for entity in tree for the specified relationship.
ecs_entity_t ecs_get_target_for_id(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel, ecs_id_t id)
Get the target of a relationship for a given id.
ecs_table_t * ecs_get_table(const ecs_world_t *world, ecs_entity_t entity)
Get the table of an entity.
bool ecs_children_next(ecs_iter_t *it)
Progress a children iterator.
ecs_term_t ecs_term_copy(const ecs_term_t *src)
Copy resources of a term to another term.
ecs_iter_t ecs_term_chain_iter(const ecs_iter_t *it, ecs_term_t *term)
Return a chained term iterator.
void ecs_term_fini(ecs_term_t *term)
Free resources of term.
ecs_filter_t * ecs_filter_init(ecs_world_t *world, const ecs_filter_desc_t *desc)
Initialize filter A filter is a lightweight object that can be used to query for entities in a world.
bool ecs_filter_next(ecs_iter_t *it)
Iterate tables matched by filter.
ecs_iter_t ecs_filter_iter(const ecs_world_t *world, const ecs_filter_t *filter)
Return a filter iterator.
char * ecs_term_str(const ecs_world_t *world, const ecs_term_t *term)
Convert term to string expression.
int ecs_filter_finalize(const ecs_world_t *world, ecs_filter_t *filter)
Finalize filter.
char * ecs_filter_str(const ecs_world_t *world, const ecs_filter_t *filter)
Convert filter to string expression.
void ecs_filter_fini(ecs_filter_t *filter)
Deinitialize filter.
bool ecs_filter_next_instanced(ecs_iter_t *it)
Same as ecs_filter_next, but always instanced.
bool ecs_term_next(ecs_iter_t *it)
Progress a term iterator.
int32_t ecs_filter_pivot_term(const ecs_world_t *world, const ecs_filter_t *filter)
Get pivot term for filter.
ecs_iter_t ecs_children(const ecs_world_t *world, ecs_entity_t parent)
Iterator for a parent's children.
int32_t ecs_filter_find_this_var(const ecs_filter_t *filter)
Find index for $this variable.
bool ecs_term_match_this(const ecs_term_t *term)
Is term matched on $this variable.
int ecs_term_finalize(const ecs_world_t *world, ecs_term_t *term)
Finalize term.
bool ecs_term_id_is_set(const ecs_term_id_t *id)
Test whether term id is set.
void ecs_filter_move(ecs_filter_t *dst, ecs_filter_t *src)
Move resources of one filter to another.
bool ecs_term_is_initialized(const ecs_term_t *term)
Test whether a term is set.
ecs_term_t ecs_term_move(ecs_term_t *src)
Move resources of a term to another term.
void ecs_filter_copy(ecs_filter_t *dst, const ecs_filter_t *src)
Copy resources of one filter to another.
ecs_iter_t ecs_filter_chain_iter(const ecs_iter_t *it, const ecs_filter_t *filter)
Return a chained filter iterator.
bool ecs_term_match_0(const ecs_term_t *term)
Is term matched on 0 source.
ecs_iter_t ecs_term_iter(const ecs_world_t *world, ecs_term_t *term)
Iterator for a single (component) id.
void(* ecs_module_action_t)(ecs_world_t *world)
Initialization action for modules.
uint64_t(* ecs_group_by_action_t)(ecs_world_t *world, ecs_table_t *table, ecs_id_t group_id, void *ctx)
Callback used for grouping tables in a query.
uint64_t(* ecs_hash_value_action_t)(const void *ptr)
Callback used for hashing values.
void(* ecs_iter_fini_action_t)(ecs_iter_t *it)
Function prototype for freeing an iterator.
void(* ecs_sort_table_action_t)(ecs_world_t *world, ecs_table_t *table, ecs_entity_t *entities, void *ptr, int32_t size, int32_t lo, int32_t hi, ecs_order_by_action_t order_by)
Callback used for sorting the entire table of components.
bool(* ecs_iter_next_action_t)(ecs_iter_t *it)
Function prototype for iterating an iterator.
void(* ecs_iter_action_t)(ecs_iter_t *it)
Function prototype for iterables.
void(* ecs_copy_t)(void *dst_ptr, const void *src_ptr, int32_t count, const ecs_type_info_t *type_info)
Copy is invoked when a component is copied into another component.
int(* ecs_compare_action_t)(const void *ptr1, const void *ptr2)
Callback used for sorting values.
void(* ecs_fini_action_t)(ecs_world_t *world, void *ctx)
Action callback on world exit.
void(* ecs_move_t)(void *dst_ptr, void *src_ptr, int32_t count, const ecs_type_info_t *type_info)
Move is invoked when a component is moved to another component.
void(* ecs_run_action_t)(ecs_iter_t *it)
Function prototype for runnables (systems, observers).
void(* ecs_ctx_free_t)(void *ctx)
Function to cleanup context data.
int(* ecs_order_by_action_t)(ecs_entity_t e1, const void *ptr1, ecs_entity_t e2, const void *ptr2)
Callback used for comparing components.
void(* ecs_iter_init_action_t)(const ecs_world_t *world, const ecs_poly_t *iterable, ecs_iter_t *it, ecs_term_t *filter)
Function prototype for creating an iterator from a poly.
void(* ecs_xtor_t)(void *ptr, int32_t count, const ecs_type_info_t *type_info)
Constructor/destructor callback.
void * ecs_emplace_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Emplace a component.
ecs_ref_t ecs_ref_init_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Create a component ref.
void * ecs_record_get_mut_id(ecs_world_t *world, ecs_record_t *record, ecs_id_t id)
Same as ecs_record_get_id, but returns a mutable pointer.
ecs_entity_t ecs_record_get_entity(const ecs_record_t *record)
Get entity corresponding with record.
void ecs_ref_update(const ecs_world_t *world, ecs_ref_t *ref)
Update ref.
void ecs_read_end(const ecs_record_t *record)
End read access to entity.
void ecs_write_end(ecs_record_t *record)
End exclusive write access to entity.
void * ecs_ref_get_id(const ecs_world_t *world, ecs_ref_t *ref, ecs_id_t id)
Get component from ref.
bool ecs_record_has_id(ecs_world_t *world, const ecs_record_t *record, ecs_id_t id)
Test if entity for record has component.
const void * ecs_record_get_id(ecs_world_t *world, const ecs_record_t *record, ecs_id_t id)
Get component from entity record.
ecs_entity_t ecs_set_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, size_t size, const void *ptr)
Set the value of a component.
const void * ecs_get_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Get an immutable pointer to a component.
ecs_record_t * ecs_write_begin(ecs_world_t *world, ecs_entity_t entity)
Begin exclusive write access to entity.
void ecs_modified_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Signal that a component has been modified.
void * ecs_get_mut_modified_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Combines get_mut + modifed in single operation.
const ecs_record_t * ecs_read_begin(ecs_world_t *world, ecs_entity_t entity)
Begin read access to entity.
void * ecs_get_mut_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Get a mutable pointer to a component.
const ecs_id_t ECS_PAIR
Indicates that the id is a pair.
const ecs_id_t ECS_OVERRIDE
Automatically override component when it is inherited.
const ecs_id_t ECS_AND
Include all components from entity to which AND is applied.
const ecs_id_t ECS_TOGGLE
Adds bitset to storage which allows component to be enabled/disabled.
bool ecs_id_is_union(const ecs_world_t *world, ecs_id_t id)
Return whether represents a union.
bool ecs_id_is_valid(const ecs_world_t *world, ecs_id_t id)
Utility to check if id is valid.
bool ecs_id_is_pair(ecs_id_t id)
Utility to check if id is a pair.
ecs_entity_t ecs_get_typeid(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
bool ecs_id_match(ecs_id_t id, ecs_id_t pattern)
Utility to match an id with a pattern.
const char * ecs_id_flag_str(ecs_id_t id_flags)
Convert id flag to string.
bool ecs_id_in_use(const ecs_world_t *world, ecs_id_t id)
Returns whether specified id is in use.
bool ecs_id_is_tag(const ecs_world_t *world, ecs_id_t id)
Returns whether specified id a tag.
void ecs_id_str_buf(const ecs_world_t *world, ecs_id_t id, ecs_strbuf_t *buf)
Write id string to buffer.
char * ecs_id_str(const ecs_world_t *world, ecs_id_t id)
Convert id to string.
bool ecs_id_is_wildcard(ecs_id_t id)
Utility to check if id is a wildcard.
ecs_flags32_t ecs_id_get_flags(const ecs_world_t *world, ecs_id_t id)
Get flags associated with id.
bool ecs_field_is_set(const ecs_iter_t *it, int32_t index)
Test whether field is set.
bool ecs_field_is_writeonly(const ecs_iter_t *it, int32_t index)
Test whether the field is writeonly.
bool ecs_field_is_self(const ecs_iter_t *it, int32_t index)
Test whether the field is matched on self.
void * ecs_field_w_size(const ecs_iter_t *it, size_t size, int32_t index)
Obtain data for a query field.
ecs_iter_t ecs_worker_iter(const ecs_iter_t *it, int32_t index, int32_t count)
Create a worker iterator.
size_t ecs_field_size(const ecs_iter_t *it, int32_t index)
Return field type size.
bool ecs_iter_is_true(ecs_iter_t *it)
Test if iterator is true.
void ecs_iter_fini(ecs_iter_t *it)
Cleanup iterator resources.
char * ecs_iter_str(const ecs_iter_t *it)
Convert iterator to string.
bool ecs_iter_var_is_constrained(ecs_iter_t *it, int32_t var_id)
Returns whether variable is constrained.
ecs_iter_t ecs_page_iter(const ecs_iter_t *it, int32_t offset, int32_t limit)
Create a paged iterator.
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.
ecs_id_t ecs_field_id(const ecs_iter_t *it, int32_t index)
Return id matched for field.
bool ecs_field_is_readonly(const ecs_iter_t *it, int32_t index)
Test whether the field is readonly.
void ecs_iter_set_var(ecs_iter_t *it, int32_t var_id, ecs_entity_t entity)
Set value for iterator variable.
bool ecs_iter_next(ecs_iter_t *it)
Progress any iterator.
ecs_entity_t ecs_iter_get_var(ecs_iter_t *it, int32_t var_id)
Get value of iterator variable as entity.
bool ecs_worker_next(ecs_iter_t *it)
Progress a worker iterator.
ecs_entity_t ecs_iter_first(ecs_iter_t *it)
Get first matching entity from iterator.
void ecs_iter_set_var_as_table(ecs_iter_t *it, int32_t var_id, const ecs_table_t *table)
Same as ecs_iter_set_var, but for a table.
ecs_table_t * ecs_iter_get_var_as_table(ecs_iter_t *it, int32_t var_id)
Get value of iterator variable as table.
ecs_entity_t ecs_field_src(const ecs_iter_t *it, int32_t index)
Return field source.
int32_t ecs_iter_count(ecs_iter_t *it)
Count number of matched entities in query.
bool ecs_page_next(ecs_iter_t *it)
Progress a paged iterator.
void ecs_iter_set_var_as_range(ecs_iter_t *it, int32_t var_id, const ecs_table_range_t *range)
Same as ecs_iter_set_var, but for a range of entities This constrains the variable to a range of enti...
ecs_table_range_t ecs_iter_get_var_as_range(ecs_iter_t *it, int32_t var_id)
Get value of iterator variable as table range.
int32_t ecs_field_column_index(const ecs_iter_t *it, int32_t index)
Return index of matched table column.
ecs_id_t ecs_strip_generation(ecs_entity_t e)
Remove generation from entity id.
void ecs_ensure(ecs_world_t *world, ecs_entity_t entity)
Ensure id is alive.
bool ecs_is_valid(const ecs_world_t *world, ecs_entity_t e)
Test whether an entity is valid.
void ecs_set_entity_generation(ecs_world_t *world, ecs_entity_t entity)
Override the generation of an entity.
ecs_entity_t ecs_get_alive(const ecs_world_t *world, ecs_entity_t e)
Get alive identifier.
bool ecs_exists(const ecs_world_t *world, ecs_entity_t entity)
Test whether an entity exists.
void ecs_ensure_id(ecs_world_t *world, ecs_id_t id)
Same as ecs_ensure, but for (component) ids.
bool ecs_is_alive(const ecs_world_t *world, ecs_entity_t e)
Test whether an entity is alive.
void ecs_emit(ecs_world_t *world, ecs_event_desc_t *desc)
Send event.
ecs_entity_t ecs_observer_init(ecs_world_t *world, const ecs_observer_desc_t *desc)
Create observer.
void * ecs_observer_get_ctx(const ecs_world_t *world, ecs_entity_t observer)
Get observer ctx.
bool ecs_observer_default_run_action(ecs_iter_t *it)
Default run action for observer.
void * ecs_observer_get_binding_ctx(const ecs_world_t *world, ecs_entity_t observer)
Get observer binding ctx.
#define FLECS_TERM_DESC_MAX
Maximum number of terms in ecs_filter_desc_t.
#define FLECS_EVENT_DESC_MAX
Maximum number of events in ecs_observer_desc_t.
#define ecs_ftime_t
Customizable precision for scalar time values.
#define FLECS_ID_DESC_MAX
Maximum number of ids to add ecs_entity_desc_t / ecs_bulk_desc_t.
char * ecs_get_path_w_sep(const ecs_world_t *world, ecs_entity_t parent, ecs_entity_t child, const char *sep, const char *prefix)
Get a path identifier for an entity.
ecs_entity_t ecs_new_from_path_w_sep(ecs_world_t *world, ecs_entity_t parent, const char *path, const char *sep, const char *prefix)
Find or create entity from path.
ecs_entity_t ecs_lookup(const ecs_world_t *world, const char *name)
Lookup an entity by name.
ecs_entity_t ecs_lookup_symbol(const ecs_world_t *world, const char *symbol, bool lookup_as_path, bool recursive)
Lookup an entity by its symbol name.
void ecs_set_alias(ecs_world_t *world, ecs_entity_t entity, const char *alias)
Set alias for entity.
void ecs_get_path_w_sep_buf(const ecs_world_t *world, ecs_entity_t parent, ecs_entity_t child, const char *sep, const char *prefix, ecs_strbuf_t *buf)
Write path identifier to buffer.
ecs_entity_t ecs_get_scope(const ecs_world_t *world)
Get the current scope.
ecs_entity_t * ecs_set_lookup_path(ecs_world_t *world, const ecs_entity_t *lookup_path)
Set search path for lookup operations.
ecs_entity_t ecs_set_name(ecs_world_t *world, ecs_entity_t entity, const char *name)
Set the name of an entity.
const char * ecs_get_symbol(const ecs_world_t *world, ecs_entity_t entity)
Get the symbol of an entity.
ecs_entity_t ecs_lookup_path_w_sep(const ecs_world_t *world, ecs_entity_t parent, const char *path, const char *sep, const char *prefix, bool recursive)
Lookup an entity from a path.
ecs_entity_t ecs_set_symbol(ecs_world_t *world, ecs_entity_t entity, const char *symbol)
Set the symbol of an entity.
ecs_entity_t ecs_lookup_child(const ecs_world_t *world, ecs_entity_t parent, const char *name)
Lookup a child entity by name.
const char * ecs_get_name(const ecs_world_t *world, ecs_entity_t entity)
Get the name of an entity.
ecs_entity_t ecs_add_path_w_sep(ecs_world_t *world, ecs_entity_t entity, ecs_entity_t parent, const char *path, const char *sep, const char *prefix)
Add specified path to entity.
ecs_entity_t * ecs_get_lookup_path(const ecs_world_t *world)
Get current lookup path.
ecs_entity_t ecs_set_scope(ecs_world_t *world, ecs_entity_t scope)
Set the current scope.
const char * ecs_set_name_prefix(ecs_world_t *world, const char *prefix)
Set a name prefix for newly created entities.
const ecs_query_group_info_t * ecs_query_get_group_info(const ecs_query_t *query, uint64_t group_id)
Get information about query group.
bool ecs_query_next_instanced(ecs_iter_t *iter)
Same as ecs_query_next, but always instanced.
void ecs_query_fini(ecs_query_t *query)
Destroy a query.
void ecs_query_skip(ecs_iter_t *it)
Skip a table while iterating.
int32_t ecs_query_table_count(const ecs_query_t *query)
Returns number of tables query matched with.
bool ecs_query_next_table(ecs_iter_t *iter)
Fast alternative to ecs_query_next that only returns matched tables.
int32_t ecs_query_entity_count(const ecs_query_t *query)
Returns number of entities query matched with.
char * ecs_query_str(const ecs_query_t *query)
Convert query to string.
void * ecs_query_get_ctx(const ecs_query_t *query)
Get query ctx.
ecs_query_t * ecs_query_init(ecs_world_t *world, const ecs_query_desc_t *desc)
Create a query.
void ecs_query_set_group(ecs_iter_t *it, uint64_t group_id)
Set group to iterate for query iterator.
ecs_iter_t ecs_query_iter(const ecs_world_t *world, ecs_query_t *query)
Return a query iterator.
bool ecs_query_next(ecs_iter_t *iter)
Progress the query iterator.
void * ecs_query_get_group_ctx(const ecs_query_t *query, uint64_t group_id)
Get context of query group.
int ecs_query_populate(ecs_iter_t *iter, bool when_changed)
Populate iterator fields.
bool ecs_query_orphaned(const ecs_query_t *query)
Returns whether query is orphaned.
void * ecs_query_get_binding_ctx(const ecs_query_t *query)
Get query binding ctx.
const ecs_filter_t * ecs_query_get_filter(const ecs_query_t *query)
Get filter from a query.
int32_t ecs_query_empty_table_count(const ecs_query_t *query)
Returns number of empty tables query matched with.
bool ecs_query_changed(ecs_query_t *query, const ecs_iter_t *it)
Returns whether the query data changed since the last iteration.
ecs_inout_kind_t
Specify read/write access for term.
ecs_oper_kind_t
Specify operator for term.
ecs_filter_t ECS_FILTER_INIT
Use $this variable to initialize user-allocated filter object.
@ EcsOut
Term is only written.
@ EcsInOut
Term is both read and written.
@ EcsInOutDefault
InOut for regular terms, In for shared terms.
@ EcsInOutNone
Term is neither read nor written.
@ EcsIn
Term is only read.
@ EcsNot
The term must not match.
@ EcsOptional
The term may match.
@ EcsOr
One of the terms in an or chain must match.
@ EcsOrFrom
Term must match at least one component from term id.
@ EcsAnd
The term must match.
@ EcsNotFrom
Term must match none of the components from term id.
@ EcsAndFrom
Term must match all components from term id.
ecs_table_t * ecs_table_add_id(ecs_world_t *world, ecs_table_t *table, ecs_id_t id)
Get table that has all components of current table plus the specified id.
int32_t ecs_search(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id, ecs_id_t *id_out)
Search for component id in table type.
const ecs_type_t * ecs_table_get_type(const ecs_table_t *table)
Get type for table.
int32_t ecs_search_offset(const ecs_world_t *world, const ecs_table_t *table, int32_t offset, ecs_id_t id, ecs_id_t *id_out)
Search for component id in table type starting from an offset.
bool ecs_table_has_flags(ecs_table_t *table, ecs_flags32_t flags)
Test table for flags.
int32_t ecs_table_column_to_type_index(const ecs_table_t *table, int32_t index)
Convert column index to type index.
int32_t ecs_search_relation(const ecs_world_t *world, const ecs_table_t *table, int32_t offset, ecs_id_t id, ecs_entity_t rel, ecs_flags32_t flags, ecs_entity_t *subject_out, ecs_id_t *id_out, struct ecs_table_record_t **tr_out)
Search for component/relationship id in table type starting from an offset.
int32_t ecs_table_column_count(const ecs_table_t *table)
Return number of columns in table.
bool ecs_commit(ecs_world_t *world, ecs_entity_t entity, ecs_record_t *record, ecs_table_t *table, const ecs_type_t *added, const ecs_type_t *removed)
Commit (move) entity to a table.
void * ecs_table_get_column(const ecs_table_t *table, int32_t index, int32_t offset)
Get column from table by column index.
bool ecs_table_has_id(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
Test if table has id.
ecs_table_t * ecs_table_remove_id(ecs_world_t *world, ecs_table_t *table, ecs_id_t id)
Get table that has all components of current table minus the specified id.
int32_t ecs_table_count(const ecs_table_t *table)
Returns the number of records in the table.
void ecs_table_unlock(ecs_world_t *world, ecs_table_t *table)
Unlock a table.
int32_t ecs_table_get_depth(const ecs_world_t *world, const ecs_table_t *table, ecs_entity_t rel)
Return depth for table in tree for relationship rel.
void * ecs_table_get_id(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id, int32_t offset)
Get column from table by component id.
void ecs_table_swap_rows(ecs_world_t *world, ecs_table_t *table, int32_t row_1, int32_t row_2)
Swaps two elements inside the table.
int32_t ecs_table_get_column_index(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
Get column index for id.
void ecs_table_lock(ecs_world_t *world, ecs_table_t *table)
Lock or unlock table.
void * ecs_record_get_column(const ecs_record_t *r, int32_t column, size_t c_size)
Get component pointer from column/record.
ecs_table_t * ecs_table_find(ecs_world_t *world, const ecs_id_t *ids, int32_t id_count)
Find table from id array.
ecs_record_t * ecs_record_find(const ecs_world_t *world, ecs_entity_t entity)
Find record for entity.
int32_t ecs_table_get_type_index(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
Get type index for id.
size_t ecs_table_get_column_size(const ecs_table_t *table, int32_t index)
Get column size from table.
int32_t ecs_table_type_to_column_index(const ecs_table_t *table, int32_t index)
Convert type index to column index.
int ecs_value_fini_w_type_info(const ecs_world_t *world, const ecs_type_info_t *ti, void *ptr)
Destruct a value.
int ecs_value_fini(const ecs_world_t *world, ecs_entity_t type, void *ptr)
Destruct a value.
int ecs_value_copy(const ecs_world_t *world, ecs_entity_t type, void *dst, const void *src)
Copy value.
int ecs_value_move(const ecs_world_t *world, ecs_entity_t type, void *dst, void *src)
Move value.
int ecs_value_move_w_type_info(const ecs_world_t *world, const ecs_type_info_t *ti, void *dst, void *src)
Move value.
void * ecs_value_new_w_type_info(ecs_world_t *world, const ecs_type_info_t *ti)
Construct a value in new storage.
int ecs_value_move_ctor_w_type_info(const ecs_world_t *world, const ecs_type_info_t *ti, void *dst, void *src)
Move construct value.
int ecs_value_copy_w_type_info(const ecs_world_t *world, const ecs_type_info_t *ti, void *dst, const void *src)
Copy value.
int ecs_value_init_w_type_info(const ecs_world_t *world, const ecs_type_info_t *ti, void *ptr)
Construct a value in existing storage.
void * ecs_value_new(ecs_world_t *world, ecs_entity_t type)
Construct a value in new storage.
int ecs_value_free(ecs_world_t *world, ecs_entity_t type, void *ptr)
Destruct a value, free storage.
int ecs_value_move_ctor(const ecs_world_t *world, ecs_entity_t type, void *dst, void *src)
Move construct value.
int ecs_value_init(const ecs_world_t *world, ecs_entity_t type, void *ptr)
Construct a value in existing storage.
void ecs_atfini(ecs_world_t *world, ecs_fini_action_t action, void *ctx)
Register action to be executed when world is destroyed.
bool ecs_is_fini(const ecs_world_t *world)
Returns whether the world is being deleted.
int ecs_fini(ecs_world_t *world)
Delete a world.
ecs_world_t * ecs_mini(void)
Create a new world with just the core module.
ecs_world_t * ecs_init(void)
Create a new world.
ecs_world_t * ecs_init_w_args(int argc, char *argv[])
Create a new world with arguments.
void ecs_set_target_fps(ecs_world_t *world, float fps)
Set target frames per second (FPS) for application.
void ecs_measure_system_time(ecs_world_t *world, bool enable)
Measure system time.
float ecs_frame_begin(ecs_world_t *world, float delta_time)
Begin frame.
void ecs_run_post_frame(ecs_world_t *world, ecs_fini_action_t action, void *ctx)
Register action to be executed once after frame.
bool ecs_should_quit(const ecs_world_t *world)
Return whether a quit has been signaled.
void ecs_quit(ecs_world_t *world)
Signal exit This operation signals that the application should quit.
void ecs_measure_frame_time(ecs_world_t *world, bool enable)
Measure frame time.
void ecs_frame_end(ecs_world_t *world)
End frame.
ecs_entity_t ecs_get_entity(const ecs_poly_t *poly)
Get entity from poly.
ecs_id_t ecs_make_pair(ecs_entity_t first, ecs_entity_t second)
Make a pair id.
bool ecs_poly_is_(const ecs_poly_t *object, int32_t type)
Test if pointer is of specified type.
ecs_entity_t ecs_get_max_id(const ecs_world_t *world)
Get the largest issued entity id (not counting generation).
void ecs_run_aperiodic(ecs_world_t *world, ecs_flags32_t flags)
Force aperiodic actions.
void * ecs_get_binding_ctx(const ecs_world_t *world)
Get the world binding context.
void ecs_dim(ecs_world_t *world, int32_t entity_count)
Dimension the world for a specified number of entities.
void ecs_set_entity_range(ecs_world_t *world, ecs_entity_t id_start, ecs_entity_t id_end)
Set a range for issueing new entity ids.
const ecs_world_info_t * ecs_get_world_info(const ecs_world_t *world)
Get world info.
const ecs_world_t * ecs_get_world(const ecs_poly_t *poly)
Get world from poly.
void ecs_set_ctx(ecs_world_t *world, void *ctx, ecs_ctx_free_t ctx_free)
Set a world context.
int32_t ecs_delete_empty_tables(ecs_world_t *world, ecs_id_t id, uint16_t clear_generation, uint16_t delete_generation, int32_t min_id_count, double time_budget_seconds)
Cleanup empty tables.
void ecs_set_binding_ctx(ecs_world_t *world, void *ctx, ecs_ctx_free_t ctx_free)
Set a world binding context.
bool ecs_enable_range_check(ecs_world_t *world, bool enable)
Enable/disable range limits.
void * ecs_get_ctx(const ecs_world_t *world)
Get the world context.
flecs::observer_builder< Components... > observer(Args &&... args) const
Create a new observer.
Operating system abstraction API.
flecs::query< Comps... > query(flecs::query_base &parent, Args &&... args) const
Create a subquery.
ecs_size_t size
Component size.
ecs_size_t alignment
Component alignment.
ecs_size_t length
Length of identifier.
char * value
Identifier string.
ecs_hashmap_t * index
Current index.
uint64_t hash
Hash of current value.
uint64_t index_hash
Hash of existing record in current index.
Component for storing a poly object.
ecs_poly_t * poly
Pointer to poly object.
Apply a rate filter to a tick source.
Target data for flattened relationships.
Component used to provide a tick source to systems.
Component used for one shot/interval timer functionality.
void ** data
Array with component data to insert.
ecs_id_t ids[(32)]
Ids to create the entities with.
int32_t count
Number of entities to create/populate.
ecs_entity_t * entities
Entities to bulk insert.
ecs_table_t * table
Table to insert the entities into.
Used with ecs_component_init.
ecs_type_info_t type
Parameters for type (size, hooks, ...)
ecs_entity_t entity
Existing entity to associate with observer (optional)
Used with ecs_entity_init.
const char * sep
Optional custom separator for hierarchical names.
const char * root_sep
Optional, used for identifiers relative to root.
const char * name
Name of the entity.
bool use_low_id
When set to true, a low id (typically reserved for components) will be used to create the entity,...
ecs_id_t add[(32)]
Array of ids to add to the new or existing entity.
const char * symbol
Optional entity symbol.
const char * add_expr
String expression with components to add.
ecs_entity_t id
Set to modify existing entity (optional)
ecs_entity_t entity
Single-entity alternative to setting table / offset / count.
ecs_table_t * table
The table for which to notify.
int32_t count
Limit number of notified entities to count.
ecs_table_t * other_table
Optional 2nd table to notify.
const void * param
Optional context.
int32_t offset
Limit notified entities to ones starting from offset (row) in table.
const ecs_type_t * ids
Component ids.
ecs_poly_t * observable
Observable (usually the world)
ecs_entity_t event
The event id.
ecs_flags32_t flags
Event flags.
Used with ecs_filter_init.
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_term_t terms[(16)]
Terms of the filter.
int32_t terms_buffer_count
Number of terms in array provided in terms_buffer.
ecs_entity_t entity
Entity associated with query (optional)
ecs_flags32_t flags
Flags for advanced usage.
ecs_filter_t * storage
External storage to prevent allocation of the filter object.
const char * expr
Filter expression.
Filters alllow for ad-hoc quick filtering of entity tables.
ecs_term_t * terms
Array containing terms for filter.
int32_t * sizes
Field size (same for each result)
bool owned
Is filter object owned by filter.
int32_t field_count
Number of fields in iterator for filter.
int32_t term_count
Number of elements in terms array.
ecs_flags32_t flags
Filter flags.
bool terms_owned
Is terms array owned by filter.
ecs_world_t * world
World mixin.
char * variable_names[1]
Placeholder variable names array.
ecs_poly_dtor_t dtor
Dtor mixin.
ecs_entity_t entity
Entity associated with filter (optional)
ecs_iterable_t iterable
Iterable mixin.
ecs_iter_init_action_t init
Callback that creates iterator.
Used with ecs_observer_init.
void * binding_ctx
Context to be used for language bindings.
ecs_ctx_free_t ctx_free
Callback to free ctx.
ecs_entity_t entity
Existing entity to associate with observer (optional)
ecs_filter_desc_t filter
Filter for observer.
int32_t term_index
Used for internal purposes.
ecs_entity_t events[(8)]
Events to observe (OnAdd, OnRemove, OnSet, UnSet)
int32_t * last_event_id
Optional shared last event id for multiple observers.
ecs_ctx_free_t binding_ctx_free
Callback to free binding_ctx.
void * ctx
User context to pass to callback.
ecs_poly_t * observable
Observable with which to register the observer.
ecs_iter_action_t callback
Callback to invoke on an event, invoked when the observer matches.
bool yield_existing
When observer is created, generate events from existing data.
ecs_run_action_t run
Callback invoked on an event.
ecs_iter_action_t callback
See ecs_observer_desc_t::callback.
int32_t term_index
Index of the term in parent observer (single term observers only)
ecs_observable_t * observable
Observable for observer.
ecs_run_action_t run
See ecs_observer_desc_t::run.
int32_t * last_event_id
Last handled event id.
ecs_ctx_free_t ctx_free
Callback to free ctx.
ecs_filter_t filter
Query for observer.
void * ctx
Callback context.
ecs_id_t register_id
Id observer is registered with (single term observers only)
void * binding_ctx
Binding context (for language bindings)
bool is_monitor
If true, the observer only triggers when the filter did not match with the entity before the event ha...
ecs_ctx_free_t binding_ctx_free
Callback to free binding_ctx.
bool is_multi
If true, the observer triggers on more than one term.
Used with ecs_query_init.
ecs_order_by_action_t order_by
Callback used for ordering query results.
ecs_ctx_free_t ctx_free
Callback to free ctx.
ecs_id_t group_by_id
Id to be used by group_by.
ecs_group_by_action_t group_by
Callback used for grouping results.
void * ctx
User context to pass to callback.
ecs_ctx_free_t group_by_ctx_free
Function to free group_by_ctx.
void * group_by_ctx
Context to pass to group_by.
void * binding_ctx
Context to be used for language bindings.
ecs_group_create_action_t on_group_create
Callback that is invoked when a new group is created.
ecs_query_t * parent
If set, the query will be created as a subquery.
ecs_ctx_free_t binding_ctx_free
Callback to free binding_ctx.
ecs_entity_t order_by_component
Component to be used by order_by.
ecs_filter_desc_t filter
Filter for the query.
ecs_group_delete_action_t on_group_delete
Callback that is invoked when an existing group is deleted.
ecs_sort_table_action_t sort_table
Callback used for ordering query results.
Type that contains information about a query group.
int32_t table_count
Number of tables in group.
void * ctx
Group context, returned by on_group_create.
int32_t match_count
How often tables have been matched/unmatched.
Type that describes a single identifier in a term.
ecs_flags32_t flags
Term flags.
ecs_entity_t trav
Relationship to traverse when looking for the component.
ecs_entity_t id
Entity id.
Type that describes a term (single element in a query)
ecs_term_id_t second
Second element of pair.
ecs_id_t id
Component id to be matched by term.
ecs_term_id_t src
Source of term.
ecs_id_record_t * idr
Cached pointer to internal index.
ecs_term_id_t first
Component or first element of pair.
int32_t field_index
Index of field for term in iterator.
ecs_id_t id_flags
Id flags of term id.
bool move
Used by internals.
ecs_flags16_t flags
Flags that help eval, set by ecs_filter_init.
ecs_inout_kind_t inout
Access to contents matched by term.
ecs_oper_kind_t oper
Operator of term.
Type that contains component lifecycle callbacks.
ecs_copy_t copy_ctor
Ctor + copy.
void * ctx
User defined context.
ecs_iter_action_t on_remove
Callback that is invoked when an instance of the component is removed.
void * binding_ctx
Language binding context.
ecs_move_t move_dtor
Move + dtor.
ecs_copy_t copy
copy assignment
ecs_iter_action_t on_set
Callback that is invoked when an instance of the component is set.
ecs_move_t move
move assignment
ecs_ctx_free_t ctx_free
Callback to free ctx.
ecs_iter_action_t on_add
Callback that is invoked when an instance of a component is added.
ecs_ctx_free_t binding_ctx_free
Callback to free binding_ctx.
ecs_move_t move_ctor
Ctor + move.
ecs_move_t ctor_move_dtor
Ctor + move + dtor (or move_ctor + dtor).
Type that contains component information (passed to ctors/dtors/...)
ecs_size_t alignment
Alignment of type.
ecs_size_t size
Size of type.
const char * name
Type name.
ecs_entity_t component
Handle to component (do not set)
ecs_type_hooks_t hooks
Type hooks.
A type is a list of (component) ids.
Type that contains information about the world.
int64_t get_mut_count
get_mut/emplace commands processed
float delta_time
Time passed to or computed by ecs_progress.
int32_t id_count
Number of ids in the world (excluding wildcards)
ecs_entity_t min_id
First allowed entity id.
int32_t trivial_table_count
Number of tables with trivial components (no lifecycle callbacks)
int64_t set_count
set commands processed
float world_time_total
Time elapsed in simulation.
int32_t tag_id_count
Number of tag (no data) ids in the world.
int32_t tag_table_count
Number of tag-only tables.
int32_t component_id_count
Number of component (data) ids in the world.
int32_t table_record_count
Total number of table records (entries in table caches)
int64_t pipeline_build_count_total
Total number of pipeline builds.
int32_t table_count
Number of tables.
float delta_time_raw
Raw delta time (no time scaling)
float frame_time_total
Total time spent processing a frame.
float world_time_total_raw
Time elapsed in simulation (no scaling)
int64_t table_create_total
Total number of times a table was created.
int64_t observers_ran_frame
Total number of times observer was invoked.
float system_time_total
Total time spent in systems.
int64_t id_delete_total
Total number of times an id was deleted.
int64_t systems_ran_frame
Total number of systems ran in last frame.
float merge_time_total
Total time spent in merges.
int64_t discard_count
commands discarded, happens when entity is no longer alive when running the command
int64_t clear_count
clear commands processed
ecs_entity_t last_component_id
Last issued component entity id.
int32_t empty_table_count
Number of tables without entities.
int64_t frame_count_total
Total number of frames.
ecs_entity_t max_id
Last allowed entity id.
int64_t merge_count_total
Total number of merges.
int64_t other_count
other commands processed
int64_t batched_command_count
commands batched
int64_t table_delete_total
Total number of times a table was deleted.
int64_t delete_count
delete commands processed
int64_t rematch_count_total
Total number of rematches.
int64_t id_create_total
Total number of times a new id was created.
int64_t batched_entity_count
entities for which commands were batched
float time_scale
Time scale applied to delta_time.
int32_t pair_id_count
Number of pair ids in the world.
float rematch_time_total
Time spent on query rematching.
float target_fps
Target fps.
int32_t wildcard_id_count
Number of wildcard ids.
int32_t table_storage_count
Total number of table storages.
float emit_time_total
Total time spent notifying observers.
int64_t modified_count
modified commands processed
const char * name_prefix
Value set by ecs_set_name_prefix.
int64_t add_count
add commands processed
int64_t remove_count
remove commands processed
flecs::term term() const
Create a term for a (component) type.