Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs::Children Struct Reference

Children list component. More...

#include <Hierarchy.hpp>

Public Member Functions

 Children ()=default
bool empty () const
 Check if entity has any children.
usize count () const
 Get number of children.
bool operator== (const Children &) const =default
 Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges).

Public Attributes

std::vector< Entity > entities
 List of child entity IDs.

Detailed Description

Children list component.

Stores references to all child entities. Maintained in sync with Parent components by the hierarchy management system.

Definition at line 66 of file Hierarchy.hpp.

Constructor & Destructor Documentation

◆ Children()

esengine::ecs::Children::Children ( )
default

References Children().

Referenced by Children(), and operator==().

Member Function Documentation

◆ count()

usize esengine::ecs::Children::count ( ) const
inlinenodiscard

Get number of children.

Returns
Child count

Definition at line 83 of file Hierarchy.hpp.

References entities.

◆ empty()

bool esengine::ecs::Children::empty ( ) const
inlinenodiscard

Check if entity has any children.

Returns
true if has children

Definition at line 77 of file Hierarchy.hpp.

References empty(), and entities.

Referenced by empty().

◆ operator==()

bool esengine::ecs::Children::operator== ( const Children & ) const
default

Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges).

References Children().

Member Data Documentation

◆ entities

std::vector<Entity> esengine::ecs::Children::entities

List of child entity IDs.

Definition at line 69 of file Hierarchy.hpp.

Referenced by childrenToJS(), count(), empty(), and esengine::ecs::syncHierarchyComponents().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/Hierarchy.hpp