CG-Project2
Loading...
Searching...
No Matches
systems::ecs Namespace Reference

All utilities to manage the entities in the EntityManager. More...

Functions

bool removeEntityFromManager (const unsigned int &id)
 Removes an entity from the EntityManager, if the entity has children they will be removed too.
void removeEntityFromScene (const unsigned int &id)
 Removes the given entity from the BasicScene, if entity has children they will be removed too.
bool removeEntityFromAll (const unsigned int &id)
 Removes an entity from the EntityManager and from the BasicScene.
void cleanAll ()
 Clean the EntityManager from all entities and Components and from the BasicScene too.
std::string getEntityName (const unsigned int &id)
 Retrieves the name of the given entity.
void updateEntityName (const unsigned int &id, const std::string &name)
 Updates the name of the given entity.

Detailed Description

All utilities to manage the entities in the EntityManager.

See also
EntityManager

Function Documentation

◆ getEntityName()

std::string systems::ecs::getEntityName ( const unsigned int & id)

Retrieves the name of the given entity.

Parameters
idthe entity id
Returns
the name of the entity

◆ removeEntityFromAll()

bool systems::ecs::removeEntityFromAll ( const unsigned int & id)

Removes an entity from the EntityManager and from the BasicScene.

Parameters
idthe entity id
Returns
true if the entity is removed

◆ removeEntityFromManager()

bool systems::ecs::removeEntityFromManager ( const unsigned int & id)

Removes an entity from the EntityManager, if the entity has children they will be removed too.

Parameters
idthe entity id
Returns
true if the entity is removed

◆ removeEntityFromScene()

void systems::ecs::removeEntityFromScene ( const unsigned int & id)

Removes the given entity from the BasicScene, if entity has children they will be removed too.

Parameters
idthe entity id

◆ updateEntityName()

void systems::ecs::updateEntityName ( const unsigned int & id,
const std::string & name )

Updates the name of the given entity.

Parameters
idthe entity id
namethe entity new name