![]() |
Flecs v4.0
A fast entity component system (ECS) for C & C++
|
Macros | |
#define | EcsSingleton EcsVariable |
Shortcut as EcsVariable is typically used as source for singleton terms. | |
#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. | |
Variables | |
const ecs_entity_t | FLECS_IDEcsComponentID_ |
Component component id. | |
const ecs_entity_t | FLECS_IDEcsIdentifierID_ |
Identifier component id. | |
const ecs_entity_t | FLECS_IDEcsPolyID_ |
Poly component id. | |
const ecs_entity_t | FLECS_IDEcsDefaultChildComponentID_ |
DefaultChildComponent component id. | |
const ecs_entity_t | EcsQuery |
Tag added to queries. | |
const ecs_entity_t | EcsObserver |
Tag added to observers. | |
const ecs_entity_t | EcsSystem |
Tag added to systems. | |
const ecs_entity_t | FLECS_IDEcsTickSourceID_ |
TickSource component id. | |
const ecs_entity_t | FLECS_IDEcsPipelineQueryID_ |
Pipeline module component ids. | |
const ecs_entity_t | FLECS_IDEcsTimerID_ |
Timer component id. | |
const ecs_entity_t | FLECS_IDEcsRateFilterID_ |
RateFilter component id. | |
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 | EcsInheritable |
Mark component as inheritable. | |
const ecs_entity_t | EcsOnInstantiate |
Relationship that specifies component inheritance behavior. | |
const ecs_entity_t | EcsOverride |
Override component on instantiate. | |
const ecs_entity_t | EcsInherit |
Inherit component on instantiate. | |
const ecs_entity_t | EcsDontInherit |
Never inherit component on instantiate. | |
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 | EcsCanToggle |
Mark a component as toggleable with ecs_enable_id(). | |
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 | EcsPairIsTag |
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 | 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 | EcsNotQueryable |
Trait added to entities that should never be returned by queries. | |
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 | 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 | 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 | EcsSparse |
Mark component as sparse. | |
const ecs_entity_t | EcsUnion |
Mark relationship as union. | |
const ecs_entity_t | EcsPredEq |
Marker used to indicate $var == ... matching in queries. | |
const ecs_entity_t | EcsPredMatch |
Marker used to indicate $var == "name" matching in queries. | |
const ecs_entity_t | EcsPredLookup |
Marker used to indicate $var ~= "pattern" matching in queries. | |
const ecs_entity_t | EcsScopeOpen |
Marker used to indicate the start of a scope ({ ) in queries. | |
const ecs_entity_t | EcsScopeClose |
Marker used to indicate the end of a scope (} ) in queries. | |
const ecs_entity_t | EcsEmpty |
Tag used to indicate query is empty. | |
const ecs_entity_t | FLECS_IDEcsPipelineID_ |
Pipeline component id. | |
const ecs_entity_t | EcsOnStart |
OnStart pipeline phase. | |
const ecs_entity_t | EcsPreFrame |
PreFrame pipeline phase. | |
const ecs_entity_t | EcsOnLoad |
OnLoad pipeline phase. | |
const ecs_entity_t | EcsPostLoad |
PostLoad pipeline phase. | |
const ecs_entity_t | EcsPreUpdate |
PreUpdate pipeline phase. | |
const ecs_entity_t | EcsOnUpdate |
OnUpdate pipeline phase. | |
const ecs_entity_t | EcsOnValidate |
OnValidate pipeline phase. | |
const ecs_entity_t | EcsPostUpdate |
PostUpdate pipeline phase. | |
const ecs_entity_t | EcsPreStore |
PreStore pipeline phase. | |
const ecs_entity_t | EcsOnStore |
OnStore pipeline phase. | |
const ecs_entity_t | EcsPostFrame |
PostFrame pipeline phase. | |
const ecs_entity_t | EcsPhase |
Phase pipeline phase. | |
const ecs_entity_t | EcsConstant |
Tag added to enum/bitmask constants. | |
#define EcsFirstUserComponentId (8) |
#define EcsFirstUserEntityId (FLECS_HI_COMPONENT_ID + 128) |
Value used to quickly check if component is builtin.
This is used to quickly filter out tables with builtin components (for example for ecs_delete())
#define EcsSingleton EcsVariable |
|
extern |
Marks a relationship as acyclic.
Acyclic relationships may not form cycles.
|
extern |
Any entity ("_").
Matches any id, returns only the first.
|
extern |
Delete cleanup policy.
Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.
|
extern |
Never inherit component on instantiate.
This will not copy or share the component from the base entity (IsA target)
. When the component is added to an instance, its value will never be copied from the base entity.
|
extern |
Tag used to indicate query is empty.
This tag is removed automatically when a query becomes non-empty, and is not automatically re-added when it becomes empty.
|
extern |
Can be added to relationship to indicate that the relationship can only occur once on an entity.
Adding a 2nd instance will replace the 1st.
Behavior:
|
extern |
Ensures that entity/component cannot be used as target in IsA
relationship.
Final can improve the performance of queries as they will not attempt to substitute a final component with its subsets.
Behavior:
|
extern |
Inherit component on instantiate.
This will inherit (share) the component from the base entity (IsA target)
. The component can be manually overridden by adding it to the instance.
|
extern |
Mark component as inheritable.
This is the opposite of Final. This trait can be used to enforce that queries take into account component inheritance before inheritance (IsA) relationships are added with the component as target.
|
extern |
Trait added to entities that should never be returned by queries.
Reserved for internal entities that have special meaning to the query engine, such as EcsThis, EcsWildcard, EcsAny.
|
extern |
Ensure that relationship target is child of specified entity.
Behavior:
|
extern |
Override component on instantiate.
This will copy the component from the base entity (IsA target)
to the instance. The base component will never be inherited from the prefab.
|
extern |
Panic cleanup policy.
Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.
|
extern |
Tag added to prefab entities.
Any entity with this tag is automatically ignored by queries, unless EcsPrefab is explicitly queried for.
|
extern |
Marks a relationship as reflexive.
Behavior:
|
extern |
Ensure that an entity is always used in pair as relationship.
Behavior:
|
extern |
Remove cleanup policy.
Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.
|
extern |
Marks relationship as commutative.
Behavior:
|
extern |
Ensure that an entity is always used in pair as target.
Behavior:
|
extern |
This entity.
Default source for queries.
|
extern |
Can be added to components to indicate it is a trait.
Traits are components and/or tags that are added to other components to modify their behavior.
|
extern |
Marks a relationship as transitive.
Behavior:
|
extern |
Marks a relationship as traversable.
Traversable relationships may be traversed with "up" queries. Traversable relationships are acyclic.
|
extern |
Variable entity ("$").
Used in expressions to prefix variable names
|
extern |
Wildcard entity ("*").
Matches any id, returns all matches.
|
extern |
Ensure that a component always is added together with another component.
Behavior: