---------------------- ComponentView::Init initialize references to all pointers
| 36 | // initialize references to all pointers |
| 37 | // |
| 38 | void 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 |