SpiecsEngine
Loading...
Searching...
No Matches
◆
ViewComponent()
[1/3]
template<typename T , typename F >
void Spices::World::ViewComponent
(
const std::vector< uint32_t > &
ranges
,
F &&
fn
)
View all component in this world in ranges.
Template Parameters
T
Component
.
Parameters
[in]
ranges
view ranges.
fn
View function.
Definition at line
293
of file
World.h
.
294
{
295
SPICES_PROFILE_ZONE
;
296
297
std::shared_lock<std::shared_mutex> lock(
m_Mutex
);
298
299
for
(
auto
range : ranges)
300
{
301
auto
e
=
static_cast<
entt::entity
>
(range);
302
auto
&
comp
=
m_Registry
.get<
T
>(
e
);
303
304
fn(e,
comp
);
305
}
306
}
SPICES_PROFILE_ZONE
#define SPICES_PROFILE_ZONE
Definition
TracyProfilerWrapper.h:100
Spices::World::m_Registry
entt::registry m_Registry
This variable handles all entity.
Definition
World.h:250
Spices::World::m_Mutex
std::shared_mutex m_Mutex
Mutex for world.
Definition
World.h:245
SpicesTest::VariableTraitsTestN::e
void * e
Definition
VariableTraits_test.h:36
Spices::Key::T
@ T
Definition
KeyCodes.h:65
Spices::ShaderStage::comp
@ comp
Spices
World
Generated on Sun Mar 8 2026 10:24:50 for SpiecsEngine by
1.10.0