SpiecsEngine
 
Loading...
Searching...
No Matches

◆ IterWorldComp()

template<typename T , typename F >
void Spices::Renderer::IterWorldComp ( FrameInfo & frameInfo,
F func )
inlineprotectedinherited

Iterator the specific Component in World.

Template Parameters
TThe specific Component class.
Parameters
[in]frameInfoThe current frame data.
[in]funcThe function pointer that need to execute during this function.

Iter use view, not group.

Attention
Group result nullptr here.

This function defined how we use these components.

Parameters
[in]eentityid.
[in]transCompTransformComponent.
[in]tCompTComponent.

Definition at line 2308 of file Renderer.h.

2309 {
2311
2316 frameInfo.m_World->ViewComponent<T>([&](auto e, auto& tComp) {
2317 auto& transComp = frameInfo.m_World->GetRegistry().get<TransformComponent>(e);
2318
2325 func(static_cast<int>(e), transComp, tComp);
2326
2327 return false;
2328 });
2329 }
#define SPICES_PROFILE_ZONE