Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::ecs::vm::MatchingCtx Struct Reference

Public Attributes

const WorldpWorld
 World.
 
EntitySpan targetEntities
 Entities for which we run the VM. If empty, we run against all of them.
 
ArchetypeLookupView archetypeLookup
 entity -> archetypes lookup used to seed structural candidate archetypes
 
std::span< const Archetype * > allArchetypes
 Array of all archetypes in the world.
 
cnt::darr< const Archetype * > * pMatchesArr
 Array of already matches archetypes. Reset before each exec().
 
ArchetypeMatchStampspMatchesStampByArchetypeId
 Per-archetype stamp table for O(1) dedup in hot loops.
 
uint32_t matchesVersion
 Current dedup version used with pMatchesStampByArchetypeId.
 
QueryArchetypeCacheIndexMappLastMatchedArchetypeIdx_All
 Idx of the last matched archetype against the ALL opcode.
 
QueryArchetypeCacheIndexMappLastMatchedArchetypeIdx_Or
 Idx of the last matched archetype against the OR opcode.
 
QueryArchetypeCacheIndexMappLastMatchedArchetypeIdx_Not
 Idx of the last matched archetype against the NOT opcode.
 
QueryMask queryMask
 Mask for speeding up simple query matching.
 
uint32_t as_mask_0
 Mask for items with Is relationship pair. If the id is a pair, the first part (id) is written here.
 
uint32_t as_mask_1
 Mask for items with Is relationship pair. If the id is a pair, the second part (gen) is written here.
 
uint8_t flags
 Flags copied over from QueryCtx::Data.
 
cnt::sarray< Entity, MaxVarCnt > varBindings
 Runtime variable bindings (Var0..Var7) provided by the query.
 
uint8_t varBindingMask = 0
 Bitmask of bindings set in varBindings.
 
bool skipOr = false
 OR group was already satisfied by source terms.
 
Entity ent
 Entity to match.
 
EntitySpan idsToMatch
 List of entity ids in a query to consider.
 
uint32_t pc
 Current stack position (program counter)
 

The documentation for this struct was generated from the following file: