SpiecsEngine
 
Loading...
Searching...
No Matches

◆ IterWorldCompWithBreak()

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

Iterator the specific Component in World With break.

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.
Returns
Returns true if need break for for loop.

Definition at line 2332 of file Renderer.h.

2333 {
2335
2340 frameInfo.m_World->ViewComponent<T>([&](auto e, auto& tComp) {
2341 auto& transComp = frameInfo.m_World->GetRegistry().get<TransformComponent>(e);
2342
2350 return func(static_cast<int>(e), transComp, tComp);
2351 });
2352 }
#define SPICES_PROFILE_ZONE