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

Flecs public API. More...

#include "flecs/private/api_defines.h"
#include "flecs/private/vec.h"
#include "flecs/private/sparse.h"
#include "flecs/private/block_allocator.h"
#include "flecs/private/map.h"
#include "flecs/private/allocator.h"
#include "flecs/private/strbuf.h"
#include "flecs/os_api.h"
#include "flecs/private/api_types.h"
#include "flecs/private/api_support.h"
#include "flecs/private/hashmap.h"
#include "flecs/addons/flecs_c.h"
#include "flecs/private/addons.h"
Include dependency graph for flecs.h:

Go to the source code of this file.

Classes

struct  ecs_type_t
 A type is a list of (component) ids. More...
 
struct  ecs_header_t
 Header for ecs_poly_t objects. More...
 
struct  ecs_iterable_t
 Iterable mixin. More...
 
struct  ecs_term_id_t
 Type that describes a single identifier in a term. More...
 
struct  ecs_term_t
 Type that describes a term (single element in a query) More...
 
struct  ecs_filter_t
 Filters allow for ad-hoc quick filtering of entity tables. More...
 
struct  ecs_observer_t
 
struct  ecs_type_hooks_t
 Type that contains component lifecycle callbacks. More...
 
struct  ecs_type_info_t
 Type that contains component information (passed to ctors/dtors/...) More...
 
struct  ecs_entity_desc_t
 Used with ecs_entity_init(). More...
 
struct  ecs_bulk_desc_t
 Used with ecs_bulk_init(). More...
 
struct  ecs_component_desc_t
 Used with ecs_component_init(). More...
 
struct  ecs_filter_desc_t
 Used with ecs_filter_init(). More...
 
struct  ecs_query_desc_t
 Used with ecs_query_init(). More...
 
struct  ecs_observer_desc_t
 Used with ecs_observer_init(). More...
 
struct  ecs_event_desc_t
 Used with ecs_emit(). More...
 
struct  ecs_value_t
 
struct  ecs_build_info_t
 Type with information about the current Flecs build. More...
 
struct  ecs_world_info_t
 Type that contains information about the world. More...
 
struct  ecs_query_group_info_t
 Type that contains information about a query group. More...
 
struct  EcsIdentifier
 A (string) identifier. More...
 
struct  EcsComponent
 Component information. More...
 
struct  EcsPoly
 Component for storing a poly object. More...
 
struct  EcsFlattenTarget
 Target data for flattened relationships. More...
 
struct  ecs_flatten_desc_t
 

Macros

#define FLECS_VERSION_MAJOR   3
 
#define FLECS_VERSION_MINOR   2
 
#define FLECS_VERSION_PATCH   12
 
#define FLECS_VERSION
 
#define ecs_float_t   float
 Customizable precision for floating point operations.
 
#define ecs_ftime_t   ecs_float_t
 Customizable precision for scalar time values.
 
#define FLECS_NO_DEPRECATED_WARNINGS
 disables deprecated warnings
 
#define FLECS_DEBUG
 Used for input parameter checking and cheap sanity checks.
 
#define FLECS_CPP
 C++ API.
 
#define FLECS_MODULE
 Module support.
 
#define FLECS_PARSER
 String parser for queries.
 
#define FLECS_PLECS
 ECS data definition format.
 
#define FLECS_RULES
 Constraint solver for advanced queries.
 
#define FLECS_SNAPSHOT
 Snapshot & restore ECS data.
 
#define FLECS_STATS
 Access runtime statistics.
 
#define FLECS_MONITOR
 Track runtime statistics periodically.
 
#define FLECS_METRICS
 Expose component data as statistics.
 
#define FLECS_ALERTS
 Monitor conditions for errors.
 
#define FLECS_SYSTEM
 System support.
 
#define FLECS_PIPELINE
 Pipeline support.
 
#define FLECS_TIMER
 Timer support.
 
#define FLECS_META
 Reflection support.
 
#define FLECS_META_C
 Utilities for populating reflection data.
 
#define FLECS_UNITS
 Builtin standard units.
 
#define FLECS_EXPR
 Parsing strings to/from component values.
 
#define FLECS_JSON
 Parsing JSON to/from component values.
 
#define FLECS_DOC
 Document entities & components.
 
#define FLECS_LOG
 When enabled ECS provides more detailed logs.
 
#define FLECS_APP
 Application addon.
 
#define FLECS_OS_API_IMPL
 Default implementation for OS API.
 
#define FLECS_HTTP
 Tiny HTTP server for connecting to remote UI.
 
#define FLECS_REST
 REST API for querying application data.
 
#define FLECS_HI_COMPONENT_ID   (256)
 This constant can be used to balance between performance and memory utilization.
 
#define FLECS_HI_ID_RECORD_ID   (1024)
 This constant can be used to balance between performance and memory utilization.
 
#define FLECS_SPARSE_PAGE_BITS   (12)
 This constant is used to determine the number of bits of an id that is used to determine the page index when used with a sparse set.
 
#define FLECS_ENTITY_PAGE_BITS   (12)
 Same as FLECS_SPARSE_PAGE_BITS, but for the entity index.
 
#define FLECS_ID_DESC_MAX   (32)
 Maximum number of ids to add ecs_entity_desc_t / ecs_bulk_desc_t.
 
#define FLECS_TERM_DESC_MAX   (16)
 Maximum number of terms in ecs_filter_desc_t.
 
