entttree 0.1.0
Hierarchical entity management for EnTT
Loading...
Searching...
No Matches
entttree::ParentConnection< HTag > Struct Template Reference

ECS component storing an entity's parent and sibling position. More...

#include <hierarchy_types.h>

Public Member Functions

bool operator== (const ParentConnection &other) const =default
 

Public Attributes

entt::entity parent = entt::null
 Parent entity, or entt::null for roots.
 
Position position
 Sibling ordering key.
 

Detailed Description

template<typename HTag>
struct entttree::ParentConnection< HTag >

ECS component storing an entity's parent and sibling position.

This is the source of truth for parent-child relationships in a HierarchySystem. It lives on the child entity. The Position field determines the relative ordering among siblings.

Do not modify this component directly; use HierarchySystem's mutation API so that the internal children cache and signals stay consistent.

Template Parameters
HTagTag type identifying which hierarchy this connection belongs to.

Definition at line 35 of file hierarchy_types.h.

Member Data Documentation

◆ parent

template<typename HTag >
entt::entity entttree::ParentConnection< HTag >::parent = entt::null

Parent entity, or entt::null for roots.

Definition at line 36 of file hierarchy_types.h.

◆ position

Sibling ordering key.

Definition at line 37 of file hierarchy_types.h.


The documentation for this struct was generated from the following file: