MCPcopy Create free account
hub / github.com/Illation/ETEngine / Init

Method Init

Engine/source/EtFramework/ECS/ComponentView.cpp:38–55  ·  view source on GitHub ↗

---------------------- ComponentView::Init initialize references to all pointers

Source from the content-addressed store, hash-verified

36// initialize references to all pointers
37//
38void ComponentView::Init(BaseComponentRange* const range)
39{
40 m_Range = range;
41
42 // set the pointers to the position within the pool that the range starts from
43 for (Accessor& access : m_Accessors)
44 {
45 access.currentElement = static_cast<uint8*>(m_Range->m_Archetype->GetPool(access.typeIdx).At(m_Range->m_Offset));
46 }
47
48 // set the ecs controllers for accessors outside the current entity
49 for (EcsController const** controllerPtr : m_ControllerPtrs)
50 {
51 *controllerPtr = m_Range->m_Controller;
52 }
53
54 CalcParentPointers();
55}
56
57//----------------------
58// ComponentView::IsEnd

Callers

nothing calls this directly

Calls 1

AtMethod · 0.80

Tested by

no test coverage detected