#define FLECS_EVENT_DESC_MAX   (8)
 Maximum number of events in ecs_observer_desc_t.
 
#define FLECS_VARIABLE_COUNT_MAX   (64)
 Maximum number of query variables per query.
 
#define FLECS_QUERY_SCOPE_NESTING_MAX   (8)
 Maximum nesting depth of query scopes.
 
#define EcsSelf   (1u << 1)
 Match on self.
 
#define EcsUp   (1u << 2)
 Match by traversing upwards.
 
#define EcsDown   (1u << 3)
 Match by traversing downwards (derived, cannot be set)
 
#define EcsTraverseAll   (1u << 4)
 Match all entities encountered through traversal.
 
#define EcsCascade   (1u << 5)
 Sort results breadth first.
 
#define EcsDesc   (1u << 6)
 Iterate groups in descending order

 
#define EcsParent   (1u << 7)
 Short for up(ChildOf)
 
#define EcsIsVariable   (1u << 8)
 Term id is a variable.
 
#define EcsIsEntity   (1u << 9)
 Term id is an entity.
 
#define EcsIsName   (1u << 10)
 Term id is a name (don't attempt to lookup as entity)
 
#define EcsFilter   (1u << 11)
 Prevent observer from triggering on term.
 
#define EcsTraverseFlags   (EcsUp|EcsDown|EcsTraverseAll|EcsSelf|EcsCascade|EcsDesc|EcsParent)
 
#define EcsTermMatchAny   (1u << 0)
 
#define EcsTermMatchAnySrc   (1u << 1)
 
#define EcsTermSrcFirstEq   (1u << 2)
 
#define EcsTermSrcSecondEq   (1u << 3)
 
#define EcsTermTransitive   (1u << 4)
 
#define EcsTermReflexive   (1u << 5)
 
#define EcsTermIdInherited   (1u << 6)
 
#define EcsTermIsTrivial   (1u << 7)
 
#define EcsTermNoData   (1u << 8)
 
#define EcsTermMatchDisabled   (1u << 7)
 
#define EcsTermMatchPrefab   (1u << 8)
 
#define EcsLastInternalComponentId   (ecs_id(EcsPoly))
 Value used to quickly check if component is builtin.
 
#define EcsFirstUserComponentId   (8)
 The first user-defined component starts from this id.
 
#define EcsFirstUserEntityId   (FLECS_HI_COMPONENT_ID + 128)
 The first user-defined entity starts from this id.
 
#define ecs_poly_is(object, type)    ecs_poly_is_(object, type##_magic)
 

Typedefs

typedef uint64_t ecs_id_t
 Ids are the things that can be added to an entity.
 
typedef ecs_id_t ecs_entity_t
 An entity identifier.
 
typedef struct ecs_world_t ecs_world_t
 A world is the container for all ECS data and supporting features.
 
typedef struct ecs_table_t ecs_table_t
 A table stores entities and components for a specific type.
 
typedef struct ecs_term_t ecs_term_t
 A term is a single element in a query.
 
typedef struct ecs_filter_t ecs_filter_t
 A filter is an iterable data structure that describes a query.
 
typedef struct ecs_query_t ecs_query_t
 A query that caches its results.
 
typedef struct ecs_rule_t ecs_rule_t
 A rule is a query with advanced graph traversal features.
 
typedef struct ecs_observer_t ecs_observer_t
 An observer is a system that is invoked when an event matches its query.
 
typedef struct ecs_observable_t ecs_observable_t
 An observable produces events that can be listened for by an observer.
 
typedef struct ecs_iter_t ecs_iter_t
 
typedef struct ecs_ref_t ecs_ref_t
 A ref is a fast way to fetch a component for a specific entity.
 
typedef struct ecs_type_hooks_t ecs_type_hooks_t
 Type hooks are callbacks associated with component lifecycle events.
 
typedef struct ecs_type_info_t ecs_type_info_t
 Type information.
 
typedef struct ecs_record_t ecs_record_t
 Information about an entity, like its table and row.
 
typedef struct ecs_id_record_t ecs_id_record_t
 Information about a (component) id, such as type info and tables with the id.
 
typedef struct ecs_table_record_t ecs_table_record_t
 Information about where in a table a specific (component) id is stored.
 
typedef void ecs_poly_t
 A poly object.
 
typedef struct ecs_mixins_t ecs_mixins_t
 Type that stores poly mixins.
 
typedef struct ecs_header_t ecs_header_t
 Header for ecs_poly_t objects.
 
typedef void(* ecs_run_action_t) (ecs_iter_t *it)
 Function prototype for runnables (systems, observers).
 
typedef void(* ecs_iter_action_t) (ecs_iter_t *it)
 Function prototype for iterables.
 
typedef 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.
 
typedef bool(* ecs_iter_next_action_t) (ecs_iter_t *it)
 Function prototype for iterating an iterator.
 
typedef void(* ecs_iter_fini_action_t) (ecs_iter_t *it)
 Function prototype for freeing an iterator.
 
typedef 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.
 
typedef 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.
 
typedef 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.
 
typedef void *(* ecs_group_create_action_t) (ecs_world_t *world, uint64_t group_id, void *group_by_ctx)
 
typedef void(* ecs_group_delete_action_t) (ecs_world_t *world, uint64_t group_id, void *group_ctx, void *group_by_ctx)
 
typedef void(* ecs_module_action_t) (ecs_world_t *world)
 Initialization action for modules.
 
typedef void(* ecs_fini_action_t) (ecs_world_t *world, void *ctx)
 Action callback on world exit.
 
typedef void(* ecs_ctx_free_t) (void *ctx)
 Function to cleanup context data.
 
typedef int(* ecs_compare_action_t) (const void *ptr1, const void *ptr2)
 Callback used for sorting values.
 
typedef uint64_t(* ecs_hash_value_action_t) (const void *ptr)
 Callback used for hashing values.
 
typedef void(* ecs_xtor_t) (void *ptr, int32_t count, const ecs_type_info_t *type_info)
 Constructor/destructor callback.
 
typedef 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.
 
typedef 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.
 
typedef void(* ecs_poly_dtor_t) (ecs_poly_t *poly)
 
typedef struct ecs_iterable_t ecs_iterable_t
 Iterable mixin.
 
typedef enum ecs_inout_kind_t ecs_inout_kind_t
 Specify read/write access for term.
 
typedef enum ecs_oper_kind_t ecs_oper_kind_t
 Specify operator for term.
 
typedef struct ecs_term_id_t ecs_term_id_t
 Type that describes a single identifier in a term.
 
typedef struct ecs_entity_desc_t ecs_entity_desc_t
 Used with ecs_entity_init().
 
typedef struct ecs_bulk_desc_t ecs_bulk_desc_t
 Used with ecs_bulk_init().
 
typedef struct ecs_component_desc_t ecs_component_desc_t
 Used with ecs_component_init().
 
typedef struct ecs_filter_desc_t ecs_filter_desc_t
 Used with ecs_filter_init().
 
typedef struct ecs_query_desc_t ecs_query_desc_t
 Used with ecs_query_init().
 
typedef struct ecs_observer_desc_t ecs_observer_desc_t
 Used with ecs_observer_init().
 
typedef struct ecs_event_desc_t ecs_event_desc_t
 Used with ecs_emit().
 
typedef struct ecs_value_t ecs_value_t
 
typedef struct ecs_build_info_t ecs_build_info_t
 Type with information about the current Flecs build.
 
typedef struct ecs_world_info_t ecs_world_info_t
 Type that contains information about the world.
 
typedef struct ecs_query_group_info_t ecs_query_group_info_t
 Type that contains information about a query group.
 
typedef struct EcsIdentifier EcsIdentifier
 A (string) identifier.
 
typedef struct EcsComponent EcsComponent
 Component information.
 
typedef struct EcsPoly EcsPoly
 Component for storing a poly object.
 
typedef struct EcsFlattenTarget EcsFlattenTarget
 Target data for flattened relationships.
 
typedef ecs_iterable_t EcsIterable
 Component for iterable entities.
 
typedef struct ecs_flatten_desc_t ecs_flatten_desc_t
 

Enumerations

enum  ecs_inout_kind_t {
  EcsInOutDefault , EcsInOutNone , EcsInOut , EcsIn ,
  EcsOut
}
 Specify read/write access for term. More...
 
enum  ecs_oper_kind_t {
  EcsAnd , EcsOr , EcsNot , EcsOptional ,
  EcsAndFrom , EcsOrFrom , EcsNotFrom
}
 Specify operator for term. More...
 

Functions

ecs_world_tecs_init (void)
 Create a new world.
 
ecs_world_tecs_mini (void)
 Create a new world with just the core module.
 
ecs_world_tecs_init_w_args (int argc, char *argv[])
 Create a new world with arguments.
 
int ecs_fini (ecs_world_t *world)
 Delete a world.
 
bool ecs_is_fini (const ecs_world_t *world)
 Returns whether the world is being deleted.
 
void ecs_atfini (ecs_world_t *world, ecs_fini_action_t action, void *ctx)
 Register action to be executed when world is destroyed.
 
float ecs_frame_begin (ecs_world_t *world, float delta_time)
 Begin frame.
 
void ecs_frame_end (ecs_world_t *world)
 End 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.
 
void ecs_quit (ecs_world_t *world)
 Signal exit This operation signals that the application should quit.
 
bool ecs_should_quit (const ecs_world_t *world)
 Return whether a quit has been signaled.
 
void ecs_measure_frame_time (ecs_world_t *world, bool enable)
 Measure frame time.
 
void ecs_measure_system_time (ecs_world_t *world, bool enable)
 Measure system time.
 
void ecs_set_target_fps (ecs_world_t *world, float fps)
 Set target frames per second (FPS) for application.
 
bool ecs_readonly_begin (ecs_world_t *world, bool multi_threaded)
 Begin readonly mode.
 
void ecs_readonly_end (ecs_world_t *world)
 End readonly mode.
 
void ecs_merge (ecs_world_t *world)
 Merge world or stage.
 
bool ecs_defer_begin (ecs_world_t *world)
 Defer operations until end of frame.
 
bool ecs_is_deferred (const ecs_world_t *world)
 Test if deferring is enabled for current stage.
 
bool ecs_defer_end (ecs_world_t *world)
 End block of operations to defer.
 
void ecs_defer_suspend (ecs_world_t *world)
 Suspend deferring but do not flush queue.
 
void ecs_defer_resume (ecs_world_t *world)
 Resume deferring.
 
void ecs_set_automerge (ecs_world_t *world, bool automerge)
 Enable/disable auto-merging for world or stage.
 
void ecs_set_stage_count (ecs_world_t *world, int32_t stages)
 Configure world to have N stages.
 
int32_t ecs_get_stage_count (const ecs_world_t *world)
 Get number of configured stages.
 
int32_t ecs_get_stage_id (const ecs_world_t *world)
 Get current stage id.
 
ecs_world_tecs_get_stage (const ecs_world_t *world, int32_t stage_id)
 Get stage-specific world pointer.
 
bool ecs_stage_is_readonly (const ecs_world_t *world)
 Test whether the current world is readonly.
 
ecs_world_tecs_async_stage_new (ecs_world_t *world)
 Create asynchronous stage.
 
void ecs_async_stage_free (ecs_world_t *stage)
 Free asynchronous stage.
 
bool ecs_stage_is_async (ecs_world_t *stage)
 Test whether provided stage is asynchronous.
 
void ecs_set_ctx (ecs_world_t *world, void *ctx, ecs_ctx_free_t ctx_free)
 Set a world context.
 
void ecs_set_binding_ctx (ecs_world_t *world, void *ctx, ecs_ctx_free_t ctx_free)
 Set a world binding context.
 
void * ecs_get_ctx (const ecs_world_t *world)
 Get the world context.
 
void * ecs_get_binding_ctx (const ecs_world_t *world)
 Get the world binding context.
 
const ecs_build_info_tecs_get_build_info (void)
 Get build info.
 
const ecs_world_info_tecs_get_world_info (const ecs_world_t *world)
 Get world info.
 
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 issuing new entity ids.
 
bool ecs_enable_range_check (ecs_world_t *world, bool enable)
 Enable/disable range limits.
 
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.
 
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.
 
const ecs_world_tecs_get_world (const ecs_poly_t *poly)
 Get world from poly.
 
ecs_entity_t ecs_get_entity (const ecs_poly_t *poly)
 Get entity from poly.
 
bool ecs_poly_is_ (const ecs_poly_t *object, int32_t type)
 Test if pointer is of specified type.
 
ecs_id_t ecs_make_pair (ecs_entity_t first, ecs_entity_t second)
 Make a pair id.
 
ecs_entity_t ecs_new_id (ecs_world_t *world)
 Create new entity id.
 
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_w_table (ecs_world_t *world, ecs_table_t *table)
 Create new entity in table.
 
ecs_entity_t ecs_entity_init (ecs_world_t *world, const ecs_entity_desc_t *desc)
 Find or create an entity.
 
const ecs_entity_tecs_bulk_init (ecs_world_t *world, const ecs_bulk_desc_t *desc)
 Bulk create/populate new entities.
 
const ecs_entity_tecs_bulk_new_w_id (ecs_world_t *world, ecs_id_t id, int32_t count)
 Create N 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.
 
void ecs_delete (ecs_world_t *world, ecs_entity_t entity)
 Delete an entity.
 
void ecs_delete_with (ecs_world_t *world, ecs_id_t id)
 Delete all entities with the specified 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_override_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Add override for (component) id.
 
void ecs_clear (ecs_world_t *world, ecs_entity_t entity)
 Clear all components.
 
void ecs_remove_all (ecs_world_t *world, ecs_id_t id)
 Remove all instances of the specified (component) id.
 
ecs_entity_t ecs_set_with (ecs_world_t *world, ecs_id_t id)
 Set current with id.
 
ecs_id_t ecs_get_with (const ecs_world_t *world)
 Get current with id.
 
void ecs_enable (ecs_world_t *world, ecs_entity_t entity, bool enabled)
 Enable or disable entity.
 
void ecs_enable_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, bool enable)
 Enable or disable component.
 
bool ecs_is_enabled_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Test if component is enabled.
 
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.
 
void * ecs_get_mut_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Get a mutable pointer to a component.
 
void * ecs_ensure_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Get a mutable pointer to a component.
 
void * ecs_ensure_modified_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Combines ensure + modified in single operation.
 
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_ref_get_id (const ecs_world_t *world, ecs_ref_t *ref, ecs_id_t id)
 Get component from ref.
 
void ecs_ref_update (const ecs_world_t *world, ecs_ref_t *ref)
 Update ref.
 
ecs_record_tecs_write_begin (ecs_world_t *world, ecs_entity_t entity)
 Begin exclusive write access to entity.
 
void ecs_write_end (ecs_record_t *record)
 End exclusive write access to entity.
 
const ecs_record_tecs_read_begin (ecs_world_t *world, ecs_entity_t entity)
 Begin read access to entity.
 
void ecs_read_end (const ecs_record_t *record)
 End read access to entity.
 
ecs_entity_t ecs_record_get_entity (const ecs_record_t *record)
 Get entity corresponding with record.
 
const void * ecs_record_get_id (const ecs_world_t *world, const ecs_record_t *record, ecs_id_t id)
 Get component from entity record.
 
void * ecs_record_ensure_id (ecs_world_t *world, ecs_record_t *record, ecs_id_t id)
 Same as ecs_record_get_id(), but returns a mutable pointer.
 
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.
 
void * ecs_emplace_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Emplace a component.
 
void ecs_modified_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Signal that a component has been modified.
 
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.
 
bool ecs_is_valid (const ecs_world_t *world, ecs_entity_t e)
 Test whether an entity is valid.
 
bool ecs_is_alive (const ecs_world_t *world, ecs_entity_t e)
 Test whether an entity is alive.
 
ecs_id_t ecs_strip_generation (ecs_entity_t e)
 Remove generation from entity id.
 
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.
 
void ecs_make_alive (ecs_world_t *world, ecs_entity_t entity)
 Ensure id is alive.
 
void ecs_make_alive_id (ecs_world_t *world, ecs_id_t id)
 Same as ecs_make_alive(), but for (component) ids.
 
bool ecs_exists (const ecs_world_t *world, ecs_entity_t entity)
 Test whether an entity exists.
 
const ecs_type_tecs_get_type (const ecs_world_t *world, ecs_entity_t entity)
 Get the type of an entity.
 
ecs_table_tecs_get_table (const ecs_world_t *world, ecs_entity_t entity)
 Get the table of an entity.
 
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.
 
char * ecs_entity_str (const ecs_world_t *world, ecs_entity_t entity)
 Convert entity to string.
 
bool ecs_has_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Test if an entity has an id.
 
bool ecs_owns_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Test if an entity owns an id.
 
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.
 
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.
 
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.
 
void ecs_flatten (ecs_world_t *world, ecs_id_t pair, const ecs_flatten_desc_t *desc)
 Recursively flatten relationship for target entity (experimental).
 
int32_t ecs_count_id (const ecs_world_t *world, ecs_id_t entity)
 Count entities that have the specified id.
 
const char * ecs_get_name (const ecs_world_t *world, ecs_entity_t entity)
 Get 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_set_name (ecs_world_t *world, ecs_entity_t entity, const char *name)
 Set the name of an entity.
 
ecs_entity_t ecs_set_symbol (ecs_world_t *world, ecs_entity_t entity, const char *symbol)
 Set the symbol of an entity.
 
void ecs_set_alias (ecs_world_t *world, ecs_entity_t entity, const char *alias)
 Set alias for entity.
 
ecs_entity_t ecs_lookup (const ecs_world_t *world, const char *path)
 Lookup an entity by it's path.
 
ecs_entity_t ecs_lookup_child (const ecs_world_t *world, ecs_entity_t parent, const char *name)
 Lookup a child entity by name.
 
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_lookup_symbol (const ecs_world_t *world, const char *symbol, bool lookup_as_path, bool recursive)
 Lookup an entity by its symbol name.
 
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.
 
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_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_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_set_scope (ecs_world_t *world, ecs_entity_t scope)
 Set the current scope.
 
ecs_entity_t ecs_get_scope (const ecs_world_t *world)
 Get the current scope.
 
const char * ecs_set_name_prefix (ecs_world_t *world, const char *prefix)
 Set a name prefix for newly created entities.
 
ecs_entity_tecs_set_lookup_path (ecs_world_t *world, const ecs_entity_t *lookup_path)
 Set search path for lookup operations.
 
ecs_entity_tecs_get_lookup_path (const ecs_world_t *world)
 Get current lookup path.
 
ecs_entity_t ecs_component_init (ecs_world_t *world, const ecs_component_desc_t *desc)
 Find or create a component.
 
const ecs_type_info_tecs_get_type_info (const ecs_world_t *world, ecs_id_t id)
 Get the type for an id.
 
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_hooks_tecs_get_hooks_id (ecs_world_t *world, ecs_entity_t id)
 Get hooks for component.
 
bool ecs_id_is_tag (const ecs_world_t *world, ecs_id_t id)
 Returns whether specified id a tag.
 
bool ecs_id_is_union (const ecs_world_t *world, ecs_id_t id)
 Return whether represents a union.
 
bool ecs_id_in_use (const ecs_world_t *world, ecs_id_t id)
 Returns whether specified id is in use.
 
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.
 
bool ecs_id_is_pair (ecs_id_t id)
 Utility to check if id is a pair.
 
bool ecs_id_is_wildcard (ecs_id_t id)
 Utility to check if id is a wildcard.
 
bool ecs_id_is_valid (const ecs_world_t *world, ecs_id_t id)
 Utility to check if id is valid.
 
ecs_flags32_t ecs_id_get_flags (const ecs_world_t *world, ecs_id_t id)
 Get flags associated with id.
 
const char * ecs_id_flag_str (ecs_id_t id_flags)
 Convert id flag to string.
 
char * ecs_id_str (const ecs_world_t *world, ecs_id_t id)
 Convert id to string.
 
void ecs_id_str_buf (const ecs_world_t *world, ecs_id_t id, ecs_strbuf_t *buf)
 Write id string to buffer.
 
ecs_iter_t ecs_term_iter (const ecs_world_t *world, ecs_term_t *term)
 Iterator for a single (component) id.
 
ecs_iter_t ecs_term_chain_iter (const ecs_iter_t *it, ecs_term_t *term)
 Return a chained term iterator.
 
bool ecs_term_next (ecs_iter_t *it)
 Progress a term iterator.
 
ecs_iter_t ecs_children (const ecs_world_t *world, ecs_entity_t parent)
 Iterator for a parent's children.
 
bool ecs_children_next (ecs_iter_t *it)
 Progress a children iterator.
 
bool ecs_term_id_is_set (const ecs_term_id_t *id)
 Test whether term id is set.
 
bool ecs_term_is_initialized (const ecs_term_t *term)
 Test whether a term is set.
 
bool ecs_term_match_this (const ecs_term_t *term)
 Is term matched on $this variable.
 
bool ecs_term_match_0 (const ecs_term_t *term)
 Is term matched on 0 source.
 
int ecs_term_finalize (const ecs_world_t *world, ecs_term_t *term)
 Finalize term.
 
ecs_term_t ecs_term_copy (const ecs_term_t *src)
 Copy resources of a term to another term.
 
ecs_term_t ecs_term_move (ecs_term_t *src)
 Move resources of a term to another term.
 
void ecs_term_fini (ecs_term_t *term)
 Free resources of term.
 
ecs_filter_tecs_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.
 
void ecs_filter_fini (ecs_filter_t *filter)
 Deinitialize filter.
 
int ecs_filter_finalize (const ecs_world_t *world, ecs_filter_t *filter)
 Finalize filter.
 
int32_t ecs_filter_find_this_var (const ecs_filter_t *filter)
 Find index for $this variable.
 
char * ecs_term_str (const ecs_world_t *world, const ecs_term_t *term)
 Convert term to string expression.
 
char * ecs_filter_str (const ecs_world_t *world, const ecs_filter_t *filter)
 Convert filter to string expression.
 
ecs_iter_t ecs_filter_iter (const ecs_world_t *world, const ecs_filter_t *filter)
 Return a filter iterator.
 
ecs_iter_t ecs_filter_chain_iter (const ecs_iter_t *it, const ecs_filter_t *filter)
 Return a chained filter iterator.
 
int32_t ecs_filter_pivot_term (const ecs_world_t *world, const ecs_filter_t *filter)
 Get pivot term for filter.
 
bool ecs_filter_next (ecs_iter_t *it)
 Iterate tables matched by filter.
 
bool ecs_filter_next_instanced (ecs_iter_t *it)
 Same as ecs_filter_next, but always instanced.
 
void ecs_filter_move (ecs_filter_t *dst, ecs_filter_t *src)
 Move resources of one filter to another.
 
void ecs_filter_copy (ecs_filter_t *dst, const ecs_filter_t *src)
 Copy resources of one filter to another.
 
ecs_query_tecs_query_init (ecs_world_t *world, const ecs_query_desc_t *desc)
 Create a query.
 
void ecs_query_fini (ecs_query_t *query)
 Destroy a query.
 
const ecs_filter_tecs_query_get_filter (const ecs_query_t *query)
 Get filter from a query.
 
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.
 
bool ecs_query_next_instanced (ecs_iter_t *iter)
 Same as ecs_query_next, but always instanced.
 
bool ecs_query_next_table (ecs_iter_t *iter)
 Fast alternative to ecs_query_next() that only returns matched tables.
 
int ecs_query_populate (ecs_iter_t *iter, bool when_changed)
 Populate iterator fields.
 
bool ecs_query_changed (ecs_query_t *query, const ecs_iter_t *it)
 Returns whether the query data changed since the last iteration.
 
void ecs_query_skip (ecs_iter_t *it)
 Skip a table while iterating.
 
void ecs_query_set_group (ecs_iter_t *it, uint64_t group_id)
 Set group to iterate for query iterator.
 
void * ecs_query_get_group_ctx (const ecs_query_t *query, uint64_t group_id)
 Get context of query group.
 
const ecs_query_group_info_tecs_query_get_group_info (const ecs_query_t *query, uint64_t group_id)
 Get information about query group.
 
bool ecs_query_orphaned (const ecs_query_t *query)
 Returns whether query is orphaned.
 
char * ecs_query_str (const ecs_query_t *query)
 Convert query to string.
 
int32_t ecs_query_table_count (const ecs_query_t *query)
 Returns number of tables query matched with.
 
int32_t ecs_query_empty_table_count (const ecs_query_t *query)
 Returns number of empty tables query matched with.
 
int32_t ecs_query_entity_count (const ecs_query_t *query)
 Returns number of entities query matched with.
 
void * ecs_query_get_ctx (const ecs_query_t *query)
 Get query ctx.
 
void * ecs_query_get_binding_ctx (const ecs_query_t *query)
 Get query binding ctx.
 
void ecs_emit (ecs_world_t *world, ecs_event_desc_t *desc)
 Send event.
 
void ecs_enqueue (ecs_world_t *world, ecs_event_desc_t *desc)
 
ecs_entity_t ecs_observer_init (ecs_world_t *world, const ecs_observer_desc_t *desc)
 Create observer.
 
bool ecs_observer_default_run_action (ecs_iter_t *it)
 Default run action for observer.
 
void * ecs_observer_get_ctx (const ecs_world_t *world, ecs_entity_t observer)
 Get observer ctx.
 
void * ecs_observer_get_binding_ctx (const ecs_world_t *world, ecs_entity_t observer)
 Get observer binding ctx.
 
const ecs_filter_tecs_observer_get_filter (const ecs_world_t *world, ecs_entity_t observer)
 Get observer query.
 
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.
 
bool ecs_iter_next (ecs_iter_t *it)
 Progress any iterator.
 
void ecs_iter_fini (ecs_iter_t *it)
 Cleanup iterator resources.
 
int32_t ecs_iter_count (ecs_iter_t *it)
 Count number of matched entities in query.
 
bool ecs_iter_is_true (ecs_iter_t *it)
 Test if iterator is true.
 
ecs_entity_t ecs_iter_first (ecs_iter_t *it)
 Get first matching entity from iterator.
 
void ecs_iter_set_var (ecs_iter_t *it, int32_t var_id, ecs_entity_t entity)
 Set value for iterator variable.
 
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.
 
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 entities in a table.
 
ecs_entity_t ecs_iter_get_var (ecs_iter_t *it, int32_t var_id)
 Get value of iterator variable as entity.
 
ecs_table_tecs_iter_get_var_as_table (ecs_iter_t *it, int32_t var_id)
 Get value of iterator variable as table.
 
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.
 
bool ecs_iter_var_is_constrained (ecs_iter_t *it, int32_t var_id)
 Returns whether variable is constrained.
 
char * ecs_iter_str (const ecs_iter_t *it)
 Convert iterator to string.
 
ecs_iter_t ecs_page_iter (const ecs_iter_t *it, int32_t offset, int32_t limit)
 Create a paged iterator.
 
bool ecs_page_next (ecs_iter_t *it)
 Progress a paged iterator.
 
ecs_iter_t ecs_worker_iter (const ecs_iter_t *it, int32_t index, int32_t count)
 Create a worker iterator.
 
bool ecs_worker_next (ecs_iter_t *it)
 Progress a worker iterator.
 
void * ecs_field_w_size (const ecs_iter_t *it, size_t size, int32_t index)
 Obtain data for a query field.
 
bool ecs_field_is_readonly (const ecs_iter_t *it, int32_t index)
 Test whether the field is readonly.
 
bool ecs_field_is_writeonly (const ecs_iter_t *it, int32_t index)
 Test whether the field is writeonly.
 
bool ecs_field_is_set (const ecs_iter_t *it, int32_t index)
 Test whether field is set.
 
ecs_id_t ecs_field_id (const ecs_iter_t *it, int32_t index)
 Return id matched for field.
 
int32_t ecs_field_column_index (const ecs_iter_t *it, int32_t index)
 Return index of matched table column.
 
ecs_entity_t ecs_field_src (const ecs_iter_t *it, int32_t index)
 Return field source.
 
size_t ecs_field_size (const ecs_iter_t *it, int32_t index)
 Return field type size.
 
bool ecs_field_is_self (const ecs_iter_t *it, int32_t index)
 Test whether the field is matched on self.
 
const ecs_type_tecs_table_get_type (const ecs_table_t *table)
 Get type for table.
 
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.
 
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.
 
int32_t ecs_table_column_count (const ecs_table_t *table)
 Return number of columns in table.
 
int32_t ecs_table_type_to_column_index (const ecs_table_t *table, int32_t index)
 Convert type index to column index.
 
int32_t ecs_table_column_to_type_index (const ecs_table_t *table, int32_t index)
 Convert column index to type index.
 
void * ecs_table_get_column (const ecs_table_t *table, int32_t index, int32_t offset)
 Get column from table by column index.
 
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.
 
size_t ecs_table_get_column_size (const ecs_table_t *table, int32_t index)
 Get column size from table.
 
int32_t ecs_table_count (const ecs_table_t *table)
 Returns the number of records in the table.
 
