SpiecsEngine
 
Loading...
Searching...
No Matches

◆ IterWorldCompWithRange() [1/2]

template<typename T , typename F >
void Spices::Renderer::IterWorldCompWithRange ( FrameInfo & frameInfo,
const std::vector< uint32_t > & ranges,
F func )
inlineprotectedinherited

Iterator the specific Component in World With range.

Template Parameters
TThe specific Component class.
Parameters
[in]frameInfoThe current frame data.
[in]rangesEntities View ranges.
[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 2355 of file Renderer.h.

2356 {
2358
2363 frameInfo.m_World->ViewComponent<T>(ranges, [&](auto e, auto& tComp) {
2364 auto& transComp = frameInfo.m_World->GetRegistry().get<TransformComponent>(e);
2365
2373 func(static_cast<int>(e), transComp, tComp);
2374
2375 return false;
2376 });
2377 }
#define SPICES_PROFILE_ZONE