SpiecsEngine
 
Loading...
Searching...
No Matches

◆ ViewRoot()

template<typename F >
void Spices::World::ViewRoot ( F && fn)
inline

View all root in this world.

Parameters
fnView function.

Definition at line 329 of file World.h.

330 {
332
333 std::shared_lock<std::shared_mutex> lock(m_Mutex);
334
335 for (auto entity : m_RootEntityMap)
336 {
337 Entity e(entity.second, this);
338 fn(e);
339 }
340 }
#define SPICES_PROFILE_ZONE
friend class Entity
Definition World.h:262
std::shared_mutex m_Mutex
Mutex for world.
Definition World.h:245
std::unordered_map< UUID, entt::entity > m_RootEntityMap
This variable is a cache. @noto Not in use now.
Definition World.h:257