MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / share

Method share

modules/engine/runtime/src/ecs/archetype.cpp:461–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461bool sugoi_group_t::share(sugoi_type_index_t t) const noexcept
462{
463 using namespace sugoi;
464 auto storage = archetype->storage;
465 for (EIndex i = 0; i < type.meta.length; ++i)
466 {
467 auto metaGroup = storage->entities.entries[e_id(type.meta.data[i])].chunk->group;
468 if (metaGroup->index(t) != kInvalidSIndex)
469 return true;
470 if (metaGroup->share(t))
471 return true;
472 }
473 return false;
474}
475
476bool sugoi_group_t::own(const sugoi_type_set_t& subtype) const noexcept
477{

Callers 2

sugoiG_has_componentsFunction · 0.80
sugoiG_share_componentsFunction · 0.80

Calls 2

ownMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected