class
HierarchyHelpers
- Module
- Components
- Header
#include "Components/HierarchyHelpers.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetParent | Unlinks from the old parent, links to the new one, refuses cycles. |
void | RemoveParent | |
bool | IsAncestorOf | |
void | GetChildren | Immediate children only. |
void | ForEachChild | Immediate children. |
void | ForEachDescendant | Depth-first over all descendants. |
Function details
SetParent
C++
static void SetParent(World* world, EntityID child, EntityID parent)Unlinks from the old parent, links to the new one, refuses cycles.
RemoveParent
C++
static void RemoveParent(World* world, EntityID child)IsAncestorOf
C++
static bool IsAncestorOf(World* world, EntityID ancestor, EntityID descendant)GetChildren
C++
static void GetChildren(World* world, EntityID parent, std::vector<EntityID>& out)Immediate children only.
ForEachChild
C++
template<typename Func> static void ForEachChild(World* world, EntityID parent, Func&& func)Immediate children. Func signature: void(EntityID childId)
ForEachDescendant
C++
template<typename Func> static void ForEachDescendant(World* world, EntityID entity, Func&& func)Depth-first over all descendants. Func signature: void(EntityID descendantId)
Generated from Components/HierarchyHelpers.h via components.json · Oct 26, 2026Version 1.0.0