SpiecsEngine
Loading...
Searching...
No Matches
◆
ViewComponent()
[3/3]
template<typename T , typename F >
void Spices::World::ViewComponent
(
F &&
fn
)
View all component in this world.
Template Parameters
T
Component
.
Parameters
fn
View function.
Definition at line
276
of file
World.h
.
277
{
278
SPICES_PROFILE_ZONE
;
279
280
std::shared_lock<std::shared_mutex> lock(
m_Mutex
);
281
282
auto
view =
m_Registry
.view<
T
>();
283
284
for
(
auto
e : view)
285
{
286
auto
&
comp
=
m_Registry
.get<
T
>(
e
);
287
288
if
(fn(e,
comp
))
break
;
289
}
290
}
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