class

HierarchyHelpers

Module
Components
Header
#include "Components/HierarchyHelpers.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
voidSetParentUnlinks from the old parent, links to the new one, refuses cycles.
voidRemoveParent
boolIsAncestorOf
voidGetChildrenImmediate children only.
voidForEachChildImmediate children.
voidForEachDescendantDepth-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