bool ecs_table_has_id (const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
 Test if table has id.
 
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.
 
ecs_table_tecs_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.
 
ecs_table_tecs_table_find (ecs_world_t *world, const ecs_id_t *ids, int32_t id_count)
 Find table from id array.
 
ecs_table_tecs_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.
 
void ecs_table_lock (ecs_world_t *world, ecs_table_t *table)
 Lock a table.
 
void ecs_table_unlock (ecs_world_t *world, ecs_table_t *table)
 Unlock a table.
 
bool ecs_table_has_flags (ecs_table_t *table, ecs_flags32_t flags)
 Test table for flags.
 
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.
 
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.
 
ecs_record_tecs_record_find (const ecs_world_t *world, ecs_entity_t entity)
 Find record for entity.
 
void * ecs_record_get_column (const ecs_record_t *r, int32_t column, size_t c_size)
 Get component pointer from column/record.
 
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.
 
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.
 
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.
 
int ecs_value_init (const ecs_world_t *world, ecs_entity_t type, void *ptr)
 Construct a value in existing storage.
 
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.
 
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_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_free (ecs_world_t *world, ecs_entity_t type, void *ptr)
 Destruct a value, free storage.
 
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_copy (const ecs_world_t *world, ecs_entity_t type, void *dst, const void *src)
 Copy 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.
 
int ecs_value_move (const ecs_world_t *world, ecs_entity_t type, void *dst, void *src)
 Move value.
 
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_move_ctor (const ecs_world_t *world, ecs_entity_t type, void *dst, void *src)
 Move construct value.
 

Variables

ecs_filter_t ECS_FILTER_INIT
 Use $this variable to initialize user-allocated filter object.
 
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_TOGGLE
 Adds bitset to storage which allows component to be enabled/disabled.
 
const ecs_id_t ECS_AND
 Include all components from entity to which AND is applied.
 
const ecs_entity_t FLECS_IDEcsComponentID_
 
const ecs_entity_t FLECS_IDEcsIdentifierID_
 
const ecs_entity_t FLECS_IDEcsIterableID_
 
const ecs_entity_t FLECS_IDEcsPolyID_
 
const ecs_entity_t EcsQuery
 
const ecs_entity_t EcsObserver
 
const ecs_entity_t EcsSystem
 
const ecs_entity_t FLECS_IDEcsTickSourceID_
 
const ecs_entity_t FLECS_IDEcsPipelineQueryID_
 
const ecs_entity_t FLECS_IDEcsTimerID_
 
const ecs_entity_t FLECS_IDEcsRateFilterID_
 
const ecs_entity_t EcsFlecs
 Root scope for builtin flecs entities.
 
const ecs_entity_t EcsFlecsCore
 Core module scope.
 
const ecs_entity_t EcsWorld
 Entity associated with world (used for "attaching" components to world)
 
const ecs_entity_t EcsWildcard
 Wildcard entity ("*").
 
const ecs_entity_t EcsAny
 Any entity ("_").
 
const ecs_entity_t EcsThis
 This entity.
 
const ecs_entity_t EcsVariable
 Variable entity ("$").
 
const ecs_entity_t EcsTransitive
 Marks a relationship as transitive.
 
const ecs_entity_t EcsReflexive
 Marks a relationship as reflexive.
 
const ecs_entity_t EcsFinal
 Ensures that entity/component cannot be used as target in IsA relationship.
 
const ecs_entity_t EcsDontInherit
 Ensures that component is never inherited from an IsA target.
 
const ecs_entity_t EcsAlwaysOverride
 Ensures a component is always overridden.
 
const ecs_entity_t EcsSymmetric
 Marks relationship as commutative.
 
const ecs_entity_t EcsExclusive
 Can be added to relationship to indicate that the relationship can only occur once on an entity.
 
const ecs_entity_t EcsAcyclic
 Marks a relationship as acyclic.
 
const ecs_entity_t EcsTraversable
 Marks a relationship as traversable.
 
const ecs_entity_t EcsWith
 Ensure that a component always is added together with another component.
 
const ecs_entity_t EcsOneOf
 Ensure that relationship target is child of specified entity.
 
const ecs_entity_t EcsTag
 Can be added to relationship to indicate that it should never hold data, even when it or the relationship target is a component.
 
const ecs_entity_t EcsTrait
 Can be added to components to indicate it is a trait.
 
const ecs_entity_t EcsRelationship
 Ensure that an entity is always used in pair as relationship.
 
const ecs_entity_t EcsTarget
 Ensure that an entity is always used in pair as target.
 
const ecs_entity_t EcsUnion
 Tag to indicate that relationship is stored as union.
 
const ecs_entity_t EcsName
 Tag to indicate name identifier.
 
const ecs_entity_t EcsSymbol
 Tag to indicate symbol identifier.
 
const ecs_entity_t EcsAlias
 Tag to indicate alias identifier.
 
const ecs_entity_t EcsChildOf
 Used to express parent-child relationships.
 
const ecs_entity_t EcsIsA
 Used to express inheritance relationships.
 
const ecs_entity_t EcsDependsOn
 Used to express dependency relationships.
 
const ecs_entity_t EcsSlotOf
 Used to express a slot (used with prefab inheritance)
 
const ecs_entity_t EcsModule
 Tag added to module entities.
 
const ecs_entity_t EcsPrivate
 Tag to indicate an entity/component/system is private to a module.
 
const ecs_entity_t EcsPrefab
 Tag added to prefab entities.
 
const ecs_entity_t EcsDisabled
 When this tag is added to an entity it is skipped by queries, unless EcsDisabled is explicitly queried for.
 
const ecs_entity_t EcsOnAdd
 Event that triggers when an id is added to an entity.
 
const ecs_entity_t EcsOnRemove
 Event that triggers when an id is removed from an entity.
 
const ecs_entity_t EcsOnSet
 Event that triggers when a component is set for an entity.
 
const ecs_entity_t EcsUnSet
 Event that triggers when a component is unset for an entity.
 
const ecs_entity_t EcsMonitor
 Event that triggers observer when an entity starts/stops matching a query.
 
const ecs_entity_t EcsOnTableCreate
 Event that triggers when a table is created.
 
const ecs_entity_t EcsOnTableDelete
 Event that triggers when a table is deleted.
 
const ecs_entity_t EcsOnTableEmpty
 Event that triggers when a table becomes empty (doesn't emit on creation).
 
const ecs_entity_t EcsOnTableFill
 Event that triggers when a table becomes non-empty.
 
const ecs_entity_t EcsOnDelete
 Relationship used for specifying cleanup behavior.
 
const ecs_entity_t EcsOnDeleteTarget
 Relationship used to define what should happen when a target entity (second element of a pair) is deleted.
 
const ecs_entity_t EcsRemove
 Remove cleanup policy.
 
const ecs_entity_t EcsDelete
 Delete cleanup policy.
 
const ecs_entity_t EcsPanic
 Panic cleanup policy.
 
const ecs_entity_t FLECS_IDEcsFlattenTargetID_
 Component that stores data for flattened relationships.
 
const ecs_entity_t EcsFlatten
 Tag added to root entity to indicate its subtree should be flattened.
 
const ecs_entity_t EcsDefaultChildComponent
 Used like (EcsDefaultChildComponent, Component).
 
const ecs_entity_t EcsPredEq
 
const ecs_entity_t EcsPredMatch
 
const ecs_entity_t EcsPredLookup
 
const ecs_entity_t EcsScopeOpen
 
const ecs_entity_t EcsScopeClose
 
const ecs_entity_t EcsEmpty
 Tag used to indicate query is empty.
 
const ecs_entity_t FLECS_IDEcsPipelineID_
 
const ecs_entity_t EcsOnStart
 
const ecs_entity_t EcsPreFrame
 
const ecs_entity_t EcsOnLoad
 
const ecs_entity_t EcsPostLoad
 
const ecs_entity_t EcsPreUpdate
 
const ecs_entity_t EcsOnUpdate
 
const ecs_entity_t EcsOnValidate
 
const ecs_entity_t EcsPostUpdate
 
const ecs_entity_t EcsPreStore
 
const ecs_entity_t EcsOnStore
 
const ecs_entity_t EcsPostFrame
 
const ecs_entity_t EcsPhase
 

Detailed Description

Flecs public API.

This file contains the public API for Flecs.

Definition in file flecs.